[gnome-boxes/gnome-3-14] toolbars: Set back icons from UI definition



commit 15edfbada8fda94b02e656948e823daa967b0055
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Sep 30 13:06:17 2014 +0100

    toolbars: Set back icons from UI definition
    
    Now that we don't have any need to choose different icons based on
    locale after commit 4b6777f "Fix the back icons in RTL", we can simply
    move these initializations to UI definition files.

 data/ui/collection-toolbar.ui |    2 ++
 data/ui/display-toolbar.ui    |    1 +
 data/ui/properties-toolbar.ui |    1 +
 src/collection-toolbar.vala   |    6 ------
 src/display-toolbar.vala      |    3 ---
 src/properties-toolbar.vala   |    4 ----
 6 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/data/ui/collection-toolbar.ui b/data/ui/collection-toolbar.ui
index c8cf221..19192ad 100644
--- a/data/ui/collection-toolbar.ui
+++ b/data/ui/collection-toolbar.ui
@@ -38,6 +38,8 @@
         <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>
diff --git a/data/ui/display-toolbar.ui b/data/ui/display-toolbar.ui
index 68a5d31..6416e94 100644
--- a/data/ui/display-toolbar.ui
+++ b/data/ui/display-toolbar.ui
@@ -20,6 +20,7 @@
         <child>
           <object class="GtkImage" id="back_image">
             <property name="visible">True</property>
+            <property name="icon-name">go-previous-symbolic</property>
           </object>
         </child>
       </object>
diff --git a/data/ui/properties-toolbar.ui b/data/ui/properties-toolbar.ui
index 6fd02a3..56d641b 100644
--- a/data/ui/properties-toolbar.ui
+++ b/data/ui/properties-toolbar.ui
@@ -26,6 +26,7 @@
         <child>
           <object class="GtkImage" id="back_image">
             <property name="visible">True</property>
+            <property name="icon-name">go-previous-symbolic</property>
           </object>
         </child>
       </object>
diff --git a/src/collection-toolbar.vala b/src/collection-toolbar.vala
index 40d64bf..edf8bab 100644
--- a/src/collection-toolbar.vala
+++ b/src/collection-toolbar.vala
@@ -10,16 +10,10 @@ private class Boxes.CollectionToolbar: HeaderBar {
     [GtkChild]
     private Button back_btn;
     [GtkChild]
-    private Image back_image;
-    [GtkChild]
     private Button new_btn;
 
     private AppWindow window;
 
-    construct {
-        back_image.set_from_icon_name ("go-previous-symbolic", IconSize.MENU);
-    }
-
     public void setup_ui (AppWindow window) {
         this.window = window;
 
diff --git a/src/display-toolbar.vala b/src/display-toolbar.vala
index f32df16..b752ef5 100644
--- a/src/display-toolbar.vala
+++ b/src/display-toolbar.vala
@@ -7,8 +7,6 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
     public bool handle_drag { get; construct; } // Handle drag events to (un)fulscreen the main window
 
     [GtkChild]
-    private Gtk.Image back_image;
-    [GtkChild]
     private Gtk.Image fullscreen_image;
     [GtkChild]
     private Gtk.Button back;
@@ -37,7 +35,6 @@ private class Boxes.DisplayToolbar: Gtk.HeaderBar {
             show_close_button = true;
         }
 
-        back_image.icon_name = "go-previous-symbolic";
         if (!overlay) {
             back.get_style_context ().add_class ("raised");
             fullscreen.get_style_context ().add_class ("raised");
diff --git a/src/properties-toolbar.vala b/src/properties-toolbar.vala
index 3c99195..6e6a3bc 100644
--- a/src/properties-toolbar.vala
+++ b/src/properties-toolbar.vala
@@ -6,8 +6,6 @@ private class Boxes.PropertiesToolbar: HeaderBar {
     [GtkChild]
     public Gtk.Button back_button;
     [GtkChild]
-    private Image back_image;
-    [GtkChild]
     private EditableEntry title_entry;
 
     private AppWindow window;
@@ -16,8 +14,6 @@ private class Boxes.PropertiesToolbar: HeaderBar {
     private ulong item_name_id;
 
     construct {
-        back_image.icon_name = "go-previous-symbolic";
-
         // Work around for https://bugzilla.gnome.org/show_bug.cgi?id=734676
         set_custom_title (title_entry);
     }


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