1
1

* hotlist.c: Add buttons "Refresh" and "Free VFSs now" to Active

VFS dialog.
(hotlist_button_callback): Handle the buttons.
* main.c: Remove the 'Free VFS now' menu item.
Этот коммит содержится в:
Pavel Roskin 2003-06-29 23:44:39 +00:00
родитель c1d9304c3f
Коммит 43bbd6d299
3 изменённых файлов: 35 добавлений и 8 удалений

Просмотреть файл

@ -1,3 +1,10 @@
2003-06-27 David Sterba <dave@jikos.cz>
* hotlist.c: Add buttons "Refresh" and "Free VFSs now" to Active
VFS dialog.
(hotlist_button_callback): Handle the buttons.
* main.c: Remove the 'Free VFS now' menu item.
2003-06-25 Andrew V. Samoilov <sav@bcs.zp.ua>
* ext.c (regex_check_type): Fix previous change.

Просмотреть файл

@ -68,6 +68,11 @@
#define B_APPEND (B_USER + 6)
#define B_MOVE (B_USER + 7)
#ifdef USE_VFS
#define B_FREE_ALL_VFS (B_USER + 8)
#define B_REFRESH_VFS (B_USER + 9)
#endif
static WListbox *l_hotlist;
static WListbox *l_movelist;
@ -117,6 +122,10 @@ static struct _hotlist_but {
{ B_CANCEL, NORMAL_BUTTON, 0, 53, N_("&Cancel"), "cc", LIST_HOTLIST|LIST_VFSLIST|LIST_MOVELIST},
{ B_UP_GROUP, NORMAL_BUTTON, 0, 42, N_("&Up"), "up", LIST_HOTLIST|LIST_MOVELIST},
{ B_ADD_CURRENT, NORMAL_BUTTON, 0, 20, N_("&Add current"),"ad", LIST_HOTLIST},
#ifdef USE_VFS
{ B_REFRESH_VFS, NORMAL_BUTTON, 0, 43, N_("&Refresh"), "r", LIST_VFSLIST},
{ B_FREE_ALL_VFS, NORMAL_BUTTON, 0, 20, N_("Fr&ee VFSs now"), "f", LIST_VFSLIST},
#endif
{ B_ENTER, DEFPUSH_BUTTON, 0, 0, N_("Change &To"), "ct", LIST_HOTLIST|LIST_VFSLIST|LIST_MOVELIST},
};
@ -252,6 +261,13 @@ unlink_entry (struct hotlist *entry)
entry->up = 0;
}
#ifdef USE_VFS
static void add_name_to_list (char *path)
{
listbox_add_item (l_hotlist, 0, 0, path, 0);
}
#endif /* !USE_VFS */
static int hotlist_button_callback (int action, void *data)
{
switch (action) {
@ -369,6 +385,18 @@ static int hotlist_button_callback (int action, void *data)
break;
}
#ifdef USE_VFS
case B_FREE_ALL_VFS:
vfs_expire (1);
/* fall through */
case B_REFRESH_VFS:
listbox_remove_list (l_hotlist);
listbox_add_item (l_hotlist, 0, 0, home_dir, 0);
vfs_fill_names (add_name_to_list);
return 0;
#endif /* USE_VFS */
default:
return 1;
break;
@ -478,13 +506,6 @@ static int l_call (void *l)
return listbox_nothing;
}
#ifdef USE_VFS
static void add_name_to_list (char *path)
{
listbox_add_item (l_hotlist, 0, 0, path, 0);
}
#endif /* !USE_VFS */
/*
* Expands all button names (once) and recalculates button positions.
* returns number of columns in the dialog box, which is 10 chars longer

Просмотреть файл

@ -917,7 +917,6 @@ static menu_entry CmdMenu[] = {
{' ', N_("di&Rectory hotlist C-\\"), 'R', quick_chdir_cmd},
#ifdef USE_VFS
{' ', N_("&Active VFS list C-x a"), 'A', reselect_vfs},
{' ', N_("Fr&ee VFSs now"), 'E', free_vfs_now},
#endif
#ifdef WITH_BACKGROUND
{' ', N_("&Background jobs C-x j"), 'B', jobs_cmd},