Mercurial > geeqie
comparison src/pan-view.c @ 99:d19b0de6d0bb
Sat Nov 4 17:14:47 2006 John Ellis <johne@verizon.net>
* pan-view.c: Always recalculate canvas size when displaying popups.
* README: Updates.
* po/eo.po: Mark translation for 'Command Line' not fuzzy.
* configure.in: Release 2.1.4 (quick bug fix for pan view).
author | gqview |
---|---|
date | Sat, 04 Nov 2006 22:24:47 +0000 |
parents | ddde49aace00 |
children | 73443803ea59 |
comparison
equal
deleted
inserted
replaced
98:e639afdc1c60 | 99:d19b0de6d0bb |
---|---|
670 ch = MAX((gint)ceil((gdouble)height / row), PAN_TILE_SIZE * 2); | 670 ch = MAX((gint)ceil((gdouble)height / row), PAN_TILE_SIZE * 2); |
671 | 671 |
672 row = row * 2 - 1; | 672 row = row * 2 - 1; |
673 col = col * 2 - 1; | 673 col = col * 2 - 1; |
674 | 674 |
675 printf("intersect speedup grid is %dx%d, based on %d average per grid\n", col, row, grid_size); | 675 if (debug) printf("intersect speedup grid is %dx%d, based on %d average per grid\n", col, row, grid_size); |
676 | 676 |
677 for (j = 0; j < row; j++) | 677 for (j = 0; j < row; j++) |
678 for (i = 0; i < col; i++) | 678 for (i = 0; i < col; i++) |
679 { | 679 { |
680 if ((i + 1) * cw / 2 < width && (j + 1) * ch / 2 < height) | 680 if ((i + 1) * cw / 2 < width && (j + 1) * ch / 2 < height) |
2497 break; | 2497 break; |
2498 } | 2498 } |
2499 | 2499 |
2500 pan_cache_free(pw); | 2500 pan_cache_free(pw); |
2501 | 2501 |
2502 printf("computed %d objects\n", g_list_length(pw->list)); | 2502 if (debug) printf("computed %d objects\n", g_list_length(pw->list)); |
2503 } | 2503 } |
2504 | 2504 |
2505 static GList *pan_layout_intersect_l(GList *list, GList *item_list, | 2505 static GList *pan_layout_intersect_l(GList *list, GList *item_list, |
2506 gint x, gint y, gint width, gint height) | 2506 gint x, gint y, gint width, gint height) |
2507 { | 2507 { |
3338 | 3338 |
3339 if (width > 0 && height > 0) | 3339 if (width > 0 && height > 0) |
3340 { | 3340 { |
3341 gdouble align; | 3341 gdouble align; |
3342 | 3342 |
3343 printf("Canvas size is %d x %d\n", width, height); | 3343 if (debug) printf("Canvas size is %d x %d\n", width, height); |
3344 | 3344 |
3345 pan_grid_build(pw, width, height, 1000); | 3345 pan_grid_build(pw, width, height, 1000); |
3346 | 3346 |
3347 pixbuf_renderer_set_tiles(PIXBUF_RENDERER(pw->imd->pr), width, height, | 3347 pixbuf_renderer_set_tiles(PIXBUF_RENDERER(pw->imd->pr), width, height, |
3348 PAN_TILE_SIZE, PAN_TILE_SIZE, 10, | 3348 PAN_TILE_SIZE, PAN_TILE_SIZE, 10, |
3928 pan_item_set_key(p, "info"); | 3928 pan_item_set_key(p, "info"); |
3929 pan_item_size_by_item(pbox, p, PREF_PAD_BORDER); | 3929 pan_item_size_by_item(pbox, p, PREF_PAD_BORDER); |
3930 | 3930 |
3931 pan_item_box_shadow(pbox, PAN_SHADOW_OFFSET * 2, PAN_SHADOW_FADE * 2); | 3931 pan_item_box_shadow(pbox, PAN_SHADOW_OFFSET * 2, PAN_SHADOW_FADE * 2); |
3932 pan_item_added(pw, pbox); | 3932 pan_item_added(pw, pbox); |
3933 | 3933 } |
3934 pan_layout_resize(pw); | 3934 } |
3935 } | 3935 |
3936 } | 3936 pan_layout_resize(pw); |
3937 } | 3937 } |
3938 | 3938 |
3939 | 3939 |
3940 /* | 3940 /* |
3941 *----------------------------------------------------------------------------- | 3941 *----------------------------------------------------------------------------- |