[gnome-boxes/wip/automated-tests: 6/7] display-page: Don't explicitly set title



commit 6dcea7c9eefd3585bee45841d30a2e739bc10a56
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Thu Jan 29 14:37:54 2015 +0000

    display-page: Don't explicitly set title
    
    The titles is set when status property is set and AppWindow takes care of
    binding that machine's name so we don't need to explicitly set that.

 src/display-page.vala |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/display-page.vala b/src/display-page.vala
index 4b3d836..b009476 100644
--- a/src/display-page.vala
+++ b/src/display-page.vala
@@ -91,16 +91,14 @@ private class Boxes.DisplayPage: Gtk.Box {
         toolbar_show_id = 0;
     }
 
-    public void update_title () {
+    public void update_subtitle () {
         var machine = window.current_item as Boxes.Machine;
         return_if_fail (machine != null);
 
-        var title = machine.name;
         string? hint = null;
         if (grabbed)
             hint = _("(press [left] Ctrl+Alt keys to ungrab)");
 
-        toolbar.set_title (title);
         toolbar.set_subtitle (hint);
     }
 
@@ -121,9 +119,9 @@ private class Boxes.DisplayPage: Gtk.Box {
         display_grabbed_id = display.notify["mouse-grabbed"].connect(() => {
             // In some cases this is sent inside size_allocate (see bug #692465)
             // which causes the label change queue_resize to be ignored
-            // So we delay the update_title call to an idle to work around this.
+            // So we delay the update_subtitle call to an idle to work around this.
             Idle.add_full (Priority.HIGH, () => {
-                update_title ();
+                update_subtitle ();
                 return false;
             });
         });
@@ -140,7 +138,7 @@ private class Boxes.DisplayPage: Gtk.Box {
 
             return false;
         });
-        update_title ();
+        update_subtitle ();
         widget.set_events (widget.get_events () & ~Gdk.EventMask.POINTER_MOTION_MASK);
         event_box.add (widget);
         event_box.show_all ();


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