[Xfce4-commits] <xfce4-weather-plugin:master> Only show the update spinner when it is active.

Harald Judt noreply at xfce.org
Thu Nov 29 11:06:02 CET 2012


Updating branch refs/heads/master
         to 530b200ccc07e54acff6f77e5029a100dc348111 (commit)
       from da378e359acd7f31fb0c9511f328f2e678dcc1d0 (commit)

commit 530b200ccc07e54acff6f77e5029a100dc348111
Author: Harald Judt <h.judt at gmx.at>
Date:   Thu Nov 29 10:48:43 2012 +0100

    Only show the update spinner when it is active.
    
    This saves some space that is better used for entering the location name.

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

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 290c25e..a9d8463 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -148,6 +148,7 @@ schedule_data_update(gpointer user_data)
     weather_debug("Delayed update timer expired, now scheduling data update.");
     update_weatherdata_with_reset(dialog->wd);
     gtk_spinner_stop(GTK_SPINNER(dialog->update_spinner));
+    gtk_widget_hide(GTK_WIDGET(dialog->update_spinner));
     return FALSE;
 }
 
@@ -164,6 +165,7 @@ schedule_delayed_data_update(xfceweather_dialog *dialog)
     if (dialog->wd->updatetimeout)
         g_source_remove(dialog->wd->updatetimeout);
 
+    gtk_widget_show(GTK_WIDGET(dialog->update_spinner));
     gtk_spinner_start(GTK_SPINNER(dialog->update_spinner));
     dialog->timer_id =
         g_timeout_add_seconds(UPDATE_TIMER_DELAY,
@@ -1328,5 +1330,6 @@ create_config_dialog(xfceweather_data *data,
 
     gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
     gtk_widget_show_all(vbox);
+    gtk_widget_hide(GTK_WIDGET(dialog->update_spinner));
     return dialog;
 }


More information about the Xfce4-commits mailing list