|
15 | 15 | __copyright__ = '(c) 2025 Ilya Razmanov' |
16 | 16 | __credits__ = 'Ilya Razmanov' |
17 | 17 | __license__ = 'unlicense' |
18 | | -__version__ = '2.21.2.2' |
| 18 | +__version__ = '2.21.12.21' |
19 | 19 | __maintainer__ = 'Ilya Razmanov' |
20 | 20 | __email__ = 'ilyarazmanov@gmail.com' |
21 | 21 | __status__ = 'Production' |
@@ -93,7 +93,7 @@ def GetSource(event=None) -> None: |
93 | 93 |
|
94 | 94 | # ↓ Trying to receive file name from command line, if None, opening GUI |
95 | 95 | if filename_from_command is None: |
96 | | - sourcefilename = askopenfilename(title='Open PPM/PGM file to view', filetypes=[('Portable network map', '.ppm .pgm .pbm')]) |
| 96 | + sourcefilename = askopenfilename(title='Open PPM/PGM file to view', filetypes=[('Portable any map', '.ppm .pgm .pbm .pnm')]) |
97 | 97 | if sourcefilename == '': |
98 | 98 | return |
99 | 99 | else: |
@@ -160,7 +160,7 @@ def GetSource(event=None) -> None: |
160 | 160 | label_zoom.config(text=zoom_show[zoom_factor]) |
161 | 161 | # ↓ enabling "Save as..." |
162 | 162 | menu01.entryconfig('Save binary PNM...', state='normal') # Instead of name numbers from 0 may be used |
163 | | - menu01.entryconfig('Save ascii PNM...', state='normal') |
| 163 | + menu01.entryconfig('Save ASCII PNM...', state='normal') |
164 | 164 | menu01.entryconfig('Info', state='normal') |
165 | 165 | UINormal() |
166 | 166 | sortir.geometry(f'+{(sortir.winfo_screenwidth() - sortir.winfo_width()) // 2}+{(sortir.winfo_screenheight() - sortir.winfo_height()) // 2 - 32}') |
@@ -259,7 +259,7 @@ def zoomWheel(event) -> None: |
259 | 259 | menu01.add_command(label='Open...', state='normal', accelerator='Ctrl+O', command=GetSource) |
260 | 260 | menu01.add_separator() |
261 | 261 | menu01.add_command(label='Save binary PNM...', state='disabled', command=lambda: SaveAsPNM(bin=True)) |
262 | | -menu01.add_command(label='Save ascii PNM...', state='disabled', command=lambda: SaveAsPNM(bin=False)) |
| 262 | +menu01.add_command(label='Save ASCII PNM...', state='disabled', command=lambda: SaveAsPNM(bin=False)) |
263 | 263 | menu01.add_separator() |
264 | 264 | menu01.add_command(label='Info', accelerator='Ctrl+I', state='disabled', command=ShowInfo) |
265 | 265 | menu01.add_separator() |
@@ -306,7 +306,7 @@ def zoomWheel(event) -> None: |
306 | 306 | # ↓ Command line part |
307 | 307 | if len(argv) == 2: |
308 | 308 | try_to_open = argv[1] |
309 | | - if Path(try_to_open).exists() and Path(try_to_open).is_file() and (Path(try_to_open).suffix in ('.ppm', '.pgm', '.pbm')): |
| 309 | + if Path(try_to_open).exists() and Path(try_to_open).is_file() and (Path(try_to_open).suffix in ('.ppm', '.pgm', '.pbm', '.pnm')): |
310 | 310 | filename_from_command = str(Path(try_to_open).resolve()) |
311 | 311 | GetSource() |
312 | 312 | else: |
|
0 commit comments