[gnome-commander: 4/4] search: focus results only if result list is not empty



commit 453405f48a684e0f47d8b17d6a42787a1fc8d5f1
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Aug 20 16:25:36 2011 +0200

    search: focus results only if result list is not empty

 src/dialogs/gnome-cmd-search-dialog.cc |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-search-dialog.cc b/src/dialogs/gnome-cmd-search-dialog.cc
index 55d2bf4..6a2b1e4 100755
--- a/src/dialogs/gnome-cmd-search-dialog.cc
+++ b/src/dialogs/gnome-cmd-search-dialog.cc
@@ -557,7 +557,8 @@ static gboolean update_search_status_widgets (SearchData *data)
         gtk_dialog_set_response_sensitive (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_STOP, FALSE);
         gtk_dialog_set_response_sensitive (*data->dialog, GnomeCmdSearchDialog::GCMD_RESPONSE_FIND, TRUE);
 
-        gtk_widget_grab_focus (*data->dialog->priv->result_list);         // set focus to result list
+        if (matches)
+            gtk_widget_grab_focus (*data->dialog->priv->result_list);         // set focus to result list
     }
 
     return FALSE;    // returning FALSE here stops the timeout callbacks



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