Mercurial > geeqie.yaz
comparison src/image-load.c @ 1721:728aa6bf4988
fixed emitting of error signal from image loader
author | nadvornik |
---|---|
date | Thu, 24 Sep 2009 18:02:29 +0000 |
parents | 566abe50976d |
children |
comparison
equal
deleted
inserted
replaced
1720:f7bb7b83a6ce | 1721:728aa6bf4988 |
---|---|
821 | 821 |
822 static void image_loader_thread_run(gpointer data, gpointer user_data) | 822 static void image_loader_thread_run(gpointer data, gpointer user_data) |
823 { | 823 { |
824 ImageLoader *il = data; | 824 ImageLoader *il = data; |
825 gboolean cont; | 825 gboolean cont; |
826 gboolean err; | |
826 | 827 |
827 if (il->idle_priority > G_PRIORITY_DEFAULT_IDLE) | 828 if (il->idle_priority > G_PRIORITY_DEFAULT_IDLE) |
828 { | 829 { |
829 /* low prio, wait untill high prio tasks finishes */ | 830 /* low prio, wait untill high prio tasks finishes */ |
830 image_loader_thread_wait_high(); | 831 image_loader_thread_wait_high(); |
833 { | 834 { |
834 /* high prio */ | 835 /* high prio */ |
835 image_loader_thread_enter_high(); | 836 image_loader_thread_enter_high(); |
836 } | 837 } |
837 | 838 |
838 cont = image_loader_begin(il); | 839 err = !image_loader_begin(il); |
839 | 840 |
840 if (!cont && !image_loader_get_pixbuf(il)) | 841 if (err) |
841 { | 842 { |
842 /* | 843 /* |
843 loader failed, we have to send signal | 844 loader failed, we have to send signal |
844 (idle mode returns the image_loader_begin return value directly) | 845 (idle mode returns the image_loader_begin return value directly) |
845 (success is always reported indirectly from image_loader_begin) | 846 (success is always reported indirectly from image_loader_begin) |
846 */ | 847 */ |
847 image_loader_emit_error(il); | 848 image_loader_emit_error(il); |
848 } | 849 } |
849 | 850 |
851 cont = !err; | |
852 | |
850 while (cont && !image_loader_get_is_done(il) && !image_loader_get_stopping(il)) | 853 while (cont && !image_loader_get_is_done(il) && !image_loader_get_stopping(il)) |
851 { | 854 { |
852 if (il->idle_priority > G_PRIORITY_DEFAULT_IDLE) | 855 if (il->idle_priority > G_PRIORITY_DEFAULT_IDLE) |
853 { | 856 { |
854 /* low prio, wait untill high prio tasks finishes */ | 857 /* low prio, wait untill high prio tasks finishes */ |