[gnome-contacts] Window: Add the back button



commit d6083514266c103ddf5f1650e2ee17ae35134041
Author: Adrien Plazas <kekun plazas laposte net>
Date:   Thu Oct 18 16:02:16 2018 +0200

    Window: Add the back button
    
    This will be used when adding the leaflet to navigate between the panels
    in folded mode.

 data/ui/contacts-window.ui | 29 +++++++++++++++++++++++++++++
 src/contacts-window.vala   |  6 ++++++
 2 files changed, 35 insertions(+)
---
diff --git a/data/ui/contacts-window.ui b/data/ui/contacts-window.ui
index f7ea3ae..efe415d 100644
--- a/data/ui/contacts-window.ui
+++ b/data/ui/contacts-window.ui
@@ -193,6 +193,35 @@
                 <property name="visible">True</property>
                 <property name="hexpand">True</property>
                 <property name="show_close_button">True</property>
+                <child>
+                  <object class="GtkRevealer" id="back_revealer">
+                    <property name="can_focus">False</property>
+                    <property name="transition-type">slide-right</property>
+                    <child>
+                      <object class="GtkButton" id="back">
+                        <property name="visible">True</property>
+                        <property name="valign">center</property>
+                        <property name="use-underline">True</property>
+                        <signal name="clicked" handler="on_back_clicked"/>
+                        <style>
+                          <class name="image-button"/>
+                        </style>
+                        <child internal-child="accessible">
+                          <object class="AtkObject" id="a11y-back">
+                            <property name="accessible-name" translatable="yes">Back</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkImage" id="back_image">
+                            <property name="visible">True</property>
+                            <property name="icon-name">go-previous-symbolic</property>
+                            <property name="icon-size">1</property>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
                 <child>
                   <object class="GtkButton" id="cancel_button">
                     <property name="visible">False</property>
diff --git a/src/contacts-window.vala b/src/contacts-window.vala
index 8c8c9c7..2feab89 100644
--- a/src/contacts-window.vala
+++ b/src/contacts-window.vala
@@ -25,6 +25,8 @@ public class Contacts.Window : Gtk.ApplicationWindow {
   [GtkChild]
   private Grid content_grid;
   [GtkChild]
+  private Revealer back_revealer;
+  [GtkChild]
   private Container contact_pane_container;
   [GtkChild]
   private Grid loading_box;
@@ -237,6 +239,10 @@ public class Contacts.Window : Gtk.ApplicationWindow {
     this.titlebar.selection_mode = this.state == UiState.SELECTING || this.state.editing ();
   }
 
+  [GtkCallback]
+  private void on_back_clicked () {
+  }
+
   [GtkCallback]
   private void on_edit_button_clicked () {
     if (this.contact_pane.contact == null)


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