commit 10760345fb3bea0a26d10e96379ff29a2dac4a66
parent 6babb1b7d326b7617eda00f1ae5e1da5fe60375e
Author: wwp <subscript@free.fr>
Date: Thu, 10 Apr 2025 18:17:07 +0200
Implement RFE 4827: conditioned to a new hidden option 'mainwin_toolbar_always_enable_actions', activate toolbar items bound to user actions (in the main window) whether some messages are selected or not. Keep former behaviour by default.
Diffstat:
4 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/manual/en/advanced.xml b/manual/en/advanced.xml
@@ -773,6 +773,17 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term><literal>mainwin_toolbar_always_enable_actions</literal></term>
+ <listitem>
+ <para>
+ '0' or '1'. Activate toolbar items bound to user actions in the main window,
+ whether some messages are selected or not.
+ Default is '0': such main window's toolbar items bound to user actions are activated only
+ if one or more messages are selected.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><literal>msgview_date_format</literal></term>
<listitem>
<para>
diff --git a/src/prefs_common.c b/src/prefs_common.c
@@ -1329,6 +1329,9 @@ static PrefParam param[] = {
{"mh_compat_mode", "FALSE", &prefs_common.mh_compat_mode, P_BOOL, NULL, NULL, NULL},
+ {"mainwin_toolbar_always_enable_actions", "FALSE", &prefs_common.mainwin_toolbar_always_enable_actions, P_BOOL,
+ NULL, NULL, NULL},
+
{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
};
diff --git a/src/prefs_common.h b/src/prefs_common.h
@@ -593,6 +593,7 @@ struct _PrefsCommon
gboolean passphrase_dialog_msg_title_switch;
gboolean mh_compat_mode;
+ gboolean mainwin_toolbar_always_enable_actions;
/* Proxy */
gboolean use_proxy;
diff --git a/src/toolbar.c b/src/toolbar.c
@@ -2862,7 +2862,7 @@ do { \
for (cur = toolbar->action_list; cur != NULL; cur = cur->next) {
ToolbarClawsActions *act = (ToolbarClawsActions*)cur->data;
- SET_WIDGET_COND(act->widget, M_TARGET_EXIST, M_UNLOCKED);
+ SET_WIDGET_COND(act->widget, M_UNLOCKED);
}
state = main_window_get_current_state(mainwin);