[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-870-g6dfe91124

paul at claws-mail.org paul at claws-mail.org
Sun Dec 1 11:44:37 CET 2019


The branch, gtk3 has been updated
       via  6dfe91124fa6b67c91a9998e9d9f69e39f0a1c60 (commit)
      from  8f11d71559bb63ffb31b91b353201c73ea0a569e (commit)

Summary of changes:
 src/editgroup.c       |  14 +++----
 src/editjpilot.c      |  29 ++++++-------
 src/editldap.c        | 111 +++++++++++++++++++++-----------------------------
 src/editldap_basedn.c |  24 +++++------
 src/exphtmldlg.c      |  80 +++++++++++++-----------------------
 src/expldifdlg.c      |  78 +++++++++++++----------------------
 src/export.c          |  36 +++++++---------
 7 files changed, 152 insertions(+), 220 deletions(-)


- Log -----------------------------------------------------------------
commit 6dfe91124fa6b67c91a9998e9d9f69e39f0a1c60
Author: paul <paul at claws-mail.org>
Date:   Sun Dec 1 10:44:29 2019 +0000

    replace deprecated GtkTable

diff --git a/src/editgroup.c b/src/editgroup.c
index 28cdad290..ac1f38ded 100644
--- a/src/editgroup.c
+++ b/src/editgroup.c
@@ -279,7 +279,6 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
 
 	GtkWidget *buttonGroup;
 	GtkWidget *buttonAvail;
-	gint top;
 
 	gchar *titles[ GROUP_N_COLS ];
 	gint i;
@@ -314,20 +313,21 @@ static void addressbook_edit_group_create( gboolean *cancelled ) {
 	gtk_box_pack_start(GTK_BOX(vbox), hboxg, FALSE, FALSE, 0);
 
 	/* Data entry area */
-	table = gtk_table_new( 1, 3, FALSE);
+	table = gtk_grid_new();
 	gtk_box_pack_start(GTK_BOX(hboxg), table, TRUE, TRUE, 0);
 	gtk_container_set_border_width( GTK_CONTAINER(table), 4 );
-	gtk_table_set_row_spacings(GTK_TABLE(table), 0);
-	gtk_table_set_col_spacings(GTK_TABLE(table), 4);
+	gtk_grid_set_row_spacing(GTK_GRID(table), 0);
+	gtk_grid_set_column_spacing(GTK_GRID(table), 4);
 
 	/* First row */
-	top = 0;
 	label = gtk_label_new(_("Group 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);
 
 	entry_name = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entry_name, 1, 0, 1, 1);
+	gtk_widget_set_hexpand(entry_name, TRUE);
+	gtk_widget_set_halign(entry_name, GTK_ALIGN_FILL);
 
 	/* List area */
 	hboxl = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6 );
diff --git a/src/editjpilot.c b/src/editjpilot.c
index c34e494c4..8684ffaa8 100644
--- a/src/editjpilot.c
+++ b/src/editjpilot.c
@@ -227,7 +227,7 @@ static void addressbook_edit_jpilot_create( gboolean *cancelled ) {
 	GtkWidget *file_btn;
 	GtkWidget *hsbox;
 	GtkWidget *statusbar;
-	gint top, i;
+	gint i;
 
 	window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "editjpilot");
 	gtk_widget_set_size_request(window, 450, -1);
@@ -245,40 +245,41 @@ static void addressbook_edit_jpilot_create( gboolean *cancelled ) {
 	gtk_container_add(GTK_CONTAINER(window), vbox);
 	gtk_container_set_border_width( GTK_CONTAINER(vbox), 0 );
 
-	table = gtk_table_new(2 + JPILOT_NUM_CUSTOM_LABEL, 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), entry_name, 1, 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);
 
 	/* Third row */
-	top = 2;
 	frame_custom = gtk_frame_new(_("Additional e-Mail address item(s)"));
-	gtk_table_attach(GTK_TABLE(table), frame_custom, 1, 2, top, (top + JPILOT_NUM_CUSTOM_LABEL), GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), frame_custom, 1, 2, 1, 1);
 
 	/* Now do custom labels. */
 	vbox_custom = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
diff --git a/src/editldap.c b/src/editldap.c
index e1493dbe5..e5f6d7c10 100644
--- a/src/editldap.c
+++ b/src/editldap.c
@@ -405,7 +405,6 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *entry_baseDN;
 	GtkWidget *check_btn;
 	GtkWidget *lookdn_btn;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8 );
 	gtk_widget_show( vbox );
