[gnome-contacts] Improve Contacts setup UI a bit.



commit 06d81ae49daf126e5108545ce5b8c3e370c1b1f5
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Tue Dec 26 11:05:15 2017 +0100

    Improve Contacts setup UI a bit.
    
    See [bug 761929](https://bugzilla.gnome.org/show_bug.cgi?id=761929).

 data/ui/contacts-accounts-list.ui |    3 +-
 data/ui/contacts-window.ui        |   38 ++++++++++++++++++++++++------------
 src/contacts-window.vala          |   29 +++++++++++----------------
 3 files changed, 39 insertions(+), 31 deletions(-)
---
diff --git a/data/ui/contacts-accounts-list.ui b/data/ui/contacts-accounts-list.ui
index 5b6152c..fa5b02f 100644
--- a/data/ui/contacts-accounts-list.ui
+++ b/data/ui/contacts-accounts-list.ui
@@ -5,6 +5,7 @@
     <property name="visible">True</property>
     <property name="orientation">vertical</property>
     <property name="spacing">12</property>
+    <property name="width_request">420</property>
     <child>
       <object class="GtkScrolledWindow" id="scrolled">
         <property name="visible">True</property>
@@ -31,7 +32,7 @@
         <child>
           <object class="GtkLabel">
             <property name="visible">True</property>
-            <property name="label" translatable="yes">Online Accounts</property>
+            <property name="label" translatable="yes">Online Accounts Settings</property>
             <property name="margin_start">6</property>
             <property name="margin_end">6</property>
             <property name="margin_top">3</property>
diff --git a/data/ui/contacts-window.ui b/data/ui/contacts-window.ui
index 5b24b36..a2bd487 100644
--- a/data/ui/contacts-window.ui
+++ b/data/ui/contacts-window.ui
@@ -100,22 +100,36 @@
         <child>
           <object class="GtkGrid" id="setup_view">
             <property name="visible">True</property>
+            <property name="valign">center</property>
             <property name="border_width">12</property>
             <property name="row_spacing">24</property>
             <property name="orientation">vertical</property>
             <child>
+              <object class="GtkLabel">
+                <property name="visible">True</property>
+                <property name="halign">center</property>
+                <property name="label" translatable="yes">Welcome</property>
+                <attributes>
+                  <attribute name="scale" value="3.5"/>
+                  <!-- <attribute name="weight" value="bold"/> -->
+                </attributes>
+              </object>
+              <packing>
+                <property name="top_attach">0</property>
+                <property name="left_attach">0</property>
+              </packing>
+            </child>
+            <child>
               <object class="GtkLabel" id="setup_explanation_label">
                 <property name="visible">True</property>
                 <property name="halign">center</property>
                 <property name="wrap">True</property>
-                <property name="max_width_chars">25</property>
-                <property name="label" translatable="yes">New contacts will be added to the selected address 
book. You are able to view and edit contacts from other address books.</property>
+                <property name="max_width_chars">50</property>
+                <property name="label" translatable="yes">Please select your main address book: this is 
where new contacts will be added. If you keep your contacts in an online account, you can add them using the 
online accounts settings.</property>
               </object>
               <packing>
+                <property name="top_attach">1</property>
                 <property name="left_attach">0</property>
-                <property name="top_attach">0</property>
-                <property name="width">1</property>
-                <property name="height">1</property>
               </packing>
             </child>
           </object>
@@ -273,24 +287,22 @@
   <object class="GtkHeaderBar" id="setup_header_bar">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
-    <property name="title" translatable="yes">Select Address Book</property>
+    <property name="title" translatable="yes">Contacts Setup</property>
     <property name="show_close_button">False</property>
     <style>
       <class name="titlebar"/>
     </style>
     <child>
-      <object class="GtkButton" id="setup_cancel_button">
+      <object class="GtkButton" id="setup_quit_button">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="label" translatable="yes">Cancel</property>
+        <property name="label" translatable="yes">Quit</property>
+        <property name="action_name" translatable="yes">app.quit</property>
         <child internal-child="accessible">
-          <object class="AtkObject" id="setup_cancel_button_atkobject">
-            <property name="AtkObject::accessible-name" translatable="yes">Cancel setup</property>
+          <object class="AtkObject" id="setup_quit_button_atkobject">
+            <property name="AtkObject::accessible-name" translatable="yes">Cancel setup and quit</property>
           </object>
         </child>
-        <style>
-          <class name="text-button"/>
-        </style>
       </object>
       <packing>
         <property name="pack_type">start</property>
diff --git a/src/contacts-window.vala b/src/contacts-window.vala
index 77fe59e..5c1899b 100644
--- a/src/contacts-window.vala
+++ b/src/contacts-window.vala
@@ -60,8 +60,6 @@ public class Contacts.Window : Gtk.ApplicationWindow {
   private HeaderBar setup_header_bar;
   [GtkChild]
   private Button setup_done_button;
-  [GtkChild]
-  private Button setup_cancel_button;
   private AccountsList setup_accounts_list;
 
   // The 2 panes the window consists of
@@ -143,7 +141,7 @@ public class Contacts.Window : Gtk.ApplicationWindow {
     this.setup_accounts_list.hexpand = true;
     this.setup_accounts_list.halign = Align.CENTER;
     this.setup_accounts_list.show ();
-    this.setup_view.attach (this.setup_accounts_list, 1, 0);
+    this.setup_view.attach (this.setup_accounts_list, 0, 2);
 
     if (settings.did_initial_setup) {
       view_switcher.visible_child_name = "content-view";
@@ -168,20 +166,17 @@ public class Contacts.Window : Gtk.ApplicationWindow {
       setup_accounts_list.update_contents (false);
 
       setup_done_button.clicked.connect (() => {
-         view_switcher.visible_child_name = "content-view";
-         set_titlebar (content_header_bar);
-
-         var e_store = setup_accounts_list.selected_store as Edsf.PersonaStore;
-         eds_source_registry.set_default_address_book (e_store.source);
-         settings.did_initial_setup = true;
-
-         if (change_book_action != null) {
-           change_book_action.set_enabled (true);
-         }
-       });
-      setup_cancel_button.clicked.connect (() => {
-         app.quit ();
-       });
+          view_switcher.visible_child_name = "content-view";
+          set_titlebar (content_header_bar);
+
+          var e_store = setup_accounts_list.selected_store as Edsf.PersonaStore;
+          eds_source_registry.set_default_address_book (e_store.source);
+          settings.did_initial_setup = true;
+
+          if (change_book_action != null) {
+            change_book_action.set_enabled (true);
+          }
+        });
     }
 
     init_content_widgets ();


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