[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-881-g5f2582e1c

paul at claws-mail.org paul at claws-mail.org
Mon Dec 2 19:56:58 CET 2019


The branch, gtk3 has been updated
       via  5f2582e1c97e5582c1a51e625d708c4dc9cf1c8a (commit)
      from  a2cf46f2d02977d274d2bcf4018c3972d69b157a (commit)

Summary of changes:
 src/editvcard.c | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)


- Log -----------------------------------------------------------------
commit 5f2582e1c97e5582c1a51e625d708c4dc9cf1c8a
Author: paul <paul at claws-mail.org>
Date:   Mon Dec 2 18:56:19 2019 +0000

    replace deprecated GtkTable

diff --git a/src/editvcard.c b/src/editvcard.c
index d042ea13f..7daabfad4 100644
--- a/src/editvcard.c
+++ b/src/editvcard.c
@@ -143,7 +143,6 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
 	GtkWidget *file_btn;
 	GtkWidget *statusbar;
 	GtkWidget *hsbox;
-	gint top;
 
 	window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "editvcard");
 	gtk_widget_set_size_request(window, 450, -1);
@@ -162,35 +161,37 @@ static void addressbook_edit_vcard_create( gboolean *cancelled ) {
 	gtk_container_add(GTK_CONTAINER(window), vbox);
 	gtk_container_set_border_width( GTK_CONTAINER(vbox), 0 );
 
-	table = gtk_table_new(2, 3, FALSE);
+	table = gtk_grid_new();
 	gtk_box_pack_start(GTK_BOX(vbox), table, FALSE, FALSE, 0);
 	gtk_container_set_border_width( GTK_CONTAINER(table), 8 );
-	gtk_table_set_row_spacings(GTK_TABLE(table), 8);
-	gtk_table_set_col_spacings(GTK_TABLE(table), 8 );
+	gtk_grid_set_row_spacing(GTK_GRID(table), 8);
+	gtk_grid_set_column_spacing(GTK_GRID(table), 8);
 
 	/* First row */
-	top = 0;
 	label = gtk_label_new(_("Name"));
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(label), 0.0);
+	gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 1);
 
 	name_entry = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), name_entry, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), name_entry, 1, 0, 1, 1);
+	gtk_widget_set_hexpand(name_entry, TRUE);
+	gtk_widget_set_halign(name_entry, GTK_ALIGN_FILL);
 
 	check_btn = gtk_button_new_with_label( _(" Check File "));
-	gtk_table_attach(GTK_TABLE(table), check_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
+	gtk_grid_attach(GTK_GRID(table), check_btn, 2, 0, 1, 1);
 
 	/* Second row */
-	top = 1;
 	label = gtk_label_new(_("File"));
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(label), 0.0);
+	gtk_grid_attach(GTK_GRID(table), label, 0, 1, 1, 1);
 
 	file_entry = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), file_entry, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), file_entry, 1, 1, 1, 1);
+	gtk_widget_set_hexpand(file_entry, TRUE);
+	gtk_widget_set_halign(file_entry, GTK_ALIGN_FILL);
 
 	file_btn = gtkut_get_browse_file_btn(_("_Browse"));
-	gtk_table_attach(GTK_TABLE(table), file_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
+	gtk_grid_attach(GTK_GRID(table), file_btn, 2, 1, 1, 1);
 
 	/* Status line */
 	hsbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list