Code

screen: don't set list_window->repaint
authorMax Kellermann <max@duempel.org>
Mon, 22 Sep 2008 08:20:57 +0000 (10:20 +0200)
committerMax Kellermann <max@duempel.org>
Mon, 22 Sep 2008 08:20:57 +0000 (10:20 +0200)
Several screens ignore the attribute list_window->repaint.  Don't set
it there.  It will be replaced with a more intelligent repaint
algorithm later.

src/screen_artist.c
src/screen_file.c
src/screen_play.c

index cf2d310ce920659afb83eef17a18f8f888808054..de0466c652065193992655d28d0075e9a29e7d35 100644 (file)
@@ -163,7 +163,6 @@ browse_callback(mpdclient_t *c, int event, mpd_unused gpointer data)
        case BROWSE_DB_UPDATED:
                D("screen_artist.c> browse_callback() [BROWSE_DB_UPDATED]\n");
                browser.lw->clear = 1;
-               browser.lw->repaint = 1;
                update_metalist(c, g_strdup(artist), g_strdup(album));
                break;
        default:
@@ -420,7 +419,6 @@ artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
        case CMD_SCREEN_UPDATE:
                screen->painted = 0;
                browser.lw->clear = 1;
-               browser.lw->repaint = 1;
                update_metalist(c, g_strdup(artist), g_strdup(album));
                screen_status_printf(_("Screen updated!"));
                return 0;
index 26b2739720703668506e68491f31307a5bcbe50d..083b5e34738fb5f2610d1d2d30710e2cb01bf635 100644 (file)
@@ -226,7 +226,6 @@ browse_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
        case CMD_SCREEN_UPDATE:
                screen->painted = 0;
                browser.lw->clear = 1;
-               browser.lw->repaint = 1;
                browser.filelist = mpdclient_filelist_update(c, browser.filelist);
                list_window_check_selected(browser.lw,
                                           filelist_length(browser.filelist));
index 7c2dc426fcea7b1a285bdf98f2ce3d1d0ce37877..bea8e1253e840e52db628027b582451ee64e6554 100644 (file)
@@ -71,7 +71,6 @@ playlist_changed_callback(mpdclient_t *c, int event, gpointer data)
        }
        /* make shure the playlist is repainted */
        lw->clear = 1;
-       lw->repaint = 1;
        list_window_check_selected(lw, c->playlist.list->len);
 }
 
@@ -145,7 +144,6 @@ save_post_completion_cb(mpd_unused GCompletion *gcmp, mpd_unused gchar *line,
        if( g_list_length(items)>=1 ) {
                screen_display_completion_list(screen, items);
                lw->clear = 1;
-               lw->repaint = 1;
        }
 }
 
@@ -276,7 +274,6 @@ static void add_post_completion_cb(GCompletion *gcmp, gchar *line,
     {
       screen_display_completion_list(screen, items);
       lw->clear = 1;
-      lw->repaint = 1;
     }
 
   if( line && line[0] && line[strlen(line)-1]=='/' &&
@@ -410,10 +407,9 @@ play_update(screen_t *screen, mpdclient_t *c)
 
                play_paint(screen, c);
                playlist_id = c->playlist.id;
-       } else if( lw->repaint || 1) {
+       } else {
                list_window_paint(lw, list_callback, (void *) c);
                wnoutrefresh(lw->w);
-               lw->repaint = 0;
        }
 }
 
@@ -477,7 +473,6 @@ play_cmd(screen_t *screen, mpdclient_t *c, command_t cmd)
        case CMD_SCREEN_UPDATE:
                screen->painted = 0;
                lw->clear = 1;
-               lw->repaint = 1;
                center_playing_item(c);
                return 1;
        case CMD_LIST_MOVE_UP: