Project

General

Profile

« Previous | Next » 

Revision dde05520

Added by dsorber over 8 years ago

Minor improvements to cleanup and open the password dialog automagically at start.

View differences:

software/pwmgr/pwmgr.py
ENC_TMP_FILE_PATH = '/home/dsorber/Documents/chicken_soup.enc.tmp'
KEY_FILE_PATH = '/mnt/pw_ramdisk/.f05d11ef-000c-45c2-ae14-56b56c23e1c5'
VERSION = '0.0.5'
VERSION = '0.0.6'
class SearchDialog(Gtk.Dialog):
......
self.create_textview()
self.create_toolbar()
self.create_bottom()
self.connect("key-press-event", self._key_press_event)
self.connect("key-press-event", self._key_press_event)
self.mounted = False
self.pass_data_loaded = False
......
self.original_hash = None
self.pbar_win = None
self.should_quit = False
# Open password prompt window at start
GLib.idle_add(self.open_pwd_file, self.grid)
def async_quit(self):
if self.should_quit:
......
def _remove_mount_files(self):
# Remove files in the mount path
for file_ in glob.glob('{:s}/*'.format(MOUNT_PATH)):
os.remove(file_)
for file_object in os.listdir(MOUNT_PATH):
file_object_path = os.path.join(MOUNT_PATH, file_object)
if os.path.isfile(file_object_path):
os.unlink(file_object_path)
else:
shutil.rmtree(file_object_path)
def _hash_textview(self):
passwd_text = self.textbuffer.get_text(self.textbuffer.get_start_iter(),
......
if self.mounted:
# Start async polling of the quit flag
GLib.idle_add(self.async_quit)
GLib.timeout_add(500, self.async_quit)
# Create the progress window
self.pbar_win = ProgressBarWindow(self, 'Closing...')

Also available in: Unified diff