[Xfce4-commits] [thunar-plugins/thunar-vcs-plugin] 04/04: Replace GtkTable by GtkGrid

noreply at xfce.org noreply at xfce.org
Fri Jun 1 17:53:18 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository thunar-plugins/thunar-vcs-plugin.

commit 4811838499d3106eec4712d9269feeb50cc9933f
Author: Andre Miranda <andreldm at xfce.org>
Date:   Fri Jun 1 12:51:53 2018 -0300

    Replace GtkTable by GtkGrid
---
 thunar-vcs-plugin/tvp-svn-property-page.c | 56 ++++++++++++++++------------
 tvp-git-helper/tgh-transfer-dialog.c      | 35 +++++------------
 tvp-svn-helper/tsh-diff-dialog.c          | 20 ++++++----
 tvp-svn-helper/tsh-file-dialog.c          | 28 +++++---------
 tvp-svn-helper/tsh-log-dialog.c           | 14 ++++---
 tvp-svn-helper/tsh-login-dialog.c         | 41 ++++++--------------
 tvp-svn-helper/tsh-relocate-dialog.c      | 62 +++++++++----------------------
 tvp-svn-helper/tsh-status-dialog.c        | 30 +++++++++------
 tvp-svn-helper/tsh-transfer-dialog.c      | 42 ++++++---------------
 9 files changed, 130 insertions(+), 198 deletions(-)

