Mercurial > hg > forks > geeqie
diff src/bar_exif.c @ 2034:9297985567b5
use accessor functions
gtk3 does not allow direct use of data structures,
use accessor functions instead
author | Vladimir Nadvornik <nadvornik@suse.cz> |
---|---|
date | Wed, 01 Aug 2012 00:17:18 +0200 |
parents | 26dfd7a4d130 |
children | 4321c486aec7 |
line wrap: on
line diff
--- a/src/bar_exif.c Fri Aug 10 22:51:57 2012 +0200 +++ b/src/bar_exif.c Wed Aug 01 00:17:18 2012 +0200 @@ -350,7 +350,7 @@ switch (info) { case TARGET_APP_EXIF_ENTRY: - gtk_selection_data_set(selection_data, selection_data->target, + gtk_selection_data_set(selection_data, gtk_selection_data_get_target(selection_data), 8, (gpointer) &entry, sizeof(entry)); break; @@ -378,14 +378,14 @@ switch (info) { case TARGET_APP_EXIF_ENTRY: - new_entry = *(gpointer *)selection_data->data; + new_entry = *(gpointer *)gtk_selection_data_get_data(selection_data); - if (new_entry->parent && new_entry->parent != ped->vbox) bar_pane_exif_reparent_entry(new_entry, pane); + if (gtk_widget_get_parent(new_entry) && gtk_widget_get_parent(new_entry) != ped->vbox) bar_pane_exif_reparent_entry(new_entry, pane); break; default: /* FIXME: this needs a check for valid exif keys */ - new_entry = bar_pane_exif_add_entry(ped, (gchar *)selection_data->data, NULL, TRUE, FALSE); + new_entry = bar_pane_exif_add_entry(ped, (gchar *)gtk_selection_data_get_data(selection_data), NULL, TRUE, FALSE); break; } @@ -396,17 +396,20 @@ { gint nx, ny; GtkWidget *entry = work->data; + GtkAllocation allocation; work = work->next; if (entry == new_entry) continue; + gtk_widget_get_allocation(entry, &allocation); + #if GTK_CHECK_VERSION(2,20,0) if (gtk_widget_is_drawable(entry) && #else if (GTK_WIDGET_DRAWABLE(entry) && #endif gtk_widget_translate_coordinates(pane, entry, x, y, &nx, &ny) && - ny < entry->allocation.height / 2) break; + ny < allocation.height / 2) break; pos++; } g_list_free(list); @@ -488,13 +491,13 @@ if (ee) { const gchar *title; - GtkWidget *pane = cdd->widget->parent; + GtkWidget *pane = gtk_widget_get_parent(cdd->widget); while (pane) { ped = g_object_get_data(G_OBJECT(pane), "pane_data"); if (ped) break; - pane = pane->parent; + pane = gtk_widget_get_parent(pane); } if (!pane) return;