prefs menu added

This commit is contained in:
Emile `iMil' Heitor 2005-03-16 08:26:10 +00:00 committed by Thomas Klausner
parent 83925e0835
commit c9b6e1fd89
2 changed files with 14 additions and 6 deletions

View file

@ -29,15 +29,15 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: main.c,v 1.4 2005/03/15 19:05:12 imilh Exp $
* $Id: main.c,v 1.5 2005/03/16 08:26:10 imilh Exp $
*/
#include <sys/cdefs.h>
#ifndef lint
#if 0
static char *rcsid = "$Id: main.c,v 1.4 2005/03/15 19:05:12 imilh Exp $";
static char *rcsid = "$Id: main.c,v 1.5 2005/03/16 08:26:10 imilh Exp $";
#else
__RCSID("$Id: main.c,v 1.4 2005/03/15 19:05:12 imilh Exp $");
__RCSID("$Id: main.c,v 1.5 2005/03/16 08:26:10 imilh Exp $");
#endif
#endif
@ -431,6 +431,7 @@ main_loop(Etree **etree, char **list, const char *basepath, const int where)
case 'p':
clear_tree(&etree, where);
prefs_screen();
clr_allscr(list_win);
break;
case 'o':
clear();

View file

@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: prefs.c,v 1.1 2005/03/15 17:14:26 imilh Exp $
* $Id: prefs.c,v 1.2 2005/03/16 08:26:10 imilh Exp $
*/
#include "pkg_select.h"
@ -86,15 +86,22 @@ save_prefs(Etree **etree)
void
prefs_screen()
{
int y, x, h, w, i;
int y, x, h, w, i, bottom;
char *resp, *p, confpath[MAXLEN], buf[MIDLEN];
Etree **etree;
y = 1;
x = 1;
h = LINES - 4;
h = LINES - 5;
w = COLS - 2;
bottom = h + 3;
clear();
print_kb(ps_down.icon, ps_down.descr, bottom, 2);
print_kb(ps_up.icon, ps_up.descr, bottom, 22);
print_kb(ps_back.icon, ps_back.descr, bottom, 40);
refresh();
XSTRCPY(confpath, conf.confpath);
XMALLOC(etree, (conf.elements + 1) * sizeof(Etree *));