52 self.__manager = toolBarManager |
52 self.__manager = toolBarManager |
53 self.__toolbarItems = {} # maps toolbar item IDs to toolbar items |
53 self.__toolbarItems = {} # maps toolbar item IDs to toolbar items |
54 self.__currentToolBarItem = None |
54 self.__currentToolBarItem = None |
55 self.__removedToolBarIDs = [] # remember custom toolbars to be deleted |
55 self.__removedToolBarIDs = [] # remember custom toolbars to be deleted |
56 |
56 |
57 self.__widgetActionToToolBarItemID = {} # maps widget action IDs to toolbar item IDs |
57 self.__widgetActionToToolBarItemID = {} # maps widget action IDs to toolbar item IDs |
58 self.__toolBarItemToWidgetActionID = {} # maps toolbar item IDs to widget action IDs |
58 self.__toolBarItemToWidgetActionID = {} # maps toolbar item IDs to widget action IDs |
59 |
59 |
60 self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow.png")) |
60 self.upButton.setIcon(UI.PixmapCache.getIcon("1uparrow.png")) |
61 self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow.png")) |
61 self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow.png")) |
62 self.leftButton.setIcon(UI.PixmapCache.getIcon("1leftarrow.png")) |
62 self.leftButton.setIcon(UI.PixmapCache.getIcon("1leftarrow.png")) |
404 if actionID is None: |
404 if actionID is None: |
405 actions.append(None) |
405 actions.append(None) |
406 else: |
406 else: |
407 action = self.__manager.actionById(actionID) |
407 action = self.__manager.actionById(actionID) |
408 if action is None: |
408 if action is None: |
409 raise RuntimeError("No such action, id: 0x%x" % actionID) |
409 raise RuntimeError("No such action, id: 0x{0:x}".format(actionID)) |
410 actions.append(action) |
410 actions.append(action) |
411 self.__manager.setToolBar(tb, actions) |
411 self.__manager.setToolBar(tb, actions) |
412 tbItem.isChanged = False |
412 tbItem.isChanged = False |
413 |
413 |
414 def __restoreCurrentToolbar(self, actions): |
414 def __restoreCurrentToolbar(self, actions): |