Mercurial > geeqie.yaz
comparison src/thumb.c @ 333:767b53cd9ab7
Rename thumbnails related options.
author | zas_ |
---|---|
date | Sat, 12 Apr 2008 09:41:44 +0000 |
parents | b16b9b8979e5 |
children | 4b2d7f9af171 |
comparison
equal
deleted
inserted
replaced
332:3c4bad726e98 | 333:767b53cd9ab7 |
---|---|
194 h = tl->max_h; | 194 h = tl->max_h; |
195 w = (double)h / ph * pw; | 195 w = (double)h / ph * pw; |
196 if (w < 1) w = 1; | 196 if (w < 1) w = 1; |
197 } | 197 } |
198 | 198 |
199 tl->pixbuf = gdk_pixbuf_scale_simple(pixbuf, w, h, (GdkInterpType)options->thumbnail_quality); | 199 tl->pixbuf = gdk_pixbuf_scale_simple(pixbuf, w, h, (GdkInterpType)options->thumbnails.quality); |
200 save = TRUE; | 200 save = TRUE; |
201 } | 201 } |
202 else | 202 else |
203 { | 203 { |
204 tl->pixbuf = pixbuf; | 204 tl->pixbuf = pixbuf; |
253 static void thumb_loader_setup(ThumbLoader *tl, gchar *path) | 253 static void thumb_loader_setup(ThumbLoader *tl, gchar *path) |
254 { | 254 { |
255 image_loader_free(tl->il); | 255 image_loader_free(tl->il); |
256 tl->il = image_loader_new(file_data_new_simple(path)); | 256 tl->il = image_loader_new(file_data_new_simple(path)); |
257 | 257 |
258 if (options->thumbnail_fast) | 258 if (options->thumbnails.fast) |
259 { | 259 { |
260 /* this will speed up jpegs by up to 3x in some cases */ | 260 /* this will speed up jpegs by up to 3x in some cases */ |
261 image_loader_set_requested_size(tl->il, tl->max_w, tl->max_h); | 261 image_loader_set_requested_size(tl->il, tl->max_w, tl->max_h); |
262 } | 262 } |
263 | 263 |
348 cache_path = NULL; | 348 cache_path = NULL; |
349 } | 349 } |
350 } | 350 } |
351 } | 351 } |
352 | 352 |
353 if (!cache_path && options->use_xvpics_thumbnails) | 353 if (!cache_path && options->thumbnails.use_xvpics) |
354 { | 354 { |
355 tl->pixbuf = get_xv_thumbnail(tl->path, tl->max_w, tl->max_h); | 355 tl->pixbuf = get_xv_thumbnail(tl->path, tl->max_w, tl->max_h); |
356 if (tl->pixbuf) | 356 if (tl->pixbuf) |
357 { | 357 { |
358 thumb_loader_delay_done(tl); | 358 thumb_loader_delay_done(tl); |
459 | 459 |
460 ThumbLoader *thumb_loader_new(gint width, gint height) | 460 ThumbLoader *thumb_loader_new(gint width, gint height) |
461 { | 461 { |
462 ThumbLoader *tl; | 462 ThumbLoader *tl; |
463 | 463 |
464 if (options->thumbnail_spec_standard) | 464 if (options->thumbnails.spec_standard) |
465 { | 465 { |
466 return (ThumbLoader *)thumb_loader_std_new(width, height); | 466 return (ThumbLoader *)thumb_loader_std_new(width, height); |
467 } | 467 } |
468 | 468 |
469 tl = g_new0(ThumbLoader, 1); | 469 tl = g_new0(ThumbLoader, 1); |
470 tl->standard_loader = FALSE; | 470 tl->standard_loader = FALSE; |
471 tl->path = NULL; | 471 tl->path = NULL; |
472 tl->cache_enable = options->enable_thumb_caching; | 472 tl->cache_enable = options->thumbnails.enable_caching; |
473 tl->cache_hit = FALSE; | 473 tl->cache_hit = FALSE; |
474 tl->percent_done = 0.0; | 474 tl->percent_done = 0.0; |
475 tl->max_w = width; | 475 tl->max_w = width; |
476 tl->max_h = height; | 476 tl->max_h = height; |
477 | 477 |