]> git.deb.at Git - pkg/abook.git/blobdiff - list.c
Updated JH's e-mail address
[pkg/abook.git] / list.c
diff --git a/list.c b/list.c
index 01bb156f67f30e13b5d70f32b2b5bb64c87df3e3..29ba97263c37be392ab34474091febd87896bada 100644 (file)
--- a/list.c
+++ b/list.c
@@ -1,15 +1,16 @@
 
 /*
- * list.c
- * by JH <jheinonen@bigfoot.com>
+ * $Id$
+ *
+ * by JH <jheinonen@users.sourceforge.net>
  *
  * Copyright (C) Jaakko Heinonen
  */
 
 #include <stdio.h>
 #include <string.h>
-#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();
@@ -86,7 +87,7 @@ print_list_line(int i, int line)
        char tmp[MAX_EMAILSTR_LEN];
        int extra_column = options_get_int("extra_column");
        int real_emaillen = (extra_column > 2 && extra_column < ITEM_FIELDS) ?
-               EMAILLEN : EMAILPOS - COLS;
+               EMAILLEN : COLS - EMAILPOS;
 
        scrollok(list, FALSE);
 
@@ -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;
+}
+
+