diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-04-16 23:47:14 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-04-16 23:47:14 +0000 |
commit | 3286221870b9d559046afac4f0b50bf437db9241 (patch) | |
tree | 3cf6e896ce125eef81652af3566b5dbc5195f55c | |
parent | 1ee5c2cac42b35b7c70739ae0e4e67842da44683 (diff) | |
parent | f4e32f29e1d048a16dbac560398a0815180133ef (diff) | |
download | gtk+-3286221870b9d559046afac4f0b50bf437db9241.tar.gz |
Merge branch 'widget-factory-inspector' into 'master'
Widget factory inspector
See merge request GNOME/gtk!752
-rw-r--r-- | demos/widget-factory/widget-factory.c | 11 | ||||
-rw-r--r-- | demos/widget-factory/widget-factory.ui | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c index 7a32c37610..d116bd3867 100644 --- a/demos/widget-factory/widget-factory.c +++ b/demos/widget-factory/widget-factory.c @@ -227,7 +227,7 @@ activate_about (GSimpleAction *action, gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)), "program-name", "GTK Widget Factory", "version", version, - "copyright", "(C) 1997-2013 The GTK Team", + "copyright", "© 1997—2019 The GTK Team", "license-type", GTK_LICENSE_LGPL_2_1, "website", "http://www.gtk.org", "comments", "Program to demonstrate GTK themes and widgets", @@ -263,6 +263,14 @@ activate_quit (GSimpleAction *action, } static void +activate_inspector (GSimpleAction *action, + GVariant *parameter, + gpointer user_data) +{ + gtk_window_set_interactive_debugging (TRUE); +} + +static void spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label) { GtkWidget *w; @@ -1935,6 +1943,7 @@ main (int argc, char *argv[]) static GActionEntry app_entries[] = { { "about", activate_about, NULL, NULL, NULL }, { "quit", activate_quit, NULL, NULL, NULL }, + { "inspector", activate_inspector, NULL, NULL, NULL }, { "main", NULL, "s", "'steak'", NULL }, { "wine", NULL, NULL, "false", NULL }, { "beer", NULL, NULL, "false", NULL }, diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui index aa61c3b0f7..095cbdbc56 100644 --- a/demos/widget-factory/widget-factory.ui +++ b/demos/widget-factory/widget-factory.ui @@ -17,6 +17,10 @@ </section> <section> <item> + <attribute name="label" translatable="yes">_Inspector</attribute> + <attribute name="action">app.inspector</attribute> + </item> + <item> <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute> <attribute name="action">win.show-help-overlay</attribute> </item> |