[Monodevelop-patches-list] r1363 - in trunk/MonoDevelop: gdldock/sources/gdl src/Main/Base src/Main/Base/Gui/Workbench/Layouts
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Apr 3 21:50:49 EST 2004
Author: tberman
Date: 2004-04-03 21:50:49 -0500 (Sat, 03 Apr 2004)
New Revision: 1363
Modified:
trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c
trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-paned.c
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
Log:
bits of resizing greedy fu fix
Modified: trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c 2004-04-04 00:29:04 UTC (rev 1362)
+++ trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c 2004-04-04 02:50:49 UTC (rev 1363)
@@ -283,14 +283,14 @@
g_object_class, PROP_PREFERRED_WIDTH,
g_param_spec_int ("preferred_width", _("Preferred width"),
_("Preferred width for the dock item"),
- -1, G_MAXINT, -1,
+ -2, G_MAXINT, -1,
G_PARAM_READWRITE));
g_object_class_install_property (
g_object_class, PROP_PREFERRED_HEIGHT,
g_param_spec_int ("preferred_height", _("Preferred height"),
_("Preferred height for the dock item"),
- -1, G_MAXINT, -1,
+ -2, G_MAXINT, -1,
G_PARAM_READWRITE));
/* signals */
Modified: trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-paned.c
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-paned.c 2004-04-04 00:29:04 UTC (rev 1362)
+++ trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-paned.c 2004-04-04 02:50:49 UTC (rev 1363)
@@ -536,29 +536,42 @@
{
GtkPaned *paned;
gboolean done = FALSE;
+ gboolean hresize = FALSE;
+ gboolean wresize = FALSE;
+ gint temp = 0;
g_return_if_fail (GDL_IS_DOCK_PANED (object));
g_return_if_fail (GDL_DOCK_ITEM (object)->child != NULL);
paned = GTK_PANED (GDL_DOCK_ITEM (object)->child);
+ if (GDL_IS_DOCK_ITEM (requestor)) {
+ g_object_get (G_OBJECT (requestor), "preferred_height", &temp, NULL);
+ if (temp == -2)
+ hresize = TRUE;
+ temp = 0;
+ g_object_get (G_OBJECT (requestor), "preferred_width", &temp, NULL);
+ if (temp == -2)
+ wresize = TRUE;
+ }
+
/* see if we can dock the item in our paned */
switch (GDL_DOCK_ITEM (object)->orientation) {
case GTK_ORIENTATION_HORIZONTAL:
if (!paned->child1 && position == GDL_DOCK_LEFT) {
- gtk_paned_pack1 (paned, GTK_WIDGET (requestor), FALSE, FALSE);
+ gtk_paned_pack1 (paned, GTK_WIDGET (requestor), wresize, FALSE);
done = TRUE;
} else if (!paned->child2 && position == GDL_DOCK_RIGHT) {
- gtk_paned_pack2 (paned, GTK_WIDGET (requestor), TRUE, FALSE);
+ gtk_paned_pack2 (paned, GTK_WIDGET (requestor), wresize, FALSE);
done = TRUE;
}
break;
case GTK_ORIENTATION_VERTICAL:
if (!paned->child1 && position == GDL_DOCK_TOP) {
- gtk_paned_pack1 (paned, GTK_WIDGET (requestor), FALSE, FALSE);
+ gtk_paned_pack1 (paned, GTK_WIDGET (requestor), hresize, FALSE);
done = TRUE;
} else if (!paned->child2 && position == GDL_DOCK_BOTTOM) {
- gtk_paned_pack2 (paned, GTK_WIDGET (requestor), TRUE, FALSE);
+ gtk_paned_pack2 (paned, GTK_WIDGET (requestor), hresize, FALSE);
done = TRUE;
}
break;
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-04 00:29:04 UTC (rev 1362)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-04-04 02:50:49 UTC (rev 1363)
@@ -1,5 +1,11 @@
2004-04-03 Todd Berman <tberman at sevenl.net>
+ * Gui/Workbench/Layous/SdiWorkspaceLayout.cs: set pref height and width
+ on the Documents dockitem to -2 to make gdl-dock attempt to give it
+ greedy resizing as much as possible.
+
+2004-04-03 Todd Berman <tberman at sevenl.net>
+
* Services/GettextCatalog.cs: moved to .Core.
* Makefile.am: reflect above change.
Modified: trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs 2004-04-04 00:29:04 UTC (rev 1362)
+++ trunk/MonoDevelop/src/Main/Base/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs 2004-04-04 02:50:49 UTC (rev 1363)
@@ -98,6 +98,8 @@
tabControl.SwitchPage += new SwitchPageHandler (ActiveMdiChanged);
DockItem item = new DockItem ("Documents", "Documents",
DockItemBehavior.Locked);
+ item.PreferredWidth = -2;
+ item.PreferredHeight = -2;
item.Add (tabControl);
item.ShowAll ();
dock.AddItem (item, DockPlacement.Center);
More information about the Monodevelop-patches-list
mailing list