@@ -145,17 +145,17 @@ def _main_():
145145 output_path = tk .StringVar (window , '' )
146146
147147 icon_types = []
148- icon_types .append (('icon' , 'App Icon' ))
149- icon_types .append (('launch' ,
150- 'App Lauch Image' ))
151148 icon_types .append (('image' , 'Icon' ))
152- icon_types .append (('favicon ' , 'Favicon ' ))
149+ icon_types .append (('tab ' , 'Tabbar Icon ' ))
153150 icon_types .append (('toolbar' ,
154151 'Toolbar Icon' ))
155- icon_types .append (('tab' , 'Tabbar Icon' ))
152+ icon_types .append (('icon' , 'App Icon' ))
153+ icon_types .append (('launch' ,
154+ 'App Lauch Image' ))
156155 icon_types .append (('notification' ,
157156 'Notification Icon' ))
158- icon_type = tk .StringVar (window , 'icon' )
157+ icon_types .append (('favicon' , 'Favicon' ))
158+ icon_type = tk .StringVar (window , 'image' )
159159 device_type = tk .StringVar (window , 'device' )
160160
161161 baseline = tk .IntVar (window , 3 , 'baseline' )
@@ -296,19 +296,23 @@ def on_select_icon(event):
296296 return
297297 window .is_picking_file = True
298298 if hasattr (event , 'data' ):
299- icon_path = event .data .split ()[0 ]
300- _ , ext = os .path .splitext (icon_path )
301- if ext .lower () not in ['.png' , '.jpg' , '.jpeg' , '.bmp' ]:
302- return
299+ icon_paths = []
300+ input_icon_paths = event .data .split ()
301+ for icon_path in input_icon_paths :
302+ _ , ext = os .path .splitext (icon_path )
303+ if ext .lower () not in ['.png' , '.jpg' , '.jpeg' , '.bmp' ]:
304+ continue
305+ icon_paths .append (icon_path )
303306 else :
304- icon_path = filedialog .\
307+ icon_paths = filedialog .\
305308 askopenfilename (title = 'Select your icon' ,
309+ multiple = True ,
306310 filetypes = [('Images' , '.png .jpg .jpeg .bmp' )])
307- if icon_path :
311+ for icon_path in icon_paths :
308312 try :
309313 image = Image .open (icon_path )
310314 except Exception :
311- return
315+ continue
312316
313317 image_name , _ = os .path .splitext (os .path .basename (icon_path ))
314318 if output_path .get ():
0 commit comments