♻️ Move main menu to separate file
This commit is contained in:
@@ -37,6 +37,7 @@ var PreferencesDialog = class PreferencesDialog {
|
|||||||
|
|
||||||
// Load the user interface file.
|
// Load the user interface file.
|
||||||
this._builder = new Gtk.Builder();
|
this._builder = new Gtk.Builder();
|
||||||
|
this._builder.add_from_resource(`/ui/common/main-menu.ui`);
|
||||||
this._builder.add_from_resource(`/ui/${utils.isGTK4() ? 'gtk4' : 'gtk3'}/prefs.ui`);
|
this._builder.add_from_resource(`/ui/${utils.isGTK4() ? 'gtk4' : 'gtk3'}/prefs.ui`);
|
||||||
this._builder.add_from_resource(`/ui/${utils.isGTK4() ? 'gtk4' : 'gtk3'}/fire.ui`);
|
this._builder.add_from_resource(`/ui/${utils.isGTK4() ? 'gtk4' : 'gtk3'}/fire.ui`);
|
||||||
this._builder.add_from_resource(`/ui/${utils.isGTK4() ? 'gtk4' : 'gtk3'}/matrix.ui`);
|
this._builder.add_from_resource(`/ui/${utils.isGTK4() ? 'gtk4' : 'gtk3'}/matrix.ui`);
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<menu id="main-menu">
|
||||||
|
<section>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">Visit Homepage</attribute>
|
||||||
|
<attribute name="action">prefs.homepage</attribute>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">View Changelog</attribute>
|
||||||
|
<attribute name="action">prefs.changelog</attribute>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">Report a Bug</attribute>
|
||||||
|
<attribute name="action">prefs.bugs</attribute>
|
||||||
|
</item>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<submenu>
|
||||||
|
<attribute name="label" translatable="yes">Donate</attribute>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">Via PayPal</attribute>
|
||||||
|
<attribute name="action">prefs.donate-paypal</attribute>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<attribute name="label" translatable="yes">Via GitHub</attribute>
|
||||||
|
<attribute name="action">prefs.donate-github</attribute>
|
||||||
|
</item>
|
||||||
|
</submenu>
|
||||||
|
</section>
|
||||||
|
</menu>
|
||||||
|
</interface>
|
||||||
@@ -19,36 +19,6 @@
|
|||||||
</data>
|
</data>
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
<menu id="main-menu">
|
|
||||||
<section>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Visit Homepage</attribute>
|
|
||||||
<attribute name="action">prefs.homepage</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">View Changelog</attribute>
|
|
||||||
<attribute name="action">prefs.changelog</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Report a Bug</attribute>
|
|
||||||
<attribute name="action">prefs.bugs</attribute>
|
|
||||||
</item>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<submenu>
|
|
||||||
<attribute name="label" translatable="yes">Donate</attribute>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Via PayPal</attribute>
|
|
||||||
<attribute name="action">prefs.donate-paypal</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Via GitHub</attribute>
|
|
||||||
<attribute name="action">prefs.donate-github</attribute>
|
|
||||||
</item>
|
|
||||||
</submenu>
|
|
||||||
</section>
|
|
||||||
</menu>
|
|
||||||
|
|
||||||
<object class="GtkMenuButton" id="menu-button">
|
<object class="GtkMenuButton" id="menu-button">
|
||||||
<property name="menu-model">main-menu</property>
|
<property name="menu-model">main-menu</property>
|
||||||
<property name="visible">1</property>
|
<property name="visible">1</property>
|
||||||
|
|||||||
@@ -27,36 +27,6 @@
|
|||||||
</data>
|
</data>
|
||||||
</object>
|
</object>
|
||||||
|
|
||||||
<menu id="main-menu">
|
|
||||||
<section>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Visit Homepage</attribute>
|
|
||||||
<attribute name="action">prefs.homepage</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">View Changelog</attribute>
|
|
||||||
<attribute name="action">prefs.changelog</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Report a Bug</attribute>
|
|
||||||
<attribute name="action">prefs.bugs</attribute>
|
|
||||||
</item>
|
|
||||||
</section>
|
|
||||||
<section>
|
|
||||||
<submenu>
|
|
||||||
<attribute name="label" translatable="yes">Donate</attribute>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Via PayPal</attribute>
|
|
||||||
<attribute name="action">prefs.donate-paypal</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">Via GitHub</attribute>
|
|
||||||
<attribute name="action">prefs.donate-github</attribute>
|
|
||||||
</item>
|
|
||||||
</submenu>
|
|
||||||
</section>
|
|
||||||
</menu>
|
|
||||||
|
|
||||||
<object class="GtkMenuButton" id="menu-button">
|
<object class="GtkMenuButton" id="menu-button">
|
||||||
<property name="menu-model">main-menu</property>
|
<property name="menu-model">main-menu</property>
|
||||||
<property name="icon-name">open-menu-symbolic</property>
|
<property name="icon-name">open-menu-symbolic</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user