@@ -417,34 +416,34 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
 		GTK_NOTEBOOK( ldapedit.notebook ),
 		gtk_notebook_get_nth_page( GTK_NOTEBOOK( ldapedit.notebook ), pageNum ), label );
 
-	table = gtk_table_new( LDAPEDIT_TABLE_ROWS, LDAPEDIT_TABLE_COLS, 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);
 
 	entry_name = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_name, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entry_name, 1, 0, 1, 1);
+	gtk_widget_set_hexpand(entry_name, TRUE);
+	gtk_widget_set_halign(entry_name, GTK_ALIGN_FILL);
 
 	CLAWS_SET_TIP(entry_name, _( 
 		"A name that you wish to call the server." ));
 
 	/* Next row */
-	++top;
 	label = gtk_label_new(_("Hostname"));
-	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);
 
 	entry_server = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_server, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entry_server, 1, 1, 1, 1);
+	gtk_widget_set_hexpand(entry_server, TRUE);
+	gtk_widget_set_halign(entry_server, GTK_ALIGN_FILL);
 
 	CLAWS_SET_TIP(entry_server, _( 
 		"This is the hostname of the server. For example, " \
@@ -454,10 +453,9 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
 		"server on the same computer as Claws Mail." ));
 
 	/* Next row */
-	++top;
 	label = gtk_label_new(_("Port"));
-	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), entry_server, 0, 2, 1, 1);
 
 	hbox_spin = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
 	spinbtn_port_adj = GTK_ADJUSTMENT(gtk_adjustment_new (389, 1, 65535, 1, 1000, 0));
@@ -483,29 +481,27 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
 	gtk_box_pack_start (GTK_BOX (hbox_spin), enable_tls_checkbtn, TRUE, FALSE, 0);
 	gtk_box_pack_start (GTK_BOX (hbox_spin), enable_ssl_checkbtn, TRUE, FALSE, 0);
 #endif
-
-	gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), hbox_spin, 1, 2, 1, 1);
 
 	CLAWS_SET_TIP(spinbtn_port, _( 
 		"The port number that the server listens on. Port 389 is " \
 		"the default." ));
 
 	check_btn = gtk_button_new_with_label( _(" Check Server "));
-	gtk_table_attach(GTK_TABLE(table), check_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
+	gtk_grid_attach(GTK_GRID(table), hbox_spin, 2, 2, 1, 1);
 
 	CLAWS_SET_TIP(check_btn, _( 
 		"Press this button to test the connection to the server." ));
 
 	/* Next row */
-	++top;
 	label = gtk_label_new(_("Search Base"));
-	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, 3, 1, 1);
 
 	entry_baseDN = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_baseDN, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entry_baseDN, 1, 3, 1, 1);
