Mercurial > geeqie
comparison src/thumb_standard.c @ 1721:46284779a897
fixed moving and maintenance of std. thumbnails
https://sourceforge.net/tracker/?func=detail&aid=2836224&group_id=222125&atid=1054680
author | nadvornik |
---|---|
date | Sun, 23 Aug 2009 13:37:15 +0000 |
parents | c776b1310ca6 |
children | 680bcf82eaff |
comparison
equal
deleted
inserted
replaced
1720:808d4308ca00 | 1721:46284779a897 |
---|---|
776 { | 776 { |
777 ThumbValidate *tv = data; | 777 ThumbValidate *tv = data; |
778 GdkPixbuf *pixbuf; | 778 GdkPixbuf *pixbuf; |
779 gboolean valid = FALSE; | 779 gboolean valid = FALSE; |
780 | 780 |
781 /* this function is called on success, so the pixbuf should not be a fallback*/ | 781 /* get the original thumbnail pixbuf (unrotated, with original options) |
782 pixbuf = thumb_loader_std_get_pixbuf(tv->tl); | 782 this is called from image_loader done callback, so tv->tl->il must exist*/ |
783 pixbuf = image_loader_get_pixbuf(tv->tl->il); | |
783 if (pixbuf) | 784 if (pixbuf) |
784 { | 785 { |
785 const gchar *uri; | 786 const gchar *uri; |
786 const gchar *mtime_str; | 787 const gchar *mtime_str; |
787 | 788 |
818 valid = TRUE; | 819 valid = TRUE; |
819 } | 820 } |
820 } | 821 } |
821 } | 822 } |
822 } | 823 } |
823 | 824 else |
824 g_object_unref(pixbuf); | 825 { |
826 DEBUG_1("invalid image found in std cache: %s", tv->path); | |
827 } | |
825 } | 828 } |
826 | 829 |
827 thumb_loader_std_thumb_file_validate_finish(tv, valid); | 830 thumb_loader_std_thumb_file_validate_finish(tv, valid); |
828 } | 831 } |
829 | 832 |
938 static void thumb_std_maint_move_validate_cb(const gchar *path, gboolean valid, gpointer data) | 941 static void thumb_std_maint_move_validate_cb(const gchar *path, gboolean valid, gpointer data) |
939 { | 942 { |
940 TMaintMove *tm = data; | 943 TMaintMove *tm = data; |
941 GdkPixbuf *pixbuf; | 944 GdkPixbuf *pixbuf; |
942 | 945 |
943 /* this function is called on success, so the pixbuf should not be a fallback*/ | 946 /* get the original thumbnail pixbuf (unrotated, with original options) |
944 pixbuf = thumb_loader_std_get_pixbuf(tm->tl); | 947 this is called from image_loader done callback, so tm->tl->il must exist*/ |
948 pixbuf = image_loader_get_pixbuf(tm->tl->il); | |
945 if (pixbuf) | 949 if (pixbuf) |
946 { | 950 { |
947 const gchar *uri; | 951 const gchar *uri; |
948 const gchar *mtime_str; | 952 const gchar *mtime_str; |
949 | 953 |
982 thumb_loader_std_save(tm->tl, pixbuf); | 986 thumb_loader_std_save(tm->tl, pixbuf); |
983 } | 987 } |
984 | 988 |
985 DEBUG_1("thumb move unlink: %s", tm->thumb_path); | 989 DEBUG_1("thumb move unlink: %s", tm->thumb_path); |
986 unlink_file(tm->thumb_path); | 990 unlink_file(tm->thumb_path); |
987 g_object_unref(pixbuf); | |
988 } | 991 } |
989 | 992 |
990 thumb_std_maint_move_step(tm); | 993 thumb_std_maint_move_step(tm); |
991 } | 994 } |
992 | 995 |