Mercurial > geeqie
comparison src/image.c @ 25:0c3b353b666e
Fri Mar 25 22:39:30 2005 John Ellis <johne@verizon.net>
* image.c: Connect to 'zoom' signal of pixbuf-renderer and notify
listener to update. Fix delay flip by listening for 'render_complete'.
* pixbuf-renderer.[ch]: Add complete property and and emit a
'render-complete' signal when changing complete back to TRUE.
* view_dir_tree.c (vdtree_row_expanded): Populate a folder node
whenever it is expanded.
##### Note: GQview CVS on sourceforge is not always up to date, please use #####
##### an offical release when making enhancements and translation updates. #####
author | gqview |
---|---|
date | Sat, 26 Mar 2005 03:50:35 +0000 |
parents | 104e34f9ab1f |
children | acd9885ebd78 |
comparison
equal
deleted
inserted
replaced
24:104e34f9ab1f | 25:0c3b353b666e |
---|---|
74 static void image_update_util(ImageWindow *imd) | 74 static void image_update_util(ImageWindow *imd) |
75 { | 75 { |
76 if (imd->func_update) imd->func_update(imd, imd->data_update); | 76 if (imd->func_update) imd->func_update(imd, imd->data_update); |
77 } | 77 } |
78 | 78 |
79 static void image_zoom_cb(PixbufRenderer *pr, gdouble zoom, gpointer data) | |
80 { | |
81 ImageWindow *imd = data; | |
82 | |
83 image_update_util(imd); | |
84 } | |
85 | |
79 static void image_complete_util(ImageWindow *imd, gint preload) | 86 static void image_complete_util(ImageWindow *imd, gint preload) |
80 { | 87 { |
81 if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return; | 88 if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return; |
82 | 89 |
83 if (debug) printf("image load completed \"%s\" (%s)\n", | 90 if (debug) printf("image load completed \"%s\" (%s)\n", |
84 (preload) ? imd->read_ahead_path : imd->image_path, | 91 (preload) ? imd->read_ahead_path : imd->image_path, |
85 (preload) ? "preload" : "current"); | 92 (preload) ? "preload" : "current"); |
86 | 93 |
87 if (!preload) imd->completed = TRUE; | 94 if (!preload) imd->completed = TRUE; |
88 if (imd->func_complete) imd->func_complete(imd, preload, imd->data_complete); | 95 if (imd->func_complete) imd->func_complete(imd, preload, imd->data_complete); |
96 } | |
97 | |
98 static void image_render_complete_cb(PixbufRenderer *pr, gpointer data) | |
99 { | |
100 ImageWindow *imd = data; | |
101 | |
102 image_complete_util(imd, FALSE); | |
89 } | 103 } |
90 | 104 |
91 static void image_new_util(ImageWindow *imd) | 105 static void image_new_util(ImageWindow *imd) |
92 { | 106 { |
93 if (imd->func_new) imd->func_new(imd, imd->data_new); | 107 if (imd->func_new) imd->func_new(imd, imd->data_new); |
537 if (debug) printf ("image begin \n"); | 551 if (debug) printf ("image begin \n"); |
538 | 552 |
539 if (imd->il) return FALSE; | 553 if (imd->il) return FALSE; |
540 | 554 |
541 imd->completed = FALSE; | 555 imd->completed = FALSE; |
556 g_object_set(G_OBJECT(imd->pr), "complete", FALSE, NULL); | |
542 | 557 |
543 if (image_post_buffer_get(imd)) | 558 if (image_post_buffer_get(imd)) |
544 { | 559 { |
545 if (debug) printf("from post buffer: %s\n", imd->image_path); | 560 if (debug) printf("from post buffer: %s\n", imd->image_path); |
546 return TRUE; | 561 return TRUE; |
1409 G_CALLBACK(image_scroll_cb), imd); | 1424 G_CALLBACK(image_scroll_cb), imd); |
1410 | 1425 |
1411 g_signal_connect(G_OBJECT(imd->pr), "destroy", | 1426 g_signal_connect(G_OBJECT(imd->pr), "destroy", |
1412 G_CALLBACK(image_destroy_cb), imd); | 1427 G_CALLBACK(image_destroy_cb), imd); |
1413 | 1428 |
1429 g_signal_connect(G_OBJECT(imd->pr), "zoom", | |
1430 G_CALLBACK(image_zoom_cb), imd); | |
1431 g_signal_connect(G_OBJECT(imd->pr), "render_complete", | |
1432 G_CALLBACK(image_render_complete_cb), imd); | |
1433 | |
1414 return imd; | 1434 return imd; |
1415 } | 1435 } |
1416 | 1436 |