[geary/wip/account-editor-refinements-v1: 3/7] Move common account editor pane in-app notification impl to the editor



commit fdb9243ae536a49ba6bd76839da2a669814fef18
Author: Michael Gratton <mike vee net>
Date:   Wed Jan 9 10:20:51 2019 +1100

    Move common account editor pane in-app notification impl to the editor
    
    This moves the individual in-app notification implementation on each of
    the editor panes to the editor itself, reducing redundancy and allowing
    the editor to issue notifications if needed (spoiler: it will).

 po/POTFILES.in                                     |   1 +
 src/client/accounts/accounts-editor-add-pane.vala  |  10 +-
 src/client/accounts/accounts-editor-list-pane.vala |  12 +-
 .../accounts/accounts-editor-servers-pane.vala     |  10 +-
 src/client/accounts/accounts-editor.vala           |  38 ++--
 ui/accounts_editor.ui                              |  64 ++++++
 ui/accounts_editor_add_pane.ui                     | 181 +++++++++--------
 ui/accounts_editor_list_pane.ui                    | 215 ++++++++++-----------
 ui/accounts_editor_servers_pane.ui                 | 201 +++++++++----------
 ui/org.gnome.Geary.gresource.xml                   |   1 +
 10 files changed, 372 insertions(+), 361 deletions(-)
---
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 50387e02..f93c1690 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -401,6 +401,7 @@ src/engine/util/util-time.vala
 src/engine/util/util-timeout-manager.vala
 src/engine/util/util-trillian.vala
 src/mailer/main.vala
+ui/accounts_editor.ui
 ui/accounts_editor_add_pane.ui
 ui/accounts_editor_edit_pane.ui
 ui/accounts_editor_list_pane.ui
