Commits

Anonymous committed 9287c2e

cmenu: assume the specifed icons are always there

Comments (0)

Files changed (1)

tortoise/contextmenu.py

 
                 if menu_info.icon:
                     icon_path = get_icon_path("tortoise", menu_info.icon)
-                    if icon_path:
-                        opt['hbmpChecked'] = opt['hbmpUnchecked'] = \
-                                icon_to_bitmap(icon_path, type="MENUCHECK")
+                    opt['hbmpChecked'] = opt['hbmpUnchecked'] = \
+                            icon_to_bitmap(icon_path, type="MENUCHECK")
                 
                 item, _ = win32gui_struct.PackMENUITEMINFO(**opt)
                 win32gui.InsertMenuItem(menu, idCmdFirst + idCmd, True, item)
 
                 if menu_info.icon:
                     icon_path = get_icon_path("tortoise", menu_info.icon)
-                    if icon_path:
-                        opt['hbmpChecked'] = opt['hbmpUnchecked'] = \
-                                icon_to_bitmap(icon_path, type="MENUCHECK")
+                    opt['hbmpChecked'] = opt['hbmpUnchecked'] = \
+                            icon_to_bitmap(icon_path, type="MENUCHECK")
                 
                 item, _ = win32gui_struct.PackMENUITEMINFO(**opt)
                 win32gui.InsertMenuItem(menu, idCmdFirst+idCmd, True, item)