summaryrefslogtreecommitdiff
path: root/data/ui/mainwindow.ui
diff options
context:
space:
mode:
authorBilal Elmoussaoui <bil.elmoussaoui@gmail.com>2019-02-04 15:01:06 +0100
committerBilal Elmoussaoui <bil.elmoussaoui@gmail.com>2019-02-04 15:01:06 +0100
commitf16972d77b01c3b9357329def8a6aa40da9fae02 (patch)
treef865be41ea96f1ff5313adadb5968ddd99b2326c /data/ui/mainwindow.ui
parenta54814c0d14c54238a7995f139c3eb0121213b43 (diff)
downloadd-feet-f16972d77b01c3b9357329def8a6aa40da9fae02.tar.gz
Use Gtk.Template for widgets
This uses https://gitlab.gnome.org/GNOME/pygobject/merge_requests/52/ in order to clean the code It also moves the ui's to a gresource file to avoid having the pkgdatadir sent to all the widgets During the migration, I have also updated some depcreated widgets.
Diffstat (limited to 'data/ui/mainwindow.ui')
-rw-r--r--data/ui/mainwindow.ui111
1 files changed, 48 insertions, 63 deletions
diff --git a/data/ui/mainwindow.ui b/data/ui/mainwindow.ui
index 86a0f6e..55844c6 100644
--- a/data/ui/mainwindow.ui
+++ b/data/ui/mainwindow.ui
@@ -1,78 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.0 -->
<interface>
- <!-- interface-requires gtk+ 3.10 -->
- <menu id="gear_menu">
- <section>
- <item>
- <attribute name="label" translatable="yes">Connect to System Bus</attribute>
- <attribute name="action">win.connect-system-bus</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Connect to Session Bus</attribute>
- <attribute name="action">win.connect-session-bus</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Connect to other Bus</attribute>
- <attribute name="action">win.connect-other-bus</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">Close Bus</attribute>
- <attribute name="action">win.close-bus</attribute>
- </item>
- </section>
- <section>
- <item>
- <attribute name="label" translatable="yes">About D-Feet</attribute>
- <attribute name="action">app.about</attribute>
- </item>
- <item>
- <attribute name="label" translatable="yes">Help</attribute>
- <attribute name="action">app.help</attribute>
- <attribute name="accel">F1</attribute>
- </item>
- </section>
- </menu>
- <object class="GtkHeaderBar" id="headerbar">
- <property name="visible">True</property>
+ <requires lib="gtk+" version="3.10"/>
+ <template class="DFeetWindow" parent="GtkApplicationWindow">
<property name="can_focus">False</property>
- <property name="show-close-button">True</property>
- <child type="title">
- <object class="GtkStackSwitcher" id="stack_switcher">
+ <property name="default_width">600</property>
+ <property name="default_height">480</property>
+ <signal name="delete-event" handler="window_deleted" swapped="no"/>
+ <signal name="destroy" handler="window_destroyed" swapped="no"/>
+ <child>
+ <object class="GtkStack" id="buses_stack">
<property name="visible">True</property>
- <property name="valign">center</property>
- <property name="stack">buses_stack</property>
+ <property name="can_focus">False</property>
+ <property name="transition_duration">300</property>
+ <property name="transition_type">slide-left-right</property>
+ <signal name="add" handler="stack_child_added" swapped="no"/>
+ <signal name="remove" handler="stack_child_removed" swapped="no"/>
+ <child>
+ <placeholder/>
+ </child>
</object>
</child>
- <child>
- <object class="GtkMenuButton" id="gear_menu_button">
+ <child type="titlebar">
+ <object class="GtkHeaderBar" id="headerbar">
<property name="visible">True</property>
- <property name="valign">center</property>
<property name="can_focus">False</property>
- <property name="sensitive">True</property>
- <property name="action_name">win.gear-menu</property>
- <property name="menu_model">gear_menu</property>
- <style>
- <class name="image-button"/>
- </style>
+ <property name="show_close_button">True</property>
+ <child type="title">
+ <object class="GtkStackSwitcher" id="stack_switcher">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">center</property>
+ <property name="stack">buses_stack</property>
+ </object>
+ </child>
<child>
- <object class="GtkImage" id="gear_image">
+ <object class="GtkMenuButton" id="gear_menu_button">
<property name="visible">True</property>
- <property name="icon_size">1</property>
- <property name="icon_name">open-menu-symbolic</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="valign">center</property>
+ <property name="action_name">win.gear-menu</property>
+ <child>
+ <object class="GtkImage" id="gear_image">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon_name">open-menu-symbolic</property>
+ <property name="icon_size">1</property>
+ </object>
+ </child>
+ <style>
+ <class name="image-button"/>
+ </style>
</object>
+ <packing>
+ <property name="pack_type">end</property>
+ </packing>
</child>
</object>
- <packing>
- <property name="pack_type">end</property>
- </packing>
</child>
- </object>
- <object class="GtkStack" id="buses_stack">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="transition-type">slide-left-right</property>
- <property name="transition-duration">300</property>
- </object>
+ </template>
</interface>