[gtk+] widget-factory: Add a horizontal-buttons example



commit f248b21b1bc6e7955544f219eed9abd779984d63
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Apr 29 06:21:11 2014 -0400

    widget-factory: Add a horizontal-buttons example
    
    Sadly, we don't have good icons for payment methods...

 demos/widget-factory/widget-factory.c  |    7 ++++---
 demos/widget-factory/widget-factory.ui |   21 +++++++++++++++++++++
 2 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index 7404e59..1e59b0d 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -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;
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index cfe5905..804556a 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -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">


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]