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



commit d6a7ddb4362b627dbf95d66aad69d1d967cb1869
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]