+	gtk_widget_set_hexpand(entry_baseDN, TRUE);
+	gtk_widget_set_halign(entry_baseDN, GTK_ALIGN_FILL);
 
 	CLAWS_SET_TIP(entry_baseDN, _( 
 		"This specifies the name of the directory to be searched " \
@@ -516,7 +512,7 @@ static void addressbook_edit_ldap_page_basic( gint pageNum, gchar *pageLbl ) {
 		));
 
 	lookdn_btn = gtkut_get_browse_file_btn(_("_Browse"));
-	gtk_table_attach(GTK_TABLE(table), lookdn_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
+	gtk_grid_attach(GTK_GRID(table), lookdn_btn, 2, 3, 1, 1);
 
 	CLAWS_SET_TIP(lookdn_btn, _( 
 		"Press this button to lookup the name of available " \
@@ -555,7 +551,6 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *check_dynsearch;
 	GtkWidget *check_matchoption;
 	GtkWidget *reset_btn;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8 );
 	gtk_widget_show( vbox );
@@ -567,28 +562,28 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
 		GTK_NOTEBOOK( ldapedit.notebook ),
 		gtk_notebook_get_nth_page( GTK_NOTEBOOK( ldapedit.notebook ), pageNum ), label );
 
-	table = gtk_table_new( LDAPEDIT_TABLE_ROWS, LDAPEDIT_TABLE_COLS, 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(_("Search Attributes"));
-	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);
 
 	entry_criteria = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_criteria, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entry_criteria, 1, 0, 1, 1);
+	gtk_widget_set_hexpand(entry_criteria, TRUE);
+	gtk_widget_set_halign(entry_criteria, GTK_ALIGN_FILL);
 
 	CLAWS_SET_TIP(entry_criteria, _( 
 		"A list of LDAP attribute names that should be searched " \
 		"when attempting to find a name or address." ));
 
 	reset_btn = gtk_button_new_with_label( _(" Defaults "));
-	gtk_table_attach(GTK_TABLE(table), reset_btn, 2, 3, top, (top + 1), GTK_FILL, 0, 3, 0);
+	gtk_grid_attach(GTK_GRID(table), reset_btn, 2, 0, 1, 1);
 
 	CLAWS_SET_TIP(reset_btn, _( 
 		"This resets the attribute names to a default value " \
@@ -596,10 +591,9 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
 		"name or address search process." ));
 
 	/* Next row */
-	++top;
 	label = gtk_label_new(_("Max Query Age (secs)"));
-	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);
 
 	hbox_spin = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
 	spinbtn_queryage_adj = GTK_ADJUSTMENT(gtk_adjustment_new(
@@ -607,8 +601,7 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
 	spinbtn_queryage = gtk_spin_button_new(GTK_ADJUSTMENT (spinbtn_queryage_adj), 1, 0);
 	gtk_box_pack_start (GTK_BOX (hbox_spin), spinbtn_queryage, FALSE, FALSE, 0);
 	gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_queryage), TRUE);
-	gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), hbox_spin, 1, 1, 1, 1);
 
 	CLAWS_SET_TIP(spinbtn_queryage, _( 
 		"This defines the maximum period of time (in seconds) that " \
@@ -626,22 +619,18 @@ static void addressbook_edit_ldap_page_search( gint pageNum, gchar *pageLbl ) {
 		"results." ));
 
 	/* Next row */
-	++top;
 	check_dynsearch = gtk_check_button_new_with_label(
 				_("Include server in dynamic search") );
-	gtk_table_attach(GTK_TABLE(table), check_dynsearch, 1, 3, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), check_dynsearch, 1, 2, 1, 1);
 
 	CLAWS_SET_TIP(check_dynsearch, _( 
 		"Check this option to include this server for dynamic " \
 		"searches when using address completion." ));
 
 	/* Next row */
-	++top;
 	check_matchoption = gtk_check_button_new_with_label(
 				_("Match names 'containing' search term") );
-	gtk_table_attach(GTK_TABLE(table), check_matchoption, 1, 3, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), check_matchoption, 1, 3, 1, 1);
 
 	CLAWS_SET_TIP(check_matchoption, _( 
 		"Searches for names and addresses can be performed either " \
@@ -687,7 +676,6 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
 	GtkWidget *spinbtn_timeout;
 	GtkAdjustment *spinbtn_maxentry_adj;
 	GtkWidget *spinbtn_maxentry;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8 );
 	gtk_widget_show( vbox );
@@ -699,21 +687,21 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
 		GTK_NOTEBOOK( ldapedit.notebook ),
 		gtk_notebook_get_nth_page( GTK_NOTEBOOK( ldapedit.notebook ), pageNum ), label );
 
-	table = gtk_table_new( LDAPEDIT_TABLE_ROWS, LDAPEDIT_TABLE_COLS, 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);
 
 	/* Next row */
-	top = 0;
 	label = gtk_label_new(_("Bind DN"));
-	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);
 
 	entry_bindDN = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_bindDN, 1, 3, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entry_bindDN, 1, 0, 1, 1);
+	gtk_widget_set_hexpand(entry_bindDN, TRUE);
+	gtk_widget_set_halign(entry_bindDN, GTK_ALIGN_FILL);
 
 	CLAWS_SET_TIP(entry_bindDN, _( 
 		"The LDAP user account name to be used to connect to the server. " \
@@ -722,15 +710,15 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
 		"This is usually left empty when performing a search." ));
 
 	/* Next row */
-	++top;
 	label = gtk_label_new(_("Bind Password"));
