summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormonsta <[email protected]>2016-06-30 15:55:55 +0300
committermonsta <[email protected]>2016-06-30 15:55:55 +0300
commitdd837483d4435bfac418ef9c006cff642990a83f (patch)
treea74b4fd0dd864f231e340568c4d28ebdaa9a8da2 /src
parent38d5cd1e7b60611e57bf8690f01d6f3baf030029 (diff)
downloadmate-screensaver-dd837483d4435bfac418ef9c006cff642990a83f.tar.bz2
mate-screensaver-dd837483d4435bfac418ef9c006cff642990a83f.tar.xz
fix UI issues introduced in 296b056
Diffstat (limited to 'src')
-rw-r--r--src/copy-theme-dialog.c17
-rw-r--r--src/gs-lock-plug.c27
-rw-r--r--src/gs-window-x11.c17
3 files changed, 45 insertions, 16 deletions
diff --git a/src/copy-theme-dialog.c b/src/copy-theme-dialog.c
index 14794a0..6384d7f 100644
--- a/src/copy-theme-dialog.c
+++ b/src/copy-theme-dialog.c
@@ -31,11 +31,6 @@
#include "copy-theme-dialog.h"
-#if !GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_box_new(GTK_ORIENTATION_HORIZONTAL, b) gtk_hbox_new(FALSE, b)
-#define gtk_box_new(GTK_ORIENTATION_VERTICAL, b) gtk_vbox_new(FALSE, b)
-#endif
-
static void
copy_theme_dialog_class_init (CopyThemeDialogClass *klass);
static void
@@ -212,7 +207,11 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
4);
gtk_box_set_spacing (GTK_BOX (dialog_vbox), 4);
+#if GTK_CHECK_VERSION (3, 0, 0)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+ vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_box_pack_start (GTK_BOX (dialog_vbox), vbox, TRUE, TRUE, 0);
@@ -230,7 +229,11 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox), dlg->priv->status, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+#else
+ hbox = gtk_hbox_new (FALSE, 0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
table = gtk_table_new (2, 2, FALSE);
@@ -248,7 +251,11 @@ copy_theme_dialog_init (CopyThemeDialog *dlg)
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
progress_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
+ progress_vbox = gtk_vbox_new (FALSE, 0);
+#endif
gtk_box_set_homogeneous (progress_vbox, TRUE);
gtk_box_pack_start (GTK_BOX (vbox), progress_vbox, FALSE, FALSE, 0);
diff --git a/src/gs-lock-plug.c b/src/gs-lock-plug.c
index 7dea3c3..d4b2a7b 100644
--- a/src/gs-lock-plug.c
+++ b/src/gs-lock-plug.c
@@ -82,11 +82,6 @@ static void gs_lock_plug_finalize (GObject *object);
#define GS_LOCK_PLUG_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_LOCK_PLUG, GSLockPlugPrivate))
-#if !GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_box_new(GTK_ORIENTATION_HORIZONTAL, b) gtk_hbox_new(FALSE, b)
-#define gtk_box_new(GTK_ORIENTATION_VERTICAL, b) gtk_vbox_new(FALSE, b)
-#endif
-
#if !GTK_CHECK_VERSION (3, 20, 0)
#define gtk_widget_set_focus_on_click(a, b) gtk_button_set_focus_on_click(GTK_BUTTON(a), b)
#endif
@@ -1966,11 +1961,15 @@ create_page_one (GSLockPlug *plug)
align = gtk_alignment_new (0.5, 0.5, 1, 1);
gtk_notebook_append_page (GTK_NOTEBOOK (plug->priv->notebook), align, NULL);
- vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+ vbox = gtk_vbox_new (FALSE, 12);
gtk_container_add (GTK_CONTAINER (align), vbox);
#endif
+#if GTK_CHECK_VERSION(3, 0, 0)
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
+ vbox2 = gtk_vbox_new (FALSE, 0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
str = g_strdup ("<span size=\"xx-large\" weight=\"ultrabold\">%s</span>");
@@ -2006,7 +2005,11 @@ create_page_one (GSLockPlug *plug)
gtk_misc_set_alignment (GTK_MISC (plug->priv->auth_face_image), 0.5, 1.0);
#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
+ vbox2 = gtk_vbox_new (FALSE, 0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
str = g_strdup ("<span size=\"x-large\">%R</span>");
@@ -2036,10 +2039,18 @@ create_page_one (GSLockPlug *plug)
gtk_label_set_use_markup (GTK_LABEL (plug->priv->auth_username_label), TRUE);
gtk_box_pack_start (GTK_BOX (vbox2), plug->priv->auth_username_label, FALSE, FALSE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
+ vbox2 = gtk_vbox_new (FALSE, 0);
+#endif
gtk_box_pack_start (GTK_BOX (vbox), vbox2, TRUE, TRUE, 0);
+#if GTK_CHECK_VERSION (3, 0, 0)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+#else
+ hbox = gtk_hbox_new (FALSE, 6);
+#endif
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
plug->priv->auth_prompt_label = gtk_label_new_with_mnemonic (_("_Password:"));
@@ -2294,7 +2305,11 @@ gs_lock_plug_init (GSLockPlug *plug)
{
gs_debug ("Unable to load theme!");
+#if GTK_CHECK_VERSION (3, 0, 0)
plug->priv->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+#else
+ plug->priv->vbox = gtk_vbox_new (FALSE, 0);
+#endif
gtk_container_add (GTK_CONTAINER (plug), plug->priv->vbox);
diff --git a/src/gs-window-x11.c b/src/gs-window-x11.c
index 6861508..41adbb6 100644
--- a/src/gs-window-x11.c
+++ b/src/gs-window-x11.c
@@ -62,11 +62,6 @@ enum
#define GS_WINDOW_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GS_TYPE_WINDOW, GSWindowPrivate))
-#if !GTK_CHECK_VERSION (3, 0, 0)
-#define gtk_box_new(GTK_ORIENTATION_HORIZONTAL, b) gtk_hbox_new(FALSE, b)
-#define gtk_box_new(GTK_ORIENTATION_VERTICAL, b) gtk_vbox_new(FALSE, b)
-#endif
-
struct GSWindowPrivate
{
int monitor;
@@ -1120,7 +1115,11 @@ set_info_text_and_icon (GSWindow *window,
GtkWidget *primary_label;
GtkWidget *secondary_label;
+#if GTK_CHECK_VERSION (3, 0, 0)
hbox_content = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
+#else
+ hbox_content = gtk_hbox_new (FALSE, 8);
+#endif
gtk_widget_show (hbox_content);
image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_DIALOG);
@@ -1132,7 +1131,11 @@ set_info_text_and_icon (GSWindow *window,
gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0);
#endif
+#if GTK_CHECK_VERSION (3, 0, 0)
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+#else
+ vbox = gtk_vbox_new (FALSE, 6);
+#endif
gtk_widget_show (vbox);
gtk_box_pack_start (GTK_BOX (hbox_content), vbox, FALSE, FALSE, 0);
@@ -2799,7 +2802,11 @@ gs_window_init (GSWindow *window)
| GDK_ENTER_NOTIFY_MASK
| GDK_LEAVE_NOTIFY_MASK);
+#if GTK_CHECK_VERSION (3, 0, 0)
window->priv->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+#else
+ window->priv->vbox = gtk_vbox_new (FALSE, 12);
+#endif
gtk_widget_show (window->priv->vbox);
gtk_container_add (GTK_CONTAINER (window), window->priv->vbox);