Mercurial > geeqie.yaz
comparison src/image.c @ 24:104e34f9ab1f
Wed Mar 23 00:22:28 2005 John Ellis <johne@verizon.net>
* image.c (image_change_from_image): Fix and use pixbuf_renderer_move.
* pan-view.c: Convert back to ImageWindow from PixbufRenderer, so that
focus and full screen work again.
* pixbuf-renderer.[ch] (pixbuf_renderer_move): Add this function.
##### 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 | Wed, 23 Mar 2005 05:29:45 +0000 |
parents | 17acca639a86 |
children | 0c3b353b666e |
comparison
equal
deleted
inserted
replaced
23:17acca639a86 | 24:104e34f9ab1f |
---|---|
945 | 945 |
946 if (info) *info = NULL; | 946 if (info) *info = NULL; |
947 return NULL; | 947 return NULL; |
948 } | 948 } |
949 | 949 |
950 #if 0 | |
951 static void image_loader_sync_data(ImageLoader *il, gpointer data) | 950 static void image_loader_sync_data(ImageLoader *il, gpointer data) |
952 { | 951 { |
953 /* change data for the callbacks directly */ | 952 /* change data for the callbacks directly */ |
954 | 953 |
955 il->data_area_ready = data; | 954 il->data_area_ready = data; |
956 il->data_error = data; | 955 il->data_error = data; |
957 il->data_done = data; | 956 il->data_done = data; |
958 il->data_percent = data; | 957 il->data_percent = data; |
959 } | 958 } |
960 #endif | |
961 | 959 |
962 /* this is more like a move function | 960 /* this is more like a move function |
963 * it moves most data from source to imd, source does keep a ref on the pixbuf | 961 * it moves most data from source to imd |
964 */ | 962 */ |
965 void image_change_from_image(ImageWindow *imd, ImageWindow *source) | 963 void image_change_from_image(ImageWindow *imd, ImageWindow *source) |
966 { | 964 { |
967 if (imd == source) return; | 965 if (imd == source) return; |
968 | 966 |
969 printf("FIXME: enable set from image\n"); | |
970 #if 0 | |
971 imd->zoom_min = source->zoom_min; | |
972 imd->zoom_max = source->zoom_max; | |
973 | |
974 imd->unknown = source->unknown; | 967 imd->unknown = source->unknown; |
975 | |
976 image_set_pixbuf(imd, source->pixbuf, image_zoom_get(source), TRUE); | |
977 | 968 |
978 imd->collection = source->collection; | 969 imd->collection = source->collection; |
979 imd->collection_info = source->collection_info; | 970 imd->collection_info = source->collection_info; |
980 imd->size = source->size; | 971 imd->size = source->size; |
981 imd->mtime = source->mtime; | 972 imd->mtime = source->mtime; |
983 image_set_path(imd, image_get_path(source)); | 974 image_set_path(imd, image_get_path(source)); |
984 | 975 |
985 image_loader_free(imd->il); | 976 image_loader_free(imd->il); |
986 imd->il = NULL; | 977 imd->il = NULL; |
987 | 978 |
988 if (imd->pixbuf && source->il) | 979 if (source->il) |
989 { | 980 { |
990 imd->il = source->il; | 981 imd->il = source->il; |
991 source->il = NULL; | 982 source->il = NULL; |
992 | 983 |
993 image_loader_sync_data(imd->il, imd); | 984 image_loader_sync_data(imd->il, imd); |
1017 imd->prev_path = source->prev_path; | 1008 imd->prev_path = source->prev_path; |
1018 source->prev_path = NULL; | 1009 source->prev_path = NULL; |
1019 | 1010 |
1020 imd->completed = source->completed; | 1011 imd->completed = source->completed; |
1021 | 1012 |
1022 imd->x_scroll = source->x_scroll; | 1013 pixbuf_renderer_move(PIXBUF_RENDERER(imd->pr), PIXBUF_RENDERER(source->pr)); |
1023 imd->y_scroll = source->y_scroll; | |
1024 | |
1025 if (imd->source_tiles_enabled) | |
1026 { | |
1027 image_source_tile_unset(imd); | |
1028 } | |
1029 | |
1030 if (source->source_tiles_enabled) | |
1031 { | |
1032 imd->source_tiles_enabled = source->source_tiles_enabled; | |
1033 imd->source_tiles_cache_size = source->source_tiles_cache_size; | |
1034 imd->source_tiles = source->source_tiles; | |
1035 imd->source_tile_width = source->source_tile_width; | |
1036 imd->source_tile_height = source->source_tile_height; | |
1037 | |
1038 source->source_tiles_enabled = FALSE; | |
1039 source->source_tiles = NULL; | |
1040 | |
1041 imd->func_tile_request = source->func_tile_request; | |
1042 imd->func_tile_dispose = source->func_tile_dispose; | |
1043 imd->data_tile = source->data_tile; | |
1044 | |
1045 source->func_tile_request = NULL; | |
1046 source->func_tile_dispose = NULL; | |
1047 source->data_tile = NULL; | |
1048 | |
1049 imd->image_width = source->image_width; | |
1050 imd->image_height = source->image_height; | |
1051 | |
1052 if (image_zoom_clamp(imd, source->zoom, TRUE, TRUE)) | |
1053 { | |
1054 image_size_clamp(imd); | |
1055 image_scroll_clamp(imd); | |
1056 image_tile_sync(imd, imd->width, imd->height, FALSE); | |
1057 image_redraw(imd, FALSE); | |
1058 } | |
1059 return; | |
1060 } | |
1061 | |
1062 image_scroll_clamp(imd); | |
1063 #endif | |
1064 } | 1014 } |
1065 | 1015 |
1066 /* manipulation */ | 1016 /* manipulation */ |
1067 | 1017 |
1068 void image_area_changed(ImageWindow *imd, gint x, gint y, gint width, gint height) | 1018 void image_area_changed(ImageWindow *imd, gint x, gint y, gint width, gint height) |