-	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), entry_bindDN, 0, 1, 1, 1);
 
 	entry_bindPW = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entry_bindPW, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 	gtk_entry_set_visibility(GTK_ENTRY(entry_bindPW), FALSE);
+	gtk_grid_attach(GTK_GRID(table), entry_bindPW, 1, 1, 1, 1);
+	gtk_widget_set_hexpand(entry_bindPW, TRUE);
+	gtk_widget_set_halign(entry_bindPW, GTK_ALIGN_FILL);
 
 	CLAWS_SET_TIP(entry_bindPW, _( 
 		"The password to be used when connecting as the \"Bind DN\" " \
@@ -740,39 +728,34 @@ static void addressbook_edit_ldap_page_extended( gint pageNum, gchar *pageLbl )
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(showpwd_checkbtn), FALSE);
 	g_signal_connect(G_OBJECT(showpwd_checkbtn), "toggled",
 			G_CALLBACK(showpwd_checkbtn_toggled), entry_bindPW);
-	gtk_table_attach(GTK_TABLE(table), showpwd_checkbtn, 2, 3, top, (top + 1),
-			0, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), showpwd_checkbtn, 2, 1, 1, 1);
 
 	/* Next row */
-	++top;
 	label = gtk_label_new(_("Timeout (secs)"));
-	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, 2, 1, 1);
 
 	hbox_spin = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
 	spinbtn_timeout_adj = GTK_ADJUSTMENT(gtk_adjustment_new (0, 0, 300, 1, 10, 0));
 	spinbtn_timeout = gtk_spin_button_new(GTK_ADJUSTMENT (spinbtn_timeout_adj), 1, 0);
 	gtk_box_pack_start (GTK_BOX (hbox_spin), spinbtn_timeout, FALSE, FALSE, 0);
 	gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_timeout), TRUE);
-	gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), hbox_spin, 1, 2, 1, 1);
 
 	CLAWS_SET_TIP(spinbtn_timeout, _( 
 		"The timeout period in seconds." ));
 
 	/* Next row */
-	++top;
 	label = gtk_label_new(_("Maximum Entries"));
-	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, 3, 1, 1);
 
 	hbox_spin = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
 	spinbtn_maxentry_adj = GTK_ADJUSTMENT(gtk_adjustment_new (0, 0, 500, 1, 10, 0));
 	spinbtn_maxentry = gtk_spin_button_new(GTK_ADJUSTMENT (spinbtn_maxentry_adj), 1, 0);
 	gtk_box_pack_start (GTK_BOX (hbox_spin), spinbtn_maxentry, FALSE, FALSE, 0);
 	gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_maxentry), TRUE);
-	gtk_table_attach(GTK_TABLE(table), hbox_spin, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), hbox_spin, 1, 3, 1, 1);
 
 	CLAWS_SET_TIP(spinbtn_maxentry, _( 
 		"The maximum number of entries that should be returned " \
diff --git a/src/editldap_basedn.c b/src/editldap_basedn.c
index 8185d2138..0cdaa23fe 100644
--- a/src/editldap_basedn.c
+++ b/src/editldap_basedn.c
@@ -142,7 +142,6 @@ static void edit_ldap_bdn_create(void) {
 	GtkWidget *cancel_btn;
 	GtkWidget *hsbox;
 	GtkWidget *statusbar;
-	gint top;
 	GtkListStore *store;
 	GtkTreeSelection *sel;
 	GtkTreeViewColumn *col;
@@ -162,40 +161,39 @@ static void edit_ldap_bdn_create(void) {
 	gtk_container_add(GTK_CONTAINER(window), vbox);
 	gtk_container_set_border_width( GTK_CONTAINER(vbox), 0 );
 
-	table = gtk_table_new(3, 2, 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(_("Hostname"));
-	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);
 
 	host_label = gtk_label_new("");
-	gtk_table_attach(GTK_TABLE(table), host_label, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(host_label), 0.0);
+	gtk_grid_attach(GTK_GRID(table), host_label, 1, 0, 1, 1);
 
 	/* Second row */
-	top = 1;
 	label = gtk_label_new(_("Port"));
-	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);
 
 	port_label = gtk_label_new("");
-	gtk_table_attach(GTK_TABLE(table), port_label, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(port_label), 0.0);
+	gtk_grid_attach(GTK_GRID(table), label, 1, 1, 1, 1);
 
 	/* Third row */
-	top = 2;
 	label = gtk_label_new(_("Search Base"));
-	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, 2, 1, 1);
 
 	basedn_entry = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), basedn_entry, 1, 2, top, (top + 1), GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), basedn_entry, 1, 2, 1, 1);
