[balsa/69-resend-message] Various: Manage showing or hiding
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/69-resend-message] Various: Manage showing or hiding
- Date: Wed, 2 Mar 2022 23:11:56 +0000 (UTC)
commit 3cac1f4ca3dfe0df37dbafd723098e533b0df30b
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Wed Mar 2 18:11:04 2022 -0500
Various: Manage showing or hiding
...the resend window toolbar
modified: src/balsa-app.h
modified: src/save-restore.c
modified: src/sendmsg-window.c
src/balsa-app.h | 1 +
src/save-restore.c | 4 ++++
src/sendmsg-window.c | 22 ++++++++++++++++------
3 files changed, 21 insertions(+), 6 deletions(-)
---
diff --git a/src/balsa-app.h b/src/balsa-app.h
index 2d51b2a36..80031f3b2 100644
--- a/src/balsa-app.h
+++ b/src/balsa-app.h
@@ -250,6 +250,7 @@ extern struct BalsaApplication {
gboolean show_main_toolbar;
gboolean show_message_toolbar;
gboolean show_compose_toolbar;
+ gboolean show_resend_toolbar;
gboolean show_statusbar;
gboolean show_sos_bar;
diff --git a/src/save-restore.c b/src/save-restore.c
index ffffd9af3..1648257cc 100644
--- a/src/save-restore.c
+++ b/src/save-restore.c
@@ -868,6 +868,8 @@ config_global_load(void)
libbalsa_conf_get_bool("ShowMessageWindowToolbar=true");
balsa_app.show_compose_toolbar =
libbalsa_conf_get_bool("ShowComposeWindowToolbar=true");
+ balsa_app.show_resend_toolbar =
+ libbalsa_conf_get_bool("ShowResendWindowToolbar=true");
balsa_app.show_statusbar =
libbalsa_conf_get_bool("ShowStatusbar=true");
balsa_app.show_sos_bar =
@@ -1352,6 +1354,8 @@ config_save(void)
balsa_app.show_message_toolbar);
libbalsa_conf_set_bool("ShowComposeWindowToolbar",
balsa_app.show_compose_toolbar);
+ libbalsa_conf_set_bool("ShowResendWindowToolbar",
+ balsa_app.show_resend_toolbar);
libbalsa_conf_set_bool("ShowStatusbar",
balsa_app.show_statusbar);
libbalsa_conf_set_bool("ShowSOSbar",
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index 2fcbc676d..1080078c8 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -6253,11 +6253,19 @@ sw_show_toolbar_change_state(GSimpleAction * action, GVariant * state, gpointer
{
BalsaSendmsg *bsmsg = data;
- balsa_app.show_compose_toolbar = g_variant_get_boolean(state);
- if (balsa_app.show_compose_toolbar)
- gtk_widget_show(bsmsg->toolbar);
- else
- gtk_widget_hide(bsmsg->toolbar);
+ if (bsmsg->type == SEND_RESEND) {
+ balsa_app.show_resend_toolbar = g_variant_get_boolean(state);
+ if (balsa_app.show_resend_toolbar)
+ gtk_widget_show(bsmsg->toolbar);
+ else
+ gtk_widget_hide(bsmsg->toolbar);
+ } else {
+ balsa_app.show_compose_toolbar = g_variant_get_boolean(state);
+ if (balsa_app.show_compose_toolbar)
+ gtk_widget_show(bsmsg->toolbar);
+ else
+ gtk_widget_hide(bsmsg->toolbar);
+ }
g_simple_action_set_state(action, state);
}
@@ -6960,7 +6968,9 @@ sendmsg_window_new(SendType send_type)
bsmsg->toolbar = balsa_toolbar_new(model, G_ACTION_MAP(window));
gtk_box_pack_start(GTK_BOX(main_box), bsmsg->toolbar, FALSE, FALSE, 0);
- if (send_type != SEND_RESEND) {
+ if (send_type == SEND_RESEND) {
+ sw_action_set_active(bsmsg, "show-toolbar", balsa_app.show_resend_toolbar);
+ } else {
bsmsg->flow = !balsa_app.wordwrap;
sw_action_set_enabled(bsmsg, "reflow", bsmsg->flow);
bsmsg->send_mp_alt = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]