--- a/Helpviewer/Bookmarks/BookmarksMenu.py Wed Oct 09 19:47:41 2013 +0200 +++ b/Helpviewer/Bookmarks/BookmarksMenu.py Thu Oct 10 18:35:45 2013 +0200 @@ -20,8 +20,8 @@ """ Class implementing the bookmarks menu base class. - @signal openUrl(QUrl, str) emitted to open a URL with the given title in the - current tab + @signal openUrl(QUrl, str) emitted to open a URL with the given title in + the current tab @signal newUrl(QUrl, str) emitted to open a URL with the given title in a new tab """ @@ -134,18 +134,22 @@ menu = QMenu() v = act.data() - menuAction = menu.addAction(self.trUtf8("&Open"), self.__openBookmark) + menuAction = menu.addAction( + self.trUtf8("&Open"), self.__openBookmark) menuAction.setData(v) - menuAction = menu.addAction(self.trUtf8("Open in New &Tab\tCtrl+LMB"), + menuAction = menu.addAction( + self.trUtf8("Open in New &Tab\tCtrl+LMB"), self.__openBookmarkInNewTab) menuAction.setData(v) menu.addSeparator() - menuAction = menu.addAction(self.trUtf8("&Remove"), self.__removeBookmark) + menuAction = menu.addAction( + self.trUtf8("&Remove"), self.__removeBookmark) menuAction.setData(v) menu.addSeparator() - menuAction = menu.addAction(self.trUtf8("&Properties..."), self.__edit) + menuAction = menu.addAction( + self.trUtf8("&Properties..."), self.__edit) menuAction.setData(v) execAct = menu.exec_(QCursor.pos()) @@ -194,15 +198,15 @@ dlg = BookmarkPropertiesDialog(node) dlg.exec_() -########################################################################################## +############################################################################## class BookmarksMenuBarMenu(BookmarksMenu): """ Class implementing a dynamically populated menu for bookmarks. - @signal openUrl(QUrl, str) emitted to open a URL with the given title in the - current tab + @signal openUrl(QUrl, str) emitted to open a URL with the given title in + the current tab """ openUrl = pyqtSignal(QUrl, str) @@ -225,7 +229,8 @@ """ import Helpviewer.HelpWindow - self.__bookmarksManager = Helpviewer.HelpWindow.HelpWindow.bookmarksManager() + self.__bookmarksManager = Helpviewer.HelpWindow.HelpWindow\ + .bookmarksManager() self.setModel(self.__bookmarksManager.bookmarksModel()) self.setRootIndex(self.__bookmarksManager.bookmarksModel()\ .nodeIndex(self.__bookmarksManager.menu())) @@ -279,7 +284,8 @@ def setInitialActions(self, actions): """ - Public method to set the list of actions that should appear first in the menu. + Public method to set the list of actions that should appear first in + the menu. @param actions list of initial actions (list of QAction) """