[Banshee-List] [PATCH] Remove fullscreen window management code duplicated more or less in the IFullscreenAdaptor.



---
 .../Banshee.NowPlaying/FullscreenWindow.cs         |   39 +-------------------
 1 files changed, 1 insertions(+), 38 deletions(-)

diff --git a/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs b/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
index 0e5270b..38f0352 100644
--- a/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
+++ b/banshee/src/Extensions/Banshee.NowPlaying/Banshee.NowPlaying/FullscreenWindow.cs
@@ -52,8 +52,6 @@ namespace Banshee.NowPlaying
             this.action_service = ServiceManager.Get<InterfaceActionService> ();
             
             AddAccelGroup (action_service.UIManager.AccelGroup);
-            
-            SetupWidget ();
         }
         
         protected override bool OnExposeEvent (Gdk.EventExpose evnt)
@@ -76,7 +74,6 @@ namespace Banshee.NowPlaying
             
             switch (evnt.Key) {
                 case Gdk.Key.Escape:
-                    Unfullscreen ();
                     Hide ();
                     return true;
                 case Gdk.Key.C:
@@ -109,38 +106,16 @@ namespace Banshee.NowPlaying
         
 #region Widgetry and show/hide logic
         
-        private void SetupWidget ()
-        {
-            Deletable = false;
-            TransientFor = null;
-            Decorated = false;
-            CanFocus = true;
-            
-            ConfigureWindow ();
-        }
-        
-        private void ConfigureWindow ()
-        {
-            Gdk.Screen screen = Screen;
-            int monitor = screen.GetMonitorAtWindow (parent.GdkWindow);
-            Gdk.Rectangle bounds = screen.GetMonitorGeometry (monitor);
-            Move (bounds.X, 0);
-            SetDefaultSize (bounds.Width, bounds.Height);
-        }
-        
         protected override void OnRealized ()
         {
             Events |= Gdk.EventMask.PointerMotionMask;
             
             base.OnRealized ();
-            
-            Screen.SizeChanged += OnScreenSizeChanged;
         }
         
         protected override void OnUnrealized ()
         {
             base.OnUnrealized ();
-            Screen.SizeChanged -= OnScreenSizeChanged;
         }
         
         protected override bool OnDeleteEvent (Gdk.Event evnt)
@@ -157,7 +132,6 @@ namespace Banshee.NowPlaying
             }
             
             OnHideCursorTimeout ();
-            ConfigureWindow ();
             HasFocus = true;
             parent.AddNotification ("is-active", ParentActiveNotification);
         }
@@ -169,23 +143,12 @@ namespace Banshee.NowPlaying
             parent.RemoveNotification ("is-active", ParentActiveNotification);
         }
         
-        private void OnScreenSizeChanged (object o, EventArgs args)
-        {
-            ConfigureWindow ();
-        }
-        
         private void ParentActiveNotification (object o, GLib.NotifyArgs args)
         {
             // If our parent window is ever somehow activated while we are
             // visible, this will ensure we merge back into the parent
-            if (parent.IsActive) {
-                parent.GdkWindow.SkipPagerHint = false;
-                parent.GdkWindow.SkipTaskbarHint = false;
+            if (parent.IsActive)
                 Hide ();
-            } else {
-                parent.GdkWindow.SkipPagerHint = true;
-                parent.GdkWindow.SkipTaskbarHint = true;
-            }
         }
 
 #endregion
-- 
1.5.6.5



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