diff --git a/src/client/accounts/accounts-editor-add-pane.vala 
b/src/client/accounts/accounts-editor-add-pane.vala
index cee7d989..3d7a5610 100644
--- a/src/client/accounts/accounts-editor-add-pane.vala
+++ b/src/client/accounts/accounts-editor-add-pane.vala
@@ -27,9 +27,6 @@ internal class Accounts.EditorAddPane : Gtk.Grid, EditorPane {
     [GtkChild]
     private Gtk.HeaderBar header;
 
-    [GtkChild]
-    private Gtk.Overlay osd_overlay;
-
     [GtkChild]
     private Gtk.Grid pane_content;
 
@@ -148,11 +145,6 @@ internal class Accounts.EditorAddPane : Gtk.Grid, EditorPane {
         return this.header;
     }
 
-    private void add_notification(InAppNotification notification) {
-        this.osd_overlay.add_overlay(notification);
-        notification.show();
-    }
-
     private async void validate_account(GLib.Cancellable? cancellable) {
         this.create_spinner.show();
         this.create_spinner.start();
@@ -271,7 +263,7 @@ internal class Accounts.EditorAddPane : Gtk.Grid, EditorPane {
             if (to_focus != null) {
                 to_focus.grab_focus();
             }
-            add_notification(
+            this.editor.add_notification(
                 new InAppNotification(
                     // Translators: In-app notification label, the
                     // string substitution is a more detailed reason.
diff --git a/src/client/accounts/accounts-editor-list-pane.vala 
b/src/client/accounts/accounts-editor-list-pane.vala
index db8092d8..5aa0975b 100644
--- a/src/client/accounts/accounts-editor-list-pane.vala
+++ b/src/client/accounts/accounts-editor-list-pane.vala
@@ -54,9 +54,6 @@ internal class Accounts.EditorListPane : Gtk.Grid, EditorPane, CommandPane {
     [GtkChild]
     private Gtk.HeaderBar header;
 
-    [GtkChild]
-    private Gtk.Overlay osd_overlay;
-
     [GtkChild]
     private Gtk.Grid pane_content;
 
@@ -165,11 +162,6 @@ internal class Accounts.EditorListPane : Gtk.Grid, EditorPane, CommandPane {
         this.accounts_list.add(row);
     }
 
-    private void add_notification(InAppNotification notification) {
-        this.osd_overlay.add_overlay(notification);
-        notification.show();
-    }
-
     private void update_welcome_panel() {
         if (this.show_welcome) {
             // No accounts are available, so show only the welcome
@@ -241,7 +233,7 @@ internal class Accounts.EditorListPane : Gtk.Grid, EditorPane, CommandPane {
         if (command.executed_label != null) {
             InAppNotification ian = new InAppNotification(command.executed_label);
             ian.set_button(_("Undo"), "win." + GearyController.ACTION_UNDO);
-            add_notification(ian);
+            this.editor.add_notification(ian);
         }
     }
 
@@ -249,7 +241,7 @@ internal class Accounts.EditorListPane : Gtk.Grid, EditorPane, CommandPane {
         if (command.undone_label != null) {
             InAppNotification ian = new InAppNotification(command.undone_label);
             ian.set_button(_("Redo"), "win." + GearyController.ACTION_REDO);
-            add_notification(ian);
+            this.editor.add_notification(ian);
         }
     }
 
diff --git a/src/client/accounts/accounts-editor-servers-pane.vala 
b/src/client/accounts/accounts-editor-servers-pane.vala
index 6c4e410a..1718ea03 100644
--- a/src/client/accounts/accounts-editor-servers-pane.vala
+++ b/src/client/accounts/accounts-editor-servers-pane.vala
@@ -44,9 +44,6 @@ internal class Accounts.EditorServersPane :
     [GtkChild]
     private Gtk.HeaderBar header;
 
-    [GtkChild]
-    private Gtk.Overlay osd_overlay;
-
     [GtkChild]
     private Gtk.Grid pane_content;
 
@@ -283,7 +280,7 @@ internal class Accounts.EditorServersPane :
         debug("Validation complete, is valid: %s", is_valid.to_string());
 
         if (!is_valid) {
-            add_notification(
+            this.editor.add_notification(
                 new InAppNotification(
                     // Translators: In-app notification label, the
                     // string substitution is a more detailed reason.
@@ -329,11 +326,6 @@ internal class Accounts.EditorServersPane :
         return has_changed;
     }
 
-    private void add_notification(InAppNotification notification) {
-        this.osd_overlay.add_overlay(notification);
-        notification.show();
-    }
-
     private void add_row(Gtk.ListBox list, EditorRow<EditorServersPane> row) {
         list.add(row);
         ValidatingRow? validating = row as ValidatingRow;
diff --git a/src/client/accounts/accounts-editor.vala b/src/client/accounts/accounts-editor.vala
index 30eee914..a27c4db9 100644
--- a/src/client/accounts/accounts-editor.vala
+++ b/src/client/accounts/accounts-editor.vala
@@ -8,6 +8,7 @@
 /**
  * The main account editor window.
  */
+[GtkTemplate (ui = "/org/gnome/Geary/accounts_editor.ui")]
 public class Accounts.Editor : Gtk.Dialog {
 
 
@@ -32,7 +33,12 @@ public class Accounts.Editor : Gtk.Dialog {
 
     private SimpleActionGroup actions = new SimpleActionGroup();
 
-    private Gtk.Stack editor_panes = new Gtk.Stack();
+    [GtkChild]
+    private Gtk.Overlay notifications_pane;
+
+    [GtkChild]
+    private Gtk.Stack editor_panes;
+
     private EditorListPane editor_list_pane;
 
     private Gee.LinkedList<EditorPane> editor_pane_stack =
@@ -41,22 +47,12 @@ public class Accounts.Editor : Gtk.Dialog {
 
     public Editor(GearyApplication application, Gtk.Window parent) {
         this.application = application;
-        this.accounts = application.controller.account_manager;
+        this.transient_for = parent;
 
-        set_default_size(700, 450);
-        set_icon_name(GearyApplication.APP_ID);
-        set_modal(true);
-        set_title(_("Accounts"));
-        set_transient_for(parent);
+        // Can't set this in Glade 3.22.1 :(
+        this.get_content_area().border_width = 0;
 
-        get_content_area().border_width = 0;
-        get_content_area().add(this.editor_panes);
-
-        this.editor_panes.set_transition_type(
-            Gtk.StackTransitionType.SLIDE_LEFT_RIGHT
-        );
-        this.editor_panes.notify["visible-child"].connect_after(on_pane_changed);
-        this.editor_panes.show();
+        this.accounts = application.controller.account_manager;
 
         this.actions.add_action_entries(ACTION_ENTRIES, this);
         insert_action_group("win", this.actions);
@@ -94,11 +90,6 @@ public class Accounts.Editor : Gtk.Dialog {
         return ret;
     }
 
-    public override void destroy() {
-        this.editor_panes.notify["visible-child"].disconnect(on_pane_changed);
-        base.destroy();
-    }
-
     internal void push(EditorPane pane) {
         // Since we keep old, already-popped panes around (see pop for
         // details), when a new pane is pushed on they need to be
@@ -127,6 +118,12 @@ public class Accounts.Editor : Gtk.Dialog {
         this.editor_panes.set_visible_child(prev);
     }
 
+    /** Displays an in-app notification in the dialog. */
+    internal void add_notification(InAppNotification notification) {
+        this.notifications_pane.add_overlay(notification);
+        notification.show();
+    }
+
     internal void remove_account(Geary.AccountInformation account) {
         this.editor_panes.set_visible_child(this.editor_list_pane);
         this.editor_list_pane.remove_account(account);
@@ -168,6 +165,7 @@ public class Accounts.Editor : Gtk.Dialog {
         }
     }
 
+    [GtkCallback]
     private void on_pane_changed() {
         EditorPane? visible = get_current_pane();
         Gtk.Widget? header = null;
diff --git a/ui/accounts_editor.ui b/ui/accounts_editor.ui
new file mode 100644
index 00000000..22d41852
--- /dev/null
+++ b/ui/accounts_editor.ui
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.22.1 -->
+<interface>
+  <requires lib="gtk+" version="3.20"/>
+  <template class="AccountsEditor" parent="GtkDialog">
+    <property name="can_focus">False</property>
+    <property name="modal">True</property>
+    <property name="default_width">700</property>
+    <property name="default_height">450</property>
+    <property name="icon_name">org.gnome.Geary</property>
+    <property name="type_hint">dialog</property>
+    <child type="titlebar">
+      <placeholder/>
+    </child>
+    <child internal-child="vbox">
+      <object class="GtkBox">
+        <property name="can_focus">False</property>
+        <property name="orientation">vertical</property>
+        <child internal-child="action_area">
+          <object class="GtkButtonBox">
+            <property name="can_focus">False</property>
+            <property name="layout_style">end</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkOverlay" id="notifications_pane">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <child>
+              <object class="GtkStack" id="editor_panes">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="transition_type">slide-left-right</property>
+                <signal name="notify::visible-child" handler="on_pane_changed" swapped="no"/>
+                <child>
+                  <placeholder/>
+                </child>
+              </object>
+              <packing>
+                <property name="index">-1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">True</property>
+            <property name="fill">True</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/ui/accounts_editor_add_pane.ui b/ui/accounts_editor_add_pane.ui
index 4e4921f3..8d942c33 100644
--- a/ui/accounts_editor_add_pane.ui
+++ b/ui/accounts_editor_add_pane.ui
@@ -81,27 +81,65 @@
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <child>
-      <object class="GtkOverlay" id="osd_overlay">
+      <object class="GtkScrolledWindow">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
+        <property name="can_focus">True</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="vadjustment">pane_adjustment</property>
+        <property name="hscrollbar_policy">never</property>
+        <property name="shadow_type">in</property>
         <child>
-          <object class="GtkScrolledWindow">
+          <object class="GtkViewport">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <property name="vadjustment">pane_adjustment</property>
-            <property name="hscrollbar_policy">never</property>
-            <property name="shadow_type">in</property>
+            <property name="can_focus">False</property>
+            <property name="shadow_type">none</property>
             <child>
-              <object class="GtkViewport">
+              <object class="GtkGrid" id="pane_content">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="shadow_type">none</property>
                 <child>
-                  <object class="GtkGrid" id="pane_content">
+                  <object class="GtkFrame">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkListBox" id="details_list">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="selection_mode">none</property>
+                        <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="receiving_panel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <child>
+                      <object class="GtkLabel">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Receiving</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                        <style>
+                          <class name="geary-settings-heading"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
                     <child>
                       <object class="GtkFrame">
                         <property name="visible">True</property>
@@ -109,7 +147,7 @@
                         <property name="label_xalign">0</property>
                         <property name="shadow_type">in</property>
                         <child>
-                          <object class="GtkListBox" id="details_list">
+                          <object class="GtkListBox" id="receiving_list">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="selection_mode">none</property>
@@ -119,116 +157,69 @@
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
+                        <property name="top_attach">1</property>
                       </packing>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkGrid" id="sending_panel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
                     <child>
-                      <object class="GtkGrid" id="receiving_panel">
+                      <object class="GtkLabel">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">start</property>
-                            <property name="label" translatable="yes">Receiving</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                            <style>
-                              <class name="geary-settings-heading"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkFrame">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="label_xalign">0</property>
-                            <property name="shadow_type">in</property>
-                            <child>
-                              <object class="GtkListBox" id="receiving_list">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="selection_mode">none</property>
-                                <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
-                              </object>
-                            </child>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">1</property>
-                          </packing>
-                        </child>
+                        <property name="halign">start</property>
+                        <property name="label" translatable="yes">Sending</property>
+                        <attributes>
+                          <attribute name="weight" value="bold"/>
+                        </attributes>
+                        <style>
+                          <class name="geary-settings-heading"/>
+                        </style>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
+                        <property name="top_attach">0</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkGrid" id="sending_panel">
+                      <object class="GtkFrame">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="label_xalign">0</property>
+                        <property name="shadow_type">in</property>
                         <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">start</property>
-                            <property name="label" translatable="yes">Sending</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                            <style>
-                              <class name="geary-settings-heading"/>
-                            </style>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkFrame">
+                          <object class="GtkListBox" id="sending_list">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="label_xalign">0</property>
-                            <property name="shadow_type">in</property>
-                            <child>
-                              <object class="GtkListBox" id="sending_list">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="selection_mode">none</property>
-                                <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
-                              </object>
-                            </child>
+                            <property name="selection_mode">none</property>
+                            <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
                           </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">1</property>
-                          </packing>
                         </child>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
+                        <property name="top_attach">1</property>
                       </packing>
                     </child>
-                    <style>
-                      <class name="geary-accounts-editor-pane-content"/>
-                    </style>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
                 </child>
+                <style>
+                  <class name="geary-accounts-editor-pane-content"/>
+                </style>
               </object>
             </child>
           </object>
-          <packing>
-            <property name="index">-1</property>
-          </packing>
         </child>
       </object>
       <packing>
diff --git a/ui/accounts_editor_list_pane.ui b/ui/accounts_editor_list_pane.ui
index 36a4d3d3..85e7944a 100644
--- a/ui/accounts_editor_list_pane.ui
+++ b/ui/accounts_editor_list_pane.ui
@@ -18,171 +18,160 @@
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <child>
-      <object class="GtkOverlay" id="osd_overlay">
+      <object class="GtkScrolledWindow">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
+        <property name="can_focus">True</property>
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
+        <property name="vadjustment">pane_adjustment</property>
+        <property name="hscrollbar_policy">never</property>
+        <property name="min_content_height">400</property>
         <child>
-          <object class="GtkScrolledWindow">
+          <object class="GtkViewport">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <property name="vadjustment">pane_adjustment</property>
-            <property name="hscrollbar_policy">never</property>
-            <property name="min_content_height">400</property>
+            <property name="can_focus">False</property>
             <child>
-              <object class="GtkViewport">
+              <object class="GtkGrid" id="pane_content">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkGrid" id="pane_content">
+                  <object class="GtkGrid" id="welcome_panel">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="halign">center</property>
+                    <property name="column_spacing">12</property>
                     <child>
-                      <object class="GtkGrid" id="welcome_panel">
+                      <object class="GtkImage">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="halign">center</property>
-                        <property name="column_spacing">12</property>
-                        <child>
-                          <object class="GtkImage">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="pixel_size">64</property>
-                            <property name="icon_name">org.gnome.Geary</property>
-                            <property name="use_fallback">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                            <property name="height">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">start</property>
-                            <property name="valign">start</property>
-                            <property name="label" translatable="yes">To get started, select an email 
provider below.</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkLabel">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="halign">start</property>
-                            <property name="valign">end</property>
-                            <property name="label" translatable="yes">Welcome to Geary</property>
-                            <attributes>
-                              <attribute name="weight" value="bold"/>
-                            </attributes>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">0</property>
-                          </packing>
-                        </child>
-                        <style>
-                          <class name="geary-welcome-panel"/>
-                        </style>
+                        <property name="pixel_size">64</property>
+                        <property name="icon_name">org.gnome.Geary</property>
+                        <property name="use_fallback">True</property>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
                         <property name="top_attach">0</property>
+                        <property name="height">2</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkFrame" id="accounts_list_frame">
+                      <object class="GtkLabel">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
+                        <property name="halign">start</property>
                         <property name="valign">start</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <object class="GtkListBox" id="accounts_list">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="selection_mode">none</property>
-                            <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
-                            <signal name="row-activated" handler="on_row_activated" swapped="no"/>
-                          </object>
-                        </child>
-                        <child type="label_item">
-                          <placeholder/>
-                        </child>
+                        <property name="label" translatable="yes">To get started, select an email provider 
below.</property>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
+                        <property name="left_attach">1</property>
                         <property name="top_attach">1</property>
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkLabel" id="add_service_label">
+                      <object class="GtkLabel">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="halign">start</property>
-                        <property name="label" translatable="yes">Add an account</property>
+                        <property name="valign">end</property>
+                        <property name="label" translatable="yes">Welcome to Geary</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
                         </attributes>
-                        <style>
-                          <class name="geary-settings-heading"/>
-                        </style>
                       </object>
                       <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
                       </packing>
                     </child>
+                    <style>
+                      <class name="geary-welcome-panel"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="accounts_list_frame">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="valign">start</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
                     <child>
-                      <object class="GtkFrame">
+                      <object class="GtkListBox" id="accounts_list">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="valign">start</property>
-                        <property name="hexpand">True</property>
-                        <property name="vexpand">True</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <object class="GtkListBox" id="service_list">
-                            <property name="width_request">0</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="valign">start</property>
-                            <property name="selection_mode">none</property>
-                            <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
-                            <signal name="row-activated" handler="on_row_activated" swapped="no"/>
-                          </object>
-                        </child>
-                        <child type="label_item">
-                          <placeholder/>
-                        </child>
+                        <property name="selection_mode">none</property>
+                        <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
+                        <signal name="row-activated" handler="on_row_activated" swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">3</property>
-                      </packing>
                     </child>
+                    <child type="label_item">
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="add_service_label">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Add an account</property>
+                    <attributes>
+                      <attribute name="weight" value="bold"/>
+                    </attributes>
                     <style>
-                      <class name="geary-accounts-editor-pane-content"/>
+                      <class name="geary-settings-heading"/>
                     </style>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="valign">start</property>
+                    <property name="hexpand">True</property>
+                    <property name="vexpand">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
+                    <child>
+                      <object class="GtkListBox" id="service_list">
+                        <property name="width_request">0</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="valign">start</property>
+                        <property name="selection_mode">none</property>
+                        <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
+                        <signal name="row-activated" handler="on_row_activated" swapped="no"/>
+                      </object>
+                    </child>
+                    <child type="label_item">
+                      <placeholder/>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
                 </child>
+                <style>
+                  <class name="geary-accounts-editor-pane-content"/>
+                </style>
               </object>
             </child>
           </object>
-          <packing>
-            <property name="index">-1</property>
-          </packing>
         </child>
       </object>
       <packing>
diff --git a/ui/accounts_editor_servers_pane.ui b/ui/accounts_editor_servers_pane.ui
index d49704be..1a1234a3 100644
--- a/ui/accounts_editor_servers_pane.ui
+++ b/ui/accounts_editor_servers_pane.ui
@@ -76,142 +76,133 @@
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <child>
-      <object class="GtkOverlay" id="osd_overlay">
+      <object class="GtkScrolledWindow">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
+        <property name="can_focus">True</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="vadjustment">pane_adjustment</property>
+        <property name="hscrollbar_policy">never</property>
+        <property name="min_content_height">400</property>
         <child>
-          <object class="GtkScrolledWindow">
+          <object class="GtkViewport">
             <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hexpand">True</property>
-            <property name="vexpand">True</property>
-            <property name="vadjustment">pane_adjustment</property>
-            <property name="hscrollbar_policy">never</property>
-            <property name="min_content_height">400</property>
+            <property name="can_focus">False</property>
             <child>
-              <object class="GtkViewport">
+              <object class="GtkGrid" id="pane_content">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <child>
-                  <object class="GtkGrid" id="pane_content">
+                  <object class="GtkFrame">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
                     <child>
-                      <object class="GtkFrame">
+                      <object class="GtkListBox" id="receiving_list">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <object class="GtkListBox" id="receiving_list">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="selection_mode">none</property>
-                            <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
-                            <signal name="row-activated" handler="on_activate" swapped="no"/>
-                          </object>
-                        </child>
-                        <child type="label_item">
-                          <placeholder/>
-                        </child>
+                        <property name="selection_mode">none</property>
+                        <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
+                        <signal name="row-activated" handler="on_activate" swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="label" translatable="yes">Receiving</property>
-                        <style>
-                          <class name="geary-settings-heading"/>
-                        </style>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
-                      </packing>
+                    <child type="label_item">
+                      <placeholder/>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Receiving</property>
+                    <style>
+                      <class name="geary-settings-heading"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
                     <child>
-                      <object class="GtkFrame">
+                      <object class="GtkListBox" id="sending_list">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <object class="GtkListBox" id="sending_list">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="selection_mode">none</property>
-                            <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
-                            <signal name="row-activated" handler="on_activate" swapped="no"/>
-                          </object>
-                        </child>
-                        <child type="label_item">
-                          <placeholder/>
-                        </child>
+                        <property name="selection_mode">none</property>
+                        <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
+                        <signal name="row-activated" handler="on_activate" swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">4</property>
-                      </packing>
                     </child>
-                    <child>
-                      <object class="GtkLabel">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="halign">start</property>
-                        <property name="label" translatable="yes">Sending</property>
-                        <style>
-                          <class name="geary-settings-heading"/>
-                        </style>
-                      </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">3</property>
-                      </packing>
+                    <child type="label_item">
+                      <placeholder/>
                     </child>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">4</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="halign">start</property>
+                    <property name="label" translatable="yes">Sending</property>
+                    <style>
+                      <class name="geary-settings-heading"/>
+                    </style>
+                  </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">3</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame">
+                    <property name="visible">True</property>
+                    <property name="can_focus">False</property>
+                    <property name="hexpand">True</property>
+                    <property name="label_xalign">0</property>
+                    <property name="shadow_type">in</property>
                     <child>
-                      <object class="GtkFrame">
+                      <object class="GtkListBox" id="details_list">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="hexpand">True</property>
-                        <property name="label_xalign">0</property>
-                        <property name="shadow_type">in</property>
-                        <child>
-                          <object class="GtkListBox" id="details_list">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="selection_mode">none</property>
-                            <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
-                            <signal name="row-activated" handler="on_activate" swapped="no"/>
-                          </object>
-                        </child>
-                        <child type="label_item">
-                          <placeholder/>
-                        </child>
+                        <property name="selection_mode">none</property>
+                        <signal name="keynav-failed" handler="on_list_keynav_failed" swapped="no"/>
+                        <signal name="row-activated" handler="on_activate" swapped="no"/>
                       </object>
-                      <packing>
-                        <property name="left_attach">0</property>
-                        <property name="top_attach">0</property>
-                      </packing>
                     </child>
-                    <style>
-                      <class name="geary-accounts-editor-pane-content"/>
-                    </style>
+                    <child type="label_item">
+                      <placeholder/>
+                    </child>
                   </object>
+                  <packing>
+                    <property name="left_attach">0</property>
+                    <property name="top_attach">0</property>
+                  </packing>
                 </child>
+                <style>
+                  <class name="geary-accounts-editor-pane-content"/>
+                </style>
               </object>
             </child>
           </object>
-          <packing>
-            <property name="index">-1</property>
-          </packing>
         </child>
       </object>
       <packing>
diff --git a/ui/org.gnome.Geary.gresource.xml b/ui/org.gnome.Geary.gresource.xml
index 38fce5d8..9aa268bb 100644
--- a/ui/org.gnome.Geary.gresource.xml
+++ b/ui/org.gnome.Geary.gresource.xml
@@ -1,6 +1,7 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <gresources>
   <gresource prefix="/org/gnome/Geary">
+    <file compressed="true" preprocess="xml-stripblanks">accounts_editor.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">accounts_editor_add_pane.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">accounts_editor_edit_pane.ui</file>
     <file compressed="true" preprocess="xml-stripblanks">accounts_editor_list_pane.ui</file>


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