+	gtk_widget_set_hexpand(basedn_entry, TRUE);
+	gtk_widget_set_halign(basedn_entry, GTK_ALIGN_FILL);
 
 	/* Basedn list */
 	vlbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
diff --git a/src/exphtmldlg.c b/src/exphtmldlg.c
index 784a22b5f..776068324 100644
--- a/src/exphtmldlg.c
+++ b/src/exphtmldlg.c
@@ -346,7 +346,6 @@ static void export_html_page_file( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *labelBook;
 	GtkWidget *entryHtml;
 	GtkWidget *btnFile;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
 	gtk_container_add( GTK_CONTAINER( exphtml_dlg.notebook ), vbox );
@@ -360,38 +359,33 @@ static void export_html_page_file( gint pageNum, gchar *pageLbl ) {
 			GTK_NOTEBOOK( exphtml_dlg.notebook ), pageNum ),
 		label );
 
-	table = gtk_table_new( 3, 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( _( "Address Book" ) );
-	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);
 
 	labelBook = gtk_label_new( "Address book name goes here" );
-	gtk_table_attach(GTK_TABLE(table), labelBook, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(labelBook), 0.0);
+	gtk_grid_attach(GTK_GRID(table), labelBook, 1, 0, 1, 1);
 
 	/* Second row */
-	top++;
 	label = gtk_label_new( _( "HTML Output 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);
 
 	entryHtml = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entryHtml, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entryHtml, 1, 1, 1, 1);
+	gtk_widget_set_hexpand(entryHtml, TRUE);
+	gtk_widget_set_halign(entryHtml, GTK_ALIGN_FILL);
 
 	btnFile = gtkut_get_browse_file_btn(_("B_rowse"));
-	gtk_table_attach(GTK_TABLE(table), btnFile, 2, 3, top, (top + 1),
-		GTK_FILL, 0, 3, 0);
+	gtk_grid_attach(GTK_GRID(table), btnFile, 2, 1, 1, 1);
 
 	gtk_widget_show_all(vbox);
 
@@ -420,8 +414,6 @@ static void export_html_page_format( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *checkLinkEMail;
 	GtkWidget *checkAttributes;
 
-	gint top;
-
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
 	gtk_container_add( GTK_CONTAINER( exphtml_dlg.notebook ), vbox );
 	gtk_container_set_border_width( GTK_CONTAINER (vbox), BORDER_WIDTH );
@@ -434,18 +426,16 @@ static void export_html_page_format( gint pageNum, gchar *pageLbl ) {
 			GTK_NOTEBOOK( exphtml_dlg.notebook ), pageNum ),
 		label );
 
-	table = gtk_table_new( 5, 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( _( "Stylesheet" ) );
-	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);
 
 	optmenuCSS = gtkut_sc_combobox_create(NULL, TRUE);
 	menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenuCSS)));
@@ -458,15 +448,12 @@ static void export_html_page_format( gint pageNum, gchar *pageLbl ) {
 	COMBOBOX_ADD(menu, _("Custom-3"), EXPORT_HTML_ID_CUSTOM3);
 	COMBOBOX_ADD(menu, _("Custom-4"), EXPORT_HTML_ID_CUSTOM4);
 
-	gtk_table_attach(GTK_TABLE(table), optmenuCSS, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), optmenuCSS, 1, 0, 1, 1);
 
 	/* Second row */
-	top++;
 	label = gtk_label_new( _( "Full Name Format" ) );
-	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);
 
 	optmenuName = gtkut_sc_combobox_create(NULL, TRUE);
 	menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenuName)));
@@ -474,26 +461,19 @@ static void export_html_page_format( gint pageNum, gchar *pageLbl ) {
 	COMBOBOX_ADD(menu, _("First Name, Last Name"), EXPORT_HTML_FIRST_LAST);
 	COMBOBOX_ADD(menu, _("Last Name, First Name"), EXPORT_HTML_LAST_FIRST);
 
-	gtk_table_attach(GTK_TABLE(table), optmenuName, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), optmenuName, 1, 1, 1, 1);
 
 	/* Third row */
