aboutsummaryrefslogtreecommitdiff
path: root/src/idomessagedialog.c
diff options
context:
space:
mode:
authorCody Russell <crussell@canonical.com>2010-07-08 13:49:37 -0500
committerCody Russell <crussell@canonical.com>2010-07-08 13:49:37 -0500
commit03c0ea450e4ec8ce158437947c209512911164f1 (patch)
tree886bab7fd12f9f9471d1984776f3020b31d81f30 /src/idomessagedialog.c
parente937255e94ae5be01ffa9c391a76ceff120ec117 (diff)
downloadayatana-ido-03c0ea450e4ec8ce158437947c209512911164f1.tar.gz
ayatana-ido-03c0ea450e4ec8ce158437947c209512911164f1.tar.bz2
ayatana-ido-03c0ea450e4ec8ce158437947c209512911164f1.zip
Fix IdoMessageDialog to compile with deprecated gtk+ for Meerkat.
Diffstat (limited to 'src/idomessagedialog.c')
-rw-r--r--src/idomessagedialog.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/idomessagedialog.c b/src/idomessagedialog.c
index 2ba6538..ba73233 100644
--- a/src/idomessagedialog.c
+++ b/src/idomessagedialog.c
@@ -358,6 +358,8 @@ ido_message_dialog_get_label (IdoMessageDialog *dialog, gboolean primary)
GList *list;
gchar *text;
gchar *secondary_text;
+ GtkWidget *content;
+ GList *children;
g_object_get (G_OBJECT (dialog),
"text", &text,
@@ -366,34 +368,38 @@ ido_message_dialog_get_label (IdoMessageDialog *dialog, gboolean primary)
g_return_val_if_fail (IDO_IS_MESSAGE_DIALOG (dialog), NULL);
- for (list = GTK_BOX (GTK_DIALOG (dialog)->vbox)->children; list != NULL; list = list->next)
- {
- GtkBoxChild *child = (GtkBoxChild *)list->data;
+ content = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
+ children = gtk_container_get_children (GTK_CONTAINER (content));
- if (G_TYPE_FROM_INSTANCE (child->widget) == GTK_TYPE_HBOX)
+ for (list = children; list != NULL; list = list->next)
+ {
+ if (G_TYPE_FROM_INSTANCE (list->data) == GTK_TYPE_HBOX)
{
+ GList *hchildren;
GList *hlist;
- GtkWidget *hbox = child->widget;
+ GtkWidget *hbox = GTK_WIDGET (list->data);
- for (hlist = GTK_BOX (hbox)->children; hlist != NULL; hlist = hlist->next)
- {
- GtkBoxChild *hchild = (GtkBoxChild *)hlist->data;
+ hchildren = gtk_container_get_children (GTK_CONTAINER (hbox));
- if (G_TYPE_FROM_INSTANCE (hchild->widget) == GTK_TYPE_VBOX)
+ for (hlist = hchildren; hlist != NULL; hlist = hlist->next)
+ {
+ if (G_TYPE_FROM_INSTANCE (hlist->data) == GTK_TYPE_VBOX)
{
GList *vlist;
- GtkWidget *vbox = hchild->widget;
+ GtkWidget *vbox = GTK_WIDGET (hlist->data);
+ GList *vchildren;
+
+ vchildren = gtk_container_get_children (GTK_CONTAINER (vbox));
- for (vlist = GTK_BOX (vbox)->children; vlist != NULL; vlist = vlist->next)
+ for (vlist = vchildren; vlist != NULL; vlist = vlist->next)
{
- GtkBoxChild *vchild = (GtkBoxChild *)vlist->data;
GtkLabel *label;
- label = GTK_LABEL (vchild->widget);
+ label = GTK_LABEL (vlist->data);
if (strcmp ((primary ? text : secondary_text), label->label) == 0)
{
- return vchild->widget;
+ return GTK_WIDGET (label);
}
}
}