gtk-demo: Add another shortcuts window example

The boxes shortcuts, taken straight from boxes.
This demonstrates a problem with view filtering.
This commit is contained in:
Matthias Clasen
2015-12-15 18:39:39 -05:00
parent 2bb80a9bb2
commit 5d3f28192c
4 changed files with 210 additions and 0 deletions

View File

@ -49,6 +49,24 @@ clocks_shortcuts_stopwatch (GtkWidget *window)
show_shortcuts (window, "shortcuts-clocks", "stopwatch");
}
static void
boxes_shortcuts (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-boxes", NULL);
}
static void
boxes_shortcuts_wizard (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-boxes", "wizard");
}
static void
boxes_shortcuts_display (GtkWidget *window)
{
show_shortcuts (window, "shortcuts-boxes", "display");
}
GtkWidget *
do_shortcuts (GtkWidget *do_widget)
{
@ -73,6 +91,9 @@ do_shortcuts (GtkWidget *do_widget)
"gedit_shortcuts", G_CALLBACK (gedit_shortcuts),
"clocks_shortcuts", G_CALLBACK (clocks_shortcuts),
"clocks_shortcuts_stopwatch", G_CALLBACK (clocks_shortcuts_stopwatch),
"boxes_shortcuts", G_CALLBACK (boxes_shortcuts),
"boxes_shortcuts_wizard", G_CALLBACK (boxes_shortcuts_wizard),
"boxes_shortcuts_display", G_CALLBACK (boxes_shortcuts_display),
NULL);
gtk_builder_connect_signals (builder, NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));