[bijiben/wip/sadiq/rewrite: 8/11] window: Add xml ui definitions



commit 03c07214a6d883e004d2b4674d83a3cf9919589b
Author: Mohammed Sadiq <sadiq sadiqpk org>
Date:   Tue Feb 27 07:58:56 2018 +0530

    window: Add xml ui definitions

 src/resources/ui/bjb-window.ui |   57 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/src/resources/ui/bjb-window.ui b/src/resources/ui/bjb-window.ui
new file mode 100644
index 0000000..6fcc4b7
--- /dev/null
+++ b/src/resources/ui/bjb-window.ui
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface domain="bjb">
+  <!-- interface-requires gtk 3.10 -->
+  <template class="BjbWindow" parent="GtkApplicationWindow">
+    <property name="width-request">400</property>
+    <property name="height-request">300</property>
+    <signal name="configure-event" handler="bjb_window_configure_event" swapped="no"/>
+    <signal name="destroy" handler="bjb_window_destroy" swapped="no"/>
+
+    <!-- Headerbar -->
+    <child type="titlebar">
+      <object class="GtkHeaderBar">
+        <property name="title" translatable="yes">GNOME Notes</property>
+        <property name="subtitle" translatable="yes">Every detail matters</property>
+        <property name="visible">1</property>
+        <property name="can-focus">1</property>
+        <property name="show-close-button">1</property>
+
+        <!-- Menu Button -->
+        <child>
+          <object class="GtkMenuButton" id="menu_button">
+            <property name="visible">1</property>
+            <property name="direction">none</property>
+            <property name="menu-model">win_menu</property>
+            <accelerator key="F10" signal="clicked"/>
+            <child>
+              <object class="GtkImage">
+                <property name="visible">1</property>
+                <property name="icon-name">open-menu-symbolic</property>
+              </object>
+            </child>
+          </object> <!-- ./GtkMenuButton menu_button -->
+          <packing>
+            <property name="pack-type">end</property>
+          </packing>
+        </child>
+
+      </object> <!-- ./GtkHeaderBar -->
+    </child>
+  </template>
+
+  <menu id="win_menu">
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_About</attribute>
+        <attribute name="action">app.about</attribute>
+      </item>
+    </section>
+    <section>
+      <item>
+        <attribute name="label" translatable="yes">_Quit</attribute>
+        <attribute name="action">app.quit</attribute>
+      </item>
+    </section>
+  </menu>
+
+</interface>


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