commit bd88f085113d43c65e0d560ff4dc7e9260985c3e
parent 237a0c2975e0b21a1e2b8f5d581ed9530b150cd5
Author: Claudio Alessi <smoppy@gmail.com>
Date: Thu, 31 Mar 2016 10:54:18 +0200
s/redraw/ui_refresh/g
Diffstat:
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/myadm.c b/myadm.c
@@ -102,7 +102,6 @@ void mysql_fillview(MYSQL_RES *res, int showfds);
int mysql_items(MYSQL_RES *res, Item **items);
View *newaview(const char *name, void (*func)(void));
void quit(const Arg *arg);
-void redraw(void);
void reload(const Arg *arg);
void run(void);
void setup(void);
@@ -113,6 +112,7 @@ struct stfl_form *ui_getform(wchar_t *code);
void ui_modify(const char *name, const char *mode, const char *fmtstr, ...);
void ui_listview(Item *items, Field *fields);
void ui_putitem(Item *item, int *lens);
+void ui_refresh(void);
void ui_set(const char *key, const char *fmtstr, ...);
void ui_showfields(Field *fds, int *lens);
void ui_showitems(Item *items, int *lens);
@@ -170,7 +170,7 @@ ui_ask(const char *msg, char *opts) {
char *o;
ui_set("status", msg);
- redraw();
+ ui_refresh();
while((c = getch())) {
if(c == '\n') {
o = &opts[0];
@@ -512,12 +512,6 @@ quit(const Arg *arg) {
}
void
-redraw(void) {
- if(selview && selview->form)
- stfl_run(selview->form, -1);
-}
-
-void
reload(const Arg *arg) {
char tmp[8];
@@ -537,7 +531,7 @@ run(void) {
int code;
while(running) {
- redraw();
+ ui_refresh();
code = getch();
if(code < 0)
continue;
@@ -645,6 +639,12 @@ ui_putitem(Item *item, int *lens) {
}
void
+ui_refresh(void) {
+ if(selview && selview->form)
+ stfl_run(selview->form, -1);
+}
+
+void
ui_set(const char *key, const char *fmtstr, ...) {
va_list ap;
char val[256];