[gnome-boxes/wip/main-window: 2/3] machine: Remove redundant timeout



commit 19b21c9be782457beffcb22d4436a892b0001c1a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Feb 25 17:51:39 2014 +0000

    machine: Remove redundant timeout
    
    Show the display immediately on going to DISPLAY UI state.

 src/machine.vala |   10 +---------
 1 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index a41b04e..7d15dcc 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -19,7 +19,6 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
 
     private ulong show_id;
     private ulong hide_id;
-    private uint show_timeout_id;
     private ulong disconnected_id;
     private ulong need_password_id;
     private ulong need_username_id;
@@ -84,11 +83,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
         switch (App.app.ui_state) {
         case Boxes.UIState.CREDS:
             App.app.set_state (Boxes.UIState.DISPLAY);
-            show_timeout_id = Timeout.add (App.app.duration, () => {
-                show_timeout_id = 0;
-                show_display ();
-                return false;
-            });
+            show_display ();
             break;
 
         case Boxes.UIState.DISPLAY:
@@ -109,9 +104,6 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
             if (_display != null) {
                 _display.disconnect (show_id);
                 show_id = 0;
-                if (show_timeout_id != 0)
-                    GLib.Source.remove (show_timeout_id);
-                show_timeout_id = 0;
                 _display.disconnect (hide_id);
                 hide_id = 0;
                 _display.disconnect (disconnected_id);


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