mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
docs: Add GtkShortcutsWindow to the widget gallery
This commit is contained in:
parent
d9259fc958
commit
b67eee5741
BIN
docs/reference/gtk/images/shortcuts-window.png
Normal file
BIN
docs/reference/gtk/images/shortcuts-window.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
@ -354,6 +354,7 @@ images = [
|
||||
'images/search-bar.png',
|
||||
'images/search-entry.png',
|
||||
'images/separator.png',
|
||||
'images/shortcuts-window.png',
|
||||
'images/sidebar.png',
|
||||
'images/slices.png',
|
||||
'images/sliders.png',
|
||||
|
@ -96,6 +96,7 @@
|
||||
<link linkend="GtkAppChooserDialog"><inlinegraphic fileref="appchooserdialog.png" format="PNG"></inlinegraphic></link>
|
||||
<link linkend="GtkPageSetupUnixDialog"><inlinegraphic fileref="pagesetupdialog.png" format="PNG"></inlinegraphic></link>
|
||||
<link linkend="GtkPrintUnixDialog"><inlinegraphic fileref="printdialog.png" format="PNG"></inlinegraphic></link>
|
||||
<link linkend="GtkShortcutsWindow"><inlinegraphic fileref="shortcuts-window.png" format="PNG"></inlinegraphic></link>
|
||||
</para>
|
||||
</section>
|
||||
</para>
|
||||
|
@ -1,4 +1,8 @@
|
||||
if get_option('gtk_doc')
|
||||
doc_shooter_resources = gnome.compile_resources('shooter_resources',
|
||||
'shooter.gresource.xml',
|
||||
source_dir: '.')
|
||||
|
||||
doc_shooter_sources = [
|
||||
'shooter.c',
|
||||
'shadow.c',
|
||||
@ -6,7 +10,8 @@ if get_option('gtk_doc')
|
||||
'../../tests/gtkgears.c',
|
||||
]
|
||||
|
||||
doc_shooter = executable('doc-shooter', doc_shooter_sources,
|
||||
doc_shooter = executable('doc-shooter',
|
||||
doc_shooter_sources, doc_shooter_resources,
|
||||
include_directories: [ confinc, gdkinc, gtkinc, testinc, ],
|
||||
dependencies: libgtk_dep)
|
||||
endif
|
||||
|
5
docs/tools/shooter.gresource.xml
Normal file
5
docs/tools/shooter.gresource.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<gresources>
|
||||
<gresource prefix="/">
|
||||
<file>shortcuts-boxes.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
120
docs/tools/shortcuts-boxes.ui
Normal file
120
docs/tools/shortcuts-boxes.ui
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkShortcutsWindow" id="shortcuts-boxes">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsSection">
|
||||
<property name="section-name">shortcuts</property>
|
||||
<property name="max-height">12</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes">Overview</property>
|
||||
<property name="view">overview</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator">F1</property>
|
||||
<property name="title" translatable="yes">Help</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Ctrl>n</property>
|
||||
<property name="title" translatable="yes">Create a new box</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Ctrl>f</property>
|
||||
<property name="title" translatable="yes">Search</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Ctrl>k</property>
|
||||
<property name="title" translatable="yes">Keyboard shortcuts</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Ctrl>q</property>
|
||||
<property name="title" translatable="yes">Close Window/Quit Boxes</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes">Box Creation and Properties</property>
|
||||
<property name="view">wizard</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">ltr</property>
|
||||
<property name="accelerator"><Alt>Right</property>
|
||||
<property name="title" translatable="yes">Switch to the next page</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">ltr</property>
|
||||
<property name="accelerator"><Alt>Left</property>
|
||||
<property name="title" translatable="yes">Switch to the previous page</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">rtl</property>
|
||||
<property name="accelerator"><Alt>Left</property>
|
||||
<property name="title" translatable="yes">Switch to the next page</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">rtl</property>
|
||||
<property name="accelerator"><Alt>Right</property>
|
||||
<property name="title" translatable="yes">Switch to the previous page</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsGroup">
|
||||
<property name="title" translatable="yes">Box Display</property>
|
||||
<property name="view">display</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator">Control_L+Alt_L</property>
|
||||
<property name="title" translatable="yes">Grab/Ungrab keyboard</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">ltr</property>
|
||||
<property name="accelerator"><Alt>Left</property>
|
||||
<property name="title" translatable="yes">Back to overview</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="direction">rtl</property>
|
||||
<property name="accelerator"><Alt>Right</property>
|
||||
<property name="title" translatable="yes">Back to overview</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Ctrl>q</property>
|
||||
<property name="title" translatable="yes">Close window/Quit Boxes</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator">F11</property>
|
||||
<property name="title" translatable="yes">Fullscreen/Restore from fullscreen</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
@ -1726,6 +1726,21 @@ create_menu (void)
|
||||
return new_widget_info ("menu", widget, ASIS);
|
||||
}
|
||||
|
||||
static WidgetInfo *
|
||||
create_shortcuts_window (void)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GtkWidget *overlay;
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/shortcuts-boxes.ui");
|
||||
overlay = GTK_WIDGET (gtk_builder_get_object (builder, "shortcuts-boxes"));
|
||||
g_object_set (overlay, "view-name", "display", NULL);
|
||||
g_object_ref (overlay);
|
||||
g_object_unref (builder);
|
||||
|
||||
return new_widget_info ("shortcuts-window", overlay, ASIS);
|
||||
}
|
||||
|
||||
GList *
|
||||
get_all_widgets (void)
|
||||
{
|
||||
@ -1798,6 +1813,7 @@ get_all_widgets (void)
|
||||
retval = g_list_prepend (retval, create_menu_bar ());
|
||||
retval = g_list_prepend (retval, create_popover ());
|
||||
retval = g_list_prepend (retval, create_menu ());
|
||||
retval = g_list_prepend (retval, create_shortcuts_window ());
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user