changeset 1729:760e8d68290c

Add compatibility for GTK 2.18 With 2.18 some functions are deprecated. With geeqie that are two at the moment. - gtk_tree_view_column_get_cell_renderers - which can be replaced by gtk_cell_layout_get_cells - gdk_event_get_graphics_expose - I just commented it as there seems to be no replacement in GTK 2.18
author mow
date Tue, 13 Oct 2009 21:49:21 +0000
parents 2ef885dfa3a7
children 5a591dd26d6c
files src/collect-table.c src/dupe.c src/pixbuf-renderer.c src/search.c src/ui_tree_edit.c src/view_file_icon.c src/view_file_list.c
diffstat 7 files changed, 30 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/collect-table.c	Sat Oct 10 15:01:41 2009 +0000
+++ b/src/collect-table.c	Tue Oct 13 21:49:21 2009 +0000
@@ -1707,7 +1707,11 @@
 			gtk_tree_view_column_set_visible(column, (i < ct->columns));
 			gtk_tree_view_column_set_fixed_width(column, thumb_width + (THUMB_BORDER_PADDING * 6));
 
+#if GTK_CHECK_VERSION(2,18,0)
+			list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column));
+#else
 			list = gtk_tree_view_column_get_cell_renderers(column);
+#endif
 			cell = (list) ? list->data : NULL;
 			g_list_free(list);
 
--- a/src/dupe.c	Sat Oct 10 15:01:41 2009 +0000
+++ b/src/dupe.c	Tue Oct 13 21:49:21 2009 +0000
@@ -2775,7 +2775,11 @@
 
 	gtk_tree_view_column_set_fixed_width(column, (thumb) ? options->thumbnails.max_width : 4);
 
+#if GTK_CHECK_VERSION(2,18,0)
+	list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column));
+#else
 	list = gtk_tree_view_column_get_cell_renderers(column);
+#endif
 	if (!list) return;
 	cell = list->data;
 	g_list_free(list);
--- a/src/pixbuf-renderer.c	Sat Oct 10 15:01:41 2009 +0000
+++ b/src/pixbuf-renderer.c	Tue Oct 13 21:49:21 2009 +0000
@@ -3682,6 +3682,7 @@
 			}
 
 		/* process exposures here, "expose_event" seems to miss a few with obstructed windows */
+#if ! GTK_CHECK_VERSION(2,18,0)
 		while ((event = gdk_event_get_graphics_expose(box->window)) != NULL)
 			{
 			pixbuf_renderer_paint(pr, &event->expose.area);
@@ -3693,6 +3694,7 @@
 				}
 			gdk_event_free(event);
 			}
+#endif
 		}
 }
 
--- a/src/search.c	Sat Oct 10 15:01:41 2009 +0000
+++ b/src/search.c	Tue Oct 13 21:49:21 2009 +0000
@@ -828,7 +828,11 @@
 
 	gtk_tree_view_column_set_fixed_width(column, (sd->thumb_enable) ? options->thumbnails.max_width : 4);
 
+#if GTK_CHECK_VERSION(2,18,0)
+	list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column));
+#else
 	list = gtk_tree_view_column_get_cell_renderers(column);
+#endif
 	if (!list) return;
 	cell = list->data;
 	g_list_free(list);
--- a/src/ui_tree_edit.c	Sat Oct 10 15:01:41 2009 +0000
+++ b/src/ui_tree_edit.c	Tue Oct 13 21:49:21 2009 +0000
@@ -189,7 +189,11 @@
 	tcolumn = gtk_tree_view_get_column(tree, column);
 	if (!tcolumn) return FALSE;
 
+#if GTK_CHECK_VERSION(2,18,0)
+	list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(tcolumn));
+#else
 	list = gtk_tree_view_column_get_cell_renderers(tcolumn);
+#endif
 	work = list;
 	while (work && !cell)
 		{
@@ -289,7 +293,11 @@
 		gint cell_x;
 		gint cell_width;
 
+#if GTK_CHECK_VERSION(2,18,0)
+		renderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(tv_column));
+#else
 		renderers = gtk_tree_view_column_get_cell_renderers(tv_column);
+#endif
 		work = renderers;
 		while (work && !cell)
 			{
--- a/src/view_file_icon.c	Sat Oct 10 15:01:41 2009 +0000
+++ b/src/view_file_icon.c	Tue Oct 13 21:49:21 2009 +0000
@@ -1636,7 +1636,11 @@
 			gtk_tree_view_column_set_visible(column, (i < VFICON(vf)->columns));
 			gtk_tree_view_column_set_fixed_width(column, thumb_width + (THUMB_BORDER_PADDING * 6));
 
+#if GTK_CHECK_VERSION(2,18,0)
+			list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column));
+#else
 			list = gtk_tree_view_column_get_cell_renderers(column);
+#endif
 			cell = (list) ? list->data : NULL;
 			g_list_free(list);
 
--- a/src/view_file_list.c	Sat Oct 10 15:01:41 2009 +0000
+++ b/src/view_file_list.c	Tue Oct 13 21:49:21 2009 +0000
@@ -1701,7 +1701,11 @@
 
 	gtk_tree_view_column_set_fixed_width(column, options->thumbnails.max_width + 4);
 
+#if GTK_CHECK_VERSION(2,18,0)
+	list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(column));
+#else
 	list = gtk_tree_view_column_get_cell_renderers(column);
+#endif
 	if (!list) return;
 	cell = list->data;
 	g_list_free(list);