[gnome-commander] search: simplify code for dlg buttons



commit abc0acf3670b2e78321d776bc4e848efe7dfc2cd
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Mar 27 18:46:04 2011 +0200

    search: simplify code for dlg buttons

 src/gnome-cmd-search-dialog.cc |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-cmd-search-dialog.cc b/src/gnome-cmd-search-dialog.cc
index bb32583..899a5e5 100644
--- a/src/gnome-cmd-search-dialog.cc
+++ b/src/gnome-cmd-search-dialog.cc
@@ -529,9 +529,6 @@ static gboolean start_search (GnomeCmdSearchDialog *dialog)
 
     dialog->priv->result_list->remove_all_files();
 
-    gtk_widget_set_sensitive (data->dialog->priv->search_button, FALSE);
-    gtk_widget_set_sensitive (data->dialog->priv->stop_button, TRUE);
-
     // create an re for file name matching
     GtkWidget *regex_radio = lookup_widget (GTK_WIDGET (dialog), "regex_radio");
 
@@ -577,8 +574,9 @@ static void on_search (GtkButton *button, GnomeCmdSearchDialog *dialog)
 {
     g_timeout_add (1, (GSourceFunc) start_search, dialog);
 
-    gtk_widget_set_sensitive (dialog->priv->search_button, FALSE);
     gtk_widget_set_sensitive (dialog->priv->goto_button, FALSE);
+    gtk_widget_set_sensitive (dialog->priv->stop_button, TRUE);
+    gtk_widget_set_sensitive (dialog->priv->search_button, FALSE);
 }
 
 



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