-	top++;
 	checkBanding = gtk_check_button_new_with_label( _( "Color Banding" ) );
-	gtk_table_attach(GTK_TABLE(table), checkBanding, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), checkBanding, 1, 2, 1, 1);
 
 	/* Fourth row */
-	top++;
 	checkLinkEMail = gtk_check_button_new_with_label( _( "Format Email Links" ) );
-	gtk_table_attach(GTK_TABLE(table), checkLinkEMail, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), checkLinkEMail, 1, 3, 1, 1);
 
 	/* Fifth row */
-	top++;
 	checkAttributes = gtk_check_button_new_with_label( _( "Format User Attributes" ) );
-	gtk_table_attach(GTK_TABLE(table), checkAttributes, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), checkAttributes, 1, 4, 1, 1);
 
 	gtk_widget_show_all(vbox);
 
@@ -516,7 +496,6 @@ static void export_html_page_finish( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *labelBook;
 	GtkWidget *labelFile;
 	GtkWidget *btnBrowse;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
 	gtk_container_add( GTK_CONTAINER( exphtml_dlg.notebook ), vbox );
@@ -528,36 +507,33 @@ static void export_html_page_finish( gint pageNum, gchar *pageLbl ) {
 		GTK_NOTEBOOK( exphtml_dlg.notebook ),
 		gtk_notebook_get_nth_page( GTK_NOTEBOOK( exphtml_dlg.notebook ), pageNum ), label );
 
-	table = gtk_table_new( 3, 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( _( "Address Book:" ) );
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(label), 1.0);
+	gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 1);
 
 	labelBook = gtk_label_new("Full name of address book goes here");
-	gtk_table_attach(GTK_TABLE(table), labelBook, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(labelBook), 0.0);
+	gtk_grid_attach(GTK_GRID(table), labelBook, 1, 0, 1, 1);
 
 	/* Second row */
-	top++;
 	label = gtk_label_new( _( "File 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), 1.0);
+	gtk_grid_attach(GTK_GRID(table), label, 0, 1, 1, 1);
 
 	labelFile = gtk_label_new("File name goes here");
-	gtk_table_attach(GTK_TABLE(table), labelFile, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(labelFile), 0.0);
+	gtk_grid_attach(GTK_GRID(table), labelFile, 1, 1, 1, 1);
 
 	/* Third row */
-	top++;
 	btnBrowse = gtk_button_new_with_label( _( "Open with Web Browser" ) );
-	gtk_table_attach(GTK_TABLE(table), btnBrowse, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), btnBrowse, 1, 2, 1, 1);
 
 	gtk_widget_show_all(vbox);
 
diff --git a/src/expldifdlg.c b/src/expldifdlg.c
index c9144e209..519537198 100644
--- a/src/expldifdlg.c
+++ b/src/expldifdlg.c
@@ -363,7 +363,6 @@ static void export_ldif_page_file( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *labelBook;
 	GtkWidget *entryLdif;
 	GtkWidget *btnFile;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
 	gtk_container_add( GTK_CONTAINER( expldif_dlg.notebook ), vbox );
@@ -377,38 +376,33 @@ static void export_ldif_page_file( gint pageNum, gchar *pageLbl ) {
 			GTK_NOTEBOOK( expldif_dlg.notebook ), pageNum ),
 		label );
 
-	table = gtk_table_new( 3, 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( _( "Address Book" ) );
-	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);
 
 	labelBook = gtk_label_new( "Address book name goes here" );
-	gtk_table_attach(GTK_TABLE(table), labelBook, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(labelBook), 0.0);
+	gtk_grid_attach(GTK_GRID(table), labelBook, 1, 0, 1, 1);
 
 	/* Second row */
-	top++;
 	label = gtk_label_new( _( "LDIF Output 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);
 
 	entryLdif = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entryLdif, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entryLdif, 1, 1, 1, 1);
+	gtk_widget_set_hexpand(entryLdif, TRUE);
+	gtk_widget_set_halign(entryLdif, GTK_ALIGN_FILL);
 
 	btnFile = gtkut_get_browse_file_btn(_("B_rowse"));
-	gtk_table_attach(GTK_TABLE(table), btnFile, 2, 3, top, (top + 1),
-		GTK_FILL, 0, 3, 0);
+	gtk_grid_attach(GTK_GRID(table), btnFile, 2, 1, 1, 1);
 
 	gtk_widget_show_all(vbox);
 
@@ -464,7 +458,6 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *checkEMail;
 	GtkListStore *store;
 	GtkTreeIter iter;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
 	gtk_container_add( GTK_CONTAINER( expldif_dlg.notebook ), vbox );
@@ -478,22 +471,21 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
 			GTK_NOTEBOOK( expldif_dlg.notebook ), pageNum ),
 		label );
 
