[gnome-sudoku/gnome-3-14] print-dialog: workaround double emission of response signal



commit 83550807a4b39404c7f35d38db4312ae80f626ca
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Oct 4 13:58:41 2014 -0500

    print-dialog: workaround double emission of response signal
    
    https://bugzilla.gnome.org/show_bug.cgi?id=737895

 src/print-dialog.vala |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/print-dialog.vala b/src/print-dialog.vala
index e353f6f..cb0e58e 100644
--- a/src/print-dialog.vala
+++ b/src/print-dialog.vala
@@ -86,8 +86,13 @@ public class PrintDialog : Gtk.Dialog
         action.value_changed.connect (() => settings.set_int (key_name, (int) action.get_value ()));
     }
 
+// FIXME why is response emitted twice when the user presses Print?
+private bool once = false;
     public override void response (int response)
     {
+if (once) return;
+once = true;
+
         if (response != Gtk.ResponseType.OK)
         {
             finished ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]