aboutsummaryrefslogtreecommitdiff
path: root/src/idomessagedialog.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2011-12-14 12:19:26 -0500
committerKen VanDine <ken.vandine@canonical.com>2011-12-14 12:19:26 -0500
commit9b717e50b0890d938cd2cf6bb4ec938240740f31 (patch)
tree1c3ced03cd9ec27f3406099e33cfb6892aa7ee2e /src/idomessagedialog.c
parent50b234a41b70db8f4c8b15ddaf2d15beacb602d6 (diff)
downloadayatana-ido-9b717e50b0890d938cd2cf6bb4ec938240740f31.tar.gz
ayatana-ido-9b717e50b0890d938cd2cf6bb4ec938240740f31.tar.bz2
ayatana-ido-9b717e50b0890d938cd2cf6bb4ec938240740f31.zip
removed deprecations from gtk3 and fixed sizing issues with idemessagedialog (LP: #888392)
Diffstat (limited to 'src/idomessagedialog.c')
-rw-r--r--src/idomessagedialog.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/idomessagedialog.c b/src/idomessagedialog.c
index 9b5fe2c..d4a3e2f 100644
--- a/src/idomessagedialog.c
+++ b/src/idomessagedialog.c
@@ -32,6 +32,7 @@
#include "idomessagedialog.h"
#include "idotimeline.h"
+#include "config.h"
#define IDO_MESSAGE_DIALOG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), IDO_TYPE_MESSAGE_DIALOG, IdoMessageDialogPrivate))
@@ -166,14 +167,22 @@ ido_message_dialog_focus_in_event (GtkWidget *widget,
IdoTimeline *timeline;
IdoMessageDialogMorphContext *context;
+#ifdef USE_GTK3
+ gtk_widget_get_preferred_size (GTK_WIDGET (dialog), NULL, &start);
+#else
gtk_widget_get_requisition (GTK_WIDGET (dialog), &start);
+#endif
priv->expanded = TRUE;
gtk_widget_show (priv->action_area);
gtk_widget_show (priv->secondary_label);
+#ifdef USE_GTK3
+ gtk_widget_get_preferred_size (GTK_WIDGET (dialog), NULL, &end);
+#else
gtk_widget_get_requisition (GTK_WIDGET (dialog), &end);
+#endif
gtk_widget_hide (priv->action_area);
gtk_widget_hide (priv->secondary_label);
@@ -370,7 +379,11 @@ ido_message_dialog_get_label (IdoMessageDialog *dialog, gboolean primary)
for (list = children; list != NULL; list = list->next)
{
+#ifdef USE_GTK3
+ if (G_TYPE_FROM_INSTANCE (list->data) == GTK_TYPE_BOX && gtk_orientable_get_orientation (list->data) == GTK_ORIENTATION_HORIZONTAL)
+#else
if (G_TYPE_FROM_INSTANCE (list->data) == GTK_TYPE_HBOX)
+#endif
{
GList *hchildren;
GList *hlist;
@@ -380,7 +393,11 @@ ido_message_dialog_get_label (IdoMessageDialog *dialog, gboolean primary)
for (hlist = hchildren; hlist != NULL; hlist = hlist->next)
{
+#ifdef USE_GTK3
+ if (G_TYPE_FROM_INSTANCE (hlist->data) == GTK_TYPE_BOX && gtk_orientable_get_orientation (hlist->data) == GTK_ORIENTATION_VERTICAL)
+#else
if (G_TYPE_FROM_INSTANCE (hlist->data) == GTK_TYPE_VBOX)
+#endif
{
GList *vlist;
GtkWidget *vbox = GTK_WIDGET (hlist->data);