[gnome-packagekit] gpk-app:set set treeview widget insensitive when searching



commit ef0b10b8efe2370eb5159eac25f74ba9c3db5d04
Author: Zhang Qiang <qiang z zhang intel com>
Date:   Thu Apr 7 11:06:47 2011 +0800

    gpk-app:set set treeview widget insensitive when searching
    
    Set treeview_packages widget as insensitive while gpk-app is
    in the progress of searching.
    
    Reference MeeGo bug: https://bugs.meego.com/show_bug.cgi?id=11324
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/gpk-application.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/gpk-application.c b/src/gpk-application.c
index 229059f..4170287 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -1555,6 +1555,8 @@ out:
 	/* mark find button sensitive */
 	search_in_progress = FALSE;
 	gpk_application_set_button_find_sensitivity (NULL);
+	widget = GTK_WIDGET (gtk_builder_get_object (builder, "scrolledwindow_groups"));
+	gtk_widget_set_sensitive (widget, TRUE);
 
 	if (error_code != NULL)
 		g_object_unref (error_code);
@@ -1710,10 +1712,20 @@ out:
 static void
 gpk_application_perform_search (gpointer user_data)
 {
+	GtkWidget *widget;
+
 	/*if we are in the middle of a search, just return*/
 	if (search_in_progress == TRUE)
 		return;
 
+	if (search_mode == GPK_MODE_NAME_DETAILS_FILE ||
+	    search_mode == GPK_MODE_GROUP ||
+	    search_mode == GPK_MODE_SELECTED) {
+		widget = GTK_WIDGET (gtk_builder_get_object (builder,
+							     "scrolledwindow_groups"));
+		gtk_widget_set_sensitive (widget, FALSE);
+	}
+
 	gpk_application_clear_details (NULL);
 	gpk_application_clear_packages (NULL);
 



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