diff --git a/thunar-vcs-plugin/tvp-svn-property-page.c b/thunar-vcs-plugin/tvp-svn-property-page.c
index a6b83ee..d29102c 100644
--- a/thunar-vcs-plugin/tvp-svn-property-page.c
+++ b/thunar-vcs-plugin/tvp-svn-property-page.c
@@ -93,7 +93,7 @@ tvp_svn_property_page_class_init (TvpSvnPropertyPageClass *klass)
 static void
 tvp_svn_property_page_init (TvpSvnPropertyPage *self)
 {
-  GtkWidget *table;
+  GtkWidget *grid;
   GtkWidget *label;
   GtkWidget *spacer;
   PangoAttrList *attr_list;
@@ -110,125 +110,133 @@ tvp_svn_property_page_init (TvpSvnPropertyPage *self)
 
   gtk_container_set_border_width (GTK_CONTAINER (self), 12);
 
-  table = gtk_table_new (9, 2, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 12);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 6);
+  grid = gtk_grid_new ();
+  gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
+  gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
 
   label = gtk_label_new (_("URL:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
   gtk_widget_show (label);
 
   self->url = label = gtk_label_new(_("Unknown"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_START);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 1, 1);
   gtk_widget_show (label);
 
   label = gtk_label_new (_("Revision:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
   gtk_widget_show (label);
 
   self->revision = label = gtk_label_new(_("Unknown"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);
   gtk_widget_show (label);
 
   label = gtk_label_new (_("Repository:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
   gtk_widget_show (label);
 
   self->repository = label = gtk_label_new(_("Unknown"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_MIDDLE);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 2, 1, 1);
   gtk_widget_show (label);
 
   /* Alignment in the most simple widget to find, for just doing a size request */
   spacer = g_object_new (GTK_TYPE_ALIGNMENT, "height-request", 12, NULL);
-  gtk_table_attach (GTK_TABLE (table), spacer, 0, 2, 3, 4, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), spacer, 0, 3, 2, 1);
   gtk_widget_show (spacer);
 
   label = gtk_label_new (_("Modified revision:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 4, 5, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1);
   gtk_widget_show (label);
 
   self->modrev = label = gtk_label_new(_("Unknown"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 4, 1, 1);
   gtk_widget_show (label);
 
   label = gtk_label_new (_("Modified date:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 5, 6, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 5, 1, 1);
   gtk_widget_show (label);
 
   self->moddate = label = gtk_label_new(_("Unknown"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
   gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 5, 1, 1);
   gtk_widget_show (label);
 
   label = gtk_label_new (_("Author:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 6, 7, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 6, 1, 1);
   gtk_widget_show (label);
 
   self->modauthor = label = gtk_label_new(_("Unknown"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 6, 1, 1);
   gtk_widget_show (label);
 
   /* Alignment in the most simple widget to find, for just doing a size request */
   spacer = g_object_new (GTK_TYPE_ALIGNMENT, "height-request", 12, NULL);
-  gtk_table_attach (GTK_TABLE (table), spacer, 0, 2, 7, 8, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), spacer, 0, 7, 2, 1);
   gtk_widget_show (spacer);
 
   label = gtk_label_new (_("Changelist:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 8, 9, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 8, 1, 1);
   gtk_widget_show (label);
 
   self->changelist = label = gtk_label_new("");
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 8, 1, 1);
   gtk_widget_show (label);
 
   /* Translators: Depth as in depth of recursion */
   label = gtk_label_new (_("Depth:"));
   gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
   gtk_label_set_attributes (GTK_LABEL (label), attr_list);
-  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 9, 10, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_grid_attach (GTK_GRID (grid), label, 0, 9, 1, 1);
   gtk_widget_show (label);
 
   self->depth = label = gtk_label_new(_("Unknown"));
   gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
   gtk_label_set_selectable (GTK_LABEL (label), TRUE);
-  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 9, 10, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (label, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), label, 1, 9, 1, 1);
   gtk_widget_show (label);
 
   /*TODO: kind, repos UUID, lock
    * wc info: size, schedule, copy from, text time, prop time, checksum, confilct, prejfile, working size */
 
-  gtk_container_add (GTK_CONTAINER (self), table);
-  gtk_widget_show (GTK_WIDGET (table));
+  gtk_container_add (GTK_CONTAINER (self), grid);
+  gtk_widget_show (GTK_WIDGET (grid));
 }
 
 
diff --git a/tvp-git-helper/tgh-transfer-dialog.c b/tvp-git-helper/tgh-transfer-dialog.c
index fb11181..8f04d34 100644
--- a/tvp-git-helper/tgh-transfer-dialog.c
+++ b/tvp-git-helper/tgh-transfer-dialog.c
@@ -52,23 +52,19 @@ tgh_transfer_dialog_class_init (TghTransferDialogClass *klass)
 static void
 tgh_transfer_dialog_init (TghTransferDialog *dialog)
 {
-    GtkWidget *table;
+    GtkWidget *grid;
     GtkWidget *label;
     GtkWidget *box;
     GtkWidget *button;
     GtkWidget *image;
 
-    table = gtk_table_new (2, 2, FALSE);
+    grid = gtk_grid_new ();
 
-    gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, TRUE, 0);
-    gtk_widget_show (table);
+    gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, TRUE, 0);
+    gtk_widget_show (grid);
 
     label = gtk_label_new_with_mnemonic (_("_Repository:"));
-    gtk_table_attach (GTK_TABLE (table), label,
-            0, 1, 0, 1,
-            GTK_FILL,
-            GTK_FILL,
-            0, 0);
+    gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
 
     box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
     dialog->repository = gtk_entry_new();
@@ -89,30 +85,19 @@ tgh_transfer_dialog_init (TghTransferDialog *dialog)
     gtk_widget_show(dialog->repository);
     gtk_widget_show(button);
 
-    gtk_table_attach (GTK_TABLE (table), box,
-            1, 2, 0, 1,
-            GTK_EXPAND | GTK_FILL,
-            GTK_FILL,
-            0, 0);
+    gtk_widget_set_hexpand (box, TRUE);
+    gtk_grid_attach (GTK_GRID (grid), box, 1, 0, 1, 1);
 
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->repository);
     gtk_widget_show(label);
     gtk_widget_show(box);
 
     label = gtk_label_new_with_mnemonic (_("_Directory:"));
-    gtk_table_attach (GTK_TABLE (table), label,
-            0, 1, 1, 2,
-            GTK_FILL,
-            GTK_FILL,
-            0, 0);
+    gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
 
     dialog->path = gtk_file_chooser_button_new (_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-    //dialog->path = gtk_file_chooser_entry_new(_("Select a folder"), GTK_FILE_CHOOSER_ACTION_OPEN);//GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);//tgh_file_chooser_entry_new ();
-    gtk_table_attach (GTK_TABLE (table), dialog->path,
-            1, 2, 1, 2,
-            GTK_EXPAND | GTK_FILL,
-            GTK_FILL,
-            0, 0);
+    gtk_widget_set_hexpand (dialog->path, TRUE);
+    gtk_grid_attach (GTK_GRID (grid), dialog->path, 1, 1, 1, 1);
 
     gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->path);
     gtk_widget_show(label);
diff --git a/tvp-svn-helper/tsh-diff-dialog.c b/tvp-svn-helper/tsh-diff-dialog.c
index 09efef6..d30397e 100644
--- a/tvp-svn-helper/tsh-diff-dialog.c
+++ b/tvp-svn-helper/tsh-diff-dialog.c
@@ -93,7 +93,7 @@ tsh_diff_dialog_init (TshDiffDialog *dialog)
   GtkWidget *scroll_window;
   GtkWidget *button;
   PangoFontDescription *font_desc;
-  GtkWidget *table;
+  GtkWidget *grid;
   GtkTreeModel *model;
   GtkWidget *depth;
   GtkWidget *notice_ancestry;
@@ -148,7 +148,7 @@ tsh_diff_dialog_init (TshDiffDialog *dialog)
   g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (refresh_clicked), dialog);
   gtk_widget_hide (button);
 
-  table = gtk_table_new (2, 2, FALSE);
+  grid = gtk_grid_new ();
   model = GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT));
   dialog->depth = depth = gtk_combo_box_new_with_model (model);
 
@@ -196,25 +196,29 @@ tsh_diff_dialog_init (TshDiffDialog *dialog)
   gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (depth), renderer, TRUE);
   gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (depth), renderer, "text", 0);
 
-  gtk_table_attach (GTK_TABLE (table), depth, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (depth, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), depth, 0, 0, 1, 1);
   gtk_widget_show (depth);
 
   dialog->notice_ancestry = notice_ancestry = gtk_check_button_new_with_label (_("Notice ancestry"));
-  gtk_table_attach (GTK_TABLE (table), notice_ancestry, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (notice_ancestry, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), notice_ancestry, 1, 1, 1, 1);
   gtk_widget_show (notice_ancestry);
 
   dialog->no_diff_deleted = no_diff_deleted = gtk_check_button_new_with_label (_("Do not show differences for deleted files"));
-  gtk_table_attach (GTK_TABLE (table), no_diff_deleted, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (no_diff_deleted, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), no_diff_deleted, 0, 1, 1, 1);
   gtk_widget_show (no_diff_deleted);
 
 #if CHECK_SVN_VERSION_S(1,7)
   dialog->show_copies_as_adds = show_copies_as_adds = gtk_check_button_new_with_label (_("Show copies as additions"));
-  gtk_table_attach (GTK_TABLE (table), show_copies_as_adds, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (show_copies_as_adds, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), show_copies_as_adds, 1, 0, 1, 1);
   gtk_widget_show (show_copies_as_adds);
 #endif
 
-  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, FALSE, 0);
-  gtk_widget_show (table);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
   gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 400);
 }
diff --git a/tvp-svn-helper/tsh-file-dialog.c b/tvp-svn-helper/tsh-file-dialog.c
index 7ef8209..6fc24ec 100644
--- a/tvp-svn-helper/tsh-file-dialog.c
+++ b/tvp-svn-helper/tsh-file-dialog.c
@@ -48,38 +48,28 @@ tsh_file_dialog_class_init (TshFileDialogClass *klass)
 static void
 tsh_file_dialog_init (TshFileDialog *dialog)
 {
-	GtkWidget *table;
+	GtkWidget *grid;
 	GtkWidget *label;
 
-	table = gtk_table_new (2, 2, FALSE);
+	grid = gtk_grid_new ();
 
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, TRUE, 0);
-	gtk_widget_show (table);
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, TRUE, 0);
+	gtk_widget_show (grid);
 
 	label = gtk_label_new_with_mnemonic (_("_Certificate:"));
-	gtk_table_attach (GTK_TABLE (table), label,
-	                  0, 1, 0, 1,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
 
 	dialog->filename = gtk_file_chooser_button_new (_("Select a file"), GTK_FILE_CHOOSER_ACTION_OPEN);
-	gtk_table_attach (GTK_TABLE (table), dialog->filename,
-	                  1, 2, 0, 1,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->filename, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->filename, 1, 0, 1, 1);
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->filename);
 	gtk_widget_show(label);
 	gtk_widget_show(dialog->filename);
 
 	dialog->may_save = gtk_check_button_new_with_label(_("Remember"));
-	gtk_table_attach (GTK_TABLE (table), dialog->may_save,
-	                  0, 2, 1, 2,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->may_save, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->may_save, 0, 1, 2, 1);
 	gtk_widget_show(dialog->may_save);
 
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Certificate"));
diff --git a/tvp-svn-helper/tsh-log-dialog.c b/tvp-svn-helper/tsh-log-dialog.c
index c0521a4..5bc172a 100644
--- a/tvp-svn-helper/tsh-log-dialog.c
+++ b/tvp-svn-helper/tsh-log-dialog.c
@@ -111,7 +111,7 @@ tsh_log_dialog_init (TshLogDialog *dialog)
   GtkWidget *vpane;
   GtkWidget *strict_history;
   GtkWidget *merged_revisions;
-  GtkWidget *table;
+  GtkWidget *grid;
 	GtkCellRenderer *renderer;
 	GtkTreeModel *model;
   gint n_columns;
@@ -209,18 +209,20 @@ tsh_log_dialog_init (TshLogDialog *dialog)
 	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), pane, TRUE, TRUE, 0);
   gtk_widget_show (pane);
 
