def run(self): try: file_url, filter_name, title = self._get_title() except Exception as e: print(e) return # res, manager import bookmarks.manager from bookmarks.resource import CurrentStringResource res = CurrentStringResource.get(self.ctx) manager = bookmarks.manager.BookmarksManager.get( self.ctx, self.command, load_controller_name(self.ctx, self.command)) from bookmarks.imple import BookmarksControllerImple BookmarksControllerImple.lock(self.command) try: import bookmarks.dialogs bookmarks.dialogs.BookmarkThisDialog( self.ctx, res, manager=manager, command=self.command, file_url=file_url, name=title, filter_name=filter_name).execute() except Exception as e: print(e) traceback.print_exc() BookmarksControllerImple.unlock(self.command)
def run(self): try: file_url, filter_name, title = self._get_title() except Exception as e: print(e) return # res, manager import bookmarks.manager from bookmarks.resource import CurrentStringResource res = CurrentStringResource.get(self.ctx) manager = bookmarks.manager.BookmarksManager.get( self.ctx, self.command, load_controller_name(self.ctx, self.command) ) from bookmarks.imple import BookmarksControllerImple BookmarksControllerImple.lock(self.command) try: import bookmarks.dialogs bookmarks.dialogs.BookmarkThisDialog( self.ctx, res, manager=manager, command=self.command, file_url=file_url, name=title, filter_name=filter_name ).execute() except Exception as e: print(e) traceback.print_exc() BookmarksControllerImple.unlock(self.command)
def run(self): from bookmarks.imple import BookmarksControllerImple imple = BookmarksControllerImple.get(self.ctx, self.command) imple.move_to_front()