summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2016-07-05 23:25:56 +0200
committerraveit65 <[email protected]>2016-07-06 17:47:43 +0200
commit7c7eb8def5a6436e4d5105a7e5c45ea8361935dc (patch)
tree70f41fdcbd41f666d37a7b1d6ae1f8523576b632
parent2a7321bebb76d5f0010f3111a2842e1f909d7ca4 (diff)
downloadcaja-7c7eb8def5a6436e4d5105a7e5c45ea8361935dc.tar.bz2
caja-7c7eb8def5a6436e4d5105a7e5c45ea8361935dc.tar.xz
GTK+-3 connect-server-dialog: use widget properties instead of GtkAlignment
-rw-r--r--src/caja-connect-server-dialog.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/caja-connect-server-dialog.c b/src/caja-connect-server-dialog.c
index 60c88643..4d4a1a3a 100644
--- a/src/caja-connect-server-dialog.c
+++ b/src/caja-connect-server-dialog.c
@@ -899,20 +899,25 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
gtk_box_pack_start (GTK_BOX (content_area), label, FALSE, FALSE, 6);
gtk_widget_show (label);
+#if !GTK_CHECK_VERSION (3, 0, 0)
/* server settings alignment */
alignment = gtk_alignment_new (0, 0, 0, 0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
0, 0, 12, 0);
gtk_box_pack_start (GTK_BOX (content_area), alignment, TRUE, TRUE, 0);
gtk_widget_show (alignment);
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
grid = gtk_grid_new ();
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 3);
- gtk_container_add (GTK_CONTAINER (alignment), grid);
+ gtk_widget_set_halign (grid, GTK_ALIGN_START);
+ gtk_widget_set_valign (grid, GTK_ALIGN_START);
+ gtk_widget_set_margin_start (grid, 12);
gtk_widget_show (grid);
+ gtk_box_pack_start (GTK_BOX (content_area), grid, TRUE, TRUE, 0);
dialog->details->primary_grid = grid;
@@ -1146,6 +1151,7 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
#endif
gtk_box_pack_start (GTK_BOX (content_area), label, FALSE, FALSE, 6);
+#if !GTK_CHECK_VERSION (3, 0, 0)
/* user details alignment */
alignment = gtk_alignment_new (0, 0, 0, 0);
gtk_alignment_set_padding (GTK_ALIGNMENT (alignment),
@@ -1154,14 +1160,21 @@ caja_connect_server_dialog_init (CajaConnectServerDialog *dialog)
bind_visibility (dialog, alignment, label);
dialog->details->user_details = alignment;
+#endif
#if GTK_CHECK_VERSION (3, 0, 0)
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 3);
gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
- gtk_container_add (GTK_CONTAINER (alignment), grid);
+ gtk_widget_set_halign (grid, GTK_ALIGN_START);
+ gtk_widget_set_valign (grid, GTK_ALIGN_START);
+ gtk_widget_set_margin_start (grid, 12);
gtk_widget_show (grid);
+ gtk_box_pack_start (GTK_BOX (content_area), grid, TRUE, TRUE, 0);
+
+ bind_visibility (dialog, grid, label);
+ dialog->details->user_details = grid;
#else
table = gtk_table_new (4, 2, FALSE);
gtk_container_add (GTK_CONTAINER (alignment), table);