[gimp] Use gtk_container_child_get() instead of table->children
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Use gtk_container_child_get() instead of table->children
- Date: Sat, 10 Oct 2009 13:11:30 +0000 (UTC)
commit b41bca97fbf4f0e01c11ab98dacd2108ed8f705c
Author: Michael Natterer <mitch gimp org>
Date: Sat Oct 10 14:40:23 2009 +0200
Use gtk_container_child_get() instead of table->children
plug-ins/common/file-pdf.c | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/plug-ins/common/file-pdf.c b/plug-ins/common/file-pdf.c
index ef28b55..30b5f2d 100644
--- a/plug-ins/common/file-pdf.c
+++ b/plug-ins/common/file-pdf.c
@@ -1253,20 +1253,30 @@ gimp_resolution_entry_attach_label (GimpResolutionEntry *gre,
if (column == 0)
{
- GtkTableChild *child;
- GList *list;
+ GList *children;
+ GList *list;
- for (list = GTK_TABLE (gre)->children; list; list = g_list_next (list))
+ children = gtk_container_get_children (GTK_CONTAINER (gre));
+
+ for (list = children; list; list = g_list_next (list))
{
- child = list->data;
+ GtkWidget *child = list->data;
+ gint left_attach;
+ gint top_attach;
+
+ gtk_container_child_get (GTK_CONTAINER (gre), child,
+ "left-attach", &left_attach,
+ "top-attach", &top_attach,
+ NULL);
- if (child->left_attach == 1 && child->top_attach == row)
+ if (left_attach == 1 && top_attach == row)
{
- gtk_label_set_mnemonic_widget (GTK_LABEL (label),
- child->widget);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (label), child);
break;
}
}
+
+ g_list_free (children);
}
gtk_misc_set_alignment (GTK_MISC (label), alignment, 0.5);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]