151 lines
6.5 KiB
Diff
151 lines
6.5 KiB
Diff
|
From fb311e1c822fb41782c7ff07525c77732a52a971 Mon Sep 17 00:00:00 2001
|
||
|
From: Adrien Plazas <kekun.plazas@laposte.net>
|
||
|
Date: Thu, 16 Jan 2020 13:17:58 +0100
|
||
|
Subject: [PATCH 046/124] Drop the 2-panes mode
|
||
|
|
||
|
This won't be needed to save horizontal space when using HdyLeaflet, and
|
||
|
it would make porting to it harder.
|
||
|
---
|
||
|
desktop/org.gnome.Geary.gschema.xml | 6 -----
|
||
|
.../application-configuration.vala | 5 ----
|
||
|
.../application/application-main-window.vala | 27 ++-----------------
|
||
|
.../components-preferences-window.vala | 16 -----------
|
||
|
4 files changed, 2 insertions(+), 52 deletions(-)
|
||
|
|
||
|
diff --git a/desktop/org.gnome.Geary.gschema.xml b/desktop/org.gnome.Geary.gschema.xml
|
||
|
index 9850dffd..89354dc2 100644
|
||
|
--- a/desktop/org.gnome.Geary.gschema.xml
|
||
|
+++ b/desktop/org.gnome.Geary.gschema.xml
|
||
|
@@ -21,12 +21,6 @@
|
||
|
<description>The last recorded height of the application window.</description>
|
||
|
</key>
|
||
|
|
||
|
- <key name="folder-list-pane-horizontal" type="b">
|
||
|
- <default>true</default>
|
||
|
- <summary>Orientation of the folder list pane</summary>
|
||
|
- <description>True if the folder list Paned is in the horizontal orientation.</description>
|
||
|
- </key>
|
||
|
-
|
||
|
<key name="formatting-toolbar-visible" type="b">
|
||
|
<default>false</default>
|
||
|
<summary>Show/hide formatting toolbar</summary>
|
||
|
diff --git a/src/client/application/application-configuration.vala b/src/client/application/application-configuration.vala
|
||
|
index 51a11bbf..48542df6 100644
|
||
|
--- a/src/client/application/application-configuration.vala
|
||
|
+++ b/src/client/application/application-configuration.vala
|
||
|
@@ -19,7 +19,6 @@ public class Application.Configuration : Geary.BaseObject {
|
||
|
public const string COMPOSE_AS_HTML_KEY = "compose-as-html";
|
||
|
public const string CONVERSATION_VIEWER_ZOOM_KEY = "conversation-viewer-zoom";
|
||
|
public const string DISPLAY_PREVIEW_KEY = "display-preview";
|
||
|
- public const string FOLDER_LIST_PANE_HORIZONTAL_KEY = "folder-list-pane-horizontal";
|
||
|
public const string FORMATTING_TOOLBAR_VISIBLE = "formatting-toolbar-visible";
|
||
|
public const string OPTIONAL_PLUGINS = "optional-plugins";
|
||
|
public const string SEARCH_STRATEGY_KEY = "search-strategy";
|
||
|
@@ -86,10 +85,6 @@ public class Application.Configuration : Geary.BaseObject {
|
||
|
get { return settings.get_boolean(WINDOW_MAXIMIZE_KEY); }
|
||
|
}
|
||
|
|
||
|
- public bool folder_list_pane_horizontal {
|
||
|
- get { return settings.get_boolean(FOLDER_LIST_PANE_HORIZONTAL_KEY); }
|
||
|
- }
|
||
|
-
|
||
|
public bool formatting_toolbar_visible {
|
||
|
get { return settings.get_boolean(FORMATTING_TOOLBAR_VISIBLE); }
|
||
|
set { settings.set_boolean(FORMATTING_TOOLBAR_VISIBLE, value); }
|
||
|
diff --git a/src/client/application/application-main-window.vala b/src/client/application/application-main-window.vala
|
||
|
index 48f8bae6..0bec6614 100644
|
||
|
--- a/src/client/application/application-main-window.vala
|
||
|
+++ b/src/client/application/application-main-window.vala
|
||
|
@@ -511,7 +511,8 @@ public class Application.MainWindow :
|
||
|
});
|
||
|
|
||
|
setup_layout(application.config);
|
||
|
- on_change_orientation();
|
||
|
+ this.folder_paned.orientation = Gtk.Orientation.HORIZONTAL;
|
||
|
+ this.folder_box.pack_start(status_bar, false, false);
|
||
|
|
||
|
update_command_actions();
|
||
|
update_conversation_actions(NONE);
|
||
|
@@ -1133,10 +1134,6 @@ public class Application.MainWindow :
|
||
|
config.bind(Configuration.WINDOW_WIDTH_KEY, this, "window-width");
|
||
|
config.bind(Configuration.WINDOW_HEIGHT_KEY, this, "window-height");
|
||
|
config.bind(Configuration.WINDOW_MAXIMIZE_KEY, this, "window-maximized");
|
||
|
- // Update to layout
|
||
|
- config.settings.changed[
|
||
|
- Configuration.FOLDER_LIST_PANE_HORIZONTAL_KEY
|
||
|
- ].connect(on_change_orientation);
|
||
|
}
|
||
|
|
||
|
private void restore_saved_window_state() {
|
||
|
@@ -1637,26 +1634,6 @@ public class Application.MainWindow :
|
||
|
}
|
||
|
}
|
||
|
|
||
|
- private void on_change_orientation() {
|
||
|
- bool horizontal = this.application.config.folder_list_pane_horizontal;
|
||
|
- bool initial = true;
|
||
|
-
|
||
|
- if (this.status_bar.parent != null) {
|
||
|
- this.status_bar.parent.remove(status_bar);
|
||
|
- initial = false;
|
||
|
- }
|
||
|
-
|
||
|
- GLib.Settings.unbind(this.folder_paned, "position");
|
||
|
- this.folder_paned.orientation = horizontal ? Gtk.Orientation.HORIZONTAL :
|
||
|
- Gtk.Orientation.VERTICAL;
|
||
|
-
|
||
|
- if (horizontal) {
|
||
|
- this.folder_box.pack_start(status_bar, false, false);
|
||
|
- } else {
|
||
|
- this.conversation_list_box.pack_start(status_bar, false, false);
|
||
|
- }
|
||
|
- }
|
||
|
-
|
||
|
private void update_headerbar() {
|
||
|
update_title();
|
||
|
if (this.selected_folder != null) {
|
||
|
diff --git a/src/client/components/components-preferences-window.vala b/src/client/components/components-preferences-window.vala
|
||
|
index b1bdfd7b..ea978a3a 100644
|
||
|
--- a/src/client/components/components-preferences-window.vala
|
||
|
+++ b/src/client/components/components-preferences-window.vala
|
||
|
@@ -136,16 +136,6 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
|
||
|
display_preview_row.activatable_widget = display_preview;
|
||
|
display_preview_row.add(display_preview);
|
||
|
|
||
|
- var three_pane_view = new Gtk.Switch();
|
||
|
- three_pane_view.valign = CENTER;
|
||
|
-
|
||
|
- var three_pane_view_row = new Hdy.ActionRow();
|
||
|
- /// Translators: Preferences label
|
||
|
- three_pane_view_row.title = _("Use _three pane view");
|
||
|
- three_pane_view_row.use_underline = true;
|
||
|
- three_pane_view_row.activatable_widget = three_pane_view;
|
||
|
- three_pane_view_row.add(three_pane_view);
|
||
|
-
|
||
|
var single_key_shortucts = new Gtk.Switch();
|
||
|
single_key_shortucts.valign = CENTER;
|
||
|
|
||
|
@@ -180,7 +170,6 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
|
||
|
//group.description = _("General application preferences");
|
||
|
group.add(autoselect_row);
|
||
|
group.add(display_preview_row);
|
||
|
- group.add(three_pane_view_row);
|
||
|
group.add(single_key_shortucts_row);
|
||
|
group.add(startup_notifications_row);
|
||
|
|
||
|
@@ -210,11 +199,6 @@ public class Components.PreferencesWindow : Hdy.PreferencesWindow {
|
||
|
display_preview,
|
||
|
"state"
|
||
|
);
|
||
|
- config.bind(
|
||
|
- Application.Configuration.FOLDER_LIST_PANE_HORIZONTAL_KEY,
|
||
|
- three_pane_view,
|
||
|
- "state"
|
||
|
- );
|
||
|
config.bind(
|
||
|
Application.Configuration.SINGLE_KEY_SHORTCUTS,
|
||
|
single_key_shortucts,
|
||
|
--
|
||
|
2.29.2
|
||
|
|