summaryrefslogtreecommitdiff
path: root/packages/libglade/libglade-2.0.1/glade-cruft.patch
blob: 2edaa729c63f8e6d92082693ca1460cc68cce45f (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
88
89
90
91
92
93
94
95
96
97
--- configure.in~	2002-08-29 13:45:44.000000000 +0100
+++ configure.in	2004-03-15 19:40:58.000000000 +0000
@@ -84,6 +84,18 @@
 AM_CONDITIONAL(HAVE_PYTHON, $have_python)
 AC_SUBST(PYTHON)
 
+AC_MSG_CHECKING([for cruft in libgtk])
+AC_TRY_LINK([
+#include <gtk/gtk.h>
+#include <stdio.h>
+],      [ gtk_tree_get_type (); return 0; ],
+        [ AC_MSG_RESULT(yes)
+          have_cruft=yes ],
+        [ AC_MSG_RESULT(no)
+	  AC_DEFINE(DISABLE_CRUFT,,[leave out support for old, broken widgets])
+          have_cruft=no ])
+AC_SUBST(DISABLE_CRUFT)
+
 dnl add debugging options ...
 changequote(,)dnl
 if test "x$GCC" = xyes; then
--- glade/glade-gtk.c~	2002-07-30 10:10:36.000000000 +0100
+++ glade/glade-gtk.c	2004-03-15 19:43:46.000000000 +0000
@@ -211,6 +211,8 @@
 	gtk_clist_column_titles_hide (GTK_CLIST (w));
 }
 
+#ifndef DISABLE_CRUFT
+
 static void
 tree_set_selection_mode (GladeXML *xml, GtkWidget *w,
 			 const char *name, const char *value)
@@ -236,6 +238,8 @@
     gtk_tree_set_view_lines (GTK_TREE (w), BOOL (value));
 }
 
+#endif
+
 static void
 list_set_selection_mode (GladeXML *xml, GtkWidget *w,
 			 const char *name, const char *value)
@@ -252,6 +256,7 @@
     gtk_check_menu_item_set_show_toggle (GTK_CHECK_MENU_ITEM (w), BOOL (value));
 }
 
+#ifndef DISABLE_CRUFT
 static void
 text_set_text (GladeXML *xml, GtkWidget *w,
 	       const char *name, const char *value)
@@ -260,6 +265,7 @@
 
     gtk_editable_insert_text (GTK_EDITABLE (w), value, -1, &pos);
 }
+#endif
 
 static void
 radio_menu_item_set_group (GladeXML *xml, GtkWidget *w,
@@ -1011,13 +1017,17 @@
     glade_register_custom_prop (GTK_TYPE_CLIST, "selection_mode", clist_set_selection_mode);
     glade_register_custom_prop (GTK_TYPE_CLIST, "shadow_type", clist_set_shadow_type);
     glade_register_custom_prop (GTK_TYPE_CLIST, "show_titles", clist_set_show_titles);
+#ifndef DISABLE_CRUFT
     glade_register_custom_prop (GTK_TYPE_TREE, "selection_mode", tree_set_selection_mode);
     glade_register_custom_prop (GTK_TYPE_TREE, "view_mode", tree_set_view_mode);
     glade_register_custom_prop (GTK_TYPE_TREE, "view_line", tree_set_view_line);
+#endif
     glade_register_custom_prop (GTK_TYPE_LIST, "selection_mode", list_set_selection_mode);
     glade_register_custom_prop (GTK_TYPE_CHECK_MENU_ITEM, "always_show_toggle",
 				check_menu_item_set_always_show_toggle);
+#ifndef DISABLE_CRUFT
     glade_register_custom_prop (GTK_TYPE_TEXT, "text", text_set_text);
+#endif
     glade_register_custom_prop (GTK_TYPE_RADIO_MENU_ITEM, "group",
 				radio_menu_item_set_group);
     glade_register_custom_prop (GTK_TYPE_TOOLBAR, "tooltips", toolbar_set_tooltips);
@@ -1155,8 +1165,10 @@
 			   glade_standard_build_children, NULL);
     glade_register_widget (GTK_TYPE_TEAROFF_MENU_ITEM, glade_standard_build_widget,
 			   NULL, NULL);
+#ifndef DISABLE_CRUFT
     glade_register_widget (GTK_TYPE_TEXT, glade_standard_build_widget,
 			   NULL, NULL);
+#endif
     glade_register_widget (GTK_TYPE_TEXT_VIEW, glade_standard_build_widget,
 			   NULL, NULL);
     glade_register_widget (GTK_TYPE_TIPS_QUERY, glade_standard_build_widget,
@@ -1165,8 +1177,10 @@
 			   glade_standard_build_children, NULL);
     glade_register_widget (GTK_TYPE_TOOLBAR, glade_standard_build_widget,
 			   toolbar_build_children, NULL);
+#ifndef DISABLE_CRUFT
     glade_register_widget (GTK_TYPE_TREE, glade_standard_build_widget,
 			   NULL, NULL);
+#endif
     glade_register_widget (GTK_TYPE_TREE_VIEW, glade_standard_build_widget,
 			   NULL, NULL);
     glade_register_widget (GTK_TYPE_VBUTTON_BOX, glade_standard_build_widget,