summaryrefslogtreecommitdiff
blob: 60953902ce05e72cac63e48b93d9577e087e4258 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
diff --exclude-from=/home/dang/bin/scripts/diffrc -up -ruN gtk-engines-2.8.2.orig/engines/smooth/src/engine/shared/gtk/smooth_gtk_rc.c gtk-engines-2.8.2/engines/smooth/src/engine/shared/gtk/smooth_gtk_rc.c
--- gtk-engines-2.8.2.orig/engines/smooth/src/engine/shared/gtk/smooth_gtk_rc.c	2006-11-13 11:07:12.000000000 -0500
+++ gtk-engines-2.8.2/engines/smooth/src/engine/shared/gtk/smooth_gtk_rc.c	2007-02-22 16:12:41.000000000 -0500
@@ -2207,11 +2207,12 @@ smooth_arrow_merge (SmoothArrowPart *des
 {
   SmoothArrow dummy;
 
-  if (dest_arrow->DefaultStyle)
-    g_free(dest_arrow->DefaultStyle);
-
+  /* what is this for? */
   smooth_style_get_arrow(src_arrow, 0, 0, &dummy);
-  memcpy(dest_arrow, src_arrow, sizeof(SmoothArrowPart));
+
+  SmoothCopyArrowPart(dest_arrow, src_arrow);
+
+  /* Only used to inherit in one rc style. So this should work fine, I think. */
   dest_arrow->Inherited = NULL;
 }
 
diff --exclude-from=/home/dang/bin/scripts/diffrc -up -ruN gtk-engines-2.8.2.orig/engines/smooth/src/utils/draw_arrows.c gtk-engines-2.8.2/engines/smooth/src/utils/draw_arrows.c
--- gtk-engines-2.8.2.orig/engines/smooth/src/utils/draw_arrows.c	2006-07-25 05:46:47.000000000 -0400
+++ gtk-engines-2.8.2/engines/smooth/src/utils/draw_arrows.c	2007-02-22 16:12:41.000000000 -0500
@@ -685,3 +685,52 @@ void SmoothFreeArrowStyles(SmoothArrowPa
 		}
 	}
 }
+
+
+void SmoothCopyArrowPart(SmoothArrowPart *dst, SmoothArrowPart *src)
+{
+	gint i, j;
+	g_assert (dst != NULL);
+	g_assert (src != NULL);
+	
+	SmoothFreeArrowStyles(dst);
+	
+	if (src->DefaultStyle)
+	{
+		dst->DefaultStyle = g_new0(SmoothArrow, 1);
+		memcpy(dst->DefaultStyle, src->DefaultStyle, sizeof(SmoothArrow));
+	}
+
+	if (src->DefaultStateStyles)
+	{			
+		dst->DefaultStateStyles = g_new0(SmoothArrow, 1);
+		memcpy(dst->DefaultStateStyles, src->DefaultStateStyles, sizeof(SmoothArrow));
+	}
+
+	if (src->DefaultTypeStyles)
+	{
+		dst->DefaultTypeStyles = g_new0(SmoothArrow, 1);
+		memcpy(dst->DefaultTypeStyles, src->DefaultTypeStyles, sizeof(SmoothArrow));
+	}
+
+	for (i=0; i < 5; i++) 
+	{
+		if (src->Styles[i])
+		{
+			dst->Styles[i] = g_new0(SmoothArrow, 1);
+			memcpy(dst->Styles[i], src->Styles[i], sizeof(SmoothArrow));
+		}
+	}
+	
+	dst->StylesFreed = src->StylesFreed;
+	dst->Inherited = src->Inherited;
+	
+	for (i=0; i < 5; i++)
+	{
+		for (j=0; j < SMOOTH_ARROW_TYPE_COUNT; j++)
+		{
+			dst->CompositeArrows[i][j] = src->CompositeArrows[i][j];
+			dst->CompositeArrowsSet[i][j] = src->CompositeArrowsSet[i][j];
+		}
+	}
+}
diff --exclude-from=/home/dang/bin/scripts/diffrc -up -ruN gtk-engines-2.8.2.orig/engines/smooth/src/utils/draw_arrows.h gtk-engines-2.8.2/engines/smooth/src/utils/draw_arrows.h
--- gtk-engines-2.8.2.orig/engines/smooth/src/utils/draw_arrows.h	2006-08-14 15:25:41.000000000 -0400
+++ gtk-engines-2.8.2/engines/smooth/src/utils/draw_arrows.h	2007-02-22 16:12:41.000000000 -0500
@@ -112,5 +112,7 @@ SmoothDrawArrow(SmoothCanvas *Canvas,
 
 GE_INTERNAL void 
 SmoothFreeArrowStyles(SmoothArrowPart *arrow);
+GE_INTERNAL void
+SmoothCopyArrowPart(SmoothArrowPart *dst, SmoothArrowPart *src);
 
 #endif /* DRAW_ARROWS_H */