History sections names:

Make names of sections with function name as prefix string.

for example:
[inp:mc_mkdir Enter directory name ]
0=...
This commit is contained in:
Slava Zanko 2009-01-20 00:57:09 +02:00
parent a144f2e4f6
commit 22fada9ce0
8 changed files with 29 additions and 29 deletions

View File

@ -523,7 +523,7 @@ edit_save_as_cmd (WEdit *edit)
int different_filename = 0;
exp = input_expand_dialog (_(" Save As "), _(" Enter file name: "),
" Save As ", edit->filename);
":edit_save_as_cmd: Save As ", edit->filename);
edit_push_action (edit, KEY_PRESS + edit->start_display);
if (exp) {
@ -906,7 +906,7 @@ edit_load_cmd (WEdit *edit)
}
exp = input_expand_dialog (_(" Load "), _(" Enter file name: "),
" Load ", edit->filename);
":edit_load_cmd: Load ", edit->filename);
if (exp) {
if (*exp)
@ -2336,7 +2336,7 @@ edit_goto_cmd (WEdit *edit)
char s[32];
g_snprintf (s, sizeof (s), "%ld", line);
f = input_dialog (_(" Goto line "), _(" Enter line: "), " Goto line ",
f = input_dialog (_(" Goto line "), _(" Enter line: "), ":edit_goto_cmd: Goto line ",
line ? s : "");
if (!f)
return;
@ -2372,7 +2372,7 @@ edit_save_block_cmd (WEdit *edit)
return 1;
exp =
input_expand_dialog (_(" Save Block "), _(" Enter file name: "),
" Save Block ",
":edit_save_block_cmd: Save Block ",
catstrs (home_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
edit_push_action (edit, KEY_PRESS + edit->start_display);
if (exp) {
@ -2402,7 +2402,7 @@ int
edit_insert_file_cmd (WEdit *edit)
{
char *exp = input_expand_dialog (_(" Insert File "), _(" Enter file name: "),
" Insert File ",
":edit_insert_file_cmd: Insert File ",
catstrs (home_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
edit_push_action (edit, KEY_PRESS + edit->start_display);
if (exp) {
@ -2442,7 +2442,7 @@ int edit_sort_cmd (WEdit * edit)
exp = input_dialog (_(" Run Sort "),
_(" Enter sort options (see manpage) separated by whitespace: "),
" Run Sort ", (old != NULL) ? old : "");
":edit_sort_cmd: Run Sort ", (old != NULL) ? old : "");
if (!exp)
return 1;
@ -2484,7 +2484,7 @@ edit_ext_cmd (WEdit *edit)
exp =
input_dialog (_("Paste output of external command"),
_("Enter shell command(s):"),
"Paste output of external command", NULL);
":edit_ext_cmd: Paste output of ext.cmd ", NULL);
if (!exp)
return 1;

View File

@ -229,7 +229,7 @@ view_file_cmd (void)
filename =
input_expand_dialog (_(" View file "), _(" Filename:"),
" View file ", selection (current_panel)->fname);
":view_file_cmd: View file ", selection (current_panel)->fname);
if (!filename)
return;
@ -252,7 +252,7 @@ filtered_view_cmd (void)
command =
input_dialog (_(" Filtered view "),
_(" Filter command and arguments:"),
" Filtered view ",
":filtered_view_cmd: Filtered view ",
selection (current_panel)->fname);
if (!command)
return;
@ -352,7 +352,7 @@ mkdir_cmd (void)
dir =
input_expand_dialog (_("Create a new Directory"),
_(" Enter directory name:"),
"Create a new Directory", "");
":mkdir_cmd: Create a new Directory", "");
if (!dir)
return;
@ -424,7 +424,7 @@ set_panel_filter (WPanel *p)
reg_exp = input_dialog_help (_(" Filter "),
_(" Set expression for filtering filenames"),
"[Filter...]", " Filter ", x);
"[Filter...]", ":set_panel_filter: Filter ", x);
if (!reg_exp)
return;
set_panel_filter_to (p, reg_exp);
@ -523,12 +523,12 @@ select_unselect_cmd (const char *title, const char *history_name, int cmd)
void select_cmd (void)
{
select_unselect_cmd (_(" Select "), " Select ", 1);
select_unselect_cmd (_(" Select "), ":select_cmd: Select ", 1);
}
void unselect_cmd (void)
{
select_unselect_cmd (_(" Unselect "), " Unselect ", 0);
select_unselect_cmd (_(" Unselect "), ":unselect_cmd: Unselect ", 0);
}
/* Check if the file exists */
@ -905,7 +905,7 @@ do_link (int symbolic_link, const char *fname)
if (!symbolic_link) {
src = g_strdup_printf (_("Link %s to:"), name_trunc (fname, 46));
dest = input_expand_dialog (_(" Link "), src, " Link ", "");
dest = input_expand_dialog (_(" Link "), src, ":do_link: Link ", "");
if (!dest || !*dest)
goto cleanup;
save_cwds_stat ();
@ -974,7 +974,7 @@ void edit_symlink_cmd (void)
i = readlink (p, buffer, MC_MAXPATHLEN - 1);
if (i > 0) {
buffer [i] = 0;
dest = input_expand_dialog (_(" Edit symlink "), q, " Edit symlink ", buffer);
dest = input_expand_dialog (_(" Edit symlink "), q, ":edit_symlink_cmd: Edit symlink ", buffer);
if (dest) {
if (*dest && strcmp (buffer, dest)) {
save_cwds_stat ();
@ -1126,7 +1126,7 @@ static const char *machine_str = N_(" Enter machine name (F1 for details): ");
void netlink_cmd (void)
{
nice_cd (_(" Link to a remote machine "), _(machine_str),
"[Network File System]", " Link to a remote machine ",
"[Network File System]", ":netlink_cmd: Link to a remote ",
"/#mc:", 1);
}
#endif /* WITH_MCFS */
@ -1134,13 +1134,13 @@ void netlink_cmd (void)
void ftplink_cmd (void)
{
nice_cd (_(" FTP to machine "), _(machine_str),
"[FTP File System]", " FTP to machine ", "/#ftp:", 1);
"[FTP File System]", ":ftplink_cmd: FTP to machine ", "/#ftp:", 1);
}
void fishlink_cmd (void)
{
nice_cd (_(" Shell link to machine "), _(machine_str),
"[FIle transfer over SHell filesystem]", " Shell link to machine ",
"[FIle transfer over SHell filesystem]", ":fishlink_cmd: Shell link to machine ",
"/#sh:", 1);
}
@ -1148,7 +1148,7 @@ void fishlink_cmd (void)
void smblink_cmd (void)
{
nice_cd (_(" SMB link to machine "), _(machine_str),
"[SMB File System]", " SMB link to machine ",
"[SMB File System]", ":smblink_cmd: SMB link to machine ",
"/#smb:", 0);
}
#endif /* WITH_SMBFS */
@ -1160,7 +1160,7 @@ void undelete_cmd (void)
nice_cd (_(" Undelete files on an ext2 file system "),
_(" Enter device (without /dev/) to undelete\n "
" files on: (F1 for details)"),
"[Undelete File System]", " Undelete files on an ext2 file system ",
"[Undelete File System]", ":undelete_cmd: Undel on ext2 fs ",
"/#undel:", 0);
}
#endif /* USE_EXT2FSLIB */

View File

@ -114,7 +114,7 @@ exec_extension (const char *filename, const char *data, int *move_dir,
if (*data == '}') {
char *parameter;
parameter_found = 0;
parameter = input_dialog (_(" Parameter "), prompt, " Parameter ", "");
parameter = input_dialog (_(" Parameter "), prompt, ":exec_extension: Parameter ", "");
if (!parameter) {
/* User canceled */
fclose (cmd_file);

View File

@ -1042,7 +1042,7 @@ void add2hotlist_cmd (void)
strip_password (label_string, 1);
prompt = g_strdup_printf (cp, path_trunc (current_panel->cwd, COLS-2*UX-(l+8)));
label = input_dialog (_(" Add to hotlist "), prompt, " Add to hotlist ", label_string);
label = input_dialog (_(" Add to hotlist "), prompt, ":add2hotlist_cmd: Add to hotlist ", label_string);
g_free (prompt);
if (!label || !*label) {

View File

@ -226,7 +226,7 @@ add2panelize_cmd (void)
if (pname->buffer && (*pname->buffer)) {
label = input_dialog (_(" Add to external panelize "),
_(" Enter command label: "),
" Add to external panelize ",
":add2panelize_cmd: Add to external panelize ",
"");
if (!label)
return;

View File

@ -598,7 +598,7 @@ static void tree_copy (WTree *tree, const char *default_dest)
return;
g_snprintf (cmd_buf, sizeof(cmd_buf), _("Copy \"%s\" directory to:"),
name_trunc (tree->selected_ptr->name, 50));
dest = input_expand_dialog (_(" Copy "), cmd_buf, " Copy ", default_dest);
dest = input_expand_dialog (_(" Copy "), cmd_buf, ":tree_copy: Copy ", default_dest);
if (!dest)
return;
@ -641,7 +641,7 @@ static void tree_move (WTree *tree, const char *default_dest)
return;
g_snprintf (cmd_buf, sizeof (cmd_buf), _("Move \"%s\" directory to:"),
name_trunc (tree->selected_ptr->name, 50));
dest = input_expand_dialog (_(" Move "), cmd_buf, " Move ", default_dest);
dest = input_expand_dialog (_(" Move "), cmd_buf, ":tree_move: Move ", default_dest);
if (!dest)
return;
if (!*dest){

View File

@ -604,7 +604,7 @@ execute_menu_command (WEdit *edit_widget, const char *commands)
if (*commands == '}'){
char *tmp;
*parameter = 0;
parameter = input_dialog (_(" Parameter "), prompt, " Parameter ", "");
parameter = input_dialog (_(" Parameter "), prompt, ":execute_menu_command: Parameter ", "");
if (!parameter || !*parameter){
/* User canceled */
fclose (cmd_file);

View File

@ -2734,7 +2734,7 @@ view_moveto_line_cmd (WView *view)
g_snprintf (prompt, sizeof (prompt),
_(" The current line number is %d.\n"
" Enter the new line number:"), (int) (line + 1));
answer = input_dialog (_(" Goto line "), prompt, " Goto line ", "");
answer = input_dialog (_(" Goto line "), prompt, ":view_moveto_line_cmd: Goto line ", "");
if (answer != NULL && answer[0] != '\0') {
errno = 0;
line = strtoul (answer, &answer_end, 10);
@ -2755,7 +2755,7 @@ view_moveto_addr_cmd (WView *view)
g_snprintf (prompt, sizeof (prompt),
_(" The current address is 0x%lx.\n"
" Enter the new address:"), view->hex_cursor);
line = input_dialog (_(" Goto Address "), prompt, " Goto Address ", "");
line = input_dialog (_(" Goto Address "), prompt, ":view_moveto_addr_cmd: Goto Address ", "");
if (line != NULL) {
if (*line != '\0') {
addr = strtoul (line, &error, 0);
@ -2788,7 +2788,7 @@ regexp_search (WView *view, int direction)
defval = (last_regexp != NULL ? last_regexp : "");
regexp = input_dialog (_("Search"), _(" Enter regexp:"), "Search", defval);
regexp = input_dialog (_("Search"), _(" Enter regexp:"), ":regexp_search: Search", defval);
if (regexp == NULL || regexp[0] == '\0') {
g_free (regexp);
return;