dia r4201 - in trunk: . app lib
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r4201 - in trunk: . app lib
- Date: Sat, 17 Jan 2009 19:59:56 +0000 (UTC)
Author: hans
Date: Sat Jan 17 19:59:56 2009
New Revision: 4201
URL: http://svn.gnome.org/viewvc/dia?rev=4201&view=rev
Log:
2009-01-17 Hans Breuer <hans breuer org>
* app/defaults.c app/gtkvwrapbox.c app/gtkwrapbox.c
app/properties-dialog.c app/gtkhwrapbox.c lib/dialinechooser.c :
patch from Robert Young to build again with GLib 2.8, bug #567558
Modified:
trunk/ChangeLog
trunk/app/defaults.c
trunk/app/gtkhwrapbox.c
trunk/app/gtkvwrapbox.c
trunk/app/gtkwrapbox.c
trunk/app/properties-dialog.c
trunk/lib/dialinechooser.c
Modified: trunk/app/defaults.c
==============================================================================
--- trunk/app/defaults.c (original)
+++ trunk/app/defaults.c Sat Jan 17 19:59:56 2009
@@ -61,7 +61,12 @@
no_defaults_dialog = gtk_label_new(_("This object has no defaults."));
gtk_widget_show (no_defaults_dialog);
+#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink(GTK_OBJECT(no_defaults_dialog));
+#else
+ g_object_ref(GTK_OBJECT(no_defaults_dialog));
+ gtk_object_sink(GTK_OBJECT(no_defaults_dialog));
+#endif
}
static gint
Modified: trunk/app/gtkhwrapbox.c
==============================================================================
--- trunk/app/gtkhwrapbox.c (original)
+++ trunk/app/gtkhwrapbox.c Sat Jan 17 19:59:56 2009
@@ -468,7 +468,11 @@
children_per_line = g_slist_length (slist);
while (slist)
{
+#if GLIB_CHECK_VERSION(2,10,0)
Line *line = g_slice_new (Line);
+#else
+ Line *line = g_new (Line, 1);
+#endif
line->children = slist;
line->min_size = min_height;
@@ -575,10 +579,15 @@
line->expand);
g_slist_free (line->children);
+#if (!GLIB_CHECK_VERSION(2,10,0))
+ g_free (line);
+#endif
line = next_line;
}
+#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free_chain (Line, line_list, next);
+#endif
}
}
Modified: trunk/app/gtkvwrapbox.c
==============================================================================
--- trunk/app/gtkvwrapbox.c (original)
+++ trunk/app/gtkvwrapbox.c Sat Jan 17 19:59:56 2009
@@ -468,7 +468,11 @@
children_per_line = g_slist_length (slist);
while (slist)
{
+#if GLIB_CHECK_VERSION(2,10,0)
Line *line = g_slice_new (Line);
+#else
+ Line *line = g_new (Line, 1);
+#endif
line->children = slist;
line->min_size = min_width;
@@ -575,10 +579,15 @@
line->expand);
g_slist_free (line->children);
- line = next_line;
+#if (!GLIB_CHECK_VERSION(2,10,0))
+ g_free (line);
+#endif
+ line = next_line;
}
+#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free_chain (Line, line_list, next);
+#endif
}
}
Modified: trunk/app/gtkwrapbox.c
==============================================================================
--- trunk/app/gtkwrapbox.c (original)
+++ trunk/app/gtkwrapbox.c Sat Jan 17 19:59:56 2009
@@ -591,7 +591,11 @@
g_return_if_fail (GTK_IS_WIDGET (child));
g_return_if_fail (child->parent == NULL);
+#if GLIB_CHECK_VERSION(2,10,0)
child_info = g_slice_new (GtkWrapBoxChild);
+#else
+ child_info = g_new (GtkWrapBoxChild, 1);
+#endif
child_info->widget = child;
child_info->hexpand = hexpand ? TRUE : FALSE;
@@ -861,7 +865,11 @@
last->next = child->next;
else
wbox->children = child->next;
+#if GLIB_CHECK_VERSION(2,10,0)
g_slice_free (GtkWrapBoxChild, child);
+#else
+ g_free (child);
+#endif
wbox->n_children--;
if (was_visible)
Modified: trunk/app/properties-dialog.c
==============================================================================
--- trunk/app/properties-dialog.c (original)
+++ trunk/app/properties-dialog.c Sat Jan 17 19:59:56 2009
@@ -80,7 +80,12 @@
no_properties_dialog = gtk_label_new(_("This object has no properties."));
gtk_widget_show (no_properties_dialog);
+#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink (G_OBJECT (no_properties_dialog));
+#else
+ g_object_ref (G_OBJECT (no_properties_dialog));
+ gtk_object_sink (GTK_OBJECT (no_properties_dialog));
+#endif
}
/* when the dialog gets destroyed we need to drop our references */
Modified: trunk/lib/dialinechooser.c
==============================================================================
--- trunk/lib/dialinechooser.c (original)
+++ trunk/lib/dialinechooser.c Sat Jan 17 19:59:56 2009
@@ -315,9 +315,16 @@
lchooser->selector = DIALINESTYLESELECTOR(wid);
menu = gtk_menu_new();
+#if GLIB_CHECK_VERSION(2,10,0)
g_object_ref_sink(GTK_OBJECT(menu));
g_object_set_data_full(G_OBJECT(lchooser), button_menu_key, menu,
(GDestroyNotify)g_object_unref);
+#else
+ g_object_ref(G_OBJECT(menu));
+ gtk_object_sink(GTK_OBJECT(menu));
+ g_object_set_data_full(G_OBJECT(lchooser), button_menu_key, menu,
+ (GDestroyNotify)gtk_widget_unref);
+#endif
for (i = 0; i <= LINESTYLE_DOTTED; i++) {
mi = gtk_menu_item_new();
g_object_set_data(G_OBJECT(mi), menuitem_enum_key, GINT_TO_POINTER(i));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]