[gnome-boxes] app-window: Don't bind a11-name to topbar.status



commit bfcaeb72e7237523408d190f1c81fb85d06574c0
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sat Aug 29 22:58:21 2015 +0100

    app-window: Don't bind a11-name to topbar.status
    
    Permanently binding 'accessible-name' property to topbar.status could
    easily lead to null be set on this non-nullable property and that leads
    to warnings on the console from gtk+. We only need machine's name set as
    'accessible-name' when machine in question is in the foreground, so no
    need for this binding anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=753888

 src/app-window.vala |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index 4cbae32..13a5a1f 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -174,9 +174,6 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
         props_window = new PropertiesWindow (this);
 
         notify["view-type"].connect (ui_state_changed);
-
-        var a11y = get_accessible ();
-        topbar.bind_property ("status", a11y, "accessible-name", BindingFlags.SYNC_CREATE);
     }
 
     private void save_window_geometry () {
@@ -223,6 +220,9 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
                 status_bind = null;
             }
             topbar.status = _("Boxes");
+            var a11y = get_accessible ();
+            a11y.accessible_name = _("Boxes");
+
             if (machine != null) {
                 if (got_error_id != 0) {
                     machine.disconnect (got_error_id);
@@ -285,6 +285,9 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
         machine.window = this;
         machine.unschedule_autosave ();
 
+        var a11y = get_accessible ();
+        a11y.accessible_name = machine.name;
+
         // Track machine status in toolbar
         status_bind = machine.bind_property ("status", topbar, "status", BindingFlags.SYNC_CREATE);
 


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