113 menu.addSeparator() |
113 menu.addSeparator() |
114 |
114 |
115 menu.addAction(self.tr("Add Bookmark..."), self.__newBookmark) |
115 menu.addAction(self.tr("Add Bookmark..."), self.__newBookmark) |
116 menu.addAction(self.tr("Add Folder..."), self.__newFolder) |
116 menu.addAction(self.tr("Add Folder..."), self.__newFolder) |
117 |
117 |
118 menu.exec_(QCursor.pos()) |
118 menu.exec(QCursor.pos()) |
119 |
119 |
120 def __updateVisitCount(self, idx): |
120 def __updateVisitCount(self, idx): |
121 """ |
121 """ |
122 Private method to update the visit count of a bookmark. |
122 Private method to update the visit count of a bookmark. |
123 |
123 |
229 Private slot to add a new bookmark. |
229 Private slot to add a new bookmark. |
230 """ |
230 """ |
231 from .AddBookmarkDialog import AddBookmarkDialog |
231 from .AddBookmarkDialog import AddBookmarkDialog |
232 dlg = AddBookmarkDialog() |
232 dlg = AddBookmarkDialog() |
233 dlg.setCurrentIndex(self.rootIndex()) |
233 dlg.setCurrentIndex(self.rootIndex()) |
234 dlg.exec_() |
234 dlg.exec() |
235 |
235 |
236 def __newFolder(self): |
236 def __newFolder(self): |
237 """ |
237 """ |
238 Private slot to add a new bookmarks folder. |
238 Private slot to add a new bookmarks folder. |
239 """ |
239 """ |
240 from .AddBookmarkDialog import AddBookmarkDialog |
240 from .AddBookmarkDialog import AddBookmarkDialog |
241 dlg = AddBookmarkDialog() |
241 dlg = AddBookmarkDialog() |
242 dlg.setCurrentIndex(self.rootIndex()) |
242 dlg.setCurrentIndex(self.rootIndex()) |
243 dlg.setFolder(True) |
243 dlg.setFolder(True) |
244 dlg.exec_() |
244 dlg.exec() |
245 |
245 |
246 def _createMenu(self): |
246 def _createMenu(self): |
247 """ |
247 """ |
248 Protected method to create the menu for a tool bar action. |
248 Protected method to create the menu for a tool bar action. |
249 |
249 |