Use primary menu instead of gtk/menus.ui
Part of the 3.32 initiative to get rid of the app menu.
This commit is contained in:
@@ -1,17 +0,0 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<interface>
|
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
|
||||||
<menu id="app-menu">
|
|
||||||
<section>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">_About</attribute>
|
|
||||||
<attribute name="action">app.about</attribute>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
|
||||||
<attribute name="action">app.quit</attribute>
|
|
||||||
<attribute name="accel"><Primary>q</attribute>
|
|
||||||
</item>
|
|
||||||
</section>
|
|
||||||
</menu>
|
|
||||||
</interface>
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<gresources>
|
<gresources>
|
||||||
<gresource prefix="/com/frac_tion/teleport">
|
<gresource prefix="/com/frac_tion/teleport">
|
||||||
<file alias="gtk/menus.ui">gtk/menus.ui</file>
|
|
||||||
<file preprocess="xml-stripblanks">window.ui</file>
|
<file preprocess="xml-stripblanks">window.ui</file>
|
||||||
<file preprocess="xml-stripblanks">settings.ui</file>
|
<file preprocess="xml-stripblanks">settings.ui</file>
|
||||||
<file preprocess="xml-stripblanks">device_settings.ui</file>
|
<file preprocess="xml-stripblanks">device_settings.ui</file>
|
||||||
|
|||||||
138
src/settings.ui
138
src/settings.ui
@@ -1,88 +1,90 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.0 -->
|
<requires lib="gtk+" version="3.16"/>
|
||||||
<object id="settings" class="GtkPopover">
|
<object class="GtkPopover" id="settings">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="margin">12</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid">
|
<object class="GtkGrid">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="margin">10</property>
|
<property name="can_focus">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="xalign">0</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes">Save received files in:</property>
|
|
||||||
<property name="margin_bottom">6</property>
|
<property name="margin_bottom">6</property>
|
||||||
|
<property name="label" translatable="yes">Save received files in:</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFileChooserButton" id="settings_download_directory">
|
<object class="GtkFileChooserButton" id="settings_download_directory">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="sensitive">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="action">select-folder</property>
|
<property name="action">select-folder</property>
|
||||||
<property name="title" translatable="yes">Choose download dir</property>
|
<property name="title" translatable="yes">Choose download dir</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="visible">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">Automatically enable Teleport on these networks:</property>
|
|
||||||
<property name="margin_bottom">6</property>
|
|
||||||
<property name="margin_top">18</property>
|
<property name="margin_top">18</property>
|
||||||
|
<property name="margin_bottom">6</property>
|
||||||
|
<property name="label" translatable="yes">Automatically enable Teleport on these networks:</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="width">2</property>
|
<property name="width">2</property>
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBox" id="general-listbox">
|
<object class="GtkListBox" id="general-listbox">
|
||||||
<property name="visible">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="selection_mode">none</property>
|
<property name="selection_mode">none</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListBoxRow" id="primary-button-row-1">
|
<object class="GtkListBoxRow" id="primary-button-row-1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="activatable">false</property>
|
<property name="activatable">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid" id="primary-button-grid-1">
|
<object class="GtkGrid" id="primary-button-grid-1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="row_spacing">0</property>
|
<property name="margin_left">12</property>
|
||||||
<property name="column_spacing">16</property>
|
<property name="margin_right">6</property>
|
||||||
<property name="margin_start">12</property>
|
<property name="margin_start">12</property>
|
||||||
<property name="margin_end">6</property>
|
<property name="margin_end">6</property>
|
||||||
<property name="margin_top">6</property>
|
<property name="margin_top">6</property>
|
||||||
<property name="margin_bottom">6</property>
|
<property name="margin_bottom">6</property>
|
||||||
|
<property name="column_spacing">16</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="device-name-lable-1">
|
<object class="GtkLabel" id="device-name-lable-1">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">o2-WLAN09</property>
|
<property name="label" translatable="yes">o2-WLAN09</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -91,14 +93,12 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="valign">center</property>
|
<property name="valign">center</property>
|
||||||
<property name="column_homogeneous">True</property>
|
<property name="column_homogeneous">True</property>
|
||||||
<style>
|
|
||||||
<class name="linked"/>
|
|
||||||
</style>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="localSettings-1">
|
<object class="GtkButton" id="localSettings-1">
|
||||||
|
<property name="height_request">35</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="height_request">35</property>
|
<property name="receives_default">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkImage">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -110,13 +110,18 @@
|
|||||||
<class name="image-button"/>
|
<class name="image-button"/>
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="linked"/>
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -127,31 +132,30 @@
|
|||||||
<object class="GtkListBoxRow" id="primary-button-row">
|
<object class="GtkListBoxRow" id="primary-button-row">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="activatable">false</property>
|
<property name="activatable">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid" id="primary-button-grid">
|
<object class="GtkGrid" id="primary-button-grid">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="row_spacing">0</property>
|
<property name="margin_left">12</property>
|
||||||
<property name="column_spacing">16</property>
|
<property name="margin_right">6</property>
|
||||||
<property name="margin_start">12</property>
|
<property name="margin_start">12</property>
|
||||||
<property name="margin_end">6</property>
|
<property name="margin_end">6</property>
|
||||||
<property name="margin_top">6</property>
|
<property name="margin_top">6</property>
|
||||||
<property name="margin_bottom">6</property>
|
<property name="margin_bottom">6</property>
|
||||||
|
<property name="column_spacing">16</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="device-name-lable">
|
<object class="GtkLabel" id="device-name-lable">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">Add Network</property>
|
<property name="label" translatable="yes">Add Network</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -160,14 +164,12 @@
|
|||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="valign">center</property>
|
<property name="valign">center</property>
|
||||||
<property name="column_homogeneous">True</property>
|
<property name="column_homogeneous">True</property>
|
||||||
<style>
|
|
||||||
<class name="linked"/>
|
|
||||||
</style>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="localSettings">
|
<object class="GtkButton" id="localSettings">
|
||||||
|
<property name="height_request">35</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="height_request">35</property>
|
<property name="receives_default">False</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkImage">
|
<object class="GtkImage">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -179,26 +181,74 @@
|
|||||||
<class name="image-button"/>
|
<class name="image-button"/>
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<style>
|
||||||
|
<class name="linked"/>
|
||||||
|
</style>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">1</property>
|
|
||||||
<property name="height">1</property>
|
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">4</property>
|
<property name="top_attach">4</property>
|
||||||
<property name="width">2</property>
|
<property name="width">2</property>
|
||||||
<property name="height">1</property>
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSeparator">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_top">6</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkModelButton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="action_name">app.about</property>
|
||||||
|
<property name="text" translatable="yes">_About Fragments</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@@ -354,6 +354,7 @@ static void
|
|||||||
teleport_app_startup (GApplication *app) {
|
teleport_app_startup (GApplication *app) {
|
||||||
TeleportAppPrivate *priv;
|
TeleportAppPrivate *priv;
|
||||||
GtkStyleProvider *provider;
|
GtkStyleProvider *provider;
|
||||||
|
static const gchar *quit_accels[] = { "<Primary>q", NULL };
|
||||||
|
|
||||||
mainApplication = TELEPORT_APP (app);
|
mainApplication = TELEPORT_APP (app);
|
||||||
priv = mainApplication->priv;
|
priv = mainApplication->priv;
|
||||||
@@ -363,6 +364,8 @@ teleport_app_startup (GApplication *app) {
|
|||||||
G_N_ELEMENTS (app_entries),
|
G_N_ELEMENTS (app_entries),
|
||||||
app);
|
app);
|
||||||
|
|
||||||
|
gtk_application_set_accels_for_action (GTK_APPLICATION (app), "app.quit", quit_accels);
|
||||||
|
|
||||||
G_APPLICATION_CLASS (teleport_app_parent_class)->startup (app);
|
G_APPLICATION_CLASS (teleport_app_parent_class)->startup (app);
|
||||||
|
|
||||||
/* window */
|
/* window */
|
||||||
|
|||||||
Reference in New Issue
Block a user