Mercurial > geeqie
comparison src/ui_tree_edit.c @ 1767:9a351e8f3b97
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 | 2349fa90226d |
children | 956aab097ea7 |
comparison
equal
deleted
inserted
replaced
1766:6e0f6d5e4c25 | 1767:9a351e8f3b97 |
---|---|
187 if (!GTK_WIDGET_VISIBLE(tree)) return FALSE; | 187 if (!GTK_WIDGET_VISIBLE(tree)) return FALSE; |
188 | 188 |
189 tcolumn = gtk_tree_view_get_column(tree, column); | 189 tcolumn = gtk_tree_view_get_column(tree, column); |
190 if (!tcolumn) return FALSE; | 190 if (!tcolumn) return FALSE; |
191 | 191 |
192 #if GTK_CHECK_VERSION(2,18,0) | |
193 list = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(tcolumn)); | |
194 #else | |
192 list = gtk_tree_view_column_get_cell_renderers(tcolumn); | 195 list = gtk_tree_view_column_get_cell_renderers(tcolumn); |
196 #endif | |
193 work = list; | 197 work = list; |
194 while (work && !cell) | 198 while (work && !cell) |
195 { | 199 { |
196 cell = work->data; | 200 cell = work->data; |
197 if (!GTK_IS_CELL_RENDERER_TEXT(cell)) | 201 if (!GTK_IS_CELL_RENDERER_TEXT(cell)) |
287 GList *renderers; | 291 GList *renderers; |
288 GList *work; | 292 GList *work; |
289 gint cell_x; | 293 gint cell_x; |
290 gint cell_width; | 294 gint cell_width; |
291 | 295 |
296 #if GTK_CHECK_VERSION(2,18,0) | |
297 renderers = gtk_cell_layout_get_cells(GTK_CELL_LAYOUT(tv_column)); | |
298 #else | |
292 renderers = gtk_tree_view_column_get_cell_renderers(tv_column); | 299 renderers = gtk_tree_view_column_get_cell_renderers(tv_column); |
300 #endif | |
293 work = renderers; | 301 work = renderers; |
294 while (work && !cell) | 302 while (work && !cell) |
295 { | 303 { |
296 cell = work->data; | 304 cell = work->data; |
297 work = work->next; | 305 work = work->next; |