summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fe-text/gui-readline.c18
-rw-r--r--src/fe-text/module-formats.c7
-rw-r--r--src/fe-text/module-formats.h11
3 files changed, 27 insertions, 9 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c
index 25cb8fe1..6c6a777c 100644
--- a/src/fe-text/gui-readline.c
+++ b/src/fe-text/gui-readline.c
@@ -19,6 +19,7 @@
*/
#include "module.h"
+#include "module-formats.h"
#include "signals.h"
#include "misc.h"
#include "settings.h"
@@ -226,6 +227,7 @@ static void paste_flush(int send)
static gboolean paste_timeout(gpointer data)
{
GTimeVal now;
+ char *str;
int diff;
if (paste_state == 0) {
@@ -249,13 +251,17 @@ static gboolean paste_timeout(gpointer data)
} else if (!paste_prompt) {
paste_prompt = TRUE;
paste_old_prompt = g_strdup(active_entry->prompt);
- printtext_window(active_win, MSGLEVEL_CLIENTNOTICE,
- "Pasting %u lines to %s. Press Ctrl-O if you wish to do this or Ctrl-C to cancel.",
- paste_line_count,
- active_win->active == NULL ? "window" :
- active_win->active->visible_name);
- gui_entry_set_prompt(active_entry, "Hit Ctrl-O to paste, Ctrl-C to abort?");
+ printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
+ TXT_PASTE_WARNING,
+ paste_line_count,
+ active_win->active == NULL ? "window" :
+ active_win->active->visible_name);
+
+ str = format_get_text(MODULE_NAME, active_win, NULL, NULL,
+ TXT_PASTE_PROMPT, 0, 0);
+ gui_entry_set_prompt(active_entry, str);
gui_entry_set_text(active_entry, "");
+ g_free(str);
}
return TRUE;
}
diff --git a/src/fe-text/module-formats.c b/src/fe-text/module-formats.c
index 79e9dc2b..f316bdce 100644
--- a/src/fe-text/module-formats.c
+++ b/src/fe-text/module-formats.c
@@ -65,12 +65,17 @@ FORMAT_REC gui_text_formats[] =
{ "statusbar_info_item_footer", "", 0 },
{ "statusbar_info_item_name", "%# : $[35]0 $[9]1 $2", 3, { 0, 1, 0 } },
{ "statusbar_not_found", "Statusbar doesn't exist: $0", 1, { 0 } },
- { "statusbar_not_found", "Statusbar doesn't exist: $0", 1, { 0 } },
{ "statusbar_item_not_found", "Statusbar item doesn't exist: $0", 1, { 0 } },
{ "statusbar_unknown_command", "Unknown statusbar command: $0", 1, { 0 } },
{ "statusbar_unknown_type", "Statusbar type must be 'window' or 'root'", 1, { 0 } },
{ "statusbar_unknown_placement", "Statusbar placement must be 'top' or 'bottom'", 1, { 0 } },
{ "statusbar_unknown_visibility", "Statusbar visibility must be 'always', 'active' or 'inactive'", 1, { 0 } },
+ /* ---- */
+ { NULL, "Pasting", 0 },
+
+ { "paste_warning", "Pasting lines to. Press Ctrl-O if you wish to do this or Ctrl-C to cancel.", 2, { 1, 0 } },
+ { "paste_prompt", "Hit Ctrl-O to paste, Ctrl-C to abort?", 0 },
+
{ NULL, NULL, 0 }
};
diff --git a/src/fe-text/module-formats.h b/src/fe-text/module-formats.h
index c3607311..4eebfc3e 100644
--- a/src/fe-text/module-formats.h
+++ b/src/fe-text/module-formats.h
@@ -44,7 +44,14 @@ enum {
TXT_STATUSBAR_UNKNOWN_COMMAND,
TXT_STATUSBAR_UNKNOWN_TYPE,
TXT_STATUSBAR_UNKNOWN_PLACEMENT,
- TXT_STATUSBAR_UNKNOWN_VISIBILITY
+ TXT_STATUSBAR_UNKNOWN_VISIBILITY,
+
+ TXT_FILL_4,
+
+ TXT_PASTE_WARNING,
+ TXT_PASTE_PROMPT,
+
+ TXT_COUNT
};
-extern FORMAT_REC gui_text_formats[];
+extern FORMAT_REC gui_text_formats[TXT_COUNT+1];