eric6/WebBrowser/Bookmarks/BookmarksToolBar.py

changeset 7759
51aa6c6b66f7
parent 7628
f904d0eef264
child 7781
607a6098cb44
equal deleted inserted replaced
7758:dd54d33d21d2 7759:51aa6c6b66f7
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
265 """ 265 """
266 from .BookmarkPropertiesDialog import BookmarkPropertiesDialog 266 from .BookmarkPropertiesDialog import BookmarkPropertiesDialog
267 idx = self.index(act) 267 idx = self.index(act)
268 node = self.__bookmarksModel.node(idx) 268 node = self.__bookmarksModel.node(idx)
269 dlg = BookmarkPropertiesDialog(node) 269 dlg = BookmarkPropertiesDialog(node)
270 dlg.exec_() 270 dlg.exec()

eric ide

mercurial