[gnome-boxes/wip/less-dialogs2: 7/14] properties-toolbar: Handle buttons' visibility



commit 7fac9b94613a1575c75ce0890edb16ccf4ab0e20
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Dec 4 16:31:29 2014 +0000

    properties-toolbar: Handle buttons' visibility
    
    PropertiesToolbar now handle the visibility of its buttons itself.

 src/properties-toolbar.vala |    3 +++
 src/properties-window.vala  |    2 --
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/properties-toolbar.vala b/src/properties-toolbar.vala
index bd30378..d09837d 100644
--- a/src/properties-toolbar.vala
+++ b/src/properties-toolbar.vala
@@ -37,6 +37,9 @@ private class Boxes.PropertiesToolbar: HeaderBar {
     }
 
     private void ui_state_changed () {
+        back_button.visible = (window.previous_ui_state == UIState.WIZARD);
+        show_close_button = (window.previous_ui_state != UIState.WIZARD);
+
         if (item_name_id != 0) {
             item.disconnect (item_name_id);
             item_name_id = 0;
diff --git a/src/properties-window.vala b/src/properties-window.vala
index 1d9eea9..5c390e9 100644
--- a/src/properties-window.vala
+++ b/src/properties-window.vala
@@ -38,8 +38,6 @@ private class Boxes.PropertiesWindow: Gtk.Window, Boxes.UI {
         properties.set_state (ui_state);
 
         visible = (ui_state == UIState.PROPERTIES);
-        topbar.back_button.visible = (previous_ui_state == UIState.WIZARD);
-        topbar.show_close_button = (previous_ui_state != UIState.WIZARD);
     }
 
     [GtkCallback]


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