Exemplo n.º 1
0
 def __init__(self, parameters):
     """
     See GenericBackend for an explanation of this function.
     Re-loads the saved state of the synchronization
     """
     super().__init__(parameters)
     # loading the saved state of the synchronization, if any
     self.data_path = os.path.join('mantis', 'sync_engine-' + self.get_id())
     self.sync_engine = self._load_pickled_file(self.data_path,
                                                SyncEngine())
Exemplo n.º 2
0
 def __init__(self, parameters):
     """
     See GenericBackend for an explanation of this function.
     Loads the saved state of the sync, if any
     """
     super().__init__(parameters)
     # loading the saved state of the synchronization, if any
     self.sync_engine_path = os.path.join('evolution',
                                          'sync_engine-' + self.get_id())
     self.sync_engine = self._load_pickled_file(self.sync_engine_path,
                                                SyncEngine())
     # sets up the connection to the evolution api
     task_personal = evolution.ecal.list_task_sources()[0][1]
     self._evolution_tasks = evolution.ecal.open_calendar_source(
         task_personal, evolution.ecal.CAL_SOURCE_TYPE_TODO)
Exemplo n.º 3
0
 def __init__(self, parameters):
     """
     See GenericBackend for an explanation of this function.
     Loads the saved state of the sync, if any
     """
     super().__init__(parameters)
     # loading the saved state of the synchronization, if any
     self.sync_engine_path = os.path.join('rtm',
                                          'sync_engine-' + self.get_id())
     self.sync_engine = self._load_pickled_file(self.sync_engine_path,
                                                SyncEngine())
     # reloading the oauth authentication token, if any
     self.token_path = os.path.join('rtm', 'auth_token-' + self.get_id())
     self.token = self._load_pickled_file(self.token_path, None)
     self.enqueued_start_get_task = False
     self.login_event = threading.Event()
     self._this_is_the_first_loop = True
Exemplo n.º 4
0
    def __init__(self, parameters):
        """
        See GenericBackend for an explanation of this function.
        """
        super().__init__(parameters)
        # loading the saved state of the synchronization, if any
        self.data_path = os.path.join('tomboy', 'sync_engine-' + self.get_id())
        self.sync_engine = self._load_pickled_file(self.data_path,
                                                   SyncEngine())
        # we let some time pass before considering a tomboy task for importing,
        # as the user may still be editing it. Here, we store the Timer objects
        # that will execute after some time after each tomboy signal.
        # NOTE: I'm not sure if this is the case anymore (but it shouldn't hurt
        #      anyway). (invernizzi)
        self._tomboy_setting_timers = {}

        # We need to tell dbus-glib to initialize libdbus' thread locks.
        # Removing this call will result in random segfaults and crashes
        # on enabling GNote and Tomboy (Bug #1264684) - parinporecha
        dbus.mainloop.glib.threads_init()