summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2013-11-12 16:51:13 +0100
committerStefano Karapetsas <[email protected]>2013-11-12 16:51:13 +0100
commit21661b23a40abdcbc6987790d93ed814e55596dc (patch)
treea18b54ab3420c576586cc8a2b2a2475f80793e4d
parentd5027c1631b5db4197f9d3a6aa518ce0265ac05f (diff)
downloadmate-screensaver-21661b23a40abdcbc6987790d93ed814e55596dc.tar.bz2
mate-screensaver-21661b23a40abdcbc6987790d93ed814e55596dc.tar.xz
copy-theme-dialog: Add GTK3 support
-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