diff --git a/libtinymailui-gtk/tny-gtk-msg-view.c b/libtinymailui-gtk/tny-gtk-msg-view.c
index 2b406da..5dfbf92 100644
--- a/libtinymailui-gtk/tny-gtk-msg-view.c
+++ b/libtinymailui-gtk/tny-gtk-msg-view.c
@@ -872,8 +872,8 @@ tny_gtk_msg_view_instance_init (GTypeInstance *instance, gpointer g_class)
 static void
 widget_size_request (GtkWidget *widget, GtkRequisition *requisition)
 {
-	if (((GtkBin *) widget)->child)
-		gtk_widget_size_request (((GtkBin *) widget)->child, requisition);
+	if (gtk_bin_get_child (GTK_BIN (widget)))
+                gtk_widget_size_request (gtk_bin_get_child (GTK_BIN (widget)), requisition);
 }
 
 static void
@@ -881,8 +881,8 @@ widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
 {
 	widget->allocation = *allocation;
 
-	if (((GtkBin *) widget)->child)
-		gtk_widget_size_allocate (((GtkBin *) widget)->child, allocation);
+	if (gtk_bin_get_child (GTK_BIN (widget)))
+		gtk_widget_size_allocate (gtk_bin_get_child (GTK_BIN (widget)), allocation);
 }
 
 
diff --git a/libtinymailui-gtk/tny-gtk-password-dialog.c b/libtinymailui-gtk/tny-gtk-password-dialog.c
index 4bdb5e9..64ad03d 100644
--- a/libtinymailui-gtk/tny-gtk-password-dialog.c
+++ b/libtinymailui-gtk/tny-gtk-password-dialog.c
@@ -74,11 +74,19 @@ tny_gtk_password_dialog_get_password (TnyPasswordGetter *self, const gchar *aid,
 		gtk_widget_show (GTK_WIDGET (pwd_entry));
 		gtk_widget_show (GTK_WIDGET (prompt_label));
 
+#if GTK_CHECK_VERSION (2,14,0)
+		gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)),
+                        GTK_WIDGET (prompt_label), TRUE, TRUE, 0);
+
+		gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)),
+                        GTK_WIDGET (pwd_entry), TRUE, TRUE, 0);
+#else
 		gtk_box_pack_start (GTK_BOX (dialog->vbox), 
 			GTK_WIDGET (prompt_label), TRUE, TRUE, 0);
 
 		gtk_box_pack_start (GTK_BOX (dialog->vbox), 
 			GTK_WIDGET (pwd_entry), TRUE, TRUE, 0);
+#endif
 
 		gtk_label_set_text (prompt_label, prompt);
 
diff --git a/tests/c-demo/tny-demoui-summary-view.c b/tests/c-demo/tny-demoui-summary-view.c
index 14314e0..5ba036a 100644
--- a/tests/c-demo/tny-demoui-summary-view.c
+++ b/tests/c-demo/tny-demoui-summary-view.c
@@ -592,12 +592,20 @@ on_header_view_key_press_event (GtkTreeView *header_view, GdkEventKey *event, gp
 
 				entry1 = gtk_entry_new ();
 				gtk_entry_set_text (GTK_ENTRY (entry1), _("To: "));
+#if GTK_CHECK_VERSION (2,14,0)
+				gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), entry1);
+#else
 				gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), entry1);
+#endif
 				gtk_widget_show (entry1);
 
 				entry2 = gtk_entry_new ();
 				gtk_entry_set_text (GTK_ENTRY (entry2), _("From: "));
+#if GTK_CHECK_VERSION (2,14,0)
+				gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), entry2);
+#else
 				gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), entry2);
+#endif
 				gtk_widget_show (entry2);
 
 				if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES)
@@ -1238,7 +1246,11 @@ on_rename_folder_activate (GtkMenuItem *mitem, gpointer user_data)
 
 			entry = gtk_entry_new ();
 			gtk_entry_set_text (GTK_ENTRY (entry), tny_folder_get_name (folder));
+#if GTK_CHECK_VERSION (2,14,0)
+			gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG(dialog))), entry);
+#else
 			gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), entry);
+#endif
 			gtk_widget_show (entry);
 
 			result = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1326,7 +1338,11 @@ on_delete_folder_activate (GtkMenuItem *mitem, gpointer user_data)
 												  NULL);
 
 			label = gtk_label_new (_("Are you sure you want to delete this folder?"));
+#if GTK_CHECK_VERSION (2,14,0)
+			gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG(dialog))), label);
+#else
 			gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label);
+#endif
 			gtk_widget_show (label);
 
 			result = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1420,7 +1436,11 @@ on_uncache_account_activate (GtkMenuItem *mitem, gpointer user_data)
 			label = gtk_label_new (str);
 			g_free (str);
 
+#if GTK_CHECK_VERSION (2,14,0)
+			gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), label);
+#else
 			gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label);
+#endif
 			gtk_widget_show (label);
 
 			result = gtk_dialog_run (GTK_DIALOG (dialog));
@@ -1578,7 +1598,11 @@ on_create_folder_activate (GtkMenuItem *mitem, gpointer user_data)
 
 			entry = gtk_entry_new ();
 			gtk_entry_set_text (GTK_ENTRY (entry), _("New folder"));
+#if GTK_CHECK_VERSION (2,14,0)
+			gtk_container_add (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), entry);
+#else
 			gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), entry);
+#endif
 			gtk_widget_show (entry);
 
 			result = gtk_dialog_run (GTK_DIALOG (dialog));
