summaryrefslogtreecommitdiff
path: root/src/caja-connect-server-dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/caja-connect-server-dialog.c')
-rw-r--r--src/caja-connect-server-dialog.c60
1 files changed, 41 insertions, 19 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index 312bcf4a..60c88643 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -891,8 +891,8 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
str = g_strdup_printf ("<b>%s</b>", _("Server Details"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
-#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
@@ -918,7 +918,11 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* first row: server entry + port spinbutton */
label = gtk_label_new_with_mnemonic (_("_Server:"));
- gtk_widget_set_halign (label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
gtk_container_add (GTK_CONTAINER (grid), label);
gtk_widget_show (label);
@@ -959,8 +963,8 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* port */
label = gtk_label_new_with_mnemonic (_("_Port:"));
-#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
@@ -981,11 +985,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* second row: type combobox */
label = gtk_label_new (_("Type:"));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (grid), label);
#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label,
0, 1,
1, 2,
@@ -1069,11 +1076,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* third row: share entry */
label = gtk_label_new (_("Share:"));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (grid), label);
#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label,
0, 1,
2, 3,
@@ -1096,11 +1106,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* fourth row: folder entry */
label = gtk_label_new (_("Folder:"));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (grid), label);
#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label,
0, 1,
3, 4,
@@ -1126,8 +1139,8 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
str = g_strdup_printf ("<b>%s</b>", _("User Details"));
gtk_label_set_markup (GTK_LABEL (label), str);
g_free (str);
-#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
#else
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
#endif
@@ -1157,11 +1170,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* first row: domain entry */
label = gtk_label_new (_("Domain Name:"));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (grid), label);
#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label,
0, 1,
0, 1,
@@ -1184,11 +1200,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* second row: username entry */
label = gtk_label_new (_("User Name:"));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (grid), label);
#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label,
0, 1,
1, 2,
@@ -1211,11 +1230,14 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
/* third row: password entry */
label = gtk_label_new (_("Password:"));
+#if GTK_CHECK_VERSION (3, 16, 0)
+ gtk_label_set_xalign (GTK_LABEL (label), 0);
+#else
+ gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
- gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_container_add (GTK_CONTAINER (grid), label);
#else
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach (GTK_TABLE (table), label,
0, 1,
2, 3,