Diff of /trunk/src/cache.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 159 by harbaum, Wed Nov 4 20:28:54 2009 UTC revision 160 by harbaum, Thu Nov 5 07:00:52 2009 UTC
# Line 144  static void gcvote_callback(vote_t *vote Line 144  static void gcvote_callback(vote_t *vote
144    
145    /* no vote returned: request failed, just cleanup */    /* no vote returned: request failed, just cleanup */
146    if(!vote) {    if(!vote) {
147      printf("gcvote callback for failed request\n");      printf("gcvote: callback for failed request\n");
148    
149      gcvote_request_free(context->gcvote_request);      gcvote_request_free(context->gcvote_request);
150      context->gcvote_request = NULL;      context->gcvote_request = NULL;
151      return;      return;
152    }    }
153    
154    printf("gcvote callback is being called with a %d/%d\n",    printf("gcvote: callback is being called with a %d/%d\n",
155           vote->quality, vote->votes);           vote->quality, vote->votes);
156    
157    gcvote_set(context, vote);    gcvote_set(context, vote);
# Line 264  static GtkWidget *cache_overview(cache_c Line 264  static GtkWidget *cache_overview(cache_c
264    
265    /* --------------------- GCVote ------------------------ */    /* --------------------- GCVote ------------------------ */
266    
267      vote_t *vote = gcvote_restore(appdata, cache);
268    
269    context->gcvote_request =    context->gcvote_request =
270      gcvote_request(appdata, gcvote_callback, cache->url, context);      gcvote_request(appdata, gcvote_callback, cache->url, context);
271    
# Line 272  static GtkWidget *cache_overview(cache_c Line 274  static GtkWidget *cache_overview(cache_c
274    gtk_container_add(GTK_CONTAINER(align), context->votebox);    gtk_container_add(GTK_CONTAINER(align), context->votebox);
275    gtk_box_pack_start_defaults(GTK_BOX(ratebox), align);    gtk_box_pack_start_defaults(GTK_BOX(ratebox), align);
276    
277      /* fill with vote if present on disk (will also free vote) */
278      if(vote)
279        gcvote_set(context, vote);
280    
281    gtk_table_attach_defaults(GTK_TABLE(table), ratebox, 2,3,0,2);    gtk_table_attach_defaults(GTK_TABLE(table), ratebox, 2,3,0,2);
282    
283    /* ----------------------------------------------------- */    /* ----------------------------------------------------- */

Legend:
Removed from v.159  
changed lines
  Added in v.160