-  table = gtk_table_new (3, 2, FALSE);
+  grid = gtk_grid_new ();
 
   dialog->strict_history = strict_history = gtk_check_button_new_with_label (_("Stop On Copy"));
-  gtk_table_attach (GTK_TABLE (table), strict_history, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (strict_history, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), strict_history, 0, 0, 1, 1);
   gtk_widget_show (strict_history);
 
   dialog->merged_revisions = merged_revisions = gtk_check_button_new_with_label (_("Show Merged Revisions"));
-  gtk_table_attach (GTK_TABLE (table), merged_revisions, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_set_hexpand (merged_revisions, TRUE);
+  gtk_grid_attach (GTK_GRID (grid), merged_revisions, 1, 0, 1, 1);
   gtk_widget_show (merged_revisions);
 
-  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, FALSE, 0);
-  gtk_widget_show (table);
+  gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, FALSE, 0);
+  gtk_widget_show (grid);
 
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Log"));
 
diff --git a/tvp-svn-helper/tsh-login-dialog.c b/tvp-svn-helper/tsh-login-dialog.c
index e9c1b87..32f8a5b 100644
--- a/tvp-svn-helper/tsh-login-dialog.c
+++ b/tvp-svn-helper/tsh-login-dialog.c
@@ -54,52 +54,35 @@ tsh_login_dialog_class_init (TshLoginDialogClass *klass)
 static void
 tsh_login_dialog_init (TshLoginDialog *dialog)
 {
-	GtkWidget *table;
+	GtkWidget *grid;
 
-	table = gtk_table_new (2, 3, FALSE);
+	grid = gtk_grid_new ();
 
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, TRUE, 0);
-	gtk_widget_show (table);
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, TRUE, 0);
+	gtk_widget_show (grid);
 
 	dialog->user_lbl = gtk_label_new_with_mnemonic (_("_Username:"));
