summaryrefslogtreecommitdiff
path: root/demos
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-03-16 14:05:48 -0400
committerMatthias Clasen <mclasen@redhat.com>2015-03-16 14:05:48 -0400
commitd5d28a50622ff0a630369c78d4844c315c83abbb (patch)
treeda17864d5fe5c2bce7fedd97f492a8b0e3769014 /demos
parent4e930ada32bc98b9094e7bc449b907bd55573216 (diff)
downloadgtk+-d5d28a50622ff0a630369c78d4844c315c83abbb.tar.gz
widget factory: Add an example for an insensitive model button
This will make it easier to make insensitive model buttons appear properly in other themes.
Diffstat (limited to 'demos')
-rw-r--r--demos/widget-factory/widget-factory.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index 14c5f04660..979b7f78e5 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -1336,6 +1336,7 @@ int
main (int argc, char *argv[])
{
GtkApplication *app;
+ GAction *action;
static GActionEntry app_entries[] = {
{ "about", activate_about, NULL, NULL, NULL },
{ "quit", activate_quit, NULL, NULL, NULL },
@@ -1353,6 +1354,8 @@ main (int argc, char *argv[])
g_action_map_add_action_entries (G_ACTION_MAP (app),
app_entries, G_N_ELEMENTS (app_entries),
app);
+ action = g_action_map_lookup_action (G_ACTION_MAP (app), "wine");
+ g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
g_signal_connect (app, "activate", G_CALLBACK (activate), NULL);