summaryrefslogtreecommitdiffstats
path: root/lib/widget/dialog.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:11:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:11:49 +0000
commit1b88cd5ee8510e90e69f885bfd730ce57621781c (patch)
treeb6b33bd695258f68c68824029c279d660ee4b85e /lib/widget/dialog.c
parentAdding upstream version 3:4.8.30. (diff)
downloadmc-1b88cd5ee8510e90e69f885bfd730ce57621781c.tar.xz
mc-1b88cd5ee8510e90e69f885bfd730ce57621781c.zip
Adding upstream version 3:4.8.31.upstream/3%4.8.31upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--lib/widget/dialog.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/lib/widget/dialog.c b/lib/widget/dialog.c
index 3ab2191..2596857 100644
--- a/lib/widget/dialog.c
+++ b/lib/widget/dialog.c
@@ -1,7 +1,7 @@
/*
Dialog box features module for the Midnight Commander
- Copyright (C) 1994-2023
+ Copyright (C) 1994-2024
Free Software Foundation, Inc.
This file is part of the Midnight Commander.
@@ -83,7 +83,7 @@ dlg_default_get_colors (const Widget * w)
/* --------------------------------------------------------------------------------------------- */
/**
- * Read histories from the ${XDG_CACHE_HOME}/mc/history file
+ * Read histories from the ${XDG_DATA_HOME}/mc/history file
*/
static void
dlg_read_history (WDialog * h)
@@ -122,6 +122,16 @@ refresh_cmd (void)
/* --------------------------------------------------------------------------------------------- */
+static void
+dlg_help (const WDialog * h)
+{
+ ev_help_t event_data = { NULL, h->help_ctx };
+
+ mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data);
+}
+
+/* --------------------------------------------------------------------------------------------- */
+
static cb_ret_t
dlg_execute_cmd (WDialog * h, long command)
{
@@ -152,10 +162,7 @@ dlg_execute_cmd (WDialog * h, long command)
break;
case CK_Help:
- {
- ev_help_t event_data = { NULL, h->help_ctx };
- mc_event_raise (MCEVENT_GROUP_CORE, "help", &event_data);
- }
+ dlg_help (h);
break;
case CK_Suspend:
@@ -571,7 +578,7 @@ dlg_run (WDialog * h)
/* --------------------------------------------------------------------------------------------- */
/**
- * Write history to the ${XDG_CACHE_HOME}/mc/history file
+ * Write history to the ${XDG_DATA_HOME}/mc/history file
*/
void
dlg_save_history (WDialog * h)