projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have a lib-ui/lib-ui.h
[apps/madmutt.git]
/
lib-ui
/
sidebar.c
diff --git
a/lib-ui/sidebar.c
b/lib-ui/sidebar.c
index
d5434a9
..
238a5dd
100644
(file)
--- a/
lib-ui/sidebar.c
+++ b/
lib-ui/sidebar.c
@@
-12,10
+12,9
@@
* please see the file GPL in the top level source directory.
*/
* please see the file GPL in the top level source directory.
*/
-#include <lib-
lib/lib-lib
.h>
+#include <lib-
ui/lib-ui
.h>
#include <libgen.h>
#include <libgen.h>
-#include <lib-ui/curses.h>
#include <lib-ui/menu.h>
#include <lib-ui/sidebar.h>
#include <lib-ui/menu.h>
#include <lib-ui/sidebar.h>
@@
-217,7
+216,7
@@
static int make_sidebar_entry (char* sbox, int idx, ssize_t len)
snprintf(entry, sizeof(entry), "%*s", (int)len, no);
memcpy(entry, sbox, MIN(len - 1, m_strlen(sbox)));
snprintf(entry, sizeof(entry), "%*s", (int)len, no);
memcpy(entry, sbox, MIN(len - 1, m_strlen(sbox)));
-
addnstr(
entry, len);
+
waddnstr(stdscr,
entry, len);
if (shortened)
p_delete(&sbox);
if (shortened)
p_delete(&sbox);
@@
-269,11
+268,11
@@
void sidebar_draw_frames (void) {
/* draw vertical delimiter */
SETCOLOR (MT_COLOR_SIDEBAR);
for (i = 0; i < LINES-1; i++) {
/* draw vertical delimiter */
SETCOLOR (MT_COLOR_SIDEBAR);
for (i = 0; i < LINES-1; i++) {
-
move (
i, SidebarWidth - delim_len);
+
wmove (stdscr,
i, SidebarWidth - delim_len);
if (!m_strcmp(SidebarDelim, "|"))
if (!m_strcmp(SidebarDelim, "|"))
-
addch (
ACS_VLINE);
+
waddch (stdscr,
ACS_VLINE);
else
else
-
addstr (
NONULL (SidebarDelim));
+
waddstr (stdscr,
NONULL (SidebarDelim));
}
/* fill "gaps" at top+bottom */
}
/* fill "gaps" at top+bottom */
@@
-284,16
+283,16
@@
void sidebar_draw_frames (void) {
* gap with spaces to get bg color
*/
if (option(OPTSTATUSONTOP) || option(OPTHELP)) {
* gap with spaces to get bg color
*/
if (option(OPTSTATUSONTOP) || option(OPTHELP)) {
-
move(
0,i);
-
addch(
' ');
+
wmove(stdscr,
0,i);
+
waddch(stdscr,
' ');
}
/*
* if we don't have $status_on_top or we have $help, fill bottom
* gap with spaces to get bg color
*/
if (!option(OPTSTATUSONTOP) || option(OPTHELP)) {
}
/*
* if we don't have $status_on_top or we have $help, fill bottom
* gap with spaces to get bg color
*/
if (!option(OPTSTATUSONTOP) || option(OPTHELP)) {
-
move(
LINES-2,i);
-
addch(
' ');
+
wmove(stdscr,
LINES-2,i);
+
waddch(stdscr,
' ');
}
}
SETCOLOR (MT_COLOR_NORMAL);
}
}
SETCOLOR (MT_COLOR_NORMAL);
@@
-359,7
+358,7
@@
int sidebar_draw (void) {
else
SETCOLOR (MT_COLOR_NORMAL);
else
SETCOLOR (MT_COLOR_NORMAL);
-
move (
line, 0);
+
wmove (stdscr,
line, 0);
line += make_sidebar_entry (tmp->path, i, SidebarWidth-delim_len);
}
line += make_sidebar_entry (tmp->path, i, SidebarWidth-delim_len);
}
@@
-368,8
+367,8
@@
int sidebar_draw (void) {
/* fill with blanks to bottom */
memset(&blank, ' ', sizeof(blank));
for (; line < last_line; line++) {
/* fill with blanks to bottom */
memset(&blank, ' ', sizeof(blank));
for (; line < last_line; line++) {
-
move (
line, 0);
-
addnstr (
blank, SidebarWidth-delim_len);
+
wmove (stdscr,
line, 0);
+
waddnstr (stdscr,
blank, SidebarWidth-delim_len);
}
return 0;
}
}
return 0;
}