[Xfce4-commits] <xfce4-weather-plugin:master> weather-config: Prevent opening multiple search dialogs.

Harald Judt noreply at xfce.org
Thu Aug 2 23:08:17 CEST 2012


Updating branch refs/heads/master
         to b6c7ebb085db03732315ba272eec67e2cc5e3e09 (commit)
       from b9d099cfbcb499f17c5583d941aa191566360a92 (commit)

commit b6c7ebb085db03732315ba272eec67e2cc5e3e09
Author: Harald Judt <h.judt at gmx.at>
Date:   Thu Aug 2 23:01:28 2012 +0200

    weather-config: Prevent opening multiple search dialogs.
    
    Deactivate the "Change" button in the configuration dialog when
    the search dialog has been created and reactivate it after the
    dialog has been closed.

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

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index ed57659..b6bfa48 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -436,6 +436,7 @@ cb_findlocation(GtkButton *button,
                                    dialog->wd->proxy_host,
                                    dialog->wd->proxy_port);
 
+    gtk_widget_set_sensitive(GTK_WIDGET(button), FALSE);
     if (run_search_dialog(sdialog)) {
         gtk_entry_set_text(GTK_ENTRY(dialog->txt_lat), sdialog->result_lat);
         gtk_entry_set_text(GTK_ENTRY(dialog->txt_lon), sdialog->result_lon);
@@ -448,6 +449,7 @@ cb_findlocation(GtkButton *button,
 #endif
     }
     free_search_dialog(sdialog);
+    gtk_widget_set_sensitive(GTK_WIDGET(button), TRUE);
 
     return FALSE;
 }


More information about the Xfce4-commits mailing list