[banshee/gtk3] ThickClient: Use the new GTK size request API



commit 772577f7b8850c8ec7e8b5b2f3f3dfb8de0cb5d2
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Thu Jul 21 22:53:36 2011 +0200

    ThickClient: Use the new GTK size request API

 .../Banshee.Equalizer.Gui/EqualizerWindow.cs       |    4 +++-
 .../Banshee.Gui.Dialogs/ErrorListDialog.cs         |    8 ++++++--
 .../ProfileConfigurationDialog.cs                  |    4 +++-
 3 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Equalizer.Gui/EqualizerWindow.cs b/src/Core/Banshee.ThickClient/Banshee.Equalizer.Gui/EqualizerWindow.cs
index 91ed4a9..ea7c923 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Equalizer.Gui/EqualizerWindow.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Equalizer.Gui/EqualizerWindow.cs
@@ -107,10 +107,12 @@ namespace Banshee.Equalizer.Gui
             eq_enabled_checkbox.Clicked += OnEnableDisable;
             eq_preset_combo.ActiveEqualizer = EqualizerManager.Instance.SelectedEqualizer;
 
+            int minimum_height, natural_height;
+            GetPreferredHeight (out minimum_height, out natural_height);
             Gdk.Geometry limits = new Gdk.Geometry ();
             limits.MinWidth = -1;
             limits.MaxWidth = -1;
-            limits.MinHeight = SizeRequest ().Height;
+            limits.MinHeight = minimum_height;
             limits.MaxHeight = Gdk.Screen.Default.Height;
             SetGeometryHints (this, limits, Gdk.WindowHints.MaxSize);
 
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ErrorListDialog.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ErrorListDialog.cs
index 316aed3..3f942bd 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ErrorListDialog.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Dialogs/ErrorListDialog.cs
@@ -93,13 +93,17 @@ namespace Banshee.Gui.Dialogs
 
         private void OnConfigureGeometry (object o, EventArgs args)
         {
+            Requisition minimum_size, natural_size;
+            GetPreferredSize (out minimum_size, out natural_size);
             var limits = new Gdk.Geometry () {
-                MinWidth = SizeRequest ().Width,
+                MinWidth = minimum_size.Width,
                 MaxWidth = Gdk.Screen.Default.Width
             };
 
             if (details_expander.Expanded) {
-                limits.MinHeight = SizeRequest ().Height + list_view.SizeRequest ().Height;
+                int list_min_height, list_natural_height;
+                list_view.GetPreferredHeight (out list_min_height, out list_natural_height);
+                limits.MinHeight = minimum_size.Height + list_min_height;
                 limits.MaxHeight = Gdk.Screen.Default.Height;
             } else {
                 limits.MinHeight = -1;
diff --git a/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileConfigurationDialog.cs b/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileConfigurationDialog.cs
index 7aa56ed..c835ab1 100644
--- a/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileConfigurationDialog.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.MediaProfiles.Gui/ProfileConfigurationDialog.cs
@@ -162,7 +162,9 @@ namespace Banshee.MediaProfiles.Gui
             SetSizeRequest(350, -1);
 
             Gdk.Geometry limits = new Gdk.Geometry();
-            limits.MinWidth = SizeRequest().Width;
+            int minimum_width, natural_width;
+            GetPreferredWidth (out minimum_width, out natural_width);
+            limits.MinWidth = minimum_width;
             limits.MaxWidth = Gdk.Screen.Default.Width;
             limits.MinHeight = -1;
             limits.MaxHeight = -1;



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