X-Git-Url: https://git.deb.at/?a=blobdiff_plain;f=list.c;h=cf2befa13b2401ddee846eacbfcc0da57b2e7cb7;hb=3212da92838c056bcc1cafa57beaf26086e2ac96;hp=01bb156f67f30e13b5d70f32b2b5bb64c87df3e3;hpb=4892aec476c9d7ce2cf11483cc369fcddf7bea6a;p=pkg%2Fabook.git diff --git a/list.c b/list.c index 01bb156..cf2befa 100644 --- a/list.c +++ b/list.c @@ -1,6 +1,7 @@ /* - * list.c + * $Id$ + * * by JH * * Copyright (C) Jaakko Heinonen @@ -8,8 +9,8 @@ #include #include -#include "abook_curses.h" #include "abook.h" +#include "ui.h" #include "database.h" #include "edit.h" #include "list.h" @@ -47,7 +48,7 @@ refresh_list() werase(list); - print_number_of_items(); + ui_print_number_of_items(); if( items < 1 ) { refresh(); @@ -290,3 +291,16 @@ invert_selection() selected[i] = !selected[i]; } +inline int +list_current_item() +{ + return curitem; +} + +inline int +list_is_empty() +{ + return items < 1 ? 1 : 0; +} + +