summaryrefslogtreecommitdiff
path: root/src/caja-connect-server-dialog.c
diff options
context:
space:
mode:
authorWolfgang Ulbrich <[email protected]>2016-01-23 00:04:15 +0100
committermonsta <[email protected]>2016-01-25 16:53:59 +0300
commit1241ff234a8ec46542e97e48a6298b78c9a0d2b5 (patch)
tree1a23419da4aea0392649d03888b3cc2621011851 /src/caja-connect-server-dialog.c
parent130906c9182c71a6049eca472f8d3b91804124cf (diff)
downloadcaja-1241ff234a8ec46542e97e48a6298b78c9a0d2b5.tar.bz2
caja-1241ff234a8ec46542e97e48a6298b78c9a0d2b5.tar.xz
GTK3: fix deprecated GtkMisc
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,