- fixed small bug in menu button (preset dirs) in fileselect. When the menu

is empty (no $HOME/.Bfs and first time use of FileSelect) it was empty,
  causing a nasty drawing error.
  It now doesn't draw the menubutton when there are no preset dirs yet.

- removed 'unused variable' warnings from space.c
This commit is contained in:
2003-07-05 10:50:42 +00:00
parent 2a1c1fd067
commit c861979e7b
2 changed files with 5 additions and 8 deletions

View File

@@ -1178,18 +1178,20 @@ void drawfilespace(ScrArea *sa, void *spacedata)
}
menu= fsmenu_build_menu();
uiDefButS(block, MENU, 3, menu, scrollrct.xmin, filebuty1, scrollrct.xmax-scrollrct.xmin, 21, &sfile->menu, 0, 0, 0, 0, "");
if(menu[0]) // happens when no .Bfs is there, and first time browse
uiDefButS(block, MENU, 3, menu, scrollrct.xmin, filebuty1, scrollrct.xmax-scrollrct.xmin, 21, &sfile->menu, 0, 0, 0, 0, "");
MEM_freeN(menu);
uiDefBut(block, BUT, 4, "P", scrollrct.xmin, filebuty2, scrollrct.xmax-scrollrct.xmin, 21, 0, 0, 0, 0, 0, "Move to the parent directory (PKEY)");
uiDrawBlock(block);
draw_filescroll(sfile);
draw_filetext(sfile);
/* others diskfree etc ? */
scrarea_queue_headredraw(curarea);
uiDrawBlock(block);
curarea->win_swap= WIN_BACK_OK;
}