projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add tokyocabinet support
[apps/madmutt.git]
/
lib-ui
/
sidebar.c
diff --git
a/lib-ui/sidebar.c
b/lib-ui/sidebar.c
index
abf76d7
..
b59a874
100644
(file)
--- a/
lib-ui/sidebar.c
+++ b/
lib-ui/sidebar.c
@@
-13,10
+13,9
@@
*/
#include <lib-ui/lib-ui.h>
*/
#include <lib-ui/lib-ui.h>
-#include <libgen.h>
-
#include <lib-ui/menu.h>
#include <lib-ui/menu.h>
-#include <lib-ui/sidebar.h>
+
+#include <libgen.h>
#include "mutt.h"
#include "charset.h"
#include "mutt.h"
#include "charset.h"
@@
-173,11
+172,6
@@
sidebar_number_format(char* dest, ssize_t destlen,
return src;
}
return src;
}
-int sidebar_need_count(void)
-{
- return sidebar_w && !m_strisempty(SidebarNumberFormat);
-}
-
/* print single item
* returns:
* 0 item was not printed ('cause of $sidebar_newmail_only)
/* print single item
* returns:
* 0 item was not printed ('cause of $sidebar_newmail_only)
@@
-259,7
+253,6
@@
int sidebar_draw(void)
{
static short prev_show_value = -1;
int x, y, line;
{
static short prev_show_value = -1;
int x, y, line;
- char blank[STRING];
WINDOW *sw;
/* initialize first time */
WINDOW *sw;
/* initialize first time */
@@
-275,11
+268,9
@@
int sidebar_draw(void)
return 0;
getmaxyx(sw, y, x);
return 0;
getmaxyx(sw, y, x);
- memset(&blank, ' ', sizeof(blank));
-
- wmove(sw, 0, 0);
- SETCOLOR(sw, MT_COLOR_STATUS);
- waddnstr(sw, blank, x);
+ SETCOLOR(sw, MT_COLOR_SIDEBAR);
+ mvwhline(sw, 0, 0, ACS_HLINE, x - 1);
+ mvwaddch(sw, 0, x - 1, ACS_TTEE);
line = 1;
for (int i = calc_boundaries(); i < Incoming.len && line < y - 1; i++) {
line = 1;
for (int i = calc_boundaries(); i < Incoming.len && line < y - 1; i++) {
@@
-303,15
+294,14
@@
int sidebar_draw(void)
while (line < y - 1) {
SETCOLOR(sw, MT_COLOR_NORMAL);
while (line < y - 1) {
SETCOLOR(sw, MT_COLOR_NORMAL);
- w
addnstr(sw, blank
, x - 1);
+ w
hline(sw, ' '
, x - 1);
SETCOLOR(sw, MT_COLOR_SIDEBAR);
SETCOLOR(sw, MT_COLOR_SIDEBAR);
- waddch(sw, ACS_VLINE);
- line++;
+ mvwaddch(sw, line++, x - 1, ACS_VLINE);
}
}
- SETCOLOR(sw, MT_COLOR_S
TATUS
);
-
waddnstr(sw, blank, x
);
-
SETCOLOR(sw, MT_COLOR_NORMAL
);
+ SETCOLOR(sw, MT_COLOR_S
IDEBAR
);
+
mvwhline(sw, y - 1, 0, ACS_HLINE, x - 1
);
+
mvwaddch(sw, y - 1, x - 1, ACS_BTEE
);
return 0;
}
return 0;
}