mail-archives/monodevelop-patches-list/2004-March/000681.html

258 строки
11 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Monodevelop-patches-list] r1076 - trunk/MonoDevelop/gdldock/sources/gdl
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1076%20-%20trunk/MonoDevelop/gdldock/sources/gdl&In-Reply-To=">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="000680.html">
<LINK REL="Next" HREF="000682.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Monodevelop-patches-list] r1076 - trunk/MonoDevelop/gdldock/sources/gdl</H1>
<B>commit-watcher at mono-cvs.ximian.com</B>
<A HREF="mailto:monodevelop-patches-list%40lists.ximian.com?Subject=%5BMonodevelop-patches-list%5D%20r1076%20-%20trunk/MonoDevelop/gdldock/sources/gdl&In-Reply-To="
TITLE="[Monodevelop-patches-list] r1076 - trunk/MonoDevelop/gdldock/sources/gdl">commit-watcher at mono-cvs.ximian.com
</A><BR>
<I>Mon Mar 1 20:23:33 EST 2004</I>
<P><UL>
<LI>Previous message: <A HREF="000680.html">[Monodevelop-patches-list] r1075 - trunk/MonoDevelop/src/Main/Base/Services/File
</A></li>
<LI>Next message: <A HREF="000682.html">[Monodevelop-patches-list] r1077 - in trunk/MonoDevelop: data/resources/glade src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions src/Main/Base/Internal/Project/Project src/Main/Base/Services
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#681">[ date ]</a>
<a href="thread.html#681">[ thread ]</a>
<a href="subject.html#681">[ subject ]</a>
<a href="author.html#681">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Author: ggiraldez
Date: 2004-03-01 20:23:32 -0500 (Mon, 01 Mar 2004)
New Revision: 1076
Modified:
trunk/MonoDevelop/gdldock/sources/gdl/Makefile.am
trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c
trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-layout.c
trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-master.c
trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-notebook.c
trunk/MonoDevelop/gdldock/sources/gdl/gdl-stock.c
Log:
- Define GDL_GLADEDIR and GDL_IMAGESDIR in Makefile.am to minimize differences
with the gdl module
- When traversing the widget hierarchy looking for a dock target, ignore those
docks belonging to a different master
- Sync with gdl module, get the patch from 2004-02-12 which uses thickness to
draw a border around the dock item and sets the default thickness for dock
items inside notebooks to 2.
Modified: trunk/MonoDevelop/gdldock/sources/gdl/Makefile.am
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/Makefile.am 2004-03-02 00:20:02 UTC (rev 1075)
+++ trunk/MonoDevelop/gdldock/sources/gdl/Makefile.am 2004-03-02 01:23:32 UTC (rev 1076)
@@ -11,7 +11,9 @@
GDL_DEPENDENCIES_LIBS = $(shell pkg-config --libs $(GDL_REQUIREMENTS))
INCLUDES = \
- -DG_LOG_DOMAIN=\&quot;GdlDock\&quot; -I.. -I. \
+ -DG_LOG_DOMAIN=\&quot;GdlDock\&quot; -I.. -I. \
+ -DGDL_GLADEDIR=\&quot;.\&quot; \
+ -DGDL_IMAGESDIR=\&quot;.\&quot; \
$(GDL_DEPENDENCIES_CFLAGS)
libgdldock_headers = \
Modified: trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c 2004-03-02 00:20:02 UTC (rev 1075)
+++ trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-item.c 2004-03-02 01:23:32 UTC (rev 1076)
@@ -193,6 +193,8 @@
static void
gdl_dock_item_class_init (GdlDockItemClass *klass)
{
+ static gboolean style_initialized = FALSE;
+
GObjectClass *g_object_class;
GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
@@ -334,6 +336,18 @@
klass-&gt;dock_drag_motion = NULL;
klass-&gt;dock_drag_end = NULL;
klass-&gt;set_orientation = gdl_dock_item_real_set_orientation;
+
+ if (!style_initialized)
+ {
+ style_initialized = TRUE;
+ gtk_rc_parse_string (
+ &quot;style \&quot;gdl-dock-item-default\&quot; {\n&quot;
+ &quot;xthickness = 0\n&quot;
+ &quot;ythickness = 0\n&quot;
+ &quot;}\n&quot;
+ &quot;class \&quot;GdlDockItem\&quot; &quot;
+ &quot;style : gtk \&quot;gdl-dock-item-default\&quot;\n&quot;);
+ }
}
static void
@@ -657,8 +671,8 @@
requisition-&gt;width = 0;
}
- requisition-&gt;width += GTK_CONTAINER (widget)-&gt;border_width * 2;
- requisition-&gt;height += GTK_CONTAINER (widget)-&gt;border_width * 2;
+ requisition-&gt;width += (GTK_CONTAINER (widget)-&gt;border_width + widget-&gt;style-&gt;xthickness) * 2;
+ requisition-&gt;height += (GTK_CONTAINER (widget)-&gt;border_width + widget-&gt;style-&gt;ythickness) * 2;
widget-&gt;requisition = *requisition;
}
@@ -689,19 +703,19 @@
border_width = GTK_CONTAINER (widget)-&gt;border_width;
- child_allocation.x = border_width;
- child_allocation.y = border_width;
- child_allocation.width = allocation-&gt;width - 2 * border_width;
- child_allocation.height = allocation-&gt;height - 2 * border_width;
+ child_allocation.x = border_width + widget-&gt;style-&gt;xthickness;
+ child_allocation.y = border_width + widget-&gt;style-&gt;ythickness;
+ child_allocation.width = allocation-&gt;width
+ - 2 * (border_width + widget-&gt;style-&gt;xthickness);
+ child_allocation.height = allocation-&gt;height
+ - 2 * (border_width + widget-&gt;style-&gt;ythickness);
if (GDL_DOCK_ITEM_GRIP_SHOWN (item)) {
- GtkAllocation grip_alloc = *allocation;
+ GtkAllocation grip_alloc = child_allocation;
GtkRequisition grip_req;
gtk_widget_size_request (item-&gt;_priv-&gt;grip, &amp;grip_req);
- grip_alloc.x = grip_alloc.y = 0;
-
if (item-&gt;orientation == GTK_ORIENTATION_HORIZONTAL) {
child_allocation.x += grip_req.width;
child_allocation.width -= grip_req.width;
@@ -813,7 +827,6 @@
g_return_if_fail (widget != NULL);
g_return_if_fail (GDL_IS_DOCK_ITEM (widget));
- /* FIXME: maybe remove this method altogether and use the default implementation */
if (GTK_WIDGET_REALIZED (widget) &amp;&amp; !GTK_WIDGET_NO_WINDOW (widget)) {
gtk_style_set_background (widget-&gt;style, widget-&gt;window,
widget-&gt;state);
Modified: trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-layout.c
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-layout.c 2004-03-02 00:20:02 UTC (rev 1075)
+++ trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-layout.c 2004-03-02 01:23:32 UTC (rev 1076)
@@ -35,7 +35,6 @@
#include &quot;gdl-tools.h&quot;
#include &quot;gdl-dock-placeholder.h&quot;
-#define GDL_GLADEDIR &quot;.&quot;
/* ----- Private variables ----- */
Modified: trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-master.c
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-master.c 2004-03-02 00:20:02 UTC (rev 1075)
+++ trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-master.c 2004-03-02 01:23:32 UTC (rev 1076)
@@ -463,7 +463,8 @@
get to a GdlDock by walking up the hierarchy */
gdk_window_get_user_data (window, (gpointer) &amp;widget);
if (GTK_IS_WIDGET (widget)) {
- while (widget &amp;&amp; !GDL_IS_DOCK (widget))
+ while (widget &amp;&amp; (!GDL_IS_DOCK (widget) ||
+ GDL_DOCK_OBJECT_GET_MASTER (widget) != master))
widget = widget-&gt;parent;
if (widget) {
gint win_w, win_h;
Modified: trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-notebook.c
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-notebook.c 2004-03-02 00:20:02 UTC (rev 1075)
+++ trunk/MonoDevelop/gdldock/sources/gdl/gdl-dock-notebook.c 2004-03-02 01:23:32 UTC (rev 1076)
@@ -96,6 +96,8 @@
static void
gdl_dock_notebook_class_init (GdlDockNotebookClass *klass)
{
+ static gboolean style_initialized = FALSE;
+
GObjectClass *g_object_class;
GtkObjectClass *gtk_object_class;
GtkWidgetClass *widget_class;
@@ -136,6 +138,18 @@
0,
G_PARAM_READWRITE |
GDL_DOCK_PARAM_EXPORT | GDL_DOCK_PARAM_AFTER));
+
+ if (!style_initialized) {
+ style_initialized = TRUE;
+
+ gtk_rc_parse_string (
+ &quot;style \&quot;gdl-dock-notebook-default\&quot; {\n&quot;
+ &quot;xthickness = 2\n&quot;
+ &quot;ythickness = 2\n&quot;
+ &quot;}\n&quot;
+ &quot;widget_class \&quot;*.GtkNotebook.GdlDockItem\&quot; &quot;
+ &quot;style : gtk \&quot;gdl-dock-notebook-default\&quot;\n&quot;);
+ }
}
static void
@@ -254,7 +268,7 @@
{
GdlDockNotebook *notebook;
GtkWidget *tablabel;
-
+
notebook = GDL_DOCK_NOTEBOOK (data);
/* deactivate old tablabel */
Modified: trunk/MonoDevelop/gdldock/sources/gdl/gdl-stock.c
===================================================================
--- trunk/MonoDevelop/gdldock/sources/gdl/gdl-stock.c 2004-03-02 00:20:02 UTC (rev 1075)
+++ trunk/MonoDevelop/gdldock/sources/gdl/gdl-stock.c 2004-03-02 01:23:32 UTC (rev 1076)
@@ -26,8 +26,6 @@
#include &lt;gtk/gtkiconfactory.h&gt;
#include &quot;gdl-stock.h&quot;
-#define GDL_IMAGESDIR &quot;.&quot;
-
static GtkIconFactory *gdl_stock_factory = NULL;
static struct {
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="000680.html">[Monodevelop-patches-list] r1075 - trunk/MonoDevelop/src/Main/Base/Services/File
</A></li>
<LI>Next message: <A HREF="000682.html">[Monodevelop-patches-list] r1077 - in trunk/MonoDevelop: data/resources/glade src/Main/Base/Gui/Dialogs/OptionPanels/ProjectOptions src/Main/Base/Internal/Project/Project src/Main/Base/Services
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#681">[ date ]</a>
<a href="thread.html#681">[ thread ]</a>
<a href="subject.html#681">[ subject ]</a>
<a href="author.html#681">[ author ]</a>
</LI>
</UL>
<hr>
<a href="http://lists.ximian.com/mailman/listinfo/monodevelop-patches-list">More information about the Monodevelop-patches-list
mailing list</a><br>
</body></html>