widget-factory: Add a horizontal-buttons example

Sadly, we don't have good icons for payment methods...
This commit is contained in:
Matthias Clasen 2014-04-29 06:21:11 -04:00
parent c0a87a85f4
commit f248b21b1b
2 changed files with 25 additions and 3 deletions

View File

@ -287,11 +287,12 @@ main (int argc, char *argv[])
{ "about", activate_about, NULL, NULL, NULL },
{ "quit", activate_quit, NULL, NULL, NULL },
{ "main", NULL, "s", "''", NULL },
{ "main", NULL, "s", "'steak'", NULL },
{ "wine", NULL, NULL, "false", NULL },
{ "beer", NULL, NULL, "false", NULL },
{ "water", NULL, NULL, "false", NULL },
{ "dessert", NULL, "s", "''", NULL }
{ "water", NULL, NULL, "true", NULL },
{ "dessert", NULL, "s", "'bars'", NULL },
{ "pay", NULL, "s", NULL, NULL }
};
gint status;

View File

@ -72,6 +72,27 @@
</item>
</section>
</submenu>
<section>
<attribute name="display-hint">horizontal-buttons</attribute>
<item>
<attribute name="label" translatable="yes">Cash</attribute>
<attribute name="action">app.pay</attribute>
<attribute name="target">cash</attribute>
<attribute name="verb-icon">document-save-symbolic</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Credit Card</attribute>
<attribute name="action">app.pay</attribute>
<attribute name="target">card</attribute>
<attribute name="verb-icon">document-send-symbolic</attribute>
</item>
<item>
<attribute name="label" translatable="yes">Cheque</attribute>
<attribute name="action">app.pay</attribute>
<attribute name="target">cheque</attribute>
<attribute name="verb-icon">document-save-as-symbolic</attribute>
</item>
</section>
</section>
</menu>
<object class="GtkAdjustment" id="adjustment1">