Example #1
0
 def _account_operation(self, fn):
     if account.Account().is_logged_in():
         fn()
     else:
         helper.show_error_dialog([
             'Failed to access account bookmarks.  Please login if you have not already.'
         ])
Example #2
0
 def show_bookmark_list(self):
     if account.Account().is_logged_in():
         from resources.lib.list_types.bookmarklist import BookmarkList
         self._show_list(BookmarkList())
     else:
         helper.show_error_dialog([
             'Failed to access account bookmarks.  Please login if you have not already.'
         ])
Example #3
0
 def account_login_logout(self):
     account.Account().log_in_or_out()
Example #4
0
 def toggle_bookmark(self):
     self._account_operation(account.Account().toggle_bookmark)
Example #5
0
 def remove_bookmark(self):
     self._account_operation(account.Account().remove_bookmark)
Example #6
0
 def add_bookmark(self):
     self._account_operation(account.Account().add_bookmark)