Beispiel #1
0
    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)
Beispiel #2
0
 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)
Beispiel #3
0
 def run(self):
     from bookmarks.imple import BookmarksControllerImple
     imple = BookmarksControllerImple.get(self.ctx, self.command)
     imple.move_to_front()
Beispiel #4
0
 def run(self):
     from bookmarks.imple import BookmarksControllerImple
     imple = BookmarksControllerImple.get(self.ctx, self.command)
     imple.move_to_front()