[banshee] [BansheeDialog] center on screen if parent hidden



commit 02a5b424a58d3cb9c16be70c3ffdb9afea1badda
Author: Aaron Bockover <abockover novell com>
Date:   Mon Apr 5 11:52:35 2010 -0400

    [BansheeDialog] center on screen if parent hidden
    
    If the transient dialog is null or is not visible, center
    the dialog on the screen, otherwise it will end up in an
    unspecified location.

 .../Banshee.Gui.Dialogs/BansheeDialog.cs           |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/BansheeDialog.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/BansheeDialog.cs
index 97e055c..d7912c2 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/BansheeDialog.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/BansheeDialog.cs
@@ -65,7 +65,9 @@ namespace Banshee.Gui.Dialogs
                 TransientFor = parent;
             }
 
-            WindowPosition = WindowPosition.CenterOnParent;
+            WindowPosition = TransientFor == null || !TransientFor.Visible
+                ? WindowPosition.Center
+                : WindowPosition.CenterOnParent;
             DestroyWithParent = true;
 
             accel_group = new AccelGroup ();



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