[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-877-g8972aaf3c
paul at claws-mail.org
paul at claws-mail.org
Mon Dec 2 11:18:11 CET 2019
The branch, gtk3 has been updated
via 8972aaf3cf00a0cdba7cbd0af1f94c50c96477ae (commit)
from f9d21e3ee3a81f0be4928c4bb0f90bfba9485123 (commit)
Summary of changes:
src/gtk/description_window.c | 14 +---
src/gtk/icon_legend.c | 12 ++-
src/gtk/prefswindow.c | 13 +--
src/gtk/sslcertwindow.c | 89 +++++++++++++++-----
src/summary_search.c | 55 +++++++------
src/wizard.c | 191 ++++++++++++++++++++++++-------------------
6 files changed, 221 insertions(+), 153 deletions(-)
- Log -----------------------------------------------------------------
commit 8972aaf3cf00a0cdba7cbd0af1f94c50c96477ae
Author: paul <paul at claws-mail.org>
Date: Mon Dec 2 10:17:35 2019 +0000
replace deprecated GtkTable
diff --git a/src/gtk/description_window.c b/src/gtk/description_window.c
index cb2a6884e..767485cc3 100644
--- a/src/gtk/description_window.c
+++ b/src/gtk/description_window.c
@@ -97,11 +97,11 @@ static void description_create(DescriptionWindow * dwindow)
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledwin),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- table = gtk_table_new(sz, dwindow->columns, FALSE);
+ table = gtk_grid_new();
gtk_container_add(GTK_CONTAINER(scrolledwin), table);
gtk_container_set_border_width(GTK_CONTAINER(table), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table), 8);
+// gtk_grid_set_column_spacing(GTK_GRID(table), 8);
line = 0;
for(i = 0; dwindow->symbol_table[i] != NULL; i = i + dwindow->columns) {
@@ -123,10 +123,7 @@ static void description_create(DescriptionWindow * dwindow)
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
gtk_label_set_yalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(GTK_TABLE(table), label,
- col, colend, line, line+1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 2);
+ gtk_grid_attach(GTK_GRID(table), label, col, line, 1, 1);
gtk_widget_size_request(label, &req);
if(req.width > max_width[j])
@@ -136,10 +133,7 @@ static void description_create(DescriptionWindow * dwindow)
GtkWidget *separator;
separator = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
- gtk_table_attach(GTK_TABLE(table), separator,
- 0, dwindow->columns, line, line+1,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 4);
+ gtk_grid_attach(GTK_GRID(table), separator, 0, line, 1, 1);
}
line++;
}
diff --git a/src/gtk/icon_legend.c b/src/gtk/icon_legend.c
index 55fbfc049..2b28e9c9f 100644
--- a/src/gtk/icon_legend.c
+++ b/src/gtk/icon_legend.c
@@ -149,23 +149,21 @@ static void legend_create(void)
gtk_widget_show(label);
gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
- table = gtk_table_new(ROWS, 4, FALSE);
+ table = gtk_grid_new();
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);
for (i = 0, j = 0, k = 0; i < ICONS; ++i, ++k) {
icon_label = stock_pixmap_widget(legend_icons[i]);
gtk_widget_set_halign(icon_label, GTK_ALIGN_CENTER);
gtk_widget_set_valign(icon_label, GTK_ALIGN_CENTER);
- gtk_table_attach(GTK_TABLE(table), icon_label, j, j + 1, k, k + 1,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), icon_label, j, k, 1, 1);
desc_label = gtk_label_new(gettext(legend_icon_desc[i]));
gtk_label_set_xalign(GTK_LABEL(desc_label), 0.0);
gtk_label_set_line_wrap(GTK_LABEL(desc_label), TRUE);
- gtk_table_attach(GTK_TABLE(table), desc_label, j + 1, j + 2, k, k + 1,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), desc_label, j+1, k, 1, 1);
if (i == ICONS / 2) {
j = 2;
diff --git a/src/gtk/prefswindow.c b/src/gtk/prefswindow.c
index 4c600b12f..4dc055e10 100644
--- a/src/gtk/prefswindow.c
+++ b/src/gtk/prefswindow.c
@@ -460,15 +460,16 @@ void prefswindow_open_full(const gchar *title, GSList *prefs_pages,
gtk_paned_add2(GTK_PANED(prefswindow->paned), prefswindow->vbox2);
- prefswindow->table2 = gtk_table_new(1, 2, FALSE);
+ prefswindow->table2 = gtk_grid_new();
gtk_widget_show(prefswindow->table2);
gtk_box_pack_start(GTK_BOX(prefswindow->vbox2), prefswindow->table2, TRUE, TRUE, 0);
prefswindow->labelframe = gtk_frame_new(NULL);
gtk_widget_show(prefswindow->labelframe);
gtk_frame_set_shadow_type(GTK_FRAME(prefswindow->labelframe), GTK_SHADOW_OUT);
- gtk_table_attach(GTK_TABLE(prefswindow->table2), prefswindow->labelframe,
- 0, 1, 0, 1, GTK_FILL | GTK_EXPAND, GTK_FILL, 1, 1);
+ gtk_grid_attach(GTK_GRID(prefswindow->table2), prefswindow->labelframe, 0, 0, 1, 1);
+ gtk_widget_set_hexpand(prefswindow->labelframe, TRUE);
+ gtk_widget_set_halign(prefswindow->labelframe, GTK_ALIGN_FILL);
prefswindow->pagelabel = gtk_label_new("");
gtk_widget_show(prefswindow->pagelabel);
@@ -483,8 +484,10 @@ void prefswindow_open_full(const gchar *title, GSList *prefs_pages,
gtk_notebook_set_show_tabs(GTK_NOTEBOOK(prefswindow->notebook), FALSE);
gtk_notebook_set_show_border(GTK_NOTEBOOK(prefswindow->notebook), FALSE);
- gtk_table_attach(GTK_TABLE(prefswindow->table2), prefswindow->notebook,
- 0, 1, 1, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 4);
+ gtk_grid_attach(GTK_GRID(prefswindow->table2), prefswindow->notebook, 0, 1, 1, 1);
+ gtk_widget_set_vexpand(prefswindow->notebook, TRUE);
+ gtk_widget_set_hexpand(prefswindow->notebook, TRUE);
+ gtk_widget_set_halign(prefswindow->notebook, GTK_ALIGN_FILL);
prefswindow->empty_page = gtk_label_new("");
gtk_widget_show(prefswindow->empty_page);
diff --git a/src/gtk/sslcertwindow.c b/src/gtk/sslcertwindow.c
index 8047f3f98..7a5310888 100644
--- a/src/gtk/sslcertwindow.c
+++ b/src/gtk/sslcertwindow.c
@@ -187,82 +187,129 @@ static GtkWidget *cert_presenter(SSLCertificate *cert)
frame_signer = gtk_frame_new(_("Signer"));
frame_status = gtk_frame_new(_("Status"));
- owner_table = GTK_TABLE(gtk_table_new(3, 2, FALSE));
- signer_table = GTK_TABLE(gtk_table_new(3, 2, FALSE));
- status_table = GTK_TABLE(gtk_table_new(3, 2, FALSE));
+ owner_table = gtk_grid_new();
+ signer_table = gtk_grid_new();
+ status_table = gtk_grid_new();
label = gtk_label_new(_("Name: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(owner_table, label, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(owner_table), label, 0, 0, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(subject_commonname);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(owner_table, label, 1, 2, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(owner_table), label, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
label = gtk_label_new(_("Organization: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(owner_table, label, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(owner_table), label, 0, 1, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(subject_organization);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(owner_table, label, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(owner_table), label, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
label = gtk_label_new(_("Location: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(owner_table, label, 0, 1, 2, 3, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(owner_table), label, 0, 2, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(subject_location);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(owner_table, label, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(owner_table), label, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
label = gtk_label_new(_("Name: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(signer_table, label, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(signer_table), label, 0, 0, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(issuer_commonname);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(signer_table, label, 1, 2, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(signer_table), label, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
label = gtk_label_new(_("Organization: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(signer_table, label, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(signer_table), label, 0, 1, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(issuer_organization);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(signer_table, label, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(signer_table), label, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
label = gtk_label_new(_("Location: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(signer_table, label, 0, 1, 2, 3, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(signer_table), label, 0, 2, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(issuer_location);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(signer_table, label, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(signer_table), label, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
label = gtk_label_new(_("Fingerprint: \n"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(status_table, label, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(status_table), label, 0, 0, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
fingerprint = g_strdup_printf("SHA1: %s\nSHA256: %s",
sha1_fingerprint, sha256_fingerprint);
label = gtk_label_new(fingerprint);
g_free(fingerprint);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(status_table, label, 1, 2, 0, 1, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(status_table), label, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(_("Signature status: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(status_table, label, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(status_table), label, 0, 1, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(sig_status);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(status_table, label, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(status_table), label, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(exp_time_t < time(NULL)? _("Expired on: "): _("Expires on: "));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(status_table, label, 0, 1, 2, 3, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(status_table), label, 0, 2, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
+
label = gtk_label_new(exp_date);
gtk_label_set_selectable(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
- gtk_table_attach(status_table, label, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(status_table), label, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(label, TRUE);
+ gtk_widget_set_halign(label, GTK_ALIGN_FILL);
gtk_container_add(GTK_CONTAINER(frame_owner), GTK_WIDGET(owner_table));
gtk_container_add(GTK_CONTAINER(frame_signer), GTK_WIDGET(signer_table));
diff --git a/src/summary_search.c b/src/summary_search.c
index 98a057ffd..12f4412e6 100644
--- a/src/summary_search.c
+++ b/src/summary_search.c
@@ -321,12 +321,12 @@ static void summary_search_create(void)
gtk_widget_show(clear_btn);
gtk_box_pack_end(GTK_BOX(bool_hbox), clear_btn, FALSE, FALSE, 0);
- table1 = gtk_table_new (5, 3, FALSE);
+ table1 = gtk_grid_new();
gtk_widget_show (table1);
gtk_box_pack_start (GTK_BOX (vbox1), table1, TRUE, TRUE, 0);
gtk_container_set_border_width (GTK_CONTAINER (table1), 4);
- 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);
from_entry = gtk_combo_box_text_new_with_entry ();
gtk_combo_box_set_active(GTK_COMBO_BOX(from_entry), -1);
@@ -334,8 +334,10 @@ static void summary_search_create(void)
combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(from_entry),
prefs_common.summary_search_from_history);
gtk_widget_show (from_entry);
- gtk_table_attach (GTK_TABLE (table1), from_entry, 1, 3, 0, 1,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), from_entry, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(from_entry, TRUE);
+ gtk_widget_set_halign(from_entry, GTK_ALIGN_FILL);
+
g_signal_connect(G_OBJECT(from_entry), "changed",
G_CALLBACK(from_changed), NULL);
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((from_entry)))),
@@ -349,8 +351,10 @@ static void summary_search_create(void)
combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(to_entry),
prefs_common.summary_search_to_history);
gtk_widget_show (to_entry);
- gtk_table_attach (GTK_TABLE (table1), to_entry, 1, 3, 1, 2,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), to_entry, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(to_entry, TRUE);
+ gtk_widget_set_halign(to_entry, GTK_ALIGN_FILL);
+
g_signal_connect(G_OBJECT(to_entry), "changed",
G_CALLBACK(to_changed), NULL);
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((to_entry)))),
@@ -364,8 +368,10 @@ static void summary_search_create(void)
combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(subject_entry),
prefs_common.summary_search_subject_history);
gtk_widget_show (subject_entry);
- gtk_table_attach (GTK_TABLE (table1), subject_entry, 1, 3, 2, 3,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), subject_entry, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(subject_entry, TRUE);
+ gtk_widget_set_halign(subject_entry, GTK_ALIGN_FILL);
+
g_signal_connect(G_OBJECT(subject_entry), "changed",
G_CALLBACK(subject_changed), NULL);
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((subject_entry)))),
@@ -379,8 +385,10 @@ static void summary_search_create(void)
combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(body_entry),
prefs_common.summary_search_body_history);
gtk_widget_show (body_entry);
- gtk_table_attach (GTK_TABLE (table1), body_entry, 1, 3, 3, 4,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), body_entry, 1, 3, 1, 1);
+ gtk_widget_set_hexpand(body_entry, TRUE);
+ gtk_widget_set_halign(body_entry, GTK_ALIGN_FILL);
+
g_signal_connect(G_OBJECT(body_entry), "changed",
G_CALLBACK(body_changed), NULL);
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((body_entry)))),
@@ -394,8 +402,10 @@ static void summary_search_create(void)
combobox_set_popdown_strings(GTK_COMBO_BOX_TEXT(adv_condition_entry),
prefs_common.summary_search_adv_condition_history);
gtk_widget_show (adv_condition_entry);
- gtk_table_attach (GTK_TABLE (table1), adv_condition_entry, 1, 2, 4, 5,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), adv_condition_entry, 1, 4, 1, 1);
+ gtk_widget_set_hexpand(adv_condition_entry, TRUE);
+ gtk_widget_set_halign(adv_condition_entry, GTK_ALIGN_FILL);
+
g_signal_connect(G_OBJECT(adv_condition_entry), "changed",
G_CALLBACK(adv_condition_changed), NULL);
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((adv_condition_entry)))),
@@ -405,8 +415,8 @@ static void summary_search_create(void)
adv_condition_btn = gtk_button_new_with_label(" ... ");
gtk_widget_show (adv_condition_btn);
- gtk_table_attach (GTK_TABLE (table1), adv_condition_btn, 2, 3, 4, 5,
- GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table1), adv_condition_btn, 2, 4, 1, 1);
+
g_signal_connect(G_OBJECT (adv_condition_btn), "clicked",
G_CALLBACK(adv_condition_btn_clicked), search_window.window);
@@ -415,38 +425,33 @@ static void summary_search_create(void)
from_label = gtk_label_new (_("From:"));
gtk_widget_show (from_label);
- gtk_table_attach (GTK_TABLE (table1), from_label, 0, 1, 0, 1,
- GTK_FILL, 0, 0, 0);
gtk_label_set_justify (GTK_LABEL (from_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign (GTK_LABEL (from_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), from_label, 0, 0, 1, 1);
to_label = gtk_label_new (_("To:"));
gtk_widget_show (to_label);
- gtk_table_attach (GTK_TABLE (table1), to_label, 0, 1, 1, 2,
- GTK_FILL, 0, 0, 0);
gtk_label_set_justify (GTK_LABEL (to_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign (GTK_LABEL (to_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), to_label, 0, 1, 1, 1);
subject_label = gtk_label_new (_("Subject:"));
gtk_widget_show (subject_label);
- gtk_table_attach (GTK_TABLE (table1), subject_label, 0, 1, 2, 3,
- GTK_FILL, 0, 0, 0);
gtk_label_set_justify (GTK_LABEL (subject_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign (GTK_LABEL (subject_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), subject_label, 0, 2, 1, 1);
body_label = gtk_label_new (_("Body:"));
gtk_widget_show (body_label);
- gtk_table_attach (GTK_TABLE (table1), body_label, 0, 1, 3, 4,
- GTK_FILL, 0, 0, 0);
gtk_label_set_justify (GTK_LABEL (body_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign (GTK_LABEL (body_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), body_label, 0, 3, 1, 1);
adv_condition_label = gtk_label_new (_("Condition:"));
gtk_widget_show (adv_condition_label);
- gtk_table_attach (GTK_TABLE (table1), adv_condition_label, 0, 1, 4, 5,
- GTK_FILL, 0, 0, 0);
gtk_label_set_justify (GTK_LABEL (adv_condition_label), GTK_JUSTIFY_RIGHT);
gtk_label_set_xalign (GTK_LABEL (adv_condition_label), 1.0);
+ gtk_grid_attach(GTK_GRID(table1), adv_condition_label, 0, 4, 1, 1);
checkbtn_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
gtk_widget_show (checkbtn_hbox);
diff --git a/src/wizard.c b/src/wizard.c
index 791a03fc1..765203956 100644
--- a/src/wizard.c
+++ b/src/wizard.c
@@ -954,54 +954,56 @@ static void wizard_email_changed(GtkWidget *widget, gpointer data)
static GtkWidget* user_page (WizardWindow * wizard)
{
- GtkWidget *table = gtk_table_new(1,1, FALSE);
+ GtkWidget *table = gtk_grid_new();
GtkWidget *vbox;
GtkWidget *label;
GtkWidget *user_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);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, VSPACING_NARROW);
gtk_container_set_border_width(GTK_CONTAINER(vbox), VSPACING_NARROW_2);
- gtk_table_attach(GTK_TABLE(table), vbox, 0,1,1,2,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), vbox, 0, 1, 1, 1);
- user_table = gtk_table_new(3, 2, FALSE);
- gtk_table_set_row_spacings(GTK_TABLE(user_table), VSPACING_NARROW);
+ user_table = gtk_grid_new();
+ gtk_grid_set_row_spacing(GTK_GRID(user_table), VSPACING_NARROW);
gtk_box_pack_start(GTK_BOX(vbox), user_table, FALSE, FALSE, 0);
label = gtk_label_new(g_strconcat("<span weight=\"bold\">", _("Your name:"),
"</span>", NULL));
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(GTK_TABLE(user_table), label, 0,1,0,1,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(user_table), label, 0, 0, 1, 1);
+
wizard->full_name = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->full_name), tmpl.name?tmpl.name:"");
- gtk_table_attach(GTK_TABLE(user_table), wizard->full_name, 1,2,0,1,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(user_table), wizard->full_name, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(wizard->full_name, TRUE);
+ gtk_widget_set_halign(wizard->full_name, GTK_ALIGN_FILL);
label = gtk_label_new(g_strconcat("<span weight=\"bold\">", _("Your email address:"),
"</span>", NULL));
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(GTK_TABLE(user_table), label, 0,1,1,2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(user_table), label, 0, 1, 1, 1);
+
wizard->email = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->email), tmpl.email?tmpl.email:"");
- gtk_table_attach(GTK_TABLE(user_table), wizard->email, 1,2,1,2,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(user_table), wizard->email, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(wizard->email, TRUE);
+ gtk_widget_set_halign(wizard->email, GTK_ALIGN_FILL);
label = gtk_label_new(_("Your organization:"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
- gtk_table_attach(GTK_TABLE(user_table), label, 0,1,2,3,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(user_table), label, 0, 2, 1, 1);
+
wizard->organization = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->organization), tmpl.organization?tmpl.organization:"");
- gtk_table_attach(GTK_TABLE(user_table), wizard->organization, 1,2,2,3,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(user_table), wizard->organization, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(wizard->organization, TRUE);
+ gtk_widget_set_halign(wizard->organization, GTK_ALIGN_FILL);
g_signal_connect(G_OBJECT(wizard->email), "changed",
G_CALLBACK(wizard_email_changed),
@@ -1011,18 +1013,17 @@ static GtkWidget* user_page (WizardWindow * wizard)
static GtkWidget* mailbox_page (WizardWindow * wizard)
{
- GtkWidget *table = gtk_table_new(1,1, FALSE);
+ GtkWidget *table = gtk_grid_new();
GtkWidget *vbox;
GtkWidget *hbox;
- 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, VSPACING_NARROW);
gtk_container_set_border_width(GTK_CONTAINER(vbox), VSPACING_NARROW_2);
- gtk_table_attach(GTK_TABLE(table), vbox, 0,1,1,2,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), vbox, 0, 1, 1, 1);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
gtk_box_pack_start (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
@@ -1077,7 +1078,7 @@ static void cert_browse_cb(GtkWidget *widget, gpointer data)
static GtkWidget* smtp_page (WizardWindow * wizard)
{
- GtkWidget *table = gtk_table_new(1, 1, FALSE);
+ GtkWidget *table = gtk_grid_new();
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *hbox_spc;
@@ -1089,14 +1090,13 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
#endif
gchar *text;
- 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, VSPACING_NARROW);
gtk_container_set_border_width(GTK_CONTAINER(vbox), VSPACING_NARROW_2);
- gtk_table_attach(GTK_TABLE(table), vbox, 0,1,1,2,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), vbox, 0, 1, 1, 1);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
gtk_box_pack_start (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
@@ -1134,30 +1134,34 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
hbox_spc = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_size_request (hbox_spc, 12, -1);
gtk_box_pack_start (GTK_BOX (hbox), hbox_spc, FALSE, FALSE, 0);
- smtp_auth_table = gtk_table_new(2, 2, FALSE);
+
+ smtp_auth_table = gtk_grid_new();
SET_TOGGLE_SENSITIVITY (wizard->smtp_auth, smtp_auth_table);
gtk_box_pack_start(GTK_BOX(hbox), smtp_auth_table, TRUE, TRUE, 0);
wizard->smtp_username_label = gtk_label_new(_("SMTP username:"));
gtk_label_set_xalign(GTK_LABEL(wizard->smtp_username_label), 1.0);
- gtk_table_attach(GTK_TABLE(smtp_auth_table), wizard->smtp_username_label, 0,1,0,1,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(smtp_auth_table), wizard->smtp_username_label, 0, 0, 1, 1);
+
text = get_default_smtp_account(wizard);
wizard->smtp_username = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->smtp_username), text);
g_free(text);
- gtk_table_attach(GTK_TABLE(smtp_auth_table), wizard->smtp_username, 1,2,0,1,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(smtp_auth_table), wizard->smtp_username, 1, 0, 1, 1);
+ gtk_widget_set_hexpand(wizard->smtp_username, TRUE);
+ gtk_widget_set_halign(wizard->smtp_username, GTK_ALIGN_FILL);
wizard->smtp_password_label = gtk_label_new(_("SMTP password:"));
gtk_label_set_xalign(GTK_LABEL(wizard->smtp_password_label), 1.0);
- gtk_table_attach(GTK_TABLE(smtp_auth_table), wizard->smtp_password_label, 0,1,1,2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(smtp_auth_table), wizard->smtp_password_label, 0, 1, 1, 1);
+
wizard->smtp_password = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->smtp_password), tmpl.smtppass?tmpl.smtppass:"");
gtk_entry_set_visibility(GTK_ENTRY(wizard->smtp_password), FALSE);
- gtk_table_attach(GTK_TABLE(smtp_auth_table), wizard->smtp_password, 1,2,1,2,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(smtp_auth_table), wizard->smtp_password, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(wizard->smtp_password, TRUE);
+ gtk_widget_set_halign(wizard->smtp_password, GTK_ALIGN_FILL);
+
#ifdef USE_GNUTLS
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
gtk_box_pack_start (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
@@ -1179,7 +1183,7 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
gtk_box_pack_start(GTK_BOX(hbox), wizard->smtp_use_tls, FALSE, FALSE, 0);
SET_TOGGLE_SENSITIVITY (wizard->smtp_use_ssl, wizard->smtp_use_tls);
- smtp_cert_table = gtk_table_new(3,3, FALSE);
+ smtp_cert_table = gtk_grid_new();
gtk_box_pack_start (GTK_BOX(vbox), smtp_cert_table, FALSE, FALSE, 4);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
hbox_spc = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
@@ -1188,7 +1192,8 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
label = gtk_label_new(_("Client SSL/TLS certificate (optional)"));
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_table_attach(GTK_TABLE(smtp_cert_table), hbox, 0, 3, 0, 1, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(smtp_cert_table), hbox, 0, 0, 1, 1);
+
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
hbox_spc = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_size_request (hbox_spc, 12, -1);
@@ -1196,14 +1201,17 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
label = gtk_label_new(_("File"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
- gtk_table_attach(GTK_TABLE(smtp_cert_table), hbox, 0, 1, 1, 2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(smtp_cert_table), hbox, 0, 1, 1, 1);
+
wizard->smtp_ssl_cert_file = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->smtp_ssl_cert_file), tmpl.smtpssl_cert?tmpl.smtpssl_cert:"");
- gtk_table_attach(GTK_TABLE(smtp_cert_table), wizard->smtp_ssl_cert_file, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(smtp_cert_table), wizard->smtp_ssl_cert_file, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(wizard->smtp_ssl_cert_file, TRUE);
+ gtk_widget_set_halign(wizard->smtp_ssl_cert_file, GTK_ALIGN_FILL);
+
button = gtkut_get_browse_file_btn(_("Browse"));
- gtk_table_attach(GTK_TABLE(smtp_cert_table), button, 2, 3, 1, 2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(smtp_cert_table), button, 2, 1, 1, 1);
+
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(cert_browse_cb), wizard->smtp_ssl_cert_file);
@@ -1214,12 +1222,15 @@ static GtkWidget* smtp_page (WizardWindow * wizard)
label = gtk_label_new(_("Password"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
- gtk_table_attach(GTK_TABLE(smtp_cert_table), hbox, 0, 1, 2, 3,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(smtp_cert_table), hbox, 0, 2, 1, 1);
+
wizard->smtp_ssl_cert_pass = gtk_entry_new();
gtk_entry_set_visibility(GTK_ENTRY(wizard->smtp_ssl_cert_pass), FALSE);
gtk_entry_set_text(GTK_ENTRY(wizard->smtp_ssl_cert_pass), tmpl.smtpssl_cert_pass?tmpl.smtpssl_cert_pass:"");
- gtk_table_attach(GTK_TABLE(smtp_cert_table), wizard->smtp_ssl_cert_pass, 1, 2, 2, 3, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(smtp_cert_table), wizard->smtp_ssl_cert_pass, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(wizard->smtp_ssl_cert_pass, TRUE);
+ gtk_widget_set_halign(wizard->smtp_ssl_cert_pass, GTK_ALIGN_FILL);
+
SET_TOGGLE_SENSITIVITY (wizard->smtp_use_ssl, smtp_cert_table);
wizard->smtp_cert_table = smtp_cert_table;
#endif
@@ -1453,7 +1464,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
static GtkWidget* recv_page (WizardWindow * wizard)
{
- GtkWidget *table = gtk_table_new(1,1, FALSE);
+ GtkWidget *table = gtk_grid_new();
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *hbox_spc;
@@ -1473,24 +1484,23 @@ static GtkWidget* recv_page (WizardWindow * wizard)
gchar *text;
gint index = 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);
vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, VSPACING_NARROW);
gtk_container_set_border_width(GTK_CONTAINER(vbox), VSPACING_NARROW_2);
- gtk_table_attach(GTK_TABLE(table), vbox, 0,1,1,2,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(table), vbox, 0, 1, 1, 1);
- recv_table = gtk_table_new(4, 2, FALSE);
+ recv_table = gtk_grid_new();
gtk_box_pack_start(GTK_BOX(vbox), recv_table, FALSE, FALSE, 0);
label = gtk_label_new(g_strconcat("<span weight=\"bold\">", _("Server type:"), "</span>", NULL));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
gtk_label_set_use_markup(GTK_LABEL(label), TRUE);
- gtk_table_attach(GTK_TABLE(recv_table), label, 0,1,0,1,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), label, 0, 0, 1, 1);
+
wizard->recv_type = gtkut_sc_combobox_create(NULL, FALSE);
store = GTK_LIST_STORE(gtk_combo_box_get_model(
GTK_COMBO_BOX(wizard->recv_type)));
@@ -1516,18 +1526,17 @@ static GtkWidget* recv_page (WizardWindow * wizard)
g_signal_connect(G_OBJECT(wizard->recv_type), "changed",
G_CALLBACK(wizard_protocol_changed),
wizard);
- gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_type, 1,2,0,1,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), wizard->recv_type, 1, 0, 1, 1);
#if defined USE_GNUTLS
auto_configure_btn = gtk_button_new_with_label(_("Auto-configure"));
auto_configure_cancel_btn = gtk_button_new_with_label(_("Cancel"));
- gtk_table_attach(GTK_TABLE(recv_table), auto_configure_btn, 0,1,1,2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), auto_configure_btn, 0, 1, 1, 1);
+
auto_configure_lbl = gtk_label_new("");
gtk_label_set_xalign(GTK_LABEL(auto_configure_lbl), 0.0);
- gtk_table_attach(GTK_TABLE(recv_table), auto_configure_lbl, 1,2,1,2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), auto_configure_lbl, 1, 1, 1, 1);
+
gtk_widget_show(auto_configure_btn);
gtk_widget_show(auto_configure_lbl);
wizard->auto_configure_lbl = auto_configure_lbl;
@@ -1543,8 +1552,8 @@ static GtkWidget* recv_page (WizardWindow * wizard)
_("Server address:"), "</span>", NULL));
gtk_label_set_xalign(GTK_LABEL(wizard->recv_label), 1.0);
gtk_label_set_use_markup(GTK_LABEL(wizard->recv_label), TRUE);
- gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_label, 0,1,2,3,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), wizard->recv_label, 0, 2, 1, 1);
+
wizard->recv_server = gtk_entry_new();
text = get_default_server(wizard, "pop");
gtk_entry_set_text(GTK_ENTRY(wizard->recv_server), text);
@@ -1553,31 +1562,35 @@ static GtkWidget* recv_page (WizardWindow * wizard)
CLAWS_SET_TIP(wizard->recv_server,
_("You can specify the port number by appending it at the end: "
"\"mail.example.com:110\""));
- gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_server, 1,2,2,3,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
-
+ gtk_grid_attach(GTK_GRID(recv_table), wizard->recv_server, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(wizard->recv_server, TRUE);
+ gtk_widget_set_halign(wizard->recv_server, GTK_ALIGN_FILL);
+
wizard->recv_username_label = gtk_label_new(g_strconcat("<span weight=\"bold\">",
_("Username:"),"</span>", NULL));
gtk_label_set_xalign(GTK_LABEL(wizard->recv_username_label), 1.0);
gtk_label_set_use_markup(GTK_LABEL(wizard->recv_username_label), TRUE);
- gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_username_label, 0,1,3,4,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), wizard->recv_username_label, 0, 3, 1, 1);
+
wizard->recv_username = gtk_entry_new();
text = get_default_account(wizard);
gtk_entry_set_text(GTK_ENTRY(wizard->recv_username), text);
g_free(text);
- gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_username, 1,2,3,4,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), wizard->recv_username, 1, 3, 1, 1);
+ gtk_widget_set_hexpand(wizard->recv_username, TRUE);
+ gtk_widget_set_halign(wizard->recv_username, GTK_ALIGN_FILL);
wizard->recv_password_label = gtk_label_new(_("Password:"));
gtk_label_set_xalign(GTK_LABEL(wizard->recv_password_label), 1.0);
- gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_password_label, 0,1,4,5,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), wizard->recv_password_label, 0, 4, 1, 1);
+
wizard->recv_password = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->recv_password), tmpl.recvpass?tmpl.recvpass:"");
gtk_entry_set_visibility(GTK_ENTRY(wizard->recv_password), FALSE);
- gtk_table_attach(GTK_TABLE(recv_table), wizard->recv_password, 1,2,4,5,
- GTK_EXPAND|GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(recv_table), wizard->recv_password, 1, 4, 1, 1);
+ gtk_widget_set_hexpand(wizard->recv_password, TRUE);
+ gtk_widget_set_halign(wizard->recv_password, GTK_ALIGN_FILL);
+
#ifdef USE_GNUTLS
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
gtk_box_pack_start (GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
@@ -1599,7 +1612,8 @@ static GtkWidget* recv_page (WizardWindow * wizard)
gtk_box_pack_start(GTK_BOX(hbox), wizard->recv_use_tls, FALSE, FALSE, 0);
SET_TOGGLE_SENSITIVITY (wizard->recv_use_ssl, wizard->recv_use_tls);
- recv_cert_table = gtk_table_new(3,3, FALSE);
+ recv_cert_table = gtk_grid_new();
+
gtk_box_pack_start (GTK_BOX(vbox), recv_cert_table, FALSE, FALSE, 4);
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
hbox_spc = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
@@ -1608,22 +1622,26 @@ static GtkWidget* recv_page (WizardWindow * wizard)
label = gtk_label_new(_("Client SSL/TLS certificate (optional)"));
gtk_label_set_xalign(GTK_LABEL(label), 0.0);
gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_table_attach(GTK_TABLE(recv_cert_table), hbox, 0, 3, 0, 1, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(recv_cert_table), hbox, 0, 0, 1, 1);
+
hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, VSPACING_NARROW);
hbox_spc = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 0);
gtk_widget_set_size_request (hbox_spc, 12, -1);
gtk_box_pack_start (GTK_BOX (hbox), hbox_spc, FALSE, FALSE, 0);
+
label = gtk_label_new(_("File"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
- gtk_table_attach(GTK_TABLE(recv_cert_table), hbox, 0, 1, 1, 2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_cert_table), hbox, 0, 1, 1, 1);
wizard->recv_ssl_cert_file = gtk_entry_new();
gtk_entry_set_text(GTK_ENTRY(wizard->recv_ssl_cert_file), tmpl.recvssl_cert?tmpl.recvssl_cert:"");
- gtk_table_attach(GTK_TABLE(recv_cert_table), wizard->recv_ssl_cert_file, 1, 2, 1, 2, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(recv_cert_table), wizard->recv_ssl_cert_file, 1, 1, 1, 1);
+ gtk_widget_set_hexpand(wizard->recv_ssl_cert_file, TRUE);
+ gtk_widget_set_halign(wizard->recv_ssl_cert_file, GTK_ALIGN_FILL);
+
button = gtkut_get_browse_file_btn(_("Browse"));
- gtk_table_attach(GTK_TABLE(recv_cert_table), button, 2, 3, 1, 2,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_cert_table), button, 2, 1, 1, 1);
+
g_signal_connect(G_OBJECT(button), "clicked",
G_CALLBACK(cert_browse_cb), wizard->recv_ssl_cert_file);
@@ -1634,12 +1652,15 @@ static GtkWidget* recv_page (WizardWindow * wizard)
label = gtk_label_new(_("Password"));
gtk_label_set_xalign(GTK_LABEL(label), 1.0);
gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
- gtk_table_attach(GTK_TABLE(recv_cert_table), hbox, 0, 1, 2, 3,
- GTK_FILL, 0, VSPACING_NARROW, 0);
+ gtk_grid_attach(GTK_GRID(recv_cert_table), hbox, 0, 2, 1, 1);
+
wizard->recv_ssl_cert_pass = gtk_entry_new();
gtk_entry_set_visibility(GTK_ENTRY(wizard->recv_ssl_cert_pass), FALSE);
gtk_entry_set_text(GTK_ENTRY(wizard->recv_ssl_cert_pass), tmpl.recvssl_cert_pass?tmpl.recvssl_cert_pass:"");
- gtk_table_attach(GTK_TABLE(recv_cert_table), wizard->recv_ssl_cert_pass, 1, 2, 2, 3, GTK_FILL, 0, 0, 0);
+ gtk_grid_attach(GTK_GRID(recv_cert_table), wizard->recv_ssl_cert_pass, 1, 2, 1, 1);
+ gtk_widget_set_hexpand(wizard->recv_ssl_cert_pass, TRUE);
+ gtk_widget_set_halign(wizard->recv_ssl_cert_pass, GTK_ALIGN_FILL);
+
SET_TOGGLE_SENSITIVITY (wizard->recv_use_ssl, recv_cert_table);
wizard->recv_cert_table = recv_cert_table;
#endif
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list