[gtk+/wip/gmenu] Something for the eye
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu] Something for the eye
- Date: Fri, 9 Dec 2011 18:27:36 +0000 (UTC)
commit fd248e3e2e23c651c6c87067570d0bd2977f4c8c
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Dec 9 13:27:10 2011 -0500
Something for the eye
examples/plugman.c | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/examples/plugman.c b/examples/plugman.c
index 11a8210..55cfe42 100644
--- a/examples/plugman.c
+++ b/examples/plugman.c
@@ -214,7 +214,22 @@ red_action (GAction *action,
GVariant *parameter,
gpointer data)
{
+ GApplication *app;
+ GList *list;
+ GtkWindow *window;
+ GtkWidget *text;
+ GdkRGBA red;
+
g_print ("Here is where we turn the text red\n");
+
+ app = g_application_get_default ();
+ list = gtk_application_get_windows (GTK_APPLICATION (app));
+ window = GTK_WINDOW (list->data);
+ text = g_object_get_data ((GObject*)window, "plugman-text");
+
+ gdk_rgba_parse (&red, "red");
+
+ gtk_widget_override_color (text, 0, &red);
}
static void
@@ -258,8 +273,6 @@ disable_red_plugin (void)
g_print ("Disabling 'Red' plugin\n");
- g_action_map_remove_action (G_ACTION_MAP (g_application_get_default ()), "app.red-action");
-
plugin_menu = find_plugin_menu ();
if (plugin_menu)
{
@@ -279,6 +292,9 @@ disable_red_plugin (void)
else
g_warning ("Plugin menu not found\n");
+ g_action_map_remove_action (G_ACTION_MAP (g_application_get_default ()), "app.red-action");
+ g_print ("Actions of 'Red' plugin removed\n");
+
is_red_plugin_enabled = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]