banshee r4209 - in trunk/banshee: . src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea



Author: abock
Date: Tue Jul  1 15:23:11 2008
New Revision: 4209
URL: http://svn.gnome.org/viewvc/banshee?rev=4209&view=rev

Log:
2008-07-01  Aaron Bockover  <abock gnome org>

    * src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs:
    Ignore the first size allocation since it's the default window size and
    causes the notification area to resize to a huge dimension until a new
    request is queued for the actual icon size (BGO #540885)



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs

Modified: trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.NotificationArea/Banshee.NotificationArea/X11NotificationAreaBox.cs	Tue Jul  1 15:23:11 2008
@@ -163,10 +163,22 @@
             return PanelOrientation.Horizontal;
         }
 
+        private bool first_alloc = true;
+
         protected override void OnSizeAllocated (Gdk.Rectangle rect)
         {
+            // Ignore the first allocation dimensions (typically 200x200) and use only 
+            // the allocation's position and the default icon size for dimension (16x16).
+            // A proper size request will be queued later through ConfigureIconSize ().
+            // Fix for BGO #540885
+            if (first_alloc) {
+                base.OnSizeAllocated (new Gdk.Rectangle (rect.X, rect.Y, panel_size, panel_size));
+                first_alloc = false;
+                return;
+            }
+            
             base.OnSizeAllocated (rect);
-
+            
             if (GetPanelOrientation () == PanelOrientation.Horizontal) {
                 if (panel_size == Allocation.Height) {
                     return;



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