示例#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)
示例#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)
示例#3
0
    def __init__(self, ctx, args):
        self.ctx = ctx
        self._res = None
        self.commands = None
        self.manager = None
        self.sub_popups = {}
        if self.__class__.POPUP_NAMES is None:
            self.__class__.POPUP_NAMES = get_popup_names(self.ctx)
        self.controllers = {}
        self.command = None
        self.frame = None
        self.menu = None
        self.last_checked = 0

        from bookmarks.resource import CurrentStringResource
        self.res = CurrentStringResource.get(ctx)
        self._label_open_all = self.res.get("Open ~All")
 def __init__(self, ctx, args):
     self.ctx = ctx
     self._res = None
     self.commands = None
     self.manager = None
     self.sub_popups = {}
     if self.__class__.POPUP_NAMES is None:
         self.__class__.POPUP_NAMES = get_popup_names(self.ctx)
     self.controllers = {}
     self.command = None
     self.frame = None
     self.menu = None
     self.last_checked = 0
     
     from bookmarks.resource import CurrentStringResource
     self.res = CurrentStringResource.get(ctx)
     self._label_open_all = self.res.get("Open ~All")
示例#5
0
    def __init__(self, ctx, args):
        import bookmarks.command
        self.ctx = ctx
        self.base_url = None
        self.filter = None
        self.update = self.RELOAD
        self.last_read = 0
        self.hidden = False
        self.executor = bookmarks.command.DispatchExecutor(self.ctx)
        self.valid = False
        self.initialize(args)
        sfa = self.create_service("com.sun.star.ucb.SimpleFileAccess")
        if sfa.exists(self.base_url) and sfa.isFolder(self.base_url):
            self.sfa = sfa
            self.valid = True

        from bookmarks.resource import CurrentStringResource
        res = CurrentStringResource.get(ctx)
        self._label_open_all = res.get("Open ~All")
示例#6
0
    def __init__(self, ctx, args):
        import bookmarks.command

        self.ctx = ctx
        self.base_url = None
        self.filter = None
        self.update = self.RELOAD
        self.last_read = 0
        self.hidden = False
        self.executor = bookmarks.command.DispatchExecutor(self.ctx)
        self.valid = False
        self.initialize(args)
        sfa = self.create_service("com.sun.star.ucb.SimpleFileAccess")
        if sfa.exists(self.base_url) and sfa.isFolder(self.base_url):
            self.sfa = sfa
            self.valid = True

        from bookmarks.resource import CurrentStringResource

        res = CurrentStringResource.get(ctx)
        self._label_open_all = res.get("Open ~All")