summaryrefslogtreecommitdiff
path: root/src/gs-lock-plug.c
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/gs-lock-plug.c
parent38d5cd1e7b60611e57bf8690f01d6f3baf030029 (diff)
downloadmate-screensaver-dd837483d4435bfac418ef9c006cff642990a83f.tar.bz2
mate-screensaver-dd837483d4435bfac418ef9c006cff642990a83f.tar.xz
fix UI issues introduced in 296b056
Diffstat (limited to 'src/gs-lock-plug.c')
-rw-r--r--src/gs-lock-plug.c27
1 files changed, 21 insertions, 6 deletions
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);