[packagekit] dimming the window

Robert Xu robxu9 at gmail.com
Fri Jun 17 11:45:59 PDT 2011


On Fri, Jun 17, 2011 at 14:17, Robert Xu <robxu9 at gmail.com> wrote:
>
> I'll prowl around gnome-packagekit to see where this insensitive
> listview happens,
> so I can do the same for installing/removing...
>
>

I also noticed that the clear button doesn't go insensitive either...
(I fixed that, see patch below.)

>From what I see: when it resolves dependencies, it sends
a finished signal. And then... it just continues without
re-insensitiving everything...


Note that I haven't tested this...

diff --git a/src/gpk-application.c b/src/gpk-application.c
index c4c5647..5fa73b3 100644
--- a/src/gpk-application.c
+++ b/src/gpk-application.c
@@ -638,6 +638,10 @@ gpk_application_progress_cb (PkProgress
*progress, PkProgressType type, gpointer
 			widget = GTK_WIDGET (gtk_builder_get_object (builder, "button_apply"));
 			gtk_widget_set_sensitive (widget, TRUE);

+			/* make clear button sensitive */
+			widget = GTK_WIDGET (gtk_builder_get_object (builder, "button_clear"));
+			gtk_widget_set_sensitive (widget, TRUE);
+
 			/* we've not yet shown, so don't bother */
 			if (status_id > 0) {
 				g_source_remove (status_id);
@@ -2061,6 +2065,10 @@ gpk_application_button_apply_cb (GtkWidget
*widget, gpointer user_data)
 		widget = GTK_WIDGET (gtk_builder_get_object (builder, "button_apply"));
 		gtk_widget_set_sensitive (widget, FALSE);

+		/* make clear button insensitive */
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "button_clear"));
+		gtk_widget_set_sensitive (widget, FALSE);
+
 	} else if (action == GPK_ACTION_REMOVE) {
 		autoremove = g_settings_get_boolean (settings,
GPK_SETTINGS_ENABLE_AUTOREMOVE);

@@ -2076,6 +2084,10 @@ gpk_application_button_apply_cb (GtkWidget
*widget, gpointer user_data)
 		/* make apply button insensitive */
 		widget = GTK_WIDGET (gtk_builder_get_object (builder, "button_apply"));
 		gtk_widget_set_sensitive (widget, FALSE);
+
+		/* make clear button insensitive */
+		widget = GTK_WIDGET (gtk_builder_get_object (builder, "button_clear"));
+		gtk_widget_set_sensitive (widget, FALSE);
 	}
 	g_strfreev (package_ids);
 	return;

-- 
later, Robert Xu + rxu AT lincomlinux DOT org



More information about the PackageKit mailing list