[Xfce4-commits] <xfce4-weather-plugin:master> Handle value-changed events for number of forecast days.

Harald Judt noreply at xfce.org
Tue Nov 27 16:46:38 CET 2012


Updating branch refs/heads/master
         to 65f4c0c70a5c6da9e16499c6f6073ced60cf0838 (commit)
       from aca13750c4bcfea083cb834a7f88782554433648 (commit)

commit 65f4c0c70a5c6da9e16499c6f6073ced60cf0838
Author: Harald Judt <h.judt at gmx.at>
Date:   Mon Nov 26 17:18:50 2012 +0100

    Handle value-changed events for number of forecast days.

 panel-plugin/weather-config.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index aa3545a..fb0e63e 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -706,6 +706,16 @@ combo_tooltip_style_changed(GtkWidget *combo,
 
 
 static void
+spin_forecast_days_value_changed(const GtkWidget *spin,
+                                 gpointer user_data)
+{
+    xfceweather_dialog *dialog = (xfceweather_dialog *) user_data;
+    dialog->wd->forecast_days =
+        gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(spin));
+}
+
+
+static void
 check_round_values_toggled(GtkWidget *button,
                            gpointer user_data)
 {
@@ -761,6 +771,9 @@ create_appearance_page(xfceweather_dialog *dialog)
              0, NULL);
     gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
     gtk_box_pack_start(GTK_BOX(page), vbox, FALSE, FALSE, 0);
+    g_signal_connect(GTK_SPIN_BUTTON(dialog->spin_forecast_days),
+                     "value-changed",
+                     G_CALLBACK(spin_forecast_days_value_changed), dialog);
 
     /* round temperature */
     vbox = gtk_vbox_new(FALSE, BORDER);


More information about the Xfce4-commits mailing list