[Xfce4-commits] <xfce4-weather-plugin:master> Hook up and handle toggle signal for round values check button.
Harald Judt
noreply at xfce.org
Tue Nov 27 16:46:15 CET 2012
Updating branch refs/heads/master
to a450cb9ddca6caa1fc4b7faaece3e58e85e14b6b (commit)
from 89dd4d59f0e86c2da8334ddeef05127bb4d0cc47 (commit)
commit a450cb9ddca6caa1fc4b7faaece3e58e85e14b6b
Author: Harald Judt <h.judt at gmx.at>
Date: Fri Nov 23 23:19:57 2012 +0100
Hook up and handle toggle signal for round values check button.
panel-plugin/weather-config.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 82f3bcf..ac88e55 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -749,6 +749,16 @@ create_units_page(xfceweather_dialog *dialog)
}
+static void
+check_round_values_toggled(GtkWidget *button,
+ gpointer user_data)
+{
+ xfceweather_dialog *dialog = (xfceweather_dialog *) user_data;
+ dialog->wd->round =
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(button));
+}
+
+
static GtkWidget *
create_appearance_page(xfceweather_dialog *dialog)
{
@@ -799,6 +809,10 @@ create_appearance_page(xfceweather_dialog *dialog)
gtk_check_button_new_with_mnemonic(_("_Round values"));
gtk_box_pack_start(GTK_BOX(vbox), dialog->check_round_values,
FALSE, FALSE, 0);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dialog->check_round_values),
+ dialog->wd->round);
+ g_signal_connect(dialog->check_round_values, "toggled",
+ G_CALLBACK(check_round_values_toggled), dialog);
/* interpolate data */
dialog->check_interpolate_data =
More information about the Xfce4-commits
mailing list