Add an example of iconic rendering

testpopover now shows several examples of icon buttons.

https://bugzilla.gnome.org/show_bug.cgi?id=727477
This commit is contained in:
Matthias Clasen 2014-04-02 01:08:39 -04:00
parent 28a567f5a9
commit 7fa1133912
2 changed files with 64 additions and 0 deletions

View File

@ -1,5 +1,23 @@
<interface>
<menu id="menu">
<section>
<attribute name="display-hint">horizontal-buttons</attribute>
<item>
<attribute name="label">Cut</attribute>
<attribute name="action">top.cut</attribute>
<attribute name="verb-icon">edit-cut-symbolic</attribute>
</item>
<item>
<attribute name="label">Copy</attribute>
<attribute name="action">top.copy</attribute>
<attribute name="verb-icon">edit-copy-symbolic</attribute>
</item>
<item>
<attribute name="label">Paste</attribute>
<attribute name="action">top.paste</attribute>
<attribute name="verb-icon">edit-paste-symbolic</attribute>
</item>
</section>
<section>
<item>
<attribute name="label">No action</attribute>
@ -44,6 +62,21 @@
<attribute name="label">Item 5b</attribute>
<attribute name="action">top.action5</attribute>
</item>
<section>
<attribute name="display-hint">horizontal-buttons</attribute>
<item>
<attribute name="label">List</attribute>
<attribute name="action">top.set-view</attribute>
<attribute name="target">list</attribute>
<attribute name="verb-icon">view-list-symbolic</attribute>
</item>
<item>
<attribute name="label">Grid</attribute>
<attribute name="action">top.set-view</attribute>
<attribute name="target">grid</attribute>
<attribute name="verb-icon">view-grid-symbolic</attribute>
</item>
</section>
<item>
<attribute name="label">Item 5c</attribute>
<attribute name="action">top.action5</attribute>
@ -53,6 +86,29 @@
<attribute name="action">top.action5</attribute>
</item>
</section>
<section>
<attribute name="display-hint">horizontal-buttons</attribute>
<attribute name="label">Format</attribute>
<item>
<attribute name="label">Bold</attribute>
<attribute name="action">top.bold</attribute>
</item>
<item>
<attribute name="label">Italic</attribute>
<attribute name="action">top.italic</attribute>
<attribute name="verb-icon">format-text-italic-symbolic</attribute>
</item>
<item>
<attribute name="label">Strikethrough</attribute>
<attribute name="action">top.strikethrough</attribute>
<attribute name="verb-icon">format-text-strikethrough-symbolic</attribute>
</item>
<item>
<attribute name="label">Underline</attribute>
<attribute name="action">top.underline</attribute>
<attribute name="verb-icon">format-text-underline-symbolic</attribute>
</item>
</section>
<section>
<attribute name="label">6666</attribute>
<item>

View File

@ -9,6 +9,14 @@ activate (GSimpleAction *action,
}
static GActionEntry entries[] = {
{ "cut", activate, NULL, NULL, NULL },
{ "copy", activate, NULL, NULL, NULL },
{ "paste", activate, NULL, NULL, NULL },
{ "bold", NULL, NULL, "false", NULL },
{ "italic", NULL, NULL, "false", NULL },
{ "strikethrough", NULL, NULL, "false", NULL },
{ "underline", NULL, NULL, "false", NULL },
{ "set-view", NULL, "s", "'list'", NULL },
{ "action1", activate, NULL, NULL, NULL },
{ "action2", NULL, NULL, "true", NULL },
{ "action2a", NULL, NULL, "false", NULL },