Mon Mar 16 12:30:39 1998 Stas Maximov <stmax@u213.srcc.msu.su>

* hotlist.c: Defaults on the hotlist add-current and new-entry is
	the current directory.
This commit is contained in:
Miguel de Icaza 1998-03-16 18:37:45 +00:00
parent 51900cea50
commit 9c3a48bbf6
2 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Mar 16 12:30:39 1998 Stas Maximov <stmax@u213.srcc.msu.su>
* hotlist.c: Defaults on the hotlist add-current and new-entry is
the current directory.
Sat Mar 14 17:30:21 1998 Miguel de Icaza <miguel@nuclecu.unam.mx>
* file.c (panel_operate): Why was the flags in query_dialog set to

View File

@ -722,6 +722,8 @@ static int add_new_entry_input (char *header, char *text1, char *text2, char *he
Quick_input.class = "hotlist_new_entry";
quick_widgets [6].text = text1;
quick_widgets [4].text = text2;
quick_widgets [5].text = *r1;
quick_widgets [3].text = *r2;
for (i = 0; i < 7; i++)
quick_widgets [i].y_divisions = lines1+lines2+7;
@ -750,6 +752,9 @@ static void add_new_entry_cmd (void)
char *title = 0, *url = 0;
int ret;
/* Take current directory as default value for input fields */
title = url = cpanel->cwd;
ret = add_new_entry_input ("New hotlist entry", "Directory label", "Directory path",
"[Hotlist]", &title, &url);
@ -835,7 +840,7 @@ void add2hotlist_cmd (void)
prompt = xmalloc (strlen (cpanel->cwd) + 20, "add2hotlist_cmd");
sprintf (prompt, "Label for \"%s\":", name_trunc (cpanel->cwd, COLS-2*UX-23));
label = input_dialog (" Add to hotlist ", prompt, "");
label = input_dialog (" Add to hotlist ", prompt, cpanel->cwd);
free (prompt);
if (!label || !*label)
return;