[gnome-clocks] Use [GtkCallback] syntax also for the switch



commit 064ecb0c88fc824ca287c82bd336afd68cba2eae
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Feb 16 11:26:18 2014 +0100

    Use [GtkCallback] syntax also for the switch

 data/ui/alarmsetupdialog.ui |    1 +
 src/alarm.vala              |    9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/alarmsetupdialog.ui b/data/ui/alarmsetupdialog.ui
index bb01be4..66053ec 100644
--- a/data/ui/alarmsetupdialog.ui
+++ b/data/ui/alarmsetupdialog.ui
@@ -316,6 +316,7 @@
                     <property name="can_focus">True</property>
                     <property name="halign">start</property>
                     <property name="valign">center</property>
+                    <signal name="notify::active" handler="active_changed" object="ClocksAlarmSetupDialog" 
swapped="no"/>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
diff --git a/src/alarm.vala b/src/alarm.vala
index 7bc03dd..a957fe1 100644
--- a/src/alarm.vala
+++ b/src/alarm.vala
@@ -347,10 +347,6 @@ private class SetupDialog : Gtk.Dialog {
             day_buttons_box.pack_start (day_buttons[day_number]);
         }
 
-        active_switch.notify["active"].connect (() => {
-            avoid_duplicate_alarm ();
-        });
-
         set_from_alarm (alarm);
     }
 
@@ -451,6 +447,11 @@ private class SetupDialog : Gtk.Dialog {
     }
 
     [GtkCallback]
+    private void active_changed () {
+        avoid_duplicate_alarm ();
+    }
+
+    [GtkCallback]
     private bool show_leading_zeros (Gtk.SpinButton spin_button) {
         spin_button.set_text ("%02i".printf (spin_button.get_value_as_int ()));
         return true;


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