Code

screen: rename screen_refresh() to screen_paint()
authorMax Kellermann <max.kellermann@gmail.com>
Mon, 20 Mar 2017 19:35:59 +0000 (20:35 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Mon, 20 Mar 2017 19:35:59 +0000 (20:35 +0100)
src/main.c
src/screen.c
src/screen.h

index 88660de05842e12fc4258c58da3a45f13547bb70..a5a803f04104163562c514ffa88e9ab7281e2d44 100644 (file)
@@ -430,7 +430,7 @@ main(int argc, const char *argv[])
                g_timeout_add_seconds(10, timer_check_key_bindings, NULL);
 #endif
 
                g_timeout_add_seconds(10, timer_check_key_bindings, NULL);
 #endif
 
-       screen_paint(mpd);
+       screen_paint(mpd, true);
 
        g_main_loop_run(main_loop);
        g_main_loop_unref(main_loop);
 
        g_main_loop_run(main_loop);
        g_main_loop_unref(main_loop);
index 1f7b7a6ef69f7a028a837da5442699c41d51f5bc..a8c80bcee3897f0603fe6f934444af06798cdc50 100644 (file)
@@ -91,7 +91,7 @@ screen_switch(const struct screen_functions *sf, struct mpdclient *c)
        if (mode_fn->open != NULL)
                mode_fn->open(c);
 
        if (mode_fn->open != NULL)
                mode_fn->open(c);
 
-       screen_paint(c);
+       screen_paint(c, true);
 }
 
 void
 }
 
 void
@@ -247,7 +247,7 @@ screen_resize(struct mpdclient *c)
        curs_set(1);
        curs_set(0);
 
        curs_set(1);
        curs_set(0);
 
-       screen_paint(c);
+       screen_paint(c, true);
 }
 
 #ifndef NCMPC_MINI
 }
 
 #ifndef NCMPC_MINI
@@ -326,8 +326,8 @@ screen_init(struct mpdclient *c)
                mode_fn->open(c);
 }
 
                mode_fn->open(c);
 }
 
-static void
-screen_refresh(struct mpdclient *c, bool main_dirty)
+void
+screen_paint(struct mpdclient *c, bool main_dirty)
 {
        /* update title/header window */
        paint_top_window(c);
 {
        /* update title/header window */
        paint_top_window(c);
@@ -356,12 +356,6 @@ screen_refresh(struct mpdclient *c, bool main_dirty)
        doupdate();
 }
 
        doupdate();
 }
 
-void
-screen_paint(struct mpdclient *c)
-{
-       screen_refresh(c, true);
-}
-
 void
 screen_update(struct mpdclient *c)
 {
 void
 screen_update(struct mpdclient *c)
 {
@@ -435,7 +429,7 @@ screen_update(struct mpdclient *c)
        if (mode_fn->update != NULL)
                mode_fn->update(c);
 
        if (mode_fn->update != NULL)
                mode_fn->update(c);
 
-       screen_refresh(c, false);
+       screen_paint(c, false);
 }
 
 #ifdef HAVE_GETMOUSE
 }
 
 #ifdef HAVE_GETMOUSE
@@ -494,7 +488,7 @@ screen_cmd(struct mpdclient *c, command_t cmd)
                                     _("Auto center mode: Off"));
                break;
        case CMD_SCREEN_UPDATE:
                                     _("Auto center mode: Off"));
                break;
        case CMD_SCREEN_UPDATE:
-               screen_paint(c);
+               screen_paint(c, true);
                break;
        case CMD_SCREEN_PREVIOUS:
                screen_next_mode(c, -1);
                break;
        case CMD_SCREEN_PREVIOUS:
                screen_next_mode(c, -1);
index ef766e58a79b106067b84a714f2818f2b58c54cd..3b6f7247a0db467043e3f25d91e052f6ab68e5a2 100644 (file)
@@ -63,7 +63,10 @@ extern struct screen screen;
 void screen_init(struct mpdclient *c);
 void screen_exit(void);
 void screen_resize(struct mpdclient *c);
 void screen_init(struct mpdclient *c);
 void screen_exit(void);
 void screen_resize(struct mpdclient *c);
-void screen_paint(struct mpdclient *c);
+
+void
+screen_paint(struct mpdclient *c, bool main_dirty);
+
 void screen_update(struct mpdclient *c);
 void screen_cmd(struct mpdclient *c, command_t cmd);
 
 void screen_update(struct mpdclient *c);
 void screen_cmd(struct mpdclient *c, command_t cmd);