From 3e84b9e2ae7599c2a92075e6682dc6b6d7aa0d33 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Ouellet Date: Sun, 19 Feb 2017 15:46:52 -0500 Subject: [PATCH] Use app instead of self for .tr() outside QObject Fixes https://github.com/QubesOS/qubes-issues/issues/2637 --- qubesmanager/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qubesmanager/main.py b/qubesmanager/main.py index 79f51ef..1223f30 100755 --- a/qubesmanager/main.py +++ b/qubesmanager/main.py @@ -96,13 +96,13 @@ class QubesManagerFileWatcher(ProcessEvent): src_info_file = open(qubes_clipboard_info_file, 'r') src_vmname = src_info_file.readline().strip('\n') if src_vmname == "": - trayIcon.showMessage(self.tr( + trayIcon.showMessage(app.tr( "Qubes Clipboard has been copied to the VM and wiped.\n" "Trigger a paste operation (e.g. Ctrl-v) to insert " "it into an application."), msecs=3000) else: - trayIcon.showMessage(unicode(self.tr( + trayIcon.showMessage(unicode(app.tr( "Qubes Clipboard fetched from VM: '{0}'\n" "Press Ctrl-Shift-v to copy this clipboard into dest" " VM's clipboard.")).format( @@ -117,7 +117,7 @@ class QubesManagerFileWatcher(ProcessEvent): EventsCodes.OP_FLAGS.get('IN_CLOSE_WRITE')) elif event.name == os.path.basename(table_widgets .qubes_dom0_updates_stat_file): - trayIcon.showMessage(self.tr("Qubes dom0 updates available."), + trayIcon.showMessage(app.tr("Qubes dom0 updates available."), msecs=0)