[gnome-boxes] App: minor ui_state_changed cleanup



commit 180a3f125cc5f30f7fc41be8fae71dcb0fc107a6
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Nov 16 15:33:13 2012 +0100

    App: minor ui_state_changed cleanup
    
    Move the set_main_ui_state() call out of the switch as its
    really only depending on != DISPLAY, and duplicating it in
    all cases is not very nice.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=688473

 src/app.vala |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/app.vala b/src/app.vala
index 9320890..fe16d14 100644
--- a/src/app.vala
+++ b/src/app.vala
@@ -556,9 +556,11 @@ private class Boxes.App: Boxes.UI {
             ui.ui_state = ui_state;
         }
 
+        if (ui_state != UIState.DISPLAY)
+            set_main_ui_state ();
+
         switch (ui_state) {
         case UIState.COLLECTION:
-            set_main_ui_state ();
             topbar.status = null;
             status_bind = null;
             if (current_item is Machine) {
@@ -578,7 +580,6 @@ private class Boxes.App: Boxes.UI {
         case UIState.PROPERTIES:
         case UIState.WIZARD:
             searchbar_revealer.revealed = false;
-            set_main_ui_state ();
             break;
 
         case UIState.DISPLAY:



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