[Reportbug-commits] [reportbug] 15/31: gtk2_ui: Consistently call set_progress_label in UI thread

Sandro Tosi morph at moszumanska.debian.org
Mon Jan 16 01:36:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

morph pushed a commit to branch master
in repository reportbug.

commit 2dd1fa8f9f1a7532c91258535b5d236ba598bb9e
Author: Simon McVittie <smcv at debian.org>
Date:   Sat Jan 14 17:14:54 2017 +0000

    gtk2_ui: Consistently call set_progress_label in UI thread
    
    Previously, log_message() would call it from the reportbug thread.
---
 reportbug/ui/gtk2_ui.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/reportbug/ui/gtk2_ui.py b/reportbug/ui/gtk2_ui.py
index e9099c2..0d3f14e 100644
--- a/reportbug/ui/gtk2_ui.py
+++ b/reportbug/ui/gtk2_ui.py
@@ -1448,6 +1448,7 @@ class ReportbugAssistant(Gtk.Assistant):
         if self.showing_page == self.progress_page:
             self.set_current_page(page.page_num)
 
+    # Called in UI thread
     def set_progress_label(self, text, *args, **kwargs):
         self.progress_page.set_label(text % args)
 
@@ -1520,8 +1521,9 @@ class GetFilenameDialog(ReportbugConnector, Gtk.FileChooserDialog):
         self.show_all()
 
 
+# Called in reportbug thread
 def log_message(*args, **kwargs):
-    return assistant.set_progress_label(*args, **kwargs)
+    application.run_once_in_main_thread(assistant.set_progress_label, *args, **kwargs)
 
 
 def select_multiple(*args, **kwargs):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git



More information about the Reportbug-commits mailing list