[packagekit] [PATCH 2/3] gpk-app:set set treeview widget insensitive

Zhang Qiang qiang.z.zhang at intel.com
Wed Apr 6 20:06:47 PDT 2011


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
---
 src/gpk-application.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/gpk-application.c b/src/gpk-application.c
index 229059f..2249250 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 (application->priv->builder, "scrolledwindow_groups"));
+	gtk_widget_set_sensitive (widget, TRUE);
 
 	if (error_code != NULL)
 		g_object_unref (error_code);
@@ -1710,10 +1712,17 @@ 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 == PK_MODE_NAME_DETAILS_FILE || search_mode == PK_MODE_GROUP || search_mode == GPK_MODE_SELECTED) {
+		widget = GTK_WIDGET (gtk_builder_get_object (application->priv->builder, "scrolledwindow_groups"));
+		gtk_widget_set_sensitive (widget, FALSE);
+	}
+
 	gpk_application_clear_details (NULL);
 	gpk_application_clear_packages (NULL);
 
-- 
1.7.2.2




More information about the PackageKit mailing list