-	table = gtk_table_new( 6, 2, 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( _( "Suffix" ) );
-	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);
 
 	entrySuffix = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), entrySuffix, 1, 2, top, (top + 1),
-		GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), entrySuffix, 1, 0, 1, 1);
+	gtk_widget_set_hexpand(entrySuffix, TRUE);
+	gtk_widget_set_halign(entrySuffix, GTK_ALIGN_FILL);
 
 	CLAWS_SET_TIP(entrySuffix, _(
 		"The suffix is used to create a \"Distinguished Name\" " \
@@ -503,11 +495,9 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
 		"  o=Organization Name,c=Country\n"));
 
 	/* Second row */
-	top++;
 	label = gtk_label_new( _( "Relative DN" ) );
-	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);
 
 	optmenuRDN = gtkut_sc_combobox_create(NULL, TRUE);
 	store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenuRDN)));
@@ -516,8 +506,7 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
 	COMBOBOX_ADD(store, _("Display Name"), EXPORT_LDIF_ID_DNAME);
 	COMBOBOX_ADD(store, _("Email Address"), EXPORT_LDIF_ID_EMAIL);
 
-	gtk_table_attach(GTK_TABLE(table), optmenuRDN, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), optmenuRDN, 1, 1, 1, 1);
 
 	CLAWS_SET_TIP(optmenuRDN, _(
 		"The LDIF file contains several data records that " \
@@ -530,19 +519,15 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
 		"create the DN."));
 	
 	/* Third row*/
-	top++;
 	labelRDN = gtk_label_new("");
 	gtk_label_set_line_wrap(GTK_LABEL(labelRDN), TRUE);
 	gtk_label_set_justify(GTK_LABEL(labelRDN), GTK_JUSTIFY_CENTER);
-	gtk_table_attach(GTK_TABLE(table), labelRDN, 0, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), labelRDN, 0, 2, 1, 1);
 		
 	/* Fourth row */
-	top++;
 	checkUseDN = gtk_check_button_new_with_label(
 			_( "Use DN attribute if present in data" ) );
