summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/copy-theme-dialog.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/copy-theme-dialog.c b/src/copy-theme-dialog.c
index 51c47f2..045674e 100644
--- a/src/copy-theme-dialog.c
+++ b/src/copy-theme-dialog.c
@@ -182,6 +182,7 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
GtkWidget *progress_vbox;
GtkWidget *table;
GtkWidget *label;
+ GtkWidget *dialog_vbox;
char *markup;
gchar *theme_dir_path;
@@ -200,13 +201,19 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
dlg->priv->cancellable = g_cancellable_new ();
/* GUI settings */
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox),
+#if GTK_CHECK_VERSION (3, 0, 0)
+ dialog_vbox = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
+#else
+ dialog_vbox = GTK_DIALOG (dlg)->vbox;
+#endif
+
+ gtk_container_set_border_width (GTK_CONTAINER (dialog_vbox),
4);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 4);
+ gtk_box_set_spacing (GTK_BOX (dialog_vbox), 4);
vbox = gtk_vbox_new (FALSE, 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), vbox, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (dialog_vbox), vbox, TRUE, TRUE, 0);
dlg->priv->status = gtk_label_new ("");
markup = g_strdup_printf ("<big><b>%s</b></big>", _("Copying files"));
@@ -252,10 +259,12 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
gtk_window_set_title (GTK_WINDOW (dlg),
_("Copying themes"));
+#if !GTK_CHECK_VERSION (3, 0, 0)
gtk_dialog_set_has_separator (GTK_DIALOG (dlg), FALSE);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (dlg), 6);
- gtk_widget_show_all (GTK_DIALOG (dlg)->vbox);
+ gtk_widget_show_all (dialog_vbox);
}
static void