banshee r4602 - in trunk/banshee: . src/Clients/Nereid/Nereid src/Libraries/Hyena.Gui/Hyena.Widgets



Author: gburt
Date: Wed Sep 24 18:35:47 2008
New Revision: 4602
URL: http://svn.gnome.org/viewvc/banshee?rev=4602&view=rev

Log:
2008-09-24  Gabriel Burt  <gabriel burt gmail com>

	* src/Clients/Nereid/Nereid/PlayerInterface.cs:
	* src/Clients/Nereid/Nereid/ViewContainer.cs: Change the order of some
	hides so that the footer widget is hidden before changing the main source
	contents widget.

	* src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs: Fix bug with
	SizeRequest handler that caused the DapInfoBar and the Recommendations
	pane to not show up.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
   trunk/banshee/src/Clients/Nereid/Nereid/ViewContainer.cs
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs

Modified: trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs
==============================================================================
--- trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs	(original)
+++ trunk/banshee/src/Clients/Nereid/Nereid/PlayerInterface.cs	Wed Sep 24 18:35:47 2008
@@ -332,6 +332,8 @@
             ISourceContents contents = source.GetInheritedProperty<bool> ("Nereid.SourceContentsPropagate")
                 ? source.GetInheritedProperty<ISourceContents> ("Nereid.SourceContents")
                 : source.Properties.Get<ISourceContents> ("Nereid.SourceContents");
+
+            view_container.ClearFooter ();
             
             if (contents != null) {
                 if (view_container.Content != contents) {
@@ -363,10 +365,8 @@
 
             view_container.Header.Visible = source.Properties.Contains ("Nereid.SourceContents.HeaderVisible") ?
                 source.Properties.Get<bool> ("Nereid.SourceContents.HeaderVisible") : true;
-            
-            view_container.ClearFooter ();
+
             Widget footer_widget = null;
-            
             if (source.Properties.Contains ("Nereid.SourceContents.FooterWidget")) {
                 footer_widget = source.Properties.Get<Widget> ("Nereid.SourceContents.FooterWidget");
             }

Modified: trunk/banshee/src/Clients/Nereid/Nereid/ViewContainer.cs
==============================================================================
--- trunk/banshee/src/Clients/Nereid/Nereid/ViewContainer.cs	(original)
+++ trunk/banshee/src/Clients/Nereid/Nereid/ViewContainer.cs	Wed Sep 24 18:35:47 2008
@@ -188,11 +188,10 @@
         
         public void ClearFooter ()
         {
+            footer.Hide ();
             foreach (Widget child in footer.Children) {
                 footer.Remove (child);
             }
-            
-            footer.Hide ();
         }
         
         public HBox Header {

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/RoundedFrame.cs	Wed Sep 24 18:35:47 2008
@@ -97,24 +97,19 @@
 
         protected override void OnSizeRequested (ref Requisition requisition)
         {
-            if (child == null) {
-                base.OnSizeRequested (ref requisition);
-                return;
+            if (child != null && child.Visible) {
+                // Add the child's width/height        
+                Requisition child_requisition = child.SizeRequest ();
+                requisition.Width = Math.Max (0, child_requisition.Width);
+                requisition.Height = child_requisition.Height;
+            } else {
+                requisition.Width = 0;
+                requisition.Height = 0;
             }
             
-            requisition.Width = 0;
-            requisition.Height = 0;
-            
-            // Add the child's width/height        
-            Requisition child_requisition = child.SizeRequest ();
-            requisition.Width = Math.Max (requisition.Width, child_requisition.Width);
-            requisition.Height += child_requisition.Height;
-            
             // Add the frame border
             requisition.Width += ((int)BorderWidth + frame_width) * 2;
             requisition.Height += ((int)BorderWidth + frame_width) * 2;
-            
-            base.OnSizeRequested (ref requisition);
         }
 
         protected override void OnSizeAllocated (Gdk.Rectangle allocation)



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