[gnome-boxes/wip/automated-tests: 4/29] topbar: Ensure 'status' property is always set



commit c9d648bfa64dad6fb284c7401a9402b9825bc9c9
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Jan 29 14:15:29 2015 +0000

    topbar: Ensure 'status' property is always set
    
    We were not initializing the 'status' property and resetting it
    to null in collection view. This meant an empty titlebar in collection
    view. Apart from this not being a good thing (see bug below), later we'll
    connect this property to the a11y-name of the containing window and that
    property is not nullable.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=736972

 src/app-window.vala |    2 +-
 src/topbar.vala     |    9 +++++----
 2 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 3e05a83..973e18c 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -181,7 +181,7 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
             view.visible = true;
 
             status_bind = null;
-            topbar.status = null;
+            topbar.status = _("Boxes");
             if (current_item is Machine) {
                 var machine = current_item as Machine;
                 if (got_error_id != 0) {
diff --git a/src/topbar.vala b/src/topbar.vala
index 2a617d1..0f91536 100644
--- a/src/topbar.vala
+++ b/src/topbar.vala
@@ -50,13 +50,13 @@ private class Boxes.Topbar: Gtk.Stack, Boxes.UI {
             collection_toolbar.click_search_button ();
     }
 
-    public string? _status;
-    public string? status {
+    public string _status;
+    public string status {
         get { return _status; }
         set {
             _status = value;
-            collection_toolbar.set_title (_status??"");
-            display_toolbar.set_title (_status??"");
+            collection_toolbar.set_title (_status);
+            display_toolbar.set_title (_status);
         }
     }
 
@@ -91,6 +91,7 @@ private class Boxes.Topbar: Gtk.Stack, Boxes.UI {
         collection_toolbar.setup_ui (window);
         selection_toolbar.setup_ui (window);
         display_toolbar.setup_ui (window);
+        status = _("Boxes");
     }
 
     private void ui_state_changed () {


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