[gtk+/wip/desrt/popover-iconic: 8/10] Add an example of iconic rendering



commit 891b6fbb841b092f66297831e603489d540f75f1
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Apr 2 01:08:39 2014 -0400

    Add an example of iconic rendering
    
    testpopover now shows several examples of icon buttons.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727477

 tests/popover.ui    |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/testpopover.c |    8 +++++++
 2 files changed, 64 insertions(+), 0 deletions(-)
---
diff --git a/tests/popover.ui b/tests/popover.ui
index 74ffdb9..14d8236 100644
--- a/tests/popover.ui
+++ b/tests/popover.ui
@@ -1,6 +1,24 @@
 <interface>
   <menu id="menu">
     <section>
+      <attribute name="display-hint">iconic</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>
         <attribute name="action">action1</attribute>
@@ -44,6 +62,21 @@
           <attribute name="label">Item 5b</attribute>
           <attribute name="action">top.action5</attribute>
         </item>
+        <section>
+          <attribute name="display-hint">iconic</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>
@@ -54,6 +87,29 @@
         </item>
       </section>
       <section>
+        <attribute name="display-hint">iconic</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>
           <attribute name="label">Item 6</attribute>
diff --git a/tests/testpopover.c b/tests/testpopover.c
index f602daa..2f80e31 100644
--- a/tests/testpopover.c
+++ b/tests/testpopover.c
@@ -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 },


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