コード例 #1
0
    def __file_load(self, filename, password=None):

        if not filename:
            logger.debug("no revelation database provided")
            return False

        if dialog.present_unique(dialog.PasswordOpen):
            logger.debug('password dialog already opened')
            return False

        entrystore = self.datafile.load(
            filename,
            password,
            lambda: dialog.run_unique(
                dialog.PasswordOpen,
                None,
                os.path.basename(filename)
            )
        )

        self.entrystore.clear()
        self.entrystore.import_entry(entrystore, None)

        menu = self.__generate_entrymenu(self.entrystore)
        self.database_item.set_submenu(menu)
        self.database_item.set_sensitive(True)

        self.menu.show_all()

        self.locktimer.start(self.config.get("autolock_timeout") * 60)

        self.__close_popups()

        return True
コード例 #2
0
	def __file_load(self, file, password = None):
		"Loads a data file"

		if file in ( "", None ):
			return False

		if dialog.present_unique(dialog.PasswordOpen) == True:
			return False

		entrystore = self.datafile.load(file, password, lambda: dialog.run_unique(dialog.PasswordOpen, None, os.path.basename(file)))

		self.entrystore.clear()
		self.entrystore.import_entry(entrystore, None)

		self.entrymenu = self.__generate_entrymenu(self.entrystore)
		self.locktimer.start(self.config.get("autolock_timeout") * 60)

		self.__close_popups()

		return True
コード例 #3
0
	def prefs(self):
		"Displays the preference dialog"

		dialog.run_unique(Preferences, None, self.config)
コード例 #4
0
	def about(self):
		"Displays an about dialog"

		dialog.run_unique(About, self.applet)
コード例 #5
0
 def prefs(self):
     dialog.run_unique(Preferences, None, self.config)