[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-876-gf9d21e3ee
paul at claws-mail.org
paul at claws-mail.org
Mon Dec 2 09:54:15 CET 2019
The branch, gtk3 has been updated
via f9d21e3ee3a81f0be4928c4bb0f90bfba9485123 (commit)
from f715769f7053dc4add81e44686297ab660e01c9d (commit)
Summary of changes:
src/prefs_account.c | 414 ++++++++++++++++---------------------------
src/prefs_actions.c | 32 ++--
src/prefs_customheader.c | 28 ++-
src/prefs_ext_prog.c | 57 +++---
src/prefs_filtering.c | 52 ++----
src/prefs_filtering_action.c | 40 +++--
src/prefs_folder_item.c | 244 +++++++++++--------------
src/prefs_fonts.c | 70 +++-----
src/prefs_image_viewer.c | 24 +--
src/prefs_matcher.c | 35 ++--
src/prefs_proxy.c | 32 ++--
src/prefs_send.c | 24 +--
src/prefs_spelling.c | 28 ++-
src/prefs_summaries.c | 22 +--
src/prefs_template.c | 24 ++-
src/prefs_themes.c | 44 ++---
src/prefs_toolbar.c | 47 ++---
17 files changed, 483 insertions(+), 734 deletions(-)
- Log -----------------------------------------------------------------
commit f9d21e3ee3a81f0be4928c4bb0f90bfba9485123
Author: paul <paul at claws-mail.org>
Date: Mon Dec 2 08:54:11 2019 +0000
replace deprecated GtkTable (and a few display fixes
diff --git a/src/prefs_account.c b/src/prefs_account.c
index 46a175c49..14ec468e0 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -1146,48 +1146,45 @@ static void basic_create_widget_func(PrefsPage * _page,
#endif
PACK_FRAME (vbox1, frame1, _("Personal information"));
- table1 = gtk_table_new (3, 2, FALSE);
+ table1 = gtk_grid_new();
gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (frame1), table1);
gtk_container_set_border_width (GTK_CONTAINER (table1), 8);
- gtk_table_set_row_spacings (GTK_TABLE (table1), VSPACING_NARROW);
- gtk_table_set_col_spacings (GTK_TABLE (table1), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table1), VSPACING_NARROW);
+ gtk_grid_set_column_spacing(GTK_GRID(table1), 8);
label = gtk_label_new (_("Full name"));
gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table1), label, 0, 1, 0, 1,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), label, 0, 0, 1, 1);
label = gtk_label_new (_("Mail address"));
gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table1), label, 0, 1, 1, 2,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), label, 0, 1, 1, 1);
label = gtk_label_new (_("Organization"));
gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table1), label, 0, 1, 2, 3,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), label, 0, 2, 1, 1);
name_entry = gtk_entry_new ();
gtk_widget_show (name_entry);
- gtk_table_attach (GTK_TABLE (table1), name_entry, 1, 2, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), name_entry, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(name_entry, TRUE);
+ gtk_widget_set_halign(name_entry, GTK_ALIGN_FILL);
addr_entry = gtk_entry_new ();
gtk_widget_show (addr_entry);
- gtk_table_attach (GTK_TABLE (table1), addr_entry, 1, 2, 1, 2,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), addr_entry, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(addr_entry, TRUE);
+ gtk_widget_set_halign(addr_entry, GTK_ALIGN_FILL);
org_entry = gtk_entry_new ();
gtk_widget_show (org_entry);
- gtk_table_attach (GTK_TABLE (table1), org_entry, 1, 2, 2, 3,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), org_entry, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(org_entry, TRUE);
+ gtk_widget_set_halign(org_entry, GTK_ALIGN_FILL);
vbox2 = gtkut_get_options_frame(vbox1, &serv_frame, _("Server information"));
@@ -1257,61 +1254,60 @@ static void basic_create_widget_func(PrefsPage * _page,
protocol_optmenu->no_imap_warn_icon = no_imap_warn_icon;
protocol_optmenu->no_imap_warn_label = no_imap_warn_label;
- serv_table = gtk_table_new (10, 4, FALSE);
+ serv_table = gtk_grid_new ();
gtk_widget_show (serv_table);
+ gtk_grid_set_row_spacing(GTK_GRID(serv_table), VSPACING_NARROW);
+ gtk_grid_set_column_spacing(GTK_GRID(serv_table), 8);
gtk_box_pack_start (GTK_BOX (vbox2), serv_table, FALSE, FALSE, 0);
- gtk_table_set_row_spacings (GTK_TABLE (serv_table), VSPACING_NARROW);
- gtk_table_set_row_spacing (GTK_TABLE (serv_table), 3, 0);
- gtk_table_set_col_spacings (GTK_TABLE (serv_table), 8);
nntpserv_entry = gtk_entry_new ();
gtk_widget_show (nntpserv_entry);
- gtk_table_attach (GTK_TABLE (serv_table), nntpserv_entry, 1, 4, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
-/* gtk_table_set_row_spacing (GTK_TABLE (serv_table), 0, 0); */
+ gtk_grid_attach(GTK_GRID(serv_table), nntpserv_entry, 1, 0, 2, 1);
+ gtk_widget_set_hexpand(nntpserv_entry, TRUE);
+ gtk_widget_set_halign(nntpserv_entry, GTK_ALIGN_FILL);
nntpauth_checkbtn = gtk_check_button_new_with_label
(_("This server requires authentication"));
gtk_widget_show (nntpauth_checkbtn);
- gtk_table_attach (GTK_TABLE (serv_table), nntpauth_checkbtn, 0, 2, 6, 7,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(serv_table), nntpauth_checkbtn, 0, 6, 2, 1);
nntpauth_onconnect_checkbtn = gtk_check_button_new_with_label
(_("Authenticate on connect"));
gtk_widget_show (nntpauth_onconnect_checkbtn);
- gtk_table_attach (GTK_TABLE (serv_table), nntpauth_onconnect_checkbtn, 2, 4, 6, 7,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(serv_table), nntpauth_onconnect_checkbtn, 2, 6, 1, 1);
recvserv_entry = gtk_entry_new ();
gtk_widget_show (recvserv_entry);
- gtk_table_attach (GTK_TABLE (serv_table), recvserv_entry, 1, 4, 2, 3,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(serv_table), recvserv_entry, 1, 2, 2, 1);
+ gtk_widget_set_hexpand(recvserv_entry, TRUE);
+ gtk_widget_set_halign(recvserv_entry, GTK_ALIGN_FILL);
localmbox_entry = gtk_entry_new ();
gtk_widget_show (localmbox_entry);
- gtk_table_attach (GTK_TABLE (serv_table), localmbox_entry, 1, 4, 3, 4,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(serv_table), localmbox_entry, 1, 3, 2, 1);
+ gtk_widget_set_hexpand(localmbox_entry, TRUE);
+ gtk_widget_set_halign(localmbox_entry, GTK_ALIGN_FILL);
smtpserv_entry = gtk_entry_new ();
gtk_widget_show (smtpserv_entry);
- gtk_table_attach (GTK_TABLE (serv_table), smtpserv_entry, 1, 4, 4, 5,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(serv_table), smtpserv_entry, 1, 4, 2, 1);
+ gtk_widget_set_hexpand(smtpserv_entry, TRUE);
+ gtk_widget_set_halign(smtpserv_entry, GTK_ALIGN_FILL);
mailcmd_entry = gtk_entry_new ();
gtk_widget_show (mailcmd_entry);
- gtk_table_attach (GTK_TABLE (serv_table), mailcmd_entry, 1, 4, 6, 7,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(serv_table), mailcmd_entry, 1, 6, 2, 1);
+ gtk_widget_set_hexpand(mailcmd_entry, TRUE);
+ gtk_widget_set_halign(mailcmd_entry, GTK_ALIGN_FILL);
uid_entry = gtk_entry_new ();
gtk_widget_show (uid_entry);
gtk_widget_set_size_request (uid_entry, DEFAULT_ENTRY_WIDTH, -1);
+ gtk_grid_attach(GTK_GRID(serv_table), uid_entry, 1, 7, 1, 1);
+ gtk_widget_set_hexpand(uid_entry, TRUE);
+ gtk_widget_set_halign(uid_entry, GTK_ALIGN_FILL);
g_signal_connect(G_OBJECT(uid_entry), "changed",
G_CALLBACK(prefs_account_entry_changed_newline_check_cb),
GINT_TO_POINTER(ac_prefs->protocol));
@@ -1319,90 +1315,64 @@ static void basic_create_widget_func(PrefsPage * _page,
pass_entry = gtk_entry_new ();
gtk_widget_show (pass_entry);
gtk_widget_set_size_request (pass_entry, DEFAULT_ENTRY_WIDTH, -1);
+ gtk_grid_attach(GTK_GRID(serv_table), pass_entry, 1, 8, 1, 1);
+ gtk_widget_set_hexpand(pass_entry, TRUE);
+ gtk_widget_set_halign(pass_entry, GTK_ALIGN_FILL);
+ gtk_entry_set_visibility (GTK_ENTRY (pass_entry), FALSE);
g_signal_connect(G_OBJECT(pass_entry), "changed",
G_CALLBACK(prefs_account_entry_changed_newline_check_cb),
GINT_TO_POINTER(ac_prefs->protocol));
-#ifndef GENERIC_UMPC
- gtk_table_attach (GTK_TABLE (serv_table), uid_entry, 1, 2, 7, 8,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
-
- gtk_table_attach (GTK_TABLE (serv_table), pass_entry, 3, 4, 7, 8,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
-#else
- gtk_table_attach (GTK_TABLE (serv_table), uid_entry, 1, 4, 7, 8,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
- gtk_table_attach (GTK_TABLE (serv_table), pass_entry, 1, 4, 8, 9,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
-#endif
- gtk_entry_set_visibility (GTK_ENTRY (pass_entry), FALSE);
-
nntpserv_label = gtk_label_new (_("News server"));
gtk_widget_show (nntpserv_label);
- gtk_table_attach (GTK_TABLE (serv_table), nntpserv_label, 0, 1, 0, 1,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (nntpserv_label), 1.0);
+ gtk_grid_attach(GTK_GRID(serv_table), nntpserv_label, 0, 0, 1, 1);
recvserv_label = gtk_label_new (_("Server for receiving"));
gtk_widget_show (recvserv_label);
- gtk_table_attach (GTK_TABLE (serv_table), recvserv_label, 0, 1, 2, 3,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (recvserv_label), 1.0);
+ gtk_grid_attach(GTK_GRID(serv_table), recvserv_label, 0, 2, 1, 1);
localmbox_label = gtk_label_new (_("Local mailbox"));
gtk_widget_show (localmbox_label);
- gtk_table_attach (GTK_TABLE (serv_table), localmbox_label, 0, 1, 3, 4,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (localmbox_label), 1.0);
+ gtk_grid_attach(GTK_GRID(serv_table), localmbox_label, 0, 3, 1, 1);
smtpserv_label = gtk_label_new (_("SMTP server (send)"));
gtk_widget_show (smtpserv_label);
- gtk_table_attach (GTK_TABLE (serv_table), smtpserv_label, 0, 1, 4, 5,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (smtpserv_label), 1.0);
+ gtk_grid_attach(GTK_GRID(serv_table), smtpserv_label, 0, 4, 1, 1);
mailcmd_checkbtn = gtk_check_button_new_with_label
(_("Use mail command rather than SMTP server"));
gtk_widget_show (mailcmd_checkbtn);
- gtk_table_attach (GTK_TABLE (serv_table), mailcmd_checkbtn, 0, 4, 5, 6,
- GTK_EXPAND | GTK_FILL,
- 0, 0, TABLE_YPAD);
+ gtk_grid_attach(GTK_GRID(serv_table), mailcmd_checkbtn, 0, 5, 2, 1);
+
g_signal_connect(G_OBJECT(mailcmd_checkbtn), "toggled",
G_CALLBACK(prefs_account_mailcmd_toggled),
NULL);
mailcmd_label = gtk_label_new (_("command to send mails"));
gtk_widget_show (mailcmd_label);
- gtk_table_attach (GTK_TABLE (serv_table), mailcmd_label, 0, 1, 6, 7,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (mailcmd_label), 1.0);
+ gtk_grid_attach(GTK_GRID(serv_table), mailcmd_label, 0, 6, 1, 1);
uid_label = gtk_label_new (_("User ID"));
gtk_widget_show (uid_label);
- gtk_table_attach (GTK_TABLE (serv_table), uid_label, 0, 1, 7, 8,
- GTK_FILL, 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (uid_label), 1.0);
+ gtk_grid_attach(GTK_GRID(serv_table), uid_label, 0, 7, 1, 1);
pass_label = gtk_label_new (_("Password"));
gtk_widget_show (pass_label);
-#ifndef GENERIC_UMPC
- gtk_table_attach (GTK_TABLE (serv_table), pass_label, 2, 3, 7, 8,
- 0, 0, 0, 0);
-#else
+#ifdef GENERIC_UMPC
gtk_label_set_xalign(GTK_LABEL (pass_label), 1.0);
- gtk_table_attach (GTK_TABLE (serv_table), pass_label, 0, 1, 8, 9,
- GTK_FILL, 0, 0, 0);
#endif
+ gtk_grid_attach(GTK_GRID(serv_table), pass_label, 0, 8, 1, 1);
showpwd_checkbtn = gtk_check_button_new_with_label (_("Show password"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(showpwd_checkbtn), FALSE);
gtk_widget_show(showpwd_checkbtn);
- gtk_table_attach (GTK_TABLE (serv_table), showpwd_checkbtn, 3, 4, 9, 10,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(serv_table), showpwd_checkbtn, 2, 8, 1, 1);
g_signal_connect(G_OBJECT(showpwd_checkbtn), "toggled",
G_CALLBACK(prefs_account_showpwd_checkbtn_toggled), pass_entry);
@@ -1530,7 +1500,7 @@ static void receive_create_widget_func(PrefsPage * _page,
local_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (local_hbox);
- gtk_box_pack_start (GTK_BOX (local_vbox), local_hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (local_vbox), local_hbox, TRUE, TRUE, 0);
local_inbox_label = gtk_label_new (_("Default Inbox"));
gtk_widget_show (local_inbox_label);
@@ -1540,7 +1510,6 @@ static void receive_create_widget_func(PrefsPage * _page,
gtk_widget_show (local_inbox_entry);
CLAWS_SET_TIP(local_inbox_entry,
_("Unfiltered messages will be stored in this folder"));
- gtk_widget_set_size_request (local_inbox_entry, DEFAULT_ENTRY_WIDTH, -1);
gtk_box_pack_start (GTK_BOX (local_hbox), local_inbox_entry, TRUE, TRUE, 0);
local_inbox_btn = gtkut_get_browse_file_btn(_("Bro_wse"));
@@ -1553,6 +1522,7 @@ static void receive_create_widget_func(PrefsPage * _page,
local_inbox_entry);
vbox2 = gtkut_get_options_frame(vbox1, &frame1, _("POP"));
+
PACK_CHECK_BUTTON (vbox2, use_apop_checkbtn,
_("Use secure authentication (APOP)"));
@@ -1619,7 +1589,7 @@ static void receive_create_widget_func(PrefsPage * _page,
hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox2), hbox1, TRUE, TRUE, 0);
inbox_label = gtk_label_new (_("Default Inbox"));
gtk_widget_show (inbox_label);
@@ -1629,7 +1599,8 @@ static void receive_create_widget_func(PrefsPage * _page,
gtk_widget_show (inbox_entry);
CLAWS_SET_TIP(inbox_entry,
_("Unfiltered messages will be stored in this folder"));
- gtk_widget_set_size_request (inbox_entry, DEFAULT_ENTRY_WIDTH, -1);
+ gtk_widget_set_size_request (local_inbox_entry, DEFAULT_ENTRY_WIDTH, -1);
+ gtk_box_pack_start (GTK_BOX (local_hbox), local_inbox_entry, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (hbox1), inbox_entry, TRUE, TRUE, 0);
inbox_btn = gtkut_get_browse_file_btn(_("Bro_wse"));
@@ -2197,88 +2168,83 @@ static void compose_create_widget_func(PrefsPage * _page,
PACK_FRAME (vbox1, frame, _("Automatically set the following addresses"));
- table = gtk_table_new (3, 2, FALSE);
+ table = gtk_grid_new();
gtk_widget_show (table);
gtk_container_add (GTK_CONTAINER (frame), table);
gtk_container_set_border_width (GTK_CONTAINER (table), 8);
- gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
- gtk_table_set_col_spacings (GTK_TABLE (table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
autocc_checkbtn = gtk_check_button_new_with_label (
prefs_common_translated_header_name("Cc:"));
gtk_widget_show (autocc_checkbtn);
- gtk_table_attach (GTK_TABLE (table), autocc_checkbtn, 0, 1, 0, 1,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), autocc_checkbtn, 0, 0, 1, 1);
autocc_entry = gtk_entry_new ();
gtk_widget_show (autocc_entry);
- gtk_table_attach (GTK_TABLE (table), autocc_entry, 1, 2, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), autocc_entry, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(autocc_entry, TRUE);
+ gtk_widget_set_halign(autocc_entry, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY (autocc_checkbtn, autocc_entry);
autobcc_checkbtn = gtk_check_button_new_with_label (
prefs_common_translated_header_name("Bcc:"));
gtk_widget_show (autobcc_checkbtn);
- gtk_table_attach (GTK_TABLE (table), autobcc_checkbtn, 0, 1, 1, 2,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), autobcc_checkbtn, 0, 1, 1, 1);
autobcc_entry = gtk_entry_new ();
gtk_widget_show (autobcc_entry);
- gtk_table_attach (GTK_TABLE (table), autobcc_entry, 1, 2, 1, 2,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), autobcc_entry, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(autobcc_entry, TRUE);
+ gtk_widget_set_halign(autobcc_entry, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY (autobcc_checkbtn, autobcc_entry);
autoreplyto_checkbtn = gtk_check_button_new_with_label (
prefs_common_translated_header_name("Reply-To:"));
gtk_widget_show (autoreplyto_checkbtn);
- gtk_table_attach (GTK_TABLE (table), autoreplyto_checkbtn, 0, 1, 2, 3,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), autoreplyto_checkbtn, 0, 2, 1, 1);
autoreplyto_entry = gtk_entry_new ();
gtk_widget_show (autoreplyto_entry);
- gtk_table_attach (GTK_TABLE (table), autoreplyto_entry, 1, 2, 2, 3,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), autoreplyto_entry, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(autoreplyto_entry, TRUE);
+ gtk_widget_set_halign(autoreplyto_entry, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY (autoreplyto_checkbtn, autoreplyto_entry);
#if USE_ENCHANT
PACK_FRAME (vbox1, frame_dict, _("Spell check dictionaries"));
- table_dict = gtk_table_new (2, 2, FALSE);
+ table_dict = gtk_grid_new();
gtk_widget_show (table_dict);
gtk_container_add (GTK_CONTAINER (frame_dict), table_dict);
gtk_container_set_border_width (GTK_CONTAINER (table_dict), 8);
- gtk_table_set_row_spacings (GTK_TABLE (table_dict), VSPACING_NARROW_2);
- gtk_table_set_col_spacings (GTK_TABLE (table_dict), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table_dict), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(table_dict), 8);
/* Default dictionary */
checkbtn_enable_default_dictionary = gtk_check_button_new_with_label(_("Default dictionary"));
- gtk_table_attach(GTK_TABLE(table_dict), checkbtn_enable_default_dictionary, 0, 1,
- 0, 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table_dict), checkbtn_enable_default_dictionary, 0, 0, 1, 1);
+
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_default_dictionary),
tmp_ac_prefs.enable_default_dictionary);
combo_default_dictionary = gtkaspell_dictionary_combo_new(TRUE);
- gtk_table_attach(GTK_TABLE(table_dict), combo_default_dictionary, 1, 2,
- 0, 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table_dict), combo_default_dictionary, 1, 0, 1, 1);
SET_TOGGLE_SENSITIVITY(checkbtn_enable_default_dictionary, combo_default_dictionary);
/* Default dictionary */
checkbtn_enable_default_alt_dictionary = gtk_check_button_new_with_label(_("Default alternate dictionary"));
- gtk_table_attach(GTK_TABLE(table_dict), checkbtn_enable_default_alt_dictionary, 0, 1,
- 1, 2, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table_dict), checkbtn_enable_default_alt_dictionary, 0, 1, 1, 1);
+
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_default_alt_dictionary),
tmp_ac_prefs.enable_default_alt_dictionary);
combo_default_alt_dictionary = gtkaspell_dictionary_combo_new(FALSE);
- gtk_table_attach(GTK_TABLE(table_dict), combo_default_alt_dictionary, 1, 2,
- 1, 2, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table_dict), combo_default_alt_dictionary, 1, 1, 1, 1);
SET_TOGGLE_SENSITIVITY(checkbtn_enable_default_alt_dictionary, combo_default_alt_dictionary);
@@ -2691,12 +2657,12 @@ static void ssl_create_widget_func(PrefsPage * _page,
PACK_FRAME(vbox1, cert_frame, _("Client certificates"));
- cert_table = gtk_table_new(4,3, FALSE);
+ cert_table = gtk_grid_new();
gtk_container_add(GTK_CONTAINER(cert_frame), cert_table);
gtk_container_set_border_width(GTK_CONTAINER(cert_table), 8);
- gtk_table_set_row_spacings(GTK_TABLE(cert_table), VSPACING_NARROW_2);
- gtk_table_set_col_spacings(GTK_TABLE(cert_table), 8);
-
+ gtk_grid_set_row_spacing(GTK_GRID(cert_table), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(cert_table), 8);
+
label = gtk_label_new(_("Certificate for receiving"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
entry_in_cert_file = gtk_entry_new();
@@ -2704,12 +2670,12 @@ static void ssl_create_widget_func(PrefsPage * _page,
CLAWS_SET_TIP(label,
_("Client certificate file as a PKCS12 or PEM file"));
CLAWS_SET_TIP(entry_in_cert_file,
- _("Client certificate file as a PKCS12 or PEM file"));
- gtk_table_attach(GTK_TABLE(cert_table), label, 0, 1, 0, 1, GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), entry_in_cert_file, 1, 2, 0, 1,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), in_ssl_cert_browse_button, 2, 3, 0, 1,
- GTK_FILL, 0, 0, 0);
+ _("Client certificate file as a PKCS12 or PEM file"));
+ gtk_grid_attach(GTK_GRID(cert_table), label, 0, 0, 1, 1);
+ gtk_grid_attach(GTK_GRID(cert_table), entry_in_cert_file, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(entry_in_cert_file, TRUE);
+ gtk_widget_set_halign(entry_in_cert_file, GTK_ALIGN_FILL);
+ gtk_grid_attach(GTK_GRID(cert_table), in_ssl_cert_browse_button, 2, 0, 1, 1);
label = gtk_label_new(_("Password"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
@@ -2719,11 +2685,11 @@ static void ssl_create_widget_func(PrefsPage * _page,
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(showpwd_checkbtn), FALSE);
g_signal_connect(G_OBJECT(showpwd_checkbtn), "toggled",
G_CALLBACK(prefs_account_showpwd_checkbtn_toggled), entry_in_cert_pass);
- gtk_table_attach(GTK_TABLE(cert_table), label, 0, 1, 1, 2, GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), entry_in_cert_pass, 1, 2, 1, 2,
- GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), showpwd_checkbtn, 2, 3, 1, 2,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(cert_table), label, 0, 1, 1, 1);
+ gtk_grid_attach(GTK_GRID(cert_table), entry_in_cert_pass, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(entry_in_cert_pass, TRUE);
+ gtk_widget_set_halign(entry_in_cert_pass, GTK_ALIGN_FILL);
+ gtk_grid_attach(GTK_GRID(cert_table), showpwd_checkbtn, 2, 1, 1, 1);
label = gtk_label_new(_("Certificate for sending"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
@@ -2733,11 +2699,11 @@ static void ssl_create_widget_func(PrefsPage * _page,
_("Client certificate file as a PKCS12 or PEM file"));
CLAWS_SET_TIP(entry_out_cert_file,
_("Client certificate file as a PKCS12 or PEM file"));
- gtk_table_attach(GTK_TABLE(cert_table), label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), entry_out_cert_file, 1, 2, 2, 3,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), out_ssl_cert_browse_button, 2, 3, 2, 3,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(cert_table), label, 0, 2, 1, 1);
+ gtk_grid_attach(GTK_GRID(cert_table), entry_out_cert_file, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(entry_out_cert_file, TRUE);
+ gtk_widget_set_halign(entry_out_cert_file, GTK_ALIGN_FILL);
+ gtk_grid_attach(GTK_GRID(cert_table), out_ssl_cert_browse_button, 2, 2, 1, 1);
label = gtk_label_new(_("Password"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
@@ -2747,11 +2713,11 @@ static void ssl_create_widget_func(PrefsPage * _page,
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(showpwd_checkbtn), FALSE);
g_signal_connect(G_OBJECT(showpwd_checkbtn), "toggled",
G_CALLBACK(prefs_account_showpwd_checkbtn_toggled), entry_out_cert_pass);
- gtk_table_attach(GTK_TABLE(cert_table), label, 0, 1, 3, 4, GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), entry_out_cert_pass, 1, 2, 3, 4,
- GTK_FILL, 0, 0, 0);
- gtk_table_attach(GTK_TABLE(cert_table), showpwd_checkbtn, 2, 3, 3, 4,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(cert_table), label, 0, 3, 1, 1);
+ gtk_grid_attach(GTK_GRID(cert_table), entry_out_cert_pass, 1, 3, 1, 1);
+ gtk_widget_set_hexpand(entry_out_cert_pass, TRUE);
+ gtk_widget_set_halign(entry_out_cert_pass, GTK_ALIGN_FILL);
+ gtk_grid_attach(GTK_GRID(cert_table), showpwd_checkbtn, 2, 3, 1, 1);
gtk_widget_show_all(cert_table);
@@ -2922,41 +2888,36 @@ static void proxy_create_widget_func(PrefsPage * _page,
PACK_CHECK_BUTTON (vbox4, proxy_auth_checkbtn, _("Use authentication"));
- table = gtk_table_new(2, 4, FALSE);
+ table = gtk_grid_new();
gtk_box_pack_start (GTK_BOX (vbox4), table, FALSE, FALSE, 0);
label = gtk_label_new(_("Username"));
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- GTK_SHRINK | GTK_FILL,
- GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 1);
proxy_name_entry = gtk_entry_new();
gtk_widget_set_size_request(proxy_name_entry, DEFAULT_ENTRY_WIDTH, -1);
- gtk_table_attach(GTK_TABLE(table), proxy_name_entry, 1, 2, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), proxy_name_entry, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(proxy_name_entry, TRUE);
+ gtk_widget_set_halign(proxy_name_entry, GTK_ALIGN_FILL);
label = gtk_label_new(_("Password"));
- gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1,
- GTK_SHRINK | GTK_FILL,
- GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 2, 0, 1, 1);
proxy_pass_entry = gtk_entry_new();
gtk_widget_set_size_request(proxy_pass_entry, DEFAULT_ENTRY_WIDTH, -1);
gtk_entry_set_visibility(GTK_ENTRY(proxy_pass_entry), FALSE);
- gtk_table_attach(GTK_TABLE(table), proxy_pass_entry, 3, 4, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), proxy_pass_entry, 3, 0, 1, 1);
+ gtk_widget_set_hexpand(proxy_pass_entry, TRUE);
+ gtk_widget_set_halign(proxy_pass_entry, GTK_ALIGN_FILL);
button = gtk_check_button_new_with_label(_("Show password"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), FALSE);
- gtk_table_attach(GTK_TABLE(table), button, 3, 4, 1, 2,
- GTK_SHRINK | GTK_FILL,
- GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), button, 3, 1, 1, 1);
+
g_signal_connect(G_OBJECT(button), "toggled",
G_CALLBACK(prefs_account_showpwd_checkbtn_toggled), proxy_pass_entry);
- gtk_box_pack_start(GTK_BOX(vbox2), gtk_hseparator_new(), FALSE, FALSE, 0);
+ gtk_box_pack_start(GTK_BOX(vbox2), gtk_separator_new(GTK_ORIENTATION_HORIZONTAL), FALSE, FALSE, 0);
PACK_CHECK_BUTTON(vbox2, proxy_send_checkbtn,
_("Use proxy server for sending"));
@@ -3141,11 +3102,11 @@ static void advanced_create_widget_func(PrefsPage * _page,
vbox3 = gtkut_get_options_frame(vbox1, &folder_frame, _("Folder"));
- table = gtk_table_new (4, 3, FALSE);
+ table = gtk_grid_new();
gtk_widget_show (table);
gtk_container_add (GTK_CONTAINER (vbox3), table);
- gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
- gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+ gtk_grid_set_row_spacing(GTK_GRID(table), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 4);
#define SET_CHECK_BTN_AND_ENTRY(label, checkbtn, entry, n) \
{ \
@@ -3153,25 +3114,23 @@ static void advanced_create_widget_func(PrefsPage * _page,
\
checkbtn = gtk_check_button_new_with_label (label); \
gtk_widget_show (checkbtn); \
- gtk_table_attach (GTK_TABLE (table), checkbtn, \
- 0, 1, n, n + 1, GTK_FILL, 0, 0, 0); \
+ gtk_grid_attach(GTK_GRID(table), checkbtn, 0, n, 1, 1); \
\
entry = gtk_entry_new (); \
gtk_widget_show (entry); \
- gtk_table_attach (GTK_TABLE (table), entry, 1, 2, n, n + 1, \
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, \
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0); \
+ gtk_grid_attach(GTK_GRID(table), entry, 1, n, 1, 1); \
+ gtk_widget_set_hexpand(entry, TRUE); \
+ gtk_widget_set_halign(entry, GTK_ALIGN_FILL); \
\
button = gtkut_get_browse_file_btn(_("Browse")); \
gtk_widget_show (button); \
- gtk_table_attach (GTK_TABLE (table), button, \
- 2, 3, n, n + 1, GTK_FILL, 0, 0, 0); \
+ gtk_grid_attach(GTK_GRID(table), button, 2, n, 1, 1); \
g_signal_connect \
- (G_OBJECT (button), "clicked", \
+ (G_OBJECT (button), "clicked", \
G_CALLBACK (prefs_account_select_folder_cb), \
entry); \
\
- SET_TOGGLE_SENSITIVITY (checkbtn, entry); \
+ SET_TOGGLE_SENSITIVITY (checkbtn, entry); \
SET_TOGGLE_SENSITIVITY (checkbtn, button); \
}
@@ -4819,8 +4778,7 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
gtk_widget_show(send_page.xmailer_checkbtn);
gtk_widget_show(basic_page.nntpserv_label);
gtk_widget_show(basic_page.nntpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 0, VSPACING_NARROW);
+ gtk_grid_set_row_spacing(GTK_GRID(basic_page.serv_table), VSPACING_NARROW);
gtk_widget_set_sensitive(basic_page.nntpauth_checkbtn, TRUE);
gtk_widget_show(basic_page.nntpauth_checkbtn);
@@ -4828,35 +4786,21 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
gtk_widget_set_sensitive(basic_page.nntpauth_onconnect_checkbtn, TRUE);
gtk_widget_show(basic_page.nntpauth_onconnect_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 1, VSPACING_NARROW);
gtk_widget_hide(basic_page.recvserv_label);
gtk_widget_hide(basic_page.recvserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 2, 0);
gtk_widget_show(basic_page.smtpserv_label);
gtk_widget_show(basic_page.smtpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 4, VSPACING_NARROW);
- gtk_widget_hide(basic_page.localmbox_label);
+ gtk_widget_hide(basic_page.localmbox_label);
gtk_widget_hide(basic_page.localmbox_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 3, 0);
gtk_widget_hide(basic_page.mailcmd_label);
gtk_widget_hide(basic_page.mailcmd_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 6, 0);
gtk_widget_hide(basic_page.mailcmd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 5, 0);
gtk_widget_show(basic_page.uid_label);
gtk_widget_show(basic_page.pass_label);
gtk_widget_show(basic_page.uid_entry);
gtk_widget_show(basic_page.pass_entry);
gtk_widget_show(basic_page.showpwd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 7, VSPACING_NARROW);
-
+
gtk_widget_set_sensitive(basic_page.uid_label, TRUE);
gtk_widget_set_sensitive(basic_page.pass_label, TRUE);
gtk_widget_set_sensitive(basic_page.uid_entry, TRUE);
@@ -4921,41 +4865,26 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
gtk_widget_hide(basic_page.nntpserv_label);
gtk_widget_hide(basic_page.nntpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 0, 0);
- gtk_widget_set_sensitive(basic_page.nntpauth_checkbtn, FALSE);
+ gtk_widget_set_sensitive(basic_page.nntpauth_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_checkbtn);
+ gtk_grid_set_row_spacing(GTK_GRID(basic_page.serv_table), VSPACING_NARROW);
gtk_widget_set_sensitive(basic_page.nntpauth_onconnect_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_onconnect_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 1, 0);
gtk_widget_hide(basic_page.recvserv_label);
gtk_widget_hide(basic_page.recvserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 2, 0);
gtk_widget_show(basic_page.smtpserv_label);
gtk_widget_show(basic_page.smtpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 4, VSPACING_NARROW);
gtk_widget_show(basic_page.localmbox_label);
gtk_widget_show(basic_page.localmbox_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 3, VSPACING_NARROW);
gtk_widget_show(basic_page.mailcmd_label);
gtk_widget_show(basic_page.mailcmd_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 6, VSPACING_NARROW);
gtk_widget_show(basic_page.mailcmd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 5, VSPACING_NARROW);
- gtk_widget_hide(basic_page.uid_label);
+ gtk_widget_hide(basic_page.uid_label);
gtk_widget_hide(basic_page.pass_label);
gtk_widget_hide(basic_page.uid_entry);
gtk_widget_hide(basic_page.pass_entry);
gtk_widget_hide(basic_page.showpwd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 7, 0);
gtk_widget_set_sensitive(basic_page.uid_label, TRUE);
gtk_widget_set_sensitive(basic_page.pass_label, TRUE);
@@ -5025,45 +4954,30 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
gtk_widget_show(send_page.xmailer_checkbtn);
gtk_widget_hide(basic_page.nntpserv_label);
gtk_widget_hide(basic_page.nntpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 0, 0);
+ gtk_grid_set_row_spacing(GTK_GRID(basic_page.serv_table), VSPACING_NARROW);
gtk_widget_set_sensitive(basic_page.nntpauth_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_checkbtn);
gtk_widget_set_sensitive(basic_page.nntpauth_onconnect_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_onconnect_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 1, 0);
gtk_widget_set_sensitive(basic_page.recvserv_label, TRUE);
gtk_widget_set_sensitive(basic_page.recvserv_entry, TRUE);
gtk_widget_show(basic_page.recvserv_label);
gtk_widget_show(basic_page.recvserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 2, VSPACING_NARROW);
gtk_widget_show(basic_page.smtpserv_label);
gtk_widget_show(basic_page.smtpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 4, VSPACING_NARROW);
- gtk_widget_hide(basic_page.localmbox_label);
+ gtk_widget_hide(basic_page.localmbox_label);
gtk_widget_hide(basic_page.localmbox_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 3, 0);
gtk_widget_hide(basic_page.mailcmd_label);
gtk_widget_hide(basic_page.mailcmd_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 6, 0);
- gtk_widget_hide(basic_page.mailcmd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 5, 0);
- gtk_widget_show(basic_page.uid_label);
+ gtk_widget_hide(basic_page.mailcmd_checkbtn);
+ gtk_widget_show(basic_page.uid_label);
gtk_widget_show(basic_page.pass_label);
gtk_widget_show(basic_page.uid_entry);
gtk_widget_show(basic_page.pass_entry);
gtk_widget_show(basic_page.showpwd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 7, VSPACING_NARROW);
-
+
gtk_widget_set_sensitive(basic_page.uid_label, TRUE);
gtk_widget_set_sensitive(basic_page.pass_label, TRUE);
gtk_widget_set_sensitive(basic_page.uid_entry, TRUE);
@@ -5126,44 +5040,29 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
gtk_widget_hide(basic_page.nntpserv_label);
gtk_widget_hide(basic_page.nntpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 0, 0);
+ gtk_grid_set_row_spacing(GTK_GRID(basic_page.serv_table), VSPACING_NARROW);
gtk_widget_set_sensitive(basic_page.nntpauth_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_checkbtn);
gtk_widget_set_sensitive(basic_page.nntpauth_onconnect_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_onconnect_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 1, 0);
gtk_widget_set_sensitive(basic_page.recvserv_label, FALSE);
gtk_widget_set_sensitive(basic_page.recvserv_entry, FALSE);
gtk_widget_hide(basic_page.recvserv_label);
gtk_widget_hide(basic_page.recvserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 2, VSPACING_NARROW);
- gtk_widget_show(basic_page.smtpserv_label);
+ gtk_widget_show(basic_page.smtpserv_label);
gtk_widget_show(basic_page.smtpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 4, VSPACING_NARROW);
gtk_widget_hide(basic_page.localmbox_label);
gtk_widget_hide(basic_page.localmbox_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 3, 0);
gtk_widget_hide(basic_page.mailcmd_label);
gtk_widget_hide(basic_page.mailcmd_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 6, 0);
- gtk_widget_hide(basic_page.mailcmd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 5, 0);
+ gtk_widget_hide(basic_page.mailcmd_checkbtn);
gtk_widget_hide(basic_page.uid_label);
gtk_widget_hide(basic_page.pass_label);
gtk_widget_hide(basic_page.uid_entry);
gtk_widget_hide(basic_page.pass_entry);
gtk_widget_hide(basic_page.showpwd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 7, VSPACING_NARROW);
gtk_widget_set_sensitive(basic_page.uid_label, FALSE);
gtk_widget_set_sensitive(basic_page.pass_label, FALSE);
@@ -5224,44 +5123,29 @@ static void prefs_account_protocol_changed(GtkComboBox *combobox, gpointer data)
gtk_widget_hide(protocol_optmenu->no_imap_warn_label);
gtk_widget_hide(basic_page.nntpserv_label);
gtk_widget_hide(basic_page.nntpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 0, 0);
+ gtk_grid_set_row_spacing(GTK_GRID(basic_page.serv_table), VSPACING_NARROW);
gtk_widget_set_sensitive(basic_page.nntpauth_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_checkbtn);
gtk_widget_set_sensitive(basic_page.nntpauth_onconnect_checkbtn, FALSE);
gtk_widget_hide(basic_page.nntpauth_onconnect_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 1, 0);
- gtk_widget_set_sensitive(basic_page.recvserv_label, TRUE);
+ gtk_widget_set_sensitive(basic_page.recvserv_label, TRUE);
gtk_widget_set_sensitive(basic_page.recvserv_entry, TRUE);
gtk_widget_show(basic_page.recvserv_label);
gtk_widget_show(basic_page.recvserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 2, VSPACING_NARROW);
gtk_widget_show(basic_page.smtpserv_label);
gtk_widget_show(basic_page.smtpserv_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 4, VSPACING_NARROW);
- gtk_widget_hide(basic_page.localmbox_label);
+ gtk_widget_hide(basic_page.localmbox_label);
gtk_widget_hide(basic_page.localmbox_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 3, 0);
- gtk_widget_hide(basic_page.mailcmd_label);
+ gtk_widget_hide(basic_page.mailcmd_label);
gtk_widget_hide(basic_page.mailcmd_entry);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 6, 0);
- gtk_widget_hide(basic_page.mailcmd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 5, 0);
- gtk_widget_show(basic_page.uid_label);
+ gtk_widget_hide(basic_page.mailcmd_checkbtn);
+ gtk_widget_show(basic_page.uid_label);
gtk_widget_show(basic_page.pass_label);
gtk_widget_show(basic_page.uid_entry);
gtk_widget_show(basic_page.pass_entry);
gtk_widget_show(basic_page.showpwd_checkbtn);
- gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
- 7, VSPACING_NARROW);
gtk_widget_set_sensitive(basic_page.uid_label, TRUE);
gtk_widget_set_sensitive(basic_page.pass_label, TRUE);
diff --git a/src/prefs_actions.c b/src/prefs_actions.c
index 2b49ae3e1..82c55d58f 100644
--- a/src/prefs_actions.c
+++ b/src/prefs_actions.c
@@ -242,43 +242,39 @@ static void prefs_actions_create(MainWindow *mainwin)
gtk_box_pack_start(GTK_BOX(vbox), vbox1, TRUE, TRUE, 0);
gtk_container_set_border_width(GTK_CONTAINER(vbox1), 2);
- table = gtk_table_new(3, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
- gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+ table = gtk_grid_new();
gtk_widget_show(table);
+ gtk_grid_set_row_spacing(GTK_GRID(table), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 4);
gtk_box_pack_start (GTK_BOX (vbox1), table, FALSE, FALSE, 0);
name_label = gtk_label_new (_("Menu name"));
gtk_widget_show (name_label);
gtk_label_set_xalign (GTK_LABEL (name_label), 1.0);
- gtk_table_attach (GTK_TABLE (table), name_label, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), name_label, 0, 0, 1, 1);
name_entry = gtk_entry_new ();
gtk_widget_show (name_entry);
- gtk_table_attach (GTK_TABLE (table), name_entry, 1, 2, 0, 1,
- (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
- (GtkAttachOptions) (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);
cmd_label = gtk_label_new (_("Command"));
gtk_widget_show (cmd_label);
gtk_label_set_xalign (GTK_LABEL (cmd_label), 1.0);
- gtk_table_attach (GTK_TABLE (table), cmd_label, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), cmd_label, 0, 2, 1, 1);
cmd_entry = gtk_entry_new ();
gtk_widget_show (cmd_entry);
- gtk_table_attach (GTK_TABLE (table), cmd_entry, 1, 2, 2, 3,
- (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), cmd_entry, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(cmd_entry, TRUE);
+ gtk_widget_set_halign(cmd_entry, GTK_ALIGN_FILL);
/* radio buttons for filter actions or shell */
filter_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,4);
- gtk_table_attach(GTK_TABLE(table), filter_hbox, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), filter_hbox, 1, 3, 1, 1);
+ gtk_widget_set_hexpand(filter_hbox, TRUE);
+ gtk_widget_set_halign(filter_hbox, GTK_ALIGN_FILL);
gtk_widget_show(filter_hbox);
shell_radiobtn = gtk_radio_button_new_with_label(NULL, _("Shell command"));
diff --git a/src/prefs_customheader.c b/src/prefs_customheader.c
index 031f9d286..2715ba852 100644
--- a/src/prefs_customheader.c
+++ b/src/prefs_customheader.c
@@ -198,44 +198,36 @@ static void prefs_custom_header_create(void)
gtk_box_pack_start (GTK_BOX (vbox), vbox1, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 2);
- table1 = gtk_table_new (3, 2, FALSE);
+ table1 = gtk_grid_new();
gtk_widget_show (table1);
gtk_box_pack_start (GTK_BOX (vbox1), table1,
FALSE, FALSE, 0);
- gtk_table_set_row_spacings (GTK_TABLE (table1), 8);
- gtk_table_set_col_spacings (GTK_TABLE (table1), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table1), 8);
+ gtk_grid_set_column_spacing(GTK_GRID(table1), 8);
hdr_label = gtk_label_new (_("Header"));
gtk_widget_show (hdr_label);
- gtk_table_attach (GTK_TABLE (table1), hdr_label, 0, 1, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (hdr_label), 0.0);
+ gtk_grid_attach(GTK_GRID(table1), hdr_label, 0, 0, 1, 1);
hdr_combo = combobox_text_new(TRUE, "User-Agent", "Face", "X-Face",
"X-Operating-System", NULL);
- gtk_table_attach (GTK_TABLE (table1), hdr_combo, 0, 1, 1, 2,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), hdr_combo, 0, 1, 1, 1);
val_label = gtk_label_new (_("Value"));
gtk_widget_show (val_label);
- gtk_table_attach (GTK_TABLE (table1), val_label, 1, 2, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL (val_label), 0.0);
+ gtk_grid_attach(GTK_GRID(table1), val_label, 1, 0, 1, 1);
val_entry = gtk_entry_new ();
gtk_widget_show (val_entry);
- gtk_table_attach (GTK_TABLE (table1), val_entry, 1, 2, 1, 2,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), val_entry, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(val_entry, TRUE);
+ gtk_widget_set_halign(val_entry, GTK_ALIGN_FILL);
val_btn = gtkut_get_browse_file_btn(_("Bro_wse"));
gtk_widget_show (val_btn);
- gtk_table_attach (GTK_TABLE (table1), val_btn, 2, 3, 1, 2,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), val_btn, 2, 1, 1, 1);
g_signal_connect (G_OBJECT (val_btn), "clicked",
G_CALLBACK (prefs_custom_header_val_from_file_cb),
NULL);
diff --git a/src/prefs_ext_prog.c b/src/prefs_ext_prog.c
index 2104da754..4e9913363 100644
--- a/src/prefs_ext_prog.c
+++ b/src/prefs_ext_prog.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004-2018 Hiroyuki Yamamoto & the Claws Mail team
+ * Copyright (C) 2004-2019 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -91,18 +91,16 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
int i = 0;
gchar *tmp;
- table = gtk_table_new(2, 1, FALSE);
+ table = gtk_grid_new();
gtk_widget_show(table);
gtk_container_set_border_width(GTK_CONTAINER(table), 8);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
gtk_widget_show(vbox);
- gtk_table_attach(GTK_TABLE (table), vbox, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_SHRINK),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), vbox, 0, 0, 1, 1);
hint_label = gtk_label_new(_("%s will be replaced with file name / URI"));
gtk_label_set_justify (GTK_LABEL (hint_label), GTK_JUSTIFY_LEFT);
@@ -120,16 +118,16 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
hint_label, FALSE, FALSE, 4);
#endif
- table2 = gtk_table_new(7, 2, FALSE);
+ table2 = gtk_grid_new();
gtk_widget_show(table2);
gtk_container_set_border_width(GTK_CONTAINER(table2), 8);
- gtk_table_set_row_spacings(GTK_TABLE(table2), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table2), 8);
-
- gtk_table_attach(GTK_TABLE (table), table2, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
-
+ gtk_grid_set_row_spacing(GTK_GRID(table2), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table2), 8);
+
+ gtk_grid_attach(GTK_GRID(table), table2, 0, 1, 1, 1);
+ gtk_widget_set_hexpand(table2, TRUE);
+ gtk_widget_set_halign(table2, GTK_ALIGN_FILL);
+
cmds_use_system_default_checkbtn = gtk_check_button_new_with_label(
_("Use system defaults when possible"));
@@ -147,19 +145,15 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
g_free(tmp);
- gtk_table_attach(GTK_TABLE (table2), cmds_use_system_default_checkbtn, 0, 2, i, i+1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 2);
+ gtk_grid_attach(GTK_GRID(table2), cmds_use_system_default_checkbtn, 0, i, 2, 1);
#ifndef G_OS_WIN32
uri_label = gtk_label_new (_("Web browser"));
gtk_widget_show(uri_label);
i++;
- gtk_table_attach(GTK_TABLE (table2), uri_label, 0, 1, i, i+1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 2);
gtk_label_set_justify(GTK_LABEL (uri_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL (uri_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table2), uri_label, 0, i, 1, 1);
uri_combo = combobox_text_new(TRUE,
DEFAULT_BROWSER_CMD,
@@ -174,8 +168,7 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
"rxvt -e w3m '%s'",
"rxvt -e lynx '%s'",
NULL);
- gtk_table_attach (GTK_TABLE (table2), uri_combo, 1, 2, i, i+1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table2), uri_combo, 1, i, 1, 1);
uri_entry = gtk_bin_get_child(GTK_BIN((uri_combo)));
gtk_entry_set_text(GTK_ENTRY(uri_entry), prefs_common.uri_cmd ? prefs_common.uri_cmd : "");
@@ -186,11 +179,9 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_widget_show(exteditor_label);
i++;
- gtk_table_attach(GTK_TABLE (table2), exteditor_label, 0, 1, i, i+1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 2);
gtk_label_set_justify(GTK_LABEL (exteditor_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL (exteditor_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table2), exteditor_label, 0, i, 1, 1);
exteditor_combo = combobox_text_new(TRUE,
"gedit %s",
@@ -207,8 +198,7 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
"kterm -e jed %s",
"kterm -e vi %s",
NULL);
- gtk_table_attach (GTK_TABLE (table2), exteditor_combo, 1, 2, i, i+1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table2), exteditor_combo, 1, i, 1, 1);
exteditor_entry = gtk_bin_get_child(GTK_BIN((exteditor_combo)));
gtk_entry_set_text(GTK_ENTRY(exteditor_entry),
@@ -219,11 +209,9 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_widget_show(astextviewer_label);
i++;
- gtk_table_attach(GTK_TABLE (table2), astextviewer_label, 0, 1, i, i+1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 2);
gtk_label_set_justify(GTK_LABEL (astextviewer_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL (astextviewer_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table2), astextviewer_label, 0, i, 1, 1);
astextviewer_entry = gtk_entry_new ();
gtk_widget_show(astextviewer_entry);
@@ -232,9 +220,10 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
"message view via a script when using the 'Display as text' "
"contextual menu item"));
- gtk_table_attach(GTK_TABLE (table2), astextviewer_entry, 1, 2, i, i+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table2), astextviewer_entry, 1, i, 1, 1);
+ gtk_widget_set_hexpand(astextviewer_entry, TRUE);
+ gtk_widget_set_halign(astextviewer_entry, GTK_ALIGN_FILL);
+
gtk_entry_set_text(GTK_ENTRY(astextviewer_entry),
prefs_common.mime_textviewer ? prefs_common.mime_textviewer : "");
diff --git a/src/prefs_filtering.c b/src/prefs_filtering.c
index 9b91d3dc2..21b1bc78c 100644
--- a/src/prefs_filtering.c
+++ b/src/prefs_filtering.c
@@ -375,57 +375,47 @@ static void prefs_filtering_create(void)
gtk_box_pack_start (GTK_BOX (vbox), vbox1, FALSE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), 2);
- table = gtk_table_new(4, 3, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
- gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+ table = gtk_grid_new();
gtk_widget_show(table);
+ gtk_grid_set_row_spacing(GTK_GRID(table), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 4);
gtk_box_pack_start (GTK_BOX (vbox1), table, TRUE, TRUE, 0);
name_label = gtk_label_new (_("Name"));
gtk_widget_show (name_label);
gtk_label_set_xalign (GTK_LABEL (name_label), 1.0);
- gtk_table_attach (GTK_TABLE (table), name_label, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), name_label, 0, 0, 1, 1);
name_entry = gtk_entry_new ();
gtk_widget_show (name_entry);
- gtk_table_attach (GTK_TABLE (table), name_entry, 1, 2, 0, 1,
- (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
- (GtkAttachOptions) (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);
account_label = gtk_label_new (_("Account"));
gtk_widget_show (account_label);
gtk_label_set_xalign (GTK_LABEL (account_label), 1.0);
- gtk_table_attach (GTK_TABLE (table), account_label, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), account_label, 0, 1, 1, 1);
account_opt_menu = prefs_filtering_account_option_menu(&filtering);
gtk_widget_show (account_opt_menu);
- gtk_table_attach (GTK_TABLE (table), account_opt_menu, 1, 2, 1, 2,
- (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), account_opt_menu, 1, 1, 1, 1);
combobox_select_by_data(GTK_COMBO_BOX(filtering.account_combobox), 0);
cond_label = gtk_label_new (_("Condition"));
gtk_widget_show (cond_label);
gtk_label_set_xalign (GTK_LABEL (cond_label), 1.0);
- gtk_table_attach (GTK_TABLE (table), cond_label, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), cond_label, 0, 2, 1, 1);
cond_entry = gtk_entry_new ();
gtk_widget_show (cond_entry);
- gtk_table_attach (GTK_TABLE (table), cond_entry, 1, 2, 2, 3,
- (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), cond_entry, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(cond_entry, TRUE);
+ gtk_widget_set_halign(cond_entry, GTK_ALIGN_FILL);
cond_btn = gtk_button_new_with_mnemonic (_(" Def_ine... "));
gtk_widget_show (cond_btn);
- gtk_table_attach (GTK_TABLE (table), cond_btn, 2, 3, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 2, 2);
+ gtk_grid_attach(GTK_GRID(table), cond_btn, 2, 2, 1, 1);
g_signal_connect(G_OBJECT (cond_btn), "clicked",
G_CALLBACK(prefs_filtering_condition_define),
NULL);
@@ -433,21 +423,17 @@ static void prefs_filtering_create(void)
action_label = gtk_label_new (_("Action"));
gtk_widget_show (action_label);
gtk_label_set_xalign (GTK_LABEL (action_label), 1.0);
- gtk_table_attach (GTK_TABLE (table), action_label, 0, 1, 3, 4,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), action_label, 0, 3, 1, 1);
action_entry = gtk_entry_new ();
gtk_widget_show (action_entry);
- gtk_table_attach (GTK_TABLE (table), action_entry, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_FILL|GTK_EXPAND),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), action_entry, 1, 3, 1, 1);
+ gtk_widget_set_hexpand(action_entry, TRUE);
+ gtk_widget_set_halign(action_entry, GTK_ALIGN_FILL);
action_btn = gtk_button_new_with_mnemonic (_(" De_fine... "));
gtk_widget_show (action_btn);
- gtk_table_attach (GTK_TABLE (table), action_btn, 2, 3, 3, 4,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 2, 2);
+ gtk_grid_attach(GTK_GRID(table), action_btn, 2, 3, 1, 1);
g_signal_connect(G_OBJECT (action_btn), "clicked",
G_CALLBACK(prefs_filtering_action_define),
NULL);
diff --git a/src/prefs_filtering_action.c b/src/prefs_filtering_action.c
index 2ebe42be9..4d708d556 100644
--- a/src/prefs_filtering_action.c
+++ b/src/prefs_filtering_action.c
@@ -418,10 +418,11 @@ static void prefs_filtering_action_create(void)
gtk_box_pack_start (GTK_BOX (vbox1), frame, FALSE, FALSE, 0);
gtk_widget_set_size_request(frame, -1, 110);
- table = gtk_table_new(3, 3, FALSE);
+ table = gtk_grid_new();
gtk_container_set_border_width(GTK_CONTAINER(table), 2);
- gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
- gtk_table_set_col_spacings (GTK_TABLE (table), HSPACING_NARROW);
+ gtk_grid_set_row_spacing(GTK_GRID(table), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(table), VSPACING_NARROW);
+
gtk_container_add(GTK_CONTAINER(frame), table);
/* first row labels */
@@ -430,26 +431,28 @@ static void prefs_filtering_action_create(void)
gtk_widget_set_size_request(label1, LABELS_WIDTH, -1);
gtk_size_group_add_widget(size_group, label1);
gtk_label_set_xalign(GTK_LABEL(label1), 1.0);
- gtk_table_attach(GTK_TABLE(table), label1, 0, 1, 0, 1,
- GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label1, 0, 0, 1, 1);
label2 = gtk_label_new ("");
gtk_size_group_add_widget(size_group, label2);
gtk_label_set_xalign(GTK_LABEL(label2), 1.0);
- gtk_table_attach(GTK_TABLE(table), label2, 0, 1, 1, 2,
- GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label2, 0, 1, 1, 1);
+ gtk_widget_set_hexpand(label2, TRUE);
+ gtk_widget_set_halign(label2, GTK_ALIGN_FILL);
label3 = gtk_label_new ("");
gtk_size_group_add_widget(size_group, label3);
gtk_label_set_xalign(GTK_LABEL(label3), 1.0);
- gtk_table_attach(GTK_TABLE(table), label3, 0, 1, 2, 3,
- GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label3, 0, 2, 1, 1);
+ gtk_widget_set_hexpand(label3, TRUE);
+ gtk_widget_set_halign(label3, GTK_ALIGN_FILL);
/* action combo */
hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_table_attach(GTK_TABLE(table), hbox1, 1, 2, 0, 1,
- GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox1, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(hbox1, TRUE);
+ gtk_widget_set_halign(hbox1, GTK_ALIGN_FILL);
model = prefs_filtering_action_create_model();
action_combo = gtk_combo_box_new_with_model(model);
@@ -474,8 +477,9 @@ static void prefs_filtering_action_create(void)
/* accounts */
hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_table_attach(GTK_TABLE(table), hbox1, 1, 2, 1, 2,
- GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox1, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(hbox1, TRUE);
+ gtk_widget_set_halign(hbox1, GTK_ALIGN_FILL);
account_combo = gtk_combo_box_text_new ();
gtk_size_group_add_widget(size_action, account_combo);
@@ -504,8 +508,9 @@ static void prefs_filtering_action_create(void)
/* destination */
hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_table_attach(GTK_TABLE(table), hbox1, 1, 2, 2, 3,
- GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox1, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(hbox1, TRUE);
+ gtk_widget_set_halign(hbox1, GTK_ALIGN_FILL);
dest_entry = gtk_entry_new ();
gtk_box_pack_start (GTK_BOX (hbox1), dest_entry, TRUE, TRUE, 0);
@@ -536,8 +541,9 @@ static void prefs_filtering_action_create(void)
FALSE, FALSE, 0);
hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_table_attach(GTK_TABLE(table), hbox1, 2, 3, 2, 3,
- GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox1, 2, 2, 1, 1);
+ gtk_widget_set_hexpand(hbox1, TRUE);
+ gtk_widget_set_halign(hbox1, GTK_ALIGN_FILL);
dest_btn = gtk_button_new_with_label (_("Select..."));
gtk_box_pack_start (GTK_BOX (hbox1), dest_btn, FALSE, FALSE, 0);
diff --git a/src/prefs_folder_item.c b/src/prefs_folder_item.c
index 97505857f..21936f52c 100644
--- a/src/prefs_folder_item.c
+++ b/src/prefs_folder_item.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-209 the Claws Mail team and Hiroyuki Yamamoto
+ * Copyright (C) 1999-2019 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -276,23 +276,22 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
page->item = item;
/* Table */
- table = gtk_table_new(12, 3, FALSE);
+ table = gtk_grid_new();
gtk_container_set_border_width (GTK_CONTAINER (table), VBOX_BORDER);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 4);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 4);
+
rowcount = 0;
if (!can_save) {
no_save_warning = prefs_folder_no_save_warning_create_widget();
- gtk_table_attach(GTK_TABLE(table), no_save_warning, 0, 3,
- rowcount, rowcount + 1, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), no_save_warning, 0, rowcount, 1, 1);
rowcount++;
}
/* Apply to subfolders */
label = gtk_label_new(_("Apply to\nsubfolders"));
- gtk_table_attach(GTK_TABLE(table), label, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 2, rowcount, 1, 1);
rowcount++;
/* folder_type */
@@ -334,19 +333,17 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
label = gtk_label_new(_("Folder type"));
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach(GTK_TABLE(table), folder_type, 1, 2,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
- gtk_table_attach(GTK_TABLE(table), dummy_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 0, rowcount, 1, 1);
+ gtk_grid_attach(GTK_GRID(table), folder_type, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(folder_type, TRUE);
+ gtk_widget_set_halign(folder_type, GTK_ALIGN_FILL);
+ gtk_grid_attach(GTK_GRID(table), dummy_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Simplify Subject */
checkbtn_simplify_subject = gtk_check_button_new_with_label(_("Simplify Subject RegExp"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_simplify_subject, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_simplify_subject, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_simplify_subject),
item->prefs->enable_simplify_subject);
@@ -354,8 +351,9 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
G_CALLBACK(folder_regexp_set_subject_example_cb), page);
entry_simplify_subject = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_simplify_subject, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_simplify_subject, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_simplify_subject, TRUE);
+ gtk_widget_set_halign(entry_simplify_subject, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_simplify_subject, entry_simplify_subject);
gtk_entry_set_text(GTK_ENTRY(entry_simplify_subject),
SAFE_STRING(item->prefs->simplify_subject_regexp));
@@ -364,21 +362,21 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
G_CALLBACK(folder_regexp_test_cb), page);
simplify_subject_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), simplify_subject_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), simplify_subject_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Test string */
label_regexp_test = gtk_label_new(_("Test string"));
gtk_label_set_xalign(GTK_LABEL(label_regexp_test), 1.0);
- gtk_table_attach(GTK_TABLE(table), label_regexp_test, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label_regexp_test, 0, rowcount, 1, 1);
SET_TOGGLE_SENSITIVITY(checkbtn_simplify_subject, label_regexp_test);
entry_regexp_test_string = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_regexp_test_string, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_regexp_test_string, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_regexp_test_string, TRUE);
+ gtk_widget_set_halign(entry_regexp_test_string, GTK_ALIGN_FILL);
+
SET_TOGGLE_SENSITIVITY(checkbtn_simplify_subject, entry_regexp_test_string);
g_signal_connect(G_OBJECT(entry_regexp_test_string), "changed",
@@ -389,13 +387,13 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
/* Test result */
label_regexp_result = gtk_label_new(_("Result"));
gtk_label_set_xalign(GTK_LABEL(label_regexp_result), 1.0);
- gtk_table_attach(GTK_TABLE(table), label_regexp_result, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label_regexp_result, 0, rowcount, 1, 1);
SET_TOGGLE_SENSITIVITY(checkbtn_simplify_subject, label_regexp_result);
entry_regexp_test_result = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_regexp_test_result, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_regexp_test_result, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_regexp_test_result, TRUE);
+ gtk_widget_set_halign(entry_regexp_test_result, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_simplify_subject, entry_regexp_test_result);
gtk_editable_set_editable(GTK_EDITABLE(entry_regexp_test_result), FALSE);
@@ -403,15 +401,15 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
/* Folder chmod */
checkbtn_folder_chmod = gtk_check_button_new_with_label(_("Folder chmod"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_folder_chmod, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_folder_chmod, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_folder_chmod),
item->prefs->enable_folder_chmod);
entry_folder_chmod = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_folder_chmod, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_folder_chmod, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_folder_chmod, TRUE);
+ gtk_widget_set_halign(entry_folder_chmod, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_folder_chmod, entry_folder_chmod);
if (item->prefs->folder_chmod) {
gchar *buf;
@@ -422,20 +420,19 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
}
folder_chmod_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), folder_chmod_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), folder_chmod_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Folder color */
folder_color = gtk_label_new(_("Folder color"));
gtk_label_set_xalign(GTK_LABEL(folder_color), 0.0);
- gtk_table_attach(GTK_TABLE(table), folder_color, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), folder_color, 0, rowcount, 1, 1);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_table_attach(GTK_TABLE(table), hbox, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(hbox, TRUE);
+ gtk_widget_set_halign(hbox, GTK_ALIGN_FILL);
folder_color_btn = gtk_button_new_with_label("");
@@ -452,39 +449,34 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
gtkut_set_button_color(folder_color_btn, &item->prefs->color);
folder_color_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), folder_color_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), folder_color_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Enable processing at startup */
checkbtn_enable_processing =
gtk_check_button_new_with_label(_("Run Processing rules at start-up"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_enable_processing, 0, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_enable_processing, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_processing),
item->prefs->enable_processing);
enable_processing_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), enable_processing_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), enable_processing_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Enable processing rules when opening folder */
checkbtn_enable_processing_when_opening =
gtk_check_button_new_with_label(_("Run Processing rules when opening"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_enable_processing_when_opening, 0, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_enable_processing_when_opening, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_processing_when_opening),
item->prefs->enable_processing_when_opening);
enable_processing_when_opening_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), enable_processing_when_opening_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-
+ gtk_grid_attach(GTK_GRID(table), enable_processing_when_opening_rec_checkbtn, 2, rowcount, 1, 1);
+
rowcount++;
/* Check folder for new mail */
@@ -493,22 +485,19 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
_("Turn this option on if mail is delivered directly "
"to this folder by server side filtering on IMAP or "
"by an external application"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_newmailcheck, 0, 2,
- rowcount, rowcount+1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-
+ gtk_grid_attach(GTK_GRID(table), checkbtn_newmailcheck, 0, rowcount, 1, 1);
+
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_newmailcheck),
item->prefs->newmailcheck);
newmailcheck_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), newmailcheck_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), newmailcheck_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Select HTML part by default? */
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_show (hbox);
- gtk_table_attach (GTK_TABLE(table), hbox, 0, 2,
- rowcount, rowcount+1, GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox, 0, rowcount, 1, 1);
label = gtk_label_new(_("Select the HTML part of multipart messages"));
gtk_widget_show (label);
@@ -532,25 +521,23 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
promote_html_part_rec_checkbtn = gtk_check_button_new();
gtk_widget_show (promote_html_part_rec_checkbtn);
- gtk_table_attach(GTK_TABLE(table), promote_html_part_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), promote_html_part_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Synchronise folder for offline use */
checkbtn_offlinesync = gtk_check_button_new_with_label(_("Synchronise for offline use"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_offlinesync, 0, 2,
- rowcount, rowcount+1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_offlinesync, 0, rowcount, 1, 1);
offlinesync_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), offlinesync_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), offlinesync_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (hbox);
- gtk_table_attach(GTK_TABLE(table), hbox, 0, 3,
- rowcount, rowcount+1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox, 0, rowcount, 1, 1);
+ gtk_widget_set_hexpand(hbox, TRUE);
+ gtk_widget_set_halign(hbox, GTK_ALIGN_FILL);
rowcount++;
hbox_spc = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
@@ -577,8 +564,9 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (hbox2);
- gtk_table_attach(GTK_TABLE(table), hbox2, 0, 3,
- rowcount, rowcount+1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox2, 0, rowcount, 1, 1);
+ gtk_widget_set_hexpand(hbox2, TRUE);
+ gtk_widget_set_halign(hbox2, GTK_ALIGN_FILL);
rowcount++;
hbox_spc = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
@@ -592,8 +580,7 @@ static void prefs_folder_item_general_create_widget_func(PrefsPage * page_,
clean_cache_btn = gtk_button_new_with_label(_("Discard folder cache"));
gtk_widget_show (clean_cache_btn);
- gtk_table_attach(GTK_TABLE(table), clean_cache_btn, 0, 1,
- rowcount, rowcount+1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), clean_cache_btn, 0, rowcount, 1, 1);
g_signal_connect(G_OBJECT(clean_cache_btn), "clicked",
G_CALLBACK(clean_cache_cb),
page);
@@ -879,53 +866,44 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
#else
# define TABLEHEIGHT 6
#endif
- table = gtk_table_new(TABLEHEIGHT, 3, FALSE);
+ table = gtk_grid_new();
gtk_container_set_border_width (GTK_CONTAINER (table), VBOX_BORDER);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 4);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 4);
rowcount = 0;
if (!can_save) {
no_save_warning = prefs_folder_no_save_warning_create_widget();
- gtk_table_attach(GTK_TABLE(table), no_save_warning, 0, 3,
- rowcount, rowcount + 1, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), no_save_warning, 0, rowcount, 1, 1);
rowcount++;
}
/* Apply to subfolders */
label = gtk_label_new(_("Apply to\nsubfolders"));
- gtk_table_attach(GTK_TABLE(table), label, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 2, rowcount, 1, 1);
rowcount++;
if (item_protocol(item) != A_NNTP) {
/* Request Return Receipt */
checkbtn_request_return_receipt = gtk_check_button_new_with_label
(_("Request Return Receipt"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_request_return_receipt,
- 0, 2, rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL,
- GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_request_return_receipt, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_request_return_receipt),
item->ret_rcpt ? TRUE : FALSE);
request_return_receipt_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), request_return_receipt_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-
+ gtk_grid_attach(GTK_GRID(table), request_return_receipt_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Save Copy to Folder */
checkbtn_save_copy_to_folder = gtk_check_button_new_with_label
(_("Save copy of outgoing messages to this folder instead of Sent"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_save_copy_to_folder, 0, 2,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_save_copy_to_folder, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_save_copy_to_folder),
item->prefs->save_copy_to_folder ? TRUE : FALSE);
save_copy_to_folder_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), save_copy_to_folder_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
-
+ gtk_grid_attach(GTK_GRID(table), save_copy_to_folder_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Default To */
@@ -933,24 +911,23 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
"Default %s"));
text = g_strdup_printf(tr, prefs_common_translated_header_name("To:"));
checkbtn_default_to = gtk_check_button_new_with_label(text);
- gtk_table_attach(GTK_TABLE(table), checkbtn_default_to, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_default_to, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_to),
item->prefs->enable_default_to);
g_free(text);
g_free(tr);
entry_default_to = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_default_to, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_default_to, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_default_to, TRUE);
+ gtk_widget_set_halign(entry_default_to, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_default_to, entry_default_to);
gtk_entry_set_text(GTK_ENTRY(entry_default_to), SAFE_STRING(item->prefs->default_to));
address_completion_register_entry(GTK_ENTRY(entry_default_to),
TRUE);
default_to_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_to_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_to_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
@@ -959,24 +936,23 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
"Default %s for replies"));
text = g_strdup_printf(tr, prefs_common_translated_header_name("To:"));
checkbtn_default_reply_to = gtk_check_button_new_with_label(text);
- gtk_table_attach(GTK_TABLE(table), checkbtn_default_reply_to, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_default_reply_to, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_reply_to),
item->prefs->enable_default_reply_to);
g_free(text);
g_free(tr);
entry_default_reply_to = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_default_reply_to, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_default_reply_to, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_default_reply_to, TRUE);
+ gtk_widget_set_halign(entry_default_reply_to, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_default_reply_to, entry_default_reply_to);
gtk_entry_set_text(GTK_ENTRY(entry_default_reply_to), SAFE_STRING(item->prefs->default_reply_to));
address_completion_register_entry(
GTK_ENTRY(entry_default_reply_to), TRUE);
default_reply_to_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_reply_to_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_reply_to_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
@@ -985,24 +961,23 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
"Default %s"));
text = g_strdup_printf(tr, prefs_common_translated_header_name("Cc:"));
checkbtn_default_cc = gtk_check_button_new_with_label(text);
- gtk_table_attach(GTK_TABLE(table), checkbtn_default_cc, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_default_cc, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_cc),
item->prefs->enable_default_cc);
g_free(text);
g_free(tr);
entry_default_cc = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_default_cc, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_default_cc, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_default_cc, TRUE);
+ gtk_widget_set_halign(entry_default_cc, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_default_cc, entry_default_cc);
gtk_entry_set_text(GTK_ENTRY(entry_default_cc), SAFE_STRING(item->prefs->default_cc));
address_completion_register_entry(GTK_ENTRY(entry_default_cc),
TRUE);
default_cc_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_cc_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_cc_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
@@ -1011,24 +986,23 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
"Default %s"));
text = g_strdup_printf(tr, prefs_common_translated_header_name("Bcc:"));
checkbtn_default_bcc = gtk_check_button_new_with_label(text);
- gtk_table_attach(GTK_TABLE(table), checkbtn_default_bcc, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_default_bcc, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_bcc),
item->prefs->enable_default_bcc);
g_free(text);
g_free(tr);
entry_default_bcc = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_default_bcc, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_default_bcc, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_default_bcc, TRUE);
+ gtk_widget_set_halign(entry_default_bcc, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_default_bcc, entry_default_bcc);
gtk_entry_set_text(GTK_ENTRY(entry_default_bcc), SAFE_STRING(item->prefs->default_bcc));
address_completion_register_entry(GTK_ENTRY(entry_default_bcc),
TRUE);
default_bcc_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_bcc_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_bcc_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
@@ -1037,37 +1011,34 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
"Default %s"));
text = g_strdup_printf(tr, prefs_common_translated_header_name("Reply-To:"));
checkbtn_default_replyto = gtk_check_button_new_with_label(text);
- gtk_table_attach(GTK_TABLE(table), checkbtn_default_replyto, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_default_replyto, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_default_replyto),
item->prefs->enable_default_replyto);
g_free(text);
g_free(tr);
entry_default_replyto = gtk_entry_new();
- gtk_table_attach(GTK_TABLE(table), entry_default_replyto, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_default_replyto, 1, rowcount, 1, 1);
+ gtk_widget_set_hexpand(entry_default_replyto, TRUE);
+ gtk_widget_set_halign(entry_default_replyto, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY(checkbtn_default_replyto, entry_default_replyto);
gtk_entry_set_text(GTK_ENTRY(entry_default_replyto), SAFE_STRING(item->prefs->default_replyto));
address_completion_register_entry(GTK_ENTRY(entry_default_replyto),
TRUE);
default_replyto_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_replyto_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_replyto_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
}
/* Default account */
checkbtn_enable_default_account = gtk_check_button_new_with_label(_("Default account"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_enable_default_account, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_enable_default_account, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_default_account),
item->prefs->enable_default_account);
optmenu_default_account = gtkut_sc_combobox_create(NULL, FALSE);
- gtk_table_attach(GTK_TABLE(table), optmenu_default_account, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), optmenu_default_account, 1, rowcount, 1, 1);
optmenu_default_account_menu = GTK_LIST_STORE(
gtk_combo_box_get_model(GTK_COMBO_BOX(optmenu_default_account)));
@@ -1104,21 +1075,18 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
SET_TOGGLE_SENSITIVITY(checkbtn_enable_default_account, optmenu_default_account);
default_account_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_account_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_account_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
#if USE_ENCHANT
/* Default dictionary */
checkbtn_enable_default_dictionary = gtk_check_button_new_with_label(_("Default dictionary"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_enable_default_dictionary, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_enable_default_dictionary, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_default_dictionary),
item->prefs->enable_default_dictionary);
combo_default_dictionary = gtkaspell_dictionary_combo_new(TRUE);
- gtk_table_attach(GTK_TABLE(table), combo_default_dictionary, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), combo_default_dictionary, 1, rowcount, 1, 1);
dictionary = item->prefs->default_dictionary;
if (dictionary && strrchr(dictionary, '/')) {
@@ -1138,21 +1106,18 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
SET_TOGGLE_SENSITIVITY(checkbtn_enable_default_dictionary, combo_default_dictionary);
default_dictionary_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_dictionary_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_dictionary_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* Default alternate dictionary */
checkbtn_enable_default_alt_dictionary = gtk_check_button_new_with_label(_("Default alternate dictionary"));
- gtk_table_attach(GTK_TABLE(table), checkbtn_enable_default_alt_dictionary, 0, 1,
- rowcount, rowcount + 1, GTK_SHRINK | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), checkbtn_enable_default_alt_dictionary, 0, rowcount, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_enable_default_alt_dictionary),
item->prefs->enable_default_alt_dictionary);
combo_default_alt_dictionary = gtkaspell_dictionary_combo_new(FALSE);
- gtk_table_attach(GTK_TABLE(table), combo_default_alt_dictionary, 1, 2,
- rowcount, rowcount + 1, GTK_EXPAND | GTK_FILL, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), combo_default_alt_dictionary, 1, rowcount, 1, 1);
dictionary = item->prefs->default_alt_dictionary;
if (dictionary && strrchr(dictionary, '/')) {
@@ -1172,8 +1137,7 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
SET_TOGGLE_SENSITIVITY(checkbtn_enable_default_alt_dictionary, combo_default_alt_dictionary);
default_alt_dictionary_rec_checkbtn = gtk_check_button_new();
- gtk_table_attach(GTK_TABLE(table), default_alt_dictionary_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_alt_dictionary_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
#endif
@@ -1181,8 +1145,7 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
/* PGP sign? */
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_show (hbox);
- gtk_table_attach (GTK_TABLE(table), hbox, 0, 2,
- rowcount, rowcount+1, GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox, 0, rowcount, 1, 1);
label = gtk_label_new(_("Always sign messages"));
gtk_widget_show (label);
@@ -1205,16 +1168,14 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
always_sign_rec_checkbtn = gtk_check_button_new();
gtk_widget_show (always_sign_rec_checkbtn);
- gtk_table_attach(GTK_TABLE(table), always_sign_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), always_sign_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
/* PGP encrypt? */
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 2);
gtk_widget_show (hbox);
- gtk_table_attach (GTK_TABLE(table), hbox, 0, 2,
- rowcount, rowcount+1, GTK_FILL, GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox, 0, rowcount, 1, 1);
label = gtk_label_new(_("Always encrypt messages"));
gtk_widget_show (label);
@@ -1237,8 +1198,7 @@ static void prefs_folder_item_compose_create_widget_func(PrefsPage * page_,
always_encrypt_rec_checkbtn = gtk_check_button_new();
gtk_widget_show (always_encrypt_rec_checkbtn);
- gtk_table_attach(GTK_TABLE(table), always_encrypt_rec_checkbtn, 2, 3,
- rowcount, rowcount + 1, GTK_SHRINK, GTK_SHRINK, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), always_encrypt_rec_checkbtn, 2, rowcount, 1, 1);
rowcount++;
diff --git a/src/prefs_fonts.c b/src/prefs_fonts.c
index b9e5f44c2..a957b06a3 100644
--- a/src/prefs_fonts.c
+++ b/src/prefs_fonts.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2003-2018 Hiroyuki Yamamoto & The Claws Mail Team
+ * Copyright (C) 2003-2019 the Claws Mail Team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -68,20 +68,18 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
GtkWidget *vbox;
gint row = 0;
- table = gtk_table_new(10, 2, FALSE);
+ table = gtk_grid_new();
gtk_widget_show(table);
gtk_container_set_border_width(GTK_CONTAINER(table), VBOX_BORDER);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
/* normal font label */
tmplabel = gtk_label_new (_("Folder and Message Lists"));
gtk_widget_show (tmplabel);
- gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, row, row+1,
- (GtkAttachOptions) GTK_FILL,
- (GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify(GTK_LABEL(tmplabel), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(tmplabel), 1.0);
+ gtk_grid_attach(GTK_GRID(table), tmplabel, 0, row, 1, 1);
/* normal font button */
entry_folderview_normalfont = gtk_font_button_new_with_font (prefs_common.normalfont);
@@ -89,19 +87,17 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
"use-font", TRUE,
NULL);
gtk_widget_show (entry_folderview_normalfont);
- gtk_table_attach (GTK_TABLE (table), entry_folderview_normalfont, 1, 2, row, row+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_folderview_normalfont, 1, row, 1, 1);
+ gtk_widget_set_hexpand(entry_folderview_normalfont, TRUE);
+ gtk_widget_set_halign(entry_folderview_normalfont, GTK_ALIGN_FILL);
row++;
/* message font label */
tmplabel = gtk_label_new (_("Message"));
gtk_widget_show (tmplabel);
- gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, row, row+1,
- (GtkAttachOptions) GTK_FILL,
- (GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify(GTK_LABEL(tmplabel), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(tmplabel), 1.0);
+ gtk_grid_attach(GTK_GRID(table), tmplabel, 0, row, 1, 1);
/* message font button */
entry_messageviewfont = gtk_font_button_new_with_font (prefs_common.textfont);
@@ -109,24 +105,20 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
"use-font", TRUE,
NULL);
gtk_widget_show (entry_messageviewfont);
- gtk_table_attach (GTK_TABLE (table), entry_messageviewfont, 1, 2, row, row+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_messageviewfont, 1, row, 1, 1);
+ gtk_widget_set_hexpand(entry_messageviewfont, TRUE);
+ gtk_widget_set_halign(entry_messageviewfont, GTK_ALIGN_FILL);
row++;
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, VSPACING_NARROW);
gtk_widget_show(vbox);
- gtk_table_attach (GTK_TABLE (table), vbox, 0, 4, row, row+1,
- (GtkAttachOptions) GTK_FILL,
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), vbox, 0, row, 1, 1);
row++;
/* derive from normal font check button */
derive_from_normalfont_checkbutton = gtk_check_button_new_with_label(_("Derive small and bold fonts from Folder and Message Lists font"));
gtk_widget_show(derive_from_normalfont_checkbutton);
- gtk_table_attach (GTK_TABLE (table), derive_from_normalfont_checkbutton, 0, 2, row, row+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), derive_from_normalfont_checkbutton, 0, row, 2, 1);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(derive_from_normalfont_checkbutton),
prefs_common.derive_from_normal_font);
row++;
@@ -134,9 +126,7 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
/* small font label */
tmplabel = gtk_label_new (_("Small"));
gtk_widget_show (tmplabel);
- gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, row, row+1,
- (GtkAttachOptions) GTK_FILL,
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), tmplabel, 0, row, 1, 1);
gtk_label_set_justify(GTK_LABEL(tmplabel), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(tmplabel), 1.0);
SET_TOGGLE_SENSITIVITY_REVERSE (derive_from_normalfont_checkbutton, tmplabel);
@@ -147,20 +137,18 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
"use-font", TRUE,
NULL);
gtk_widget_show (entry_folderview_smallfont);
- gtk_table_attach (GTK_TABLE (table), entry_folderview_smallfont, 1, 2, row, row+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_folderview_smallfont, 1, row, 1, 1);
+ gtk_widget_set_hexpand(entry_folderview_smallfont, TRUE);
+ gtk_widget_set_halign(entry_folderview_smallfont, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY_REVERSE (derive_from_normalfont_checkbutton, entry_folderview_smallfont);
row++;
/* bold font label */
tmplabel = gtk_label_new (_("Bold"));
gtk_widget_show (tmplabel);
- gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, row, row+1,
- (GtkAttachOptions) GTK_FILL,
- (GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify(GTK_LABEL(tmplabel), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(tmplabel), 1.0);
+ gtk_grid_attach(GTK_GRID(table), tmplabel, 0, row, 1, 1);
SET_TOGGLE_SENSITIVITY_REVERSE (derive_from_normalfont_checkbutton, tmplabel);
/* bold font button */
@@ -169,18 +157,16 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
"use-font", TRUE,
NULL);
gtk_widget_show (entry_folderview_boldfont);
- gtk_table_attach (GTK_TABLE (table), entry_folderview_boldfont, 1, 2, row, row+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_folderview_boldfont, 1, row, 1, 1);
+ gtk_widget_set_hexpand(entry_folderview_boldfont, TRUE);
+ gtk_widget_set_halign(entry_folderview_boldfont, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY_REVERSE (derive_from_normalfont_checkbutton, entry_folderview_boldfont);
row++;
/* print check button */
print_checkbutton = gtk_check_button_new_with_label(_("Use different font for printing"));
gtk_widget_show(print_checkbutton);
- gtk_table_attach (GTK_TABLE (table), print_checkbutton, 0, 2, row, row+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), print_checkbutton, 0, row, 2, 1);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(print_checkbutton),
prefs_common.use_different_print_font);
row++;
@@ -188,11 +174,9 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
/* print font label */
tmplabel = gtk_label_new (_("Message Printing"));
gtk_widget_show (tmplabel);
- gtk_table_attach (GTK_TABLE (table), tmplabel, 0, 1, row, row+1,
- (GtkAttachOptions) GTK_FILL,
- (GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify(GTK_LABEL(tmplabel), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(tmplabel), 1.0);
+ gtk_grid_attach(GTK_GRID(table), tmplabel, 0, row, 1, 1);
SET_TOGGLE_SENSITIVITY (print_checkbutton, tmplabel);
/* print font button */
@@ -201,9 +185,9 @@ static void prefs_fonts_create_widget(PrefsPage *_page, GtkWindow *window,
"use-font", TRUE,
NULL);
gtk_widget_show (entry_messageprintfont);
- gtk_table_attach (GTK_TABLE (table), entry_messageprintfont, 1, 2, row, row+1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), entry_messageprintfont, 1, row, 1, 1);
+ gtk_widget_set_hexpand(entry_messageprintfont, TRUE);
+ gtk_widget_set_halign(entry_messageprintfont, GTK_ALIGN_FILL);
SET_TOGGLE_SENSITIVITY (print_checkbutton, entry_messageprintfont);
row++;
diff --git a/src/prefs_image_viewer.c b/src/prefs_image_viewer.c
index 0edf109d8..165ededa9 100644
--- a/src/prefs_image_viewer.c
+++ b/src/prefs_image_viewer.c
@@ -1,6 +1,6 @@
/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2012 Hiroyuki Yamamoto and the Claws Mail Team
+ * Copyright (C) 1999-2019 the Claws Mail Team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -60,37 +60,29 @@ static void imageviewer_create_widget_func(PrefsPage * _page,
GtkWidget *inline_img;
GtkWidget *print_imgs;
- table = gtk_table_new(4, 1, FALSE);
+ table = gtk_grid_new();
gtk_widget_show(table);
gtk_container_set_border_width(GTK_CONTAINER(table), VBOX_BORDER);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
autoload_img = gtk_check_button_new_with_label(_("Automatically display attached images"));
gtk_widget_show(autoload_img);
- gtk_table_attach(GTK_TABLE(table), autoload_img, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), autoload_img, 0, 0, 1, 1);
resize_img = gtk_check_button_new_with_label(_("Resize attached images by default"));
gtk_widget_show(resize_img);
CLAWS_SET_TIP(resize_img,
_("Clicking image toggles scaling"));
- gtk_table_attach(GTK_TABLE(table), resize_img, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), resize_img, 0, 1, 1, 1);
inline_img = gtk_check_button_new_with_label(_("Display images inline"));
gtk_widget_show(inline_img);
- gtk_table_attach(GTK_TABLE(table), inline_img, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), inline_img, 0, 2, 1, 1);
print_imgs = gtk_check_button_new_with_label(_("Print images"));
gtk_widget_show(print_imgs);
- gtk_table_attach(GTK_TABLE(table), print_imgs, 0, 1, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), print_imgs, 0, 3, 1, 1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(resize_img), prefs_common.resize_img);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(autoload_img), prefs_common.display_img);
diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 07e890825..fa15e23c6 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -596,24 +596,26 @@ static void prefs_matcher_create(void)
gtk_frame_set_label_align(GTK_FRAME(frame), 0.01, 0.5);
gtk_box_pack_start(GTK_BOX(vbox1), frame, FALSE, FALSE, 0);
- table = gtk_table_new(3, 3, FALSE);
+ table = gtk_grid_new();
gtk_container_add(GTK_CONTAINER(frame), table);
- gtk_widget_set_size_request(frame, -1, -1);
+// gtk_widget_set_size_request(frame, -1, -1);
upper_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, HSPACING_NARROW);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start(GTK_BOX(hbox), upper_hbox, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(""), TRUE, TRUE, 0);
- gtk_table_attach(GTK_TABLE(table), hbox, 2, 3, 0, 1,
- GTK_FILL, GTK_SHRINK, 2, 2);
+ gtk_grid_attach(GTK_GRID(table), hbox, 2, 0, 1, 1);
+ gtk_widget_set_hexpand(hbox, TRUE);
+ gtk_widget_set_halign(hbox, GTK_ALIGN_FILL);
lower_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, HSPACING_NARROW);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start(GTK_BOX(hbox), lower_hbox, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox), gtk_label_new(""), TRUE, TRUE, 0);
- gtk_table_attach(GTK_TABLE(table), hbox, 2, 3, 1, 2,
- GTK_FILL, GTK_SHRINK, 2, 2);
-
+ gtk_grid_attach(GTK_GRID(table), hbox, 2, 1, 1, 1);
+ gtk_widget_set_hexpand(hbox, TRUE);
+ gtk_widget_set_halign(hbox, GTK_ALIGN_FILL);
+
size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
gtk_size_group_add_widget(size_group, upper_hbox);
gtk_size_group_add_widget(size_group, lower_hbox);
@@ -622,8 +624,7 @@ static void prefs_matcher_create(void)
criteria_label = gtk_label_new(_("Match criteria"));
gtk_label_set_xalign(GTK_LABEL(criteria_label), 1.0);
gtk_widget_set_size_request(criteria_label, -1, -1);
- gtk_table_attach(GTK_TABLE(table), criteria_label, 0, 1, 0, 1,
- GTK_FILL, GTK_SHRINK, 2, 2);
+ gtk_grid_attach(GTK_GRID(table), criteria_label, 0, 0, 1, 1);
criteria_combo = gtkut_sc_combobox_create(NULL, FALSE);
store = GTK_LIST_STORE(gtk_combo_box_get_model(
@@ -645,8 +646,7 @@ static void prefs_matcher_create(void)
gtk_widget_set_size_request(criteria_combo, 150, -1);
gtk_combo_box_set_active(GTK_COMBO_BOX(criteria_combo), MATCH_ALL);
- gtk_table_attach(GTK_TABLE(table), criteria_combo, 1, 2, 0, 1,
- GTK_FILL, GTK_SHRINK, 2, 2);
+ gtk_grid_attach(GTK_GRID(table), criteria_combo, 1, 0, 1, 1);
g_signal_connect(G_OBJECT(criteria_combo), "changed",
G_CALLBACK(prefs_matcher_criteria_select),
NULL);
@@ -696,12 +696,12 @@ static void prefs_matcher_create(void)
#endif
match_label = gtk_label_new("");
gtk_label_set_xalign(GTK_LABEL(match_label), 1.0);
- gtk_table_attach(GTK_TABLE(table), match_label, 0, 1, 1, 2,
- GTK_FILL, GTK_SHRINK, 2, 2);
+ gtk_grid_attach(GTK_GRID(table), match_label, 0, 1, 1, 1);
match_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
- gtk_table_attach(GTK_TABLE(table), match_hbox, 1, 2, 1, 2,
- GTK_FILL, GTK_SHRINK, 2, 2);
+ gtk_grid_attach(GTK_GRID(table), match_hbox, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(match_hbox, TRUE);
+ gtk_widget_set_halign(match_hbox, GTK_ALIGN_FILL);
match_combo = gtkut_sc_combobox_create(NULL, TRUE);
gtk_box_pack_start(GTK_BOX(match_hbox), match_combo, TRUE, TRUE, 0);
@@ -750,8 +750,9 @@ static void prefs_matcher_create(void)
gtk_box_pack_start(GTK_BOX(hbox), vbox, TRUE, TRUE, 0);
gtk_box_pack_end(GTK_BOX(hbox), gtk_label_new(""), TRUE, TRUE, 0);
- gtk_table_attach(GTK_TABLE(table), hbox, 2, 3, 2, 3,
- GTK_FILL, GTK_SHRINK, 4, 0);
+ gtk_grid_attach(GTK_GRID(table), hbox, 2, 2, 1, 1);
+ gtk_widget_set_hexpand(hbox, TRUE);
+ gtk_widget_set_halign(hbox, GTK_ALIGN_FILL);
/* Date widgets */
date_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, VSPACING_NARROW);
diff --git a/src/prefs_proxy.c b/src/prefs_proxy.c
index 53caec2a5..311b2d6c5 100644
--- a/src/prefs_proxy.c
+++ b/src/prefs_proxy.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2018 the Claws Mail team
+ * Copyright (C) 2018-2019 the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -114,40 +114,34 @@ static void prefs_proxy_create_widget(PrefsPage *_page, GtkWindow *window,
PACK_CHECK_BUTTON(vbox2, proxy_auth_checkbtn, _("Use authentication"));
- table = gtk_table_new(2, 4, FALSE);
+ table = gtk_grid_new();
- gtk_table_set_row_spacings(GTK_TABLE(table), VSPACING_NARROW);
- gtk_table_set_col_spacings(GTK_TABLE(table), 9);
+ gtk_grid_set_row_spacing(GTK_GRID(table), VSPACING_NARROW);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 9);
gtk_box_pack_start(GTK_BOX(vbox2), table, FALSE, FALSE, 0);
label = gtk_label_new(_("Username"));
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- GTK_SHRINK | GTK_FILL,
- GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 1);
proxy_name_entry = gtk_entry_new();
gtk_widget_set_size_request(proxy_name_entry, DEFAULT_ENTRY_WIDTH, -1);
- gtk_table_attach(GTK_TABLE(table), proxy_name_entry, 1, 2, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), proxy_name_entry, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(proxy_name_entry, TRUE);
+ gtk_widget_set_halign(proxy_name_entry, GTK_ALIGN_FILL);
label = gtk_label_new(_("Password"));
- gtk_table_attach(GTK_TABLE(table), label, 2, 3, 0, 1,
- GTK_SHRINK | GTK_FILL,
- GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 2, 0, 1, 1);
proxy_pass_entry = gtk_entry_new();
gtk_widget_set_size_request(proxy_pass_entry, DEFAULT_ENTRY_WIDTH, -1);
gtk_entry_set_visibility(GTK_ENTRY(proxy_pass_entry), FALSE);
- gtk_table_attach(GTK_TABLE(table), proxy_pass_entry, 3, 4, 0, 1,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL,
- GTK_EXPAND | GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), proxy_pass_entry, 3, 0, 1, 1);
+ gtk_widget_set_hexpand(proxy_pass_entry, TRUE);
+ gtk_widget_set_halign(proxy_pass_entry, GTK_ALIGN_FILL);
button = gtk_check_button_new_with_label(_("Show password"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button), FALSE);
- gtk_table_attach(GTK_TABLE(table), button, 3, 4, 1, 2,
- GTK_SHRINK | GTK_FILL,
- GTK_SHRINK | GTK_FILL, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), button, 3, 1, 1, 1);
g_signal_connect(G_OBJECT(button), "toggled",
G_CALLBACK(showpwd_checkbtn_toggled), proxy_pass_entry);
diff --git a/src/prefs_send.c b/src/prefs_send.c
index ff50f3a54..7ae2df395 100644
--- a/src/prefs_send.c
+++ b/src/prefs_send.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2005-2016 Colin Leroy & The Claws Mail Team
+ * Copyright (C) 2005-2019 Colin Leroy & The Claws Mail Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -179,11 +179,11 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
_("Never send Return Receipts"));
/* encoding table */
- table = gtk_table_new(2, 2, FALSE);
+ table = gtk_grid_new();
gtk_widget_show(table);
gtk_container_add (GTK_CONTAINER (vbox2), table);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
PACK_FRAME (vbox1, frame, _("Messages"))
gtk_container_set_border_width(GTK_CONTAINER(vbox2), 8);
@@ -224,11 +224,9 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
/* populate table within encoding sub-frame */
label_outcharset = gtk_label_new (_("Outgoing encoding"));
gtk_widget_show (label_outcharset);
- gtk_table_attach(GTK_TABLE(table), label_outcharset, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify(GTK_LABEL(label_outcharset), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(label_outcharset), 1.0);
+ gtk_grid_attach(GTK_GRID(table), label_outcharset, 0, 1, 1, 1);
optmenu = gtk_list_store_new(2,
G_TYPE_STRING, /* Menu label */
@@ -249,9 +247,7 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
CLAWS_SET_TIP(combobox_charset,
_("If 'Automatic' is selected, the optimal encoding"
" for the current locale will be used"));
- gtk_table_attach(GTK_TABLE(table), combobox_charset, 1, 2, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), combobox_charset, 1, 1, 1, 1);
#define SET_MENUITEM(str, data) \
{ \
@@ -315,20 +311,16 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
label_encoding = gtk_label_new (_("Transfer encoding"));
gtk_widget_show (label_encoding);
- gtk_table_attach(GTK_TABLE(table), label_encoding, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
gtk_label_set_justify(GTK_LABEL(label_encoding), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(label_encoding), 1.0);
+ gtk_grid_attach(GTK_GRID(table), label_encoding, 0, 2, 1, 1);
combobox_encoding = gtkut_sc_combobox_create(NULL, FALSE);
gtk_widget_show (combobox_encoding);
CLAWS_SET_TIP(combobox_encoding,
_("Specify Content-Transfer-Encoding used when"
" message body contains non-ASCII characters"));
- gtk_table_attach(GTK_TABLE(table), combobox_encoding, 1, 2, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), combobox_encoding, 1, 2, 1, 1);
optmenu = GTK_LIST_STORE(gtk_combo_box_get_model(
GTK_COMBO_BOX(combobox_encoding)));
diff --git a/src/prefs_spelling.c b/src/prefs_spelling.c
index 1815c738c..161e9d225 100644
--- a/src/prefs_spelling.c
+++ b/src/prefs_spelling.c
@@ -1,6 +1,6 @@
/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2002-2017 Hiroyuki Yamamoto & the Claws Mail team
+ * Copyright (C) 2002-2019 the Claws Mail team and Hiroyuki Yamamoto
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -151,51 +151,43 @@ static void prefs_spelling_create_widget(PrefsPage *_page, GtkWindow *window, gp
vbox2 = gtkut_get_options_frame(vbox1, &dictionary_frame, _("Dictionary"));
- table = gtk_table_new(6, 4, FALSE);
+ table = gtk_grid_new();
gtk_widget_show(table);
gtk_container_set_border_width(GTK_CONTAINER(table), 0);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
gtk_box_pack_start(GTK_BOX(vbox2), table, TRUE, TRUE, 0);
default_dict_label = gtk_label_new(_("Default dictionary"));
gtk_widget_show(default_dict_label);
- gtk_table_attach(GTK_TABLE (table), default_dict_label, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 2);
gtk_label_set_justify(GTK_LABEL(default_dict_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(default_dict_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table), default_dict_label, 0, 0, 1, 1);
default_dict_combo = gtkaspell_dictionary_combo_new(TRUE);
- gtk_table_attach (GTK_TABLE (table), default_dict_combo, 1, 2, 0, 1,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_dict_combo, 1, 0, 1, 1);
default_alt_dict_label = gtk_label_new(_("Default alternate dictionary"));
gtk_widget_show(default_alt_dict_label);
- gtk_table_attach(GTK_TABLE (table), default_alt_dict_label, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 2);
gtk_label_set_justify(GTK_LABEL(default_alt_dict_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign(GTK_LABEL(default_alt_dict_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table), default_alt_dict_label, 0, 1, 1, 1);
default_alt_dict_combo = gtkaspell_dictionary_combo_new(FALSE);
- gtk_table_attach (GTK_TABLE (table), default_alt_dict_combo, 1, 2, 1, 2,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), default_alt_dict_combo, 1, 1, 1, 1);
both_dict_check = gtk_check_button_new_with_label(
_("Check with both dictionaries"));
gtk_widget_show(both_dict_check);
- gtk_table_attach (GTK_TABLE (table), both_dict_check, 1, 2, 2, 3,
- GTK_EXPAND | GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), both_dict_check, 1, 2, 1, 1);
#ifdef WIN32
get_dictionaries_btn = gtkut_get_link_btn(GTK_WIDGET(window),
DICTS_URI, _("Get more dictionaries..."));
gtk_widget_show(get_dictionaries_btn);
- gtk_table_attach (GTK_TABLE (table), get_dictionaries_btn, 1, 2, 3, 4,
- GTK_SHRINK, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), get_dictionaries_btn, 1, 3, 1, 1);
#endif
misspelled_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 10);
gtk_widget_show(misspelled_hbox);
diff --git a/src/prefs_summaries.c b/src/prefs_summaries.c
index 45bcc9560..a35f0cdf7 100644
--- a/src/prefs_summaries.c
+++ b/src/prefs_summaries.c
@@ -246,24 +246,24 @@ static GtkWidget *date_format_create(GtkButton *button, void *data)
G_CALLBACK(date_format_select_row),
datefmt_win);
- table = gtk_table_new(2, 2, FALSE);
+ table = gtk_grid_new();
gtk_widget_show(table);
gtk_box_pack_start(GTK_BOX(vbox1), table, FALSE, FALSE, 0);
- gtk_table_set_row_spacings(GTK_TABLE(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
label1 = gtk_label_new(_("Date format"));
gtk_widget_show(label1);
- gtk_table_attach(GTK_TABLE(table), label1, 0, 1, 0, 1,
- GTK_FILL, 0, 0, 0);
gtk_label_set_justify(GTK_LABEL(label1), GTK_JUSTIFY_LEFT);
gtk_label_set_xalign(GTK_LABEL(label1), 0.0);
+ gtk_grid_attach(GTK_GRID(table), label1, 0, 0, 1, 1);
datefmt_entry = gtk_entry_new();
gtk_entry_set_max_length(GTK_ENTRY(datefmt_entry), 256);
gtk_widget_show(datefmt_entry);
- gtk_table_attach(GTK_TABLE(table), datefmt_entry, 1, 2, 0, 1,
- (GTK_EXPAND | GTK_FILL), 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), datefmt_entry, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(datefmt_entry, TRUE);
+ gtk_widget_set_halign(datefmt_entry, GTK_ALIGN_FILL);
/* we need the "sample" entry box; add it as data so callbacks can
* get the entry box */
@@ -272,17 +272,17 @@ static GtkWidget *date_format_create(GtkButton *button, void *data)
label2 = gtk_label_new(_("Example"));
gtk_widget_show(label2);
- gtk_table_attach(GTK_TABLE(table), label2, 0, 1, 1, 2,
- GTK_FILL, 0, 0, 0);
gtk_label_set_justify(GTK_LABEL(label2), GTK_JUSTIFY_LEFT);
gtk_label_set_xalign(GTK_LABEL(label2), 0.0);
+ gtk_grid_attach(GTK_GRID(table), label2, 0, 1, 1, 1);
label3 = gtk_label_new("");
gtk_widget_show(label3);
- gtk_table_attach(GTK_TABLE(table), label3, 1, 2, 1, 2,
- (GTK_EXPAND | GTK_FILL), 0, 0, 0);
gtk_label_set_justify(GTK_LABEL(label3), GTK_JUSTIFY_LEFT);
gtk_label_set_xalign(GTK_LABEL(label3), 0.0);
+ gtk_grid_attach(GTK_GRID(table), label3, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(label3, TRUE);
+ gtk_widget_set_halign(label3, GTK_ALIGN_FILL);
gtkut_stock_button_set_create(&confirm_area, &cancel_btn, _("_Cancel"),
&ok_btn, _("_OK"), NULL, NULL);
diff --git a/src/prefs_template.c b/src/prefs_template.c
index 7f0b0db03..384bd39b7 100644
--- a/src/prefs_template.c
+++ b/src/prefs_template.c
@@ -219,12 +219,12 @@ static void prefs_template_window_create(void)
gtk_container_set_border_width(GTK_CONTAINER(vbox1), 8);
gtk_paned_pack1(GTK_PANED(vpaned), vbox1, FALSE, FALSE);
- table = gtk_table_new(5, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), VSPACING_NARROW_2);
- gtk_table_set_col_spacings (GTK_TABLE (table), 4);
+ table = gtk_grid_new();
gtk_widget_show(table);
- gtk_box_pack_start (GTK_BOX (vbox1), table, FALSE, FALSE, 0);
+ gtk_grid_set_row_spacing(GTK_GRID(table), VSPACING_NARROW_2);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 4);
+ gtk_box_pack_start (GTK_BOX (vbox1), table, FALSE, FALSE, 0);
for (i=0; widgets_table[i].label; i++) {
@@ -234,16 +234,14 @@ static void prefs_template_window_create(void)
prefs_common_translated_header_name(widgets_table[i].label) :
widgets_table[i].label);
gtk_widget_show(label);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, i, (i + 1),
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) 0, 0, 0);
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
-
+ gtk_grid_attach(GTK_GRID(table), label, 0, i, 1, 1);
+
*(widgets_table[i].entry) = gtk_entry_new();
gtk_widget_show(*(widgets_table[i].entry));
- gtk_table_attach(GTK_TABLE(table), *(widgets_table[i].entry), 1, 2, i, (i + 1),
- (GtkAttachOptions) (GTK_EXPAND|GTK_SHRINK|GTK_FILL),
- (GtkAttachOptions) 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), *(widgets_table[i].entry), 1, i, 1, 1);
+ gtk_widget_set_hexpand(*(widgets_table[i].entry), TRUE);
+ gtk_widget_set_halign(*(widgets_table[i].entry), GTK_ALIGN_FILL);
CLAWS_SET_TIP(*(widgets_table[i].entry),
widgets_table[i].tooltips);
}
@@ -271,9 +269,9 @@ static void prefs_template_window_create(void)
}
gtk_widget_show(text_value);
#ifndef GENERIC_UMPC
- gtk_widget_set_size_request(text_value, -1, 120);
+ gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(scroll2), 120);
#else
- gtk_widget_set_size_request(text_value, -1, 60);
+ gtk_scrolled_window_set_min_content_height(GTK_SCROLLED_WINDOW(scroll2), 60);
#endif
gtk_container_add(GTK_CONTAINER(scroll2), text_value);
gtk_text_view_set_editable(GTK_TEXT_VIEW(text_value), TRUE);
diff --git a/src/prefs_themes.c b/src/prefs_themes.c
index 6b94e33df..4f2cf7de6 100644
--- a/src/prefs_themes.c
+++ b/src/prefs_themes.c
@@ -983,68 +983,62 @@ static void prefs_themes_create_widget(PrefsPage *page, GtkWindow *window, gpoin
PACK_FRAME(vbox1, frame_info, _("Information"));
- table1 = gtk_table_new (4, 2, FALSE);
+ table1 = gtk_grid_new();
gtk_widget_show (table1);
gtk_container_add (GTK_CONTAINER (frame_info), table1);
gtk_container_set_border_width (GTK_CONTAINER (table1), 5);
+ gtk_grid_set_row_spacing(GTK_GRID(table1), 4);
+ gtk_grid_set_column_spacing(GTK_GRID(table1), 8);
label1 = gtk_label_new (_("Name"));
gtk_widget_show (label1);
- gtk_table_attach (GTK_TABLE (table1), label1, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 5, 4);
gtk_label_set_justify (GTK_LABEL (label1), GTK_JUSTIFY_LEFT);
gtk_label_set_xalign (GTK_LABEL (label1), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), label1, 0, 0, 1, 1);
label2 = gtk_label_new (_("Author"));
gtk_widget_show (label2);
- gtk_table_attach (GTK_TABLE (table1), label2, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 5, 4);
gtk_label_set_justify (GTK_LABEL (label2), GTK_JUSTIFY_LEFT);
gtk_label_set_xalign (GTK_LABEL (label2), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), label2, 0, 1, 1, 1);
label3 = gtk_label_new (_("URL"));
gtk_widget_show (label3);
- gtk_table_attach (GTK_TABLE (table1), label3, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 5, 4);
gtk_label_set_xalign (GTK_LABEL (label3), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), label3, 0, 2, 1, 1);
label_name = gtk_label_new ("");
gtk_widget_show (label_name);
- gtk_table_attach (GTK_TABLE (table1), label_name, 1, 2, 0, 1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 5, 0);
gtk_label_set_xalign (GTK_LABEL (label_name), 0.0);
+ gtk_grid_attach(GTK_GRID(table1), label_name, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(label_name, TRUE);
+ gtk_widget_set_halign(label_name, GTK_ALIGN_FILL);
label_author = gtk_label_new ("");
gtk_widget_show (label_author);
- gtk_table_attach (GTK_TABLE (table1), label_author, 1, 2, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 5, 0);
gtk_label_set_xalign (GTK_LABEL (label_author), 0.0);
+ gtk_grid_attach(GTK_GRID(table1), label_author, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(label_author, TRUE);
+ gtk_widget_set_halign(label_author, GTK_ALIGN_FILL);
label_url = gtk_label_new ("");
gtk_widget_show (label_url);
- gtk_table_attach (GTK_TABLE (table1), label_url, 1, 2, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 5, 0);
gtk_label_set_xalign (GTK_LABEL (label_url), 0.0);
+ gtk_grid_attach(GTK_GRID(table1), label_url, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(label_url, TRUE);
+ gtk_widget_set_halign(label_url, GTK_ALIGN_FILL);
label4 = gtk_label_new (_("Status"));
gtk_widget_show (label4);
- gtk_table_attach (GTK_TABLE (table1), label4, 0, 1, 3, 4,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 5, 4);
gtk_label_set_xalign (GTK_LABEL (label4), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), label4, 0, 3, 1, 1);
label_status = gtk_label_new ("");
gtk_widget_show (label_status);
- gtk_table_attach (GTK_TABLE (table1), label_status, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 5, 0);
gtk_label_set_xalign (GTK_LABEL (label_status), 0.0);
+ gtk_grid_attach(GTK_GRID(table1), label_status, 1, 3, 1, 1);
+ gtk_widget_set_hexpand(label_status, TRUE);
+ gtk_widget_set_halign(label_status, GTK_ALIGN_FILL);
PACK_FRAME(vbox1, frame_preview, _("Preview"));
diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c
index f710e8212..0f491cf0c 100644
--- a/src/prefs_toolbar.c
+++ b/src/prefs_toolbar.c
@@ -901,20 +901,19 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar)
gtk_widget_show(toolbar_item_hbox);
gtk_container_add(GTK_CONTAINER (vbox_frame), toolbar_item_hbox);
- table = gtk_table_new (3, 3, FALSE);
+ table = gtk_grid_new();
+ gtk_container_set_border_width (GTK_CONTAINER (table), 8);
+ gtk_grid_set_row_spacing(GTK_GRID(table), 8);
+ gtk_grid_set_column_spacing(GTK_GRID(table), 8);
+
gtk_box_pack_start(GTK_BOX(toolbar_item_hbox), table,
TRUE, TRUE, 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);
/* toolbar item type */
label = gtk_label_new(_("Item type"));
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
gtk_widget_show(label);
- gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 0, 0, 1, 1);
item_type_combo = gtkut_sc_combobox_create(NULL, TRUE);
item_type_model = GTK_LIST_STORE(gtk_combo_box_get_model(
@@ -924,49 +923,37 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar)
COMBOBOX_ADD(item_type_model, _("Plugins"), ITEM_PLUGIN);
COMBOBOX_ADD(item_type_model, _("Separator"), ITEM_SEPARATOR);
gtk_widget_set_size_request(item_type_combo, 200, -1);
- gtk_table_attach(GTK_TABLE(table), item_type_combo, 1, 3, 0, 1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), item_type_combo, 1, 0, 1, 1);
/* available actions */
label = gtk_label_new(_("Event executed on click"));
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label, 0, 1, 1, 1);
item_action_combo = gtk_combo_box_text_new();
gtk_widget_set_size_request(item_action_combo, 200, -1);
- gtk_table_attach (GTK_TABLE (table), item_action_combo, 1, 3, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), item_action_combo, 1, 1, 1, 1);
/* available internal functions */
item_func_combo = gtk_combo_box_text_new();
gtk_widget_set_size_request(item_func_combo, 200, -1);
- gtk_table_attach (GTK_TABLE (table), item_func_combo, 1, 3, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), item_func_combo, 1, 1, 1, 1);
/* plugin-registered items */
item_plugin_combo = gtk_combo_box_text_new();
gtk_widget_set_size_request(item_plugin_combo, 200, -1);
- gtk_table_attach(GTK_TABLE(table), item_plugin_combo, 1, 3, 1, 2,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), item_plugin_combo, 1, 1, 1, 1);
/* toolbar item description */
label_icon_text = gtk_label_new(_("Toolbar text"));
gtk_label_set_xalign(GTK_LABEL(label_icon_text), 0.0);
gtk_widget_show (label_icon_text);
- gtk_table_attach (GTK_TABLE (table), label_icon_text, 0, 1, 2, 3,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), label_icon_text, 0, 2, 1, 1);
item_text_entry = gtk_entry_new();
- gtk_table_attach (GTK_TABLE (table), item_text_entry, 1, 3, 2, 3,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
+ gtk_grid_attach(GTK_GRID(table), item_text_entry, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(item_text_entry, TRUE);
+ gtk_widget_set_halign(item_text_entry, GTK_ALIGN_FILL);
icon_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, VBOX_BORDER);
gtk_widget_show(icon_vbox);
@@ -1046,11 +1033,12 @@ static void prefs_toolbar_create(ToolbarPage *prefs_toolbar)
scrolledwindow_list_view_set = gtk_scrolled_window_new(NULL, NULL);
gtk_box_pack_start(GTK_BOX(hbox_bottom), scrolledwindow_list_view_set, TRUE, TRUE, 0);
- gtk_container_set_border_width(GTK_CONTAINER(scrolledwindow_list_view_set), 8);
+ gtk_container_set_border_width(GTK_CONTAINER(scrolledwindow_list_view_set), 8);
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwindow_list_view_set),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwindow_list_view_set),
GTK_SHADOW_IN);
+ gtk_scrolled_window_set_propagate_natural_height(GTK_SCROLLED_WINDOW(scrolledwindow_list_view_set), TRUE);
list_view_set = create_set_list_view(prefs_toolbar);
gtk_widget_show(list_view_set);
@@ -1705,6 +1693,7 @@ static void icon_chooser_create(GtkButton *button, ToolbarPage *prefs_toolbar)
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrollwin),
GTK_SHADOW_OUT);
+ gtk_scrolled_window_set_propagate_natural_height(GTK_SCROLLED_WINDOW(scrollwin), TRUE);
icon_view = gtk_icon_view_new_with_model(GTK_TREE_MODEL(store));
gtk_icon_view_set_selection_mode(GTK_ICON_VIEW(icon_view), GTK_SELECTION_SINGLE);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list