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); |
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 |
|
|
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 |
/* ----------------------------------------------------- */ |
/* ----------------------------------------------------- */ |