-	gtk_table_attach (GTK_TABLE (table), dialog->user_lbl,
-	                  0, 1, 0, 1,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), dialog->user_lbl, 0, 0, 1, 1);
 
 	dialog->username = gtk_entry_new();
-	gtk_table_attach (GTK_TABLE (table), dialog->username,
-	                  1, 2, 0, 1,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->username, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->username, 1, 0, 1, 1);
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (dialog->user_lbl), dialog->username);
 
 	dialog->pass_lbl = gtk_label_new_with_mnemonic (_("_Password:"));
-	gtk_table_attach (GTK_TABLE (table), dialog->pass_lbl,
-	                  0, 1, 1, 2,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), dialog->pass_lbl, 0, 1, 1, 1);
 
 	dialog->password = gtk_entry_new();
-	gtk_table_attach (GTK_TABLE (table), dialog->password,
-	                  1, 2, 1, 2,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->password, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->password, 1, 1, 1, 1);
 
 	gtk_entry_set_visibility(GTK_ENTRY(dialog->password), FALSE);
 	gtk_label_set_mnemonic_widget (GTK_LABEL (dialog->pass_lbl), dialog->password);
 
 	dialog->may_save = gtk_check_button_new_with_label(_("Remember"));
-	gtk_table_attach (GTK_TABLE (table), dialog->may_save,
-	                  0, 2, 2, 3,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->may_save, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->may_save, 0, 2, 2, 1);
 	gtk_widget_show(dialog->may_save);
 
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Login"));
diff --git a/tvp-svn-helper/tsh-relocate-dialog.c b/tvp-svn-helper/tsh-relocate-dialog.c
index 7468dac..5c70c79 100644
--- a/tvp-svn-helper/tsh-relocate-dialog.c
+++ b/tvp-svn-helper/tsh-relocate-dialog.c
@@ -71,7 +71,7 @@ tsh_relocate_dialog_class_init (TshRelocateDialogClass *klass)
 static void
 tsh_relocate_dialog_init (TshRelocateDialog *dialog)
 {
-	GtkWidget *table;
+	GtkWidget *grid;
 	GtkWidget *label;
 #ifdef USE_FILE_ENTRY_REPLACEMENT
   GtkWidget *box;
@@ -79,17 +79,13 @@ tsh_relocate_dialog_init (TshRelocateDialog *dialog)
   GtkWidget *image;
 #endif
 
-	table = gtk_table_new (2, 3, FALSE);
+	grid = gtk_grid_new ();
 
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, TRUE, 0);
-	gtk_widget_show (table);
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, TRUE, 0);
+	gtk_widget_show (grid);
 
 	label = gtk_label_new_with_mnemonic (_("_From:"));
