aboutsummaryrefslogtreecommitdiff
path: root/src/idomessagedialog.c
diff options
context:
space:
mode:
authorMichael Terry <mike@mterry.name>2011-06-01 15:24:28 -0400
committerMichael Terry <mike@mterry.name>2011-06-01 15:24:28 -0400
commit5ddcf6b51cdcb8d793748ff4a812f843a0d4f6e7 (patch)
tree67cdd3557d77ae36dbc61ed05cd6c136bf4f2fe8 /src/idomessagedialog.c
parent3e67ec3d19dd4e31ec68b1b9c33f4b330c7672a3 (diff)
downloadayatana-ido-5ddcf6b51cdcb8d793748ff4a812f843a0d4f6e7.tar.gz
ayatana-ido-5ddcf6b51cdcb8d793748ff4a812f843a0d4f6e7.tar.bz2
ayatana-ido-5ddcf6b51cdcb8d793748ff4a812f843a0d4f6e7.zip
allow building either gtk2 or gtk3 versions; some deprecation cleanups
Diffstat (limited to 'src/idomessagedialog.c')
-rw-r--r--src/idomessagedialog.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/idomessagedialog.c b/src/idomessagedialog.c
index c5acb03..1e72701 100644
--- a/src/idomessagedialog.c
+++ b/src/idomessagedialog.c
@@ -284,11 +284,13 @@ ido_message_dialog_new (GtkWindow *parent,
NULL);
dialog = GTK_DIALOG (widget);
+#if ! GTK_CHECK_VERSION(3, 0, 0)
if (flags & GTK_DIALOG_NO_SEPARATOR)
{
g_warning ("The GTK_DIALOG_NO_SEPARATOR flag cannot be used for IdoMessageDialog");
flags &= ~GTK_DIALOG_NO_SEPARATOR;
}
+#endif
if (message_format)
{
@@ -296,8 +298,7 @@ ido_message_dialog_new (GtkWindow *parent,
msg = g_strdup_vprintf (message_format, args);
va_end (args);
- gtk_label_set_text (GTK_LABEL (GTK_MESSAGE_DIALOG (widget)->label),
- msg);
+ g_object_set (G_OBJECT (widget), "text", msg, NULL);
g_free (msg);
}
@@ -397,7 +398,8 @@ ido_message_dialog_get_label (IdoMessageDialog *dialog, gboolean primary)
label = GTK_LABEL (vlist->data);
- if (strcmp ((primary ? text : secondary_text), label->label) == 0)
+ if (strcmp ((primary ? text : secondary_text),
+ gtk_label_get_label (label)) == 0)
{
return GTK_WIDGET (label);
}