Skip to content

Commit 97bfb57

Browse files
committed
Extension list extension
1 parent a3c6ba6 commit 97bfb57

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

viewer.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
__copyright__ = '(c) 2025 Ilya Razmanov'
1616
__credits__ = 'Ilya Razmanov'
1717
__license__ = 'unlicense'
18-
__version__ = '2.21.2.2'
18+
__version__ = '2.21.12.21'
1919
__maintainer__ = 'Ilya Razmanov'
2020
__email__ = 'ilyarazmanov@gmail.com'
2121
__status__ = 'Production'
@@ -93,7 +93,7 @@ def GetSource(event=None) -> None:
9393

9494
# ↓ Trying to receive file name from command line, if None, opening GUI
9595
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')])
9797
if sourcefilename == '':
9898
return
9999
else:
@@ -160,7 +160,7 @@ def GetSource(event=None) -> None:
160160
label_zoom.config(text=zoom_show[zoom_factor])
161161
# ↓ enabling "Save as..."
162162
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')
164164
menu01.entryconfig('Info', state='normal')
165165
UINormal()
166166
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:
259259
menu01.add_command(label='Open...', state='normal', accelerator='Ctrl+O', command=GetSource)
260260
menu01.add_separator()
261261
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))
263263
menu01.add_separator()
264264
menu01.add_command(label='Info', accelerator='Ctrl+I', state='disabled', command=ShowInfo)
265265
menu01.add_separator()
@@ -306,7 +306,7 @@ def zoomWheel(event) -> None:
306306
# ↓ Command line part
307307
if len(argv) == 2:
308308
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')):
310310
filename_from_command = str(Path(try_to_open).resolve())
311311
GetSource()
312312
else:

0 commit comments

Comments
 (0)