178 act = menu.addAction(self.tr("&Properties..."), self.__edit) |
178 act = menu.addAction(self.tr("&Properties..."), self.__edit) |
179 act.setEnabled(idx.flags() & Qt.ItemIsEditable) |
179 act.setEnabled(idx.flags() & Qt.ItemIsEditable) |
180 if idx.isValid() and node.type() == BookmarkNode.Folder: |
180 if idx.isValid() and node.type() == BookmarkNode.Folder: |
181 menu.addSeparator() |
181 menu.addSeparator() |
182 menu.addAction(self.tr("New &Folder..."), self.__newFolder) |
182 menu.addAction(self.tr("New &Folder..."), self.__newFolder) |
183 menu.exec_(QCursor.pos()) |
183 menu.exec(QCursor.pos()) |
184 |
184 |
185 def __activated(self, idx): |
185 def __activated(self, idx): |
186 """ |
186 """ |
187 Private slot to handle the activation of an entry. |
187 Private slot to handle the activation of an entry. |
188 |
188 |
301 |
301 |
302 idx = self.bookmarksTree.currentIndex() |
302 idx = self.bookmarksTree.currentIndex() |
303 sourceIndex = self.__proxyModel.mapToSource(idx) |
303 sourceIndex = self.__proxyModel.mapToSource(idx) |
304 node = self.__bookmarksModel.node(sourceIndex) |
304 node = self.__bookmarksModel.node(sourceIndex) |
305 dlg = BookmarkPropertiesDialog(node) |
305 dlg = BookmarkPropertiesDialog(node) |
306 dlg.exec_() |
306 dlg.exec() |
307 |
307 |
308 def __newFolder(self): |
308 def __newFolder(self): |
309 """ |
309 """ |
310 Private slot to add a new bookmarks folder. |
310 Private slot to add a new bookmarks folder. |
311 """ |
311 """ |