--- trunk/src/cache.c 2009/11/04 20:28:54 159 +++ trunk/src/cache.c 2009/11/05 07:00:52 160 @@ -144,14 +144,14 @@ /* no vote returned: request failed, just cleanup */ if(!vote) { - printf("gcvote callback for failed request\n"); + printf("gcvote: callback for failed request\n"); gcvote_request_free(context->gcvote_request); context->gcvote_request = NULL; return; } - printf("gcvote callback is being called with a %d/%d\n", + printf("gcvote: callback is being called with a %d/%d\n", vote->quality, vote->votes); gcvote_set(context, vote); @@ -264,6 +264,8 @@ /* --------------------- GCVote ------------------------ */ + vote_t *vote = gcvote_restore(appdata, cache); + context->gcvote_request = gcvote_request(appdata, gcvote_callback, cache->url, context); @@ -272,6 +274,10 @@ gtk_container_add(GTK_CONTAINER(align), context->votebox); gtk_box_pack_start_defaults(GTK_BOX(ratebox), align); + /* fill with vote if present on disk (will also free vote) */ + if(vote) + gcvote_set(context, vote); + gtk_table_attach_defaults(GTK_TABLE(table), ratebox, 2,3,0,2); /* ----------------------------------------------------- */