Exemple #1
0
 def triggered(self, _action):
     try:
         if _action.objectName() == "Edit Bookmarks":
             getMainWindow().FileManager.bookmarks.makeRefresh()
             getMainWindow().FileManager.bookmarks.show()
             return
         for info in BookmarksOfDirectories.fetchAll():
             if info[1] == str(_action.objectName()):
                 if fu.isDir(str(info[2])):
                     getMainWindow().FileManager.goTo(str(info[2]))
                     return
                 else:
                     answer = Dialogs.ask(
                         translate("BookmarksMenu", "Cannot Find Folder"),
                         str(
                             translate(
                                 "BookmarksMenu",
                                 "\"%s\" cannot be found.<br>Delete this folder from the bookmarks?"
                             )) % Organizer.getLink(info[1]))
                     if answer == Dialogs.Yes:
                         BookmarksOfDirectories.delete(str(info[0]))
                         self.makeRefresh()
                         getMainWindow().FileManager.bookmarks.makeRefresh()
         getMainWindow().FileManager.makeRefreshOnlyFileList()
         getMainWindow().FileManager.makeRefreshOnlyFileListByTree()
     except:
         ReportBug.ReportBug()
 def deleteBookmark(self):
     try:
         if self.cbBookmarks.currentIndex() != -1:
             info = BookmarksOfDirectories.fetchAll()[self.cbBookmarks.currentIndex()]
             BookmarksOfDirectories.delete(str(info[0]))
             self.makeRefresh()
             getMainWindow().FileManager.bookmarksMenu.makeRefresh()
     except:
         ReportBug.ReportBug()
Exemple #3
0
 def deleteBookmark(self):
     try:
         if self.cbBookmarks.currentIndex() != -1:
             info = BookmarksOfDirectories.fetchAll()[
                 self.cbBookmarks.currentIndex()]
             BookmarksOfDirectories.delete(str(info[0]))
             self.makeRefresh()
             getMainWindow().FileManager.bookmarksMenu.makeRefresh()
     except:
         ReportBug.ReportBug()
 def triggered(self, _action):
     try:
         if _action.objectName() == "Edit Bookmarks":
             getMainWindow().FileManager.bookmarks.makeRefresh()
             getMainWindow().FileManager.bookmarks.show()
             return
         for info in BookmarksOfDirectories.fetchAll():
             if info[1] == str(_action.objectName()):
                 if fu.isDir(str(info[2])):
                     getMainWindow().FileManager.goTo(str(info[2]))
                     return
                 else:
                     answer = Dialogs.ask(translate("BookmarksMenu", "Cannot Find Folder"),
                                 str(translate("BookmarksMenu",
                                     "\"%s\" cannot be found.<br>Delete this folder from the bookmarks?")) %
                                 Organizer.getLink(info[1]))
                     if answer == Dialogs.Yes:
                         BookmarksOfDirectories.delete(str(info[0]))
                         self.makeRefresh()
                         getMainWindow().FileManager.bookmarks.makeRefresh()
         getMainWindow().FileManager.makeRefreshOnlyFileList()
         getMainWindow().FileManager.makeRefreshOnlyFileListByTree()
     except:
         ReportBug.ReportBug()