From f587ac2d43fbd2eab062294c9b390ed4a28766de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 2 Dec 2013 04:03:05 +0100 Subject: [PATCH] Adjust for new QubesVmCollection.save() implementation Watch for MOVED_TO events in /var/lib/qubes directory to reload qubes.xml. --- qubesmanager/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 9495488..0e75935 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -85,6 +85,10 @@ class QubesManagerFileWatcher(ProcessEvent): if event.path == system_path["qubes_store_filename"]: self.update_func() + def process_IN_MOVED_TO (self, event): + if event.pathname == system_path["qubes_store_filename"]: + self.update_func() + def process_IN_CLOSE_WRITE (self, event): if event.path == qubes_clipboard_info_file: src_info_file = open (qubes_clipboard_info_file, 'r') @@ -2223,6 +2227,7 @@ def main(): notifier = ThreadedNotifier(wm, QubesManagerFileWatcher(manager_window.mark_table_for_update)) notifier.start() wm.add_watch(system_path["qubes_store_filename"], EventsCodes.OP_FLAGS.get('IN_MODIFY')) + wm.add_watch(os.path.dirname(system_path["qubes_store_filename"]), EventsCodes.OP_FLAGS.get('IN_MOVED_TO')) wm.add_watch(qubes_clipboard_info_file, EventsCodes.OP_FLAGS.get('IN_CLOSE_WRITE')) wm.add_watch(os.path.dirname(qubes_clipboard_info_file), EventsCodes.OP_FLAGS.get('IN_CREATE'))