def initialize(self): # Gtk Bookmarks -- if not hasattr(self, 'watcher'): self.watcher = FileWatcher() self.watcher.connect( 'changed', lambda watcher, f: self._scan_bookmarks_files()) self.watcher.add(GTK_BOOKMARKS_FILE) self._scan_bookmarks_files()
def initialize(self): global favicon_cache if favicon_cache == None: favicon_cache = EpiphanyFaviconCacheParser().get_cache() if not hasattr(self, 'watcher'): self.watcher = FileWatcher() self.watcher.connect('changed', lambda watcher, f: self.watch_callback()) self.watcher.add(self.watched_file)
def initialize(self): if not hasattr(self, 'watcher'): self.watcher = FileWatcher() self.watcher.connect('changed', lambda watcher, f: self._parse_bookmarks()) # We do some gym to get the effectively parsed files parsed_file = self._parse_bookmarks() if parsed_file != None: self.watcher.add(parsed_file)