-	gtk_table_attach(GTK_TABLE(table), checkUseDN, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), checkUseDN, 1, 3, 1, 1);
 
 	CLAWS_SET_TIP(checkUseDN, _(
 		"The addressbook may contain entries that were " \
@@ -553,11 +538,9 @@ static void export_ldif_page_dn( gint pageNum, gchar *pageLbl ) {
 		"will be used if the DN user attribute is not found."));
 
 	/* Fifth row */
-	top++;
 	checkEMail = gtk_check_button_new_with_label(
 			_( "Exclude record if no Email Address" ) );
-	gtk_table_attach(GTK_TABLE(table), checkEMail, 1, 2, top, (top + 1),
-		GTK_FILL, 0, 0, 0);
+	gtk_grid_attach(GTK_GRID(table), checkEMail, 1, 4, 1, 1);
 
 	CLAWS_SET_TIP(checkEMail, _(
 		"An addressbook may contain entries without " \
@@ -589,7 +572,6 @@ static void export_ldif_page_finish( gint pageNum, gchar *pageLbl ) {
 	GtkWidget *label;
 	GtkWidget *labelBook;
 	GtkWidget *labelFile;
-	gint top;
 
 	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 8);
 	gtk_container_add( GTK_CONTAINER( expldif_dlg.notebook ), vbox );
@@ -601,31 +583,29 @@ static void export_ldif_page_finish( gint pageNum, gchar *pageLbl ) {
 		GTK_NOTEBOOK( expldif_dlg.notebook ),
 		gtk_notebook_get_nth_page( GTK_NOTEBOOK( expldif_dlg.notebook ), pageNum ), label );
 
-	table = gtk_table_new( 3, 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( _( "Address Book:" ) );
-	gtk_table_attach(GTK_TABLE(table), label, 0, 1, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(label), 1.0);
+	gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 1);
 
 	labelBook = gtk_label_new("Full name of address book goes here");
-	gtk_table_attach(GTK_TABLE(table), labelBook, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(labelBook), 0.0);
+	gtk_grid_attach(GTK_GRID(table), labelBook, 1, 0, 1, 1);
 
 	/* Second row */
-	top++;
 	label = gtk_label_new( _( "File 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), 1.0);
+	gtk_grid_attach(GTK_GRID(table), label, 0, 1, 1, 1);
 
 	labelFile = gtk_label_new("File name goes here");
-	gtk_table_attach(GTK_TABLE(table), labelFile, 1, 2, top, (top + 1), GTK_FILL, 0, 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(labelFile), 0.0);
+	gtk_grid_attach(GTK_GRID(table), labelFile, 1, 1, 1, 1);
 
 	gtk_widget_show_all(vbox);
 
diff --git a/src/export.c b/src/export.c
index 06f8333d5..1d5a90f8e 100644
--- a/src/export.c
+++ b/src/export.c
@@ -132,47 +132,41 @@ static void export_create(void)
 	gtk_label_set_line_wrap(GTK_LABEL(desc_label), TRUE);
 	gtk_box_pack_start(GTK_BOX(hbox), desc_label, FALSE, FALSE, 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);
 	gtk_widget_set_size_request(table, 420, -1);
 
 	src_label = gtk_label_new(_("Source folder:"));
-	gtk_table_attach(GTK_TABLE(table), src_label, 0, 1, 0, 1,
-			 (GtkAttachOptions) (GTK_FILL),
-			 (GtkAttachOptions) (GTK_EXPAND|GTK_FILL), 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(src_label), 1.0);
+	gtk_grid_attach(GTK_GRID(table), src_label, 0, 0, 1, 1);
 
 	file_label = gtk_label_new(_("Mbox file:"));
-	gtk_table_attach(GTK_TABLE(table), file_label, 0, 1, 1, 2,
-			 (GtkAttachOptions) (GTK_FILL),
-			 (GtkAttachOptions) (GTK_EXPAND|GTK_FILL), 0, 0);
 	gtk_label_set_xalign(GTK_LABEL(file_label), 1.0);
+	gtk_grid_attach(GTK_GRID(table), file_label, 0, 1, 1, 1);
 
 	src_entry = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), src_entry, 1, 2, 0, 1,
-			 (GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL),
-			 (GtkAttachOptions) (0), 0, 0);
+	gtk_grid_attach(GTK_GRID(table), src_entry, 1, 0, 1, 1);
+	gtk_widget_set_hexpand(src_entry, TRUE);
+	gtk_widget_set_halign(src_entry, GTK_ALIGN_FILL);
 
 	file_entry = gtk_entry_new();
-	gtk_table_attach(GTK_TABLE(table), file_entry, 1, 2, 1, 2,
-			 (GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL),
-			 (GtkAttachOptions) (0), 0, 0);
 	gtk_entry_set_activates_default(GTK_ENTRY(file_entry), TRUE);
+	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);
 
 	src_button = gtkut_get_browse_directory_btn(_("_Browse"));
-	gtk_table_attach(GTK_TABLE(table), src_button, 2, 3, 0, 1,
-			 (GtkAttachOptions) (0),
-			 (GtkAttachOptions) (0), 0, 0);
+	gtk_grid_attach(GTK_GRID(table), src_button, 2, 0, 1, 1);
+
 	g_signal_connect(G_OBJECT(src_button), "clicked",
 			 G_CALLBACK(export_srcsel_cb), NULL);
 
 	file_button = gtkut_get_browse_file_btn(_("B_rowse"));
-	gtk_table_attach(GTK_TABLE(table), file_button, 2, 3, 1, 2,
-			 (GtkAttachOptions) (0),
-			 (GtkAttachOptions) (0), 0, 0);
+	gtk_grid_attach(GTK_GRID(table), file_button, 2, 1, 1, 1);
+
 	g_signal_connect(G_OBJECT(file_button), "clicked",
 			 G_CALLBACK(export_filesel_cb), NULL);
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list