-	gtk_table_attach (GTK_TABLE (table), label,
-	                  0, 1, 0, 1,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
 
 #ifdef USE_FILE_ENTRY_REPLACEMENT
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -116,17 +112,11 @@ tsh_relocate_dialog_init (TshRelocateDialog *dialog)
 	gtk_widget_show(dialog->from);
 	gtk_widget_show(button);
 
-  gtk_table_attach (GTK_TABLE (table), box,
-	                  1, 2, 0, 1,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (box, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), box, 1, 0, 1, 1);
 #else
-  gtk_table_attach (GTK_TABLE (table), dialog->from,
-	                  1, 2, 0, 1,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->from, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->from, 1, 0, 1, 1);
 #endif
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->from);
@@ -139,11 +129,7 @@ tsh_relocate_dialog_init (TshRelocateDialog *dialog)
 #endif
 
 	label = gtk_label_new_with_mnemonic (_("_To:"));
-	gtk_table_attach (GTK_TABLE (table), label,
-	                  0, 1, 1, 2,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
 
 #ifdef USE_FILE_ENTRY_REPLACEMENT
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -170,17 +156,11 @@ tsh_relocate_dialog_init (TshRelocateDialog *dialog)
 	gtk_widget_show(dialog->to);
 	gtk_widget_show(button);
 
-  gtk_table_attach (GTK_TABLE (table), box,
-	                  1, 2, 1, 2,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (box, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), box, 1, 1, 1, 1);
 #else
-  gtk_table_attach (GTK_TABLE (table), dialog->to,
-	                  1, 2, 1, 2,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->to, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->to, 1, 1, 1, 1);
 #endif
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->to);
@@ -193,19 +173,11 @@ tsh_relocate_dialog_init (TshRelocateDialog *dialog)
 #endif
 
 	label = gtk_label_new_with_mnemonic (_("_Directory:"));
-	gtk_table_attach (GTK_TABLE (table), label,
-	                  0, 1, 2, 3,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
 
 	dialog->path = gtk_file_chooser_button_new (_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-	//dialog->path = gtk_file_chooser_entry_new(_("Select a folder"), GTK_FILE_CHOOSER_ACTION_OPEN);//GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);//tsh_file_chooser_entry_new ();
-	gtk_table_attach (GTK_TABLE (table), dialog->path,
-	                  1, 2, 2, 3,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->path, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->path, 1, 2, 1, 1);
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->path);
 	gtk_widget_show(label);
diff --git a/tvp-svn-helper/tsh-status-dialog.c b/tvp-svn-helper/tsh-status-dialog.c
index c92e1a4..ae913fc 100644
--- a/tvp-svn-helper/tsh-status-dialog.c
+++ b/tvp-svn-helper/tsh-status-dialog.c
@@ -102,10 +102,10 @@ tsh_status_dialog_init (TshStatusDialog *dialog)
 	GtkWidget *update;
 	GtkWidget *no_ignore;
 	GtkWidget *ignore_externals;
-  GtkWidget *table;
+	GtkWidget *grid;
 	GtkCellRenderer *renderer;
 	GtkTreeModel *model;
-    GtkTreeIter iter;
+	GtkTreeIter iter;
 
 	scroll_window = gtk_scrolled_window_new (NULL, NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@@ -153,7 +153,7 @@ tsh_status_dialog_init (TshStatusDialog *dialog)
 	gtk_widget_show (tree_view);
 	gtk_widget_show (scroll_window);
 
-  table = gtk_table_new (3, 2, FALSE);
+  grid = gtk_grid_new ();
 
 	model = GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT));
 
@@ -217,35 +217,41 @@ tsh_status_dialog_init (TshStatusDialog *dialog)
     gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (depth), renderer, TRUE);
     gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (depth), renderer, "text", 0);
 
-  gtk_table_attach (GTK_TABLE (table), depth, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_set_hexpand (depth, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), depth, 0, 0, 1, 1);
 	gtk_widget_show (depth);
 
 	dialog->get_all = get_all = gtk_check_button_new_with_label (_("Show Unmodified Files"));
-  gtk_table_attach (GTK_TABLE (table), get_all, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_set_hexpand (get_all, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), get_all, 0, 1, 1, 1);
 	gtk_widget_show (get_all);
 
 	dialog->unversioned = unversioned = gtk_check_button_new_with_label (_("Show Unversioned Files"));
-  gtk_table_attach (GTK_TABLE (table), unversioned, 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_set_hexpand (unversioned, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), unversioned, 0, 2, 1, 1);
 	gtk_widget_show (unversioned);
 
 	dialog->no_ignore = no_ignore = gtk_check_button_new_with_label (_("Show Ignored Files"));
-  gtk_table_attach (GTK_TABLE (table), no_ignore, 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_set_hexpand (no_ignore, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), no_ignore, 1, 0, 1, 1);
 	gtk_widget_show (no_ignore);
 
 	dialog->ignore_externals = ignore_externals = gtk_check_button_new_with_label (_("Hide Externals"));
-  gtk_table_attach (GTK_TABLE (table), ignore_externals, 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_set_hexpand (ignore_externals, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), ignore_externals, 1, 1, 1, 1);
 	gtk_widget_show (ignore_externals);
 
 	dialog->update = update = gtk_check_button_new_with_label (_("Check Repository"));
-  gtk_table_attach (GTK_TABLE (table), update, 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_set_hexpand (update, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), update, 1, 2, 1, 1);
 	gtk_widget_show (update);
 
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, FALSE, 0);
-  gtk_widget_show (table);
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, FALSE, 0);
+	gtk_widget_show (grid);
 
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Status"));
 
-  gtk_button_box_set_layout(GTK_BUTTON_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), GTK_BUTTONBOX_EDGE);
+	gtk_button_box_set_layout(GTK_BUTTON_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), GTK_BUTTONBOX_EDGE);
 
 	dialog->cancel = button = gtk_button_new_with_mnemonic (_("_Cancel"));
 	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_action_area (GTK_DIALOG (dialog))), button, FALSE, TRUE, 0);
diff --git a/tvp-svn-helper/tsh-transfer-dialog.c b/tvp-svn-helper/tsh-transfer-dialog.c
index d5799e3..74ec1a5 100644
--- a/tvp-svn-helper/tsh-transfer-dialog.c
+++ b/tvp-svn-helper/tsh-transfer-dialog.c
@@ -65,7 +65,7 @@ tsh_transfer_dialog_class_init (TshTransferDialogClass *klass)
 static void
 tsh_transfer_dialog_init (TshTransferDialog *dialog)
 {
-	GtkWidget *table;
+	GtkWidget *grid;
 	GtkWidget *label;
 #ifdef USE_FILE_ENTRY_REPLACEMENT
   GtkWidget *box;
@@ -73,17 +73,13 @@ tsh_transfer_dialog_init (TshTransferDialog *dialog)
   GtkWidget *image;
 #endif
 
-	table = gtk_table_new (2, 2, FALSE);
+	grid = gtk_grid_new ();
 
-	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), table, FALSE, TRUE, 0);
-	gtk_widget_show (table);
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), grid, FALSE, TRUE, 0);
+	gtk_widget_show (grid);
 
 	label = gtk_label_new_with_mnemonic (_("_Repository:"));
-	gtk_table_attach (GTK_TABLE (table), label,
-	                  0, 1, 0, 1,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
 
 #ifdef USE_FILE_ENTRY_REPLACEMENT
   box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
@@ -110,17 +106,11 @@ tsh_transfer_dialog_init (TshTransferDialog *dialog)
 	gtk_widget_show(dialog->repository);
 	gtk_widget_show(button);
 
-  gtk_table_attach (GTK_TABLE (table), box,
-	                  1, 2, 0, 1,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (box, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), box, 1, 0, 1, 1);
 #else
-  gtk_table_attach (GTK_TABLE (table), dialog->repository,
-	                  1, 2, 0, 1,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->repository, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->repository, 1, 0, 1, 1);
 #endif
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->repository);
@@ -133,19 +123,11 @@ tsh_transfer_dialog_init (TshTransferDialog *dialog)
 #endif
 
 	label = gtk_label_new_with_mnemonic (_("_Directory:"));
-	gtk_table_attach (GTK_TABLE (table), label,
-	                  0, 1, 1, 2,
-	                  GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
 
 	dialog->path = gtk_file_chooser_button_new (_("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
-	//dialog->path = gtk_file_chooser_entry_new(_("Select a folder"), GTK_FILE_CHOOSER_ACTION_OPEN);//GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);//tsh_file_chooser_entry_new ();
-	gtk_table_attach (GTK_TABLE (table), dialog->path,
-	                  1, 2, 1, 2,
-	                  GTK_EXPAND | GTK_FILL,
-	                  GTK_FILL,
-	                  0, 0);
+	gtk_widget_set_hexpand (dialog->path, TRUE);
+	gtk_grid_attach (GTK_GRID (grid), dialog->path, 1, 1, 1, 1);
 
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), dialog->path);
 	gtk_widget_show(label);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list