diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-10-10 11:58:59 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-10-10 12:09:23 +0200 |
commit | 6d84a1d22038d0a03c19d43ec4c8a01acbf13426 (patch) | |
tree | 4851e1c9b60a065485f90bae6c4afd7cd0ed6ca6 /src/thumbnail.c | |
parent | 58e7ef40a6fc437f84b7761d2bf83acfc534ceb8 (diff) |
Code cleanup
Diffstat (limited to 'src/thumbnail.c')
-rw-r--r-- | src/thumbnail.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/src/thumbnail.c b/src/thumbnail.c index 860308d..b13b3d8 100644 --- a/src/thumbnail.c +++ b/src/thumbnail.c @@ -475,24 +475,20 @@ void feh_thumbnail_mark_removed(feh_file * file, int deleted) if (thumb) { w = winwidget_get_first_window_of_type(WIN_TYPE_THUMBNAIL); if (w) { - td.font_main = imlib_load_font(DEFAULT_FONT_TITLE); + int tw, th; if (deleted) gib_imlib_image_fill_rectangle(w->im, thumb->x, thumb->y, thumb->w, thumb->h, 255, 0, 0, 150); else gib_imlib_image_fill_rectangle(w->im, thumb->x, thumb->y, thumb->w, thumb->h, 0, 0, 255, 150); - if (td.font_main) { - int tw, th; - - gib_imlib_get_text_size(td.font_main, "X", NULL, &tw, &th, - IMLIB_TEXT_TO_RIGHT); - gib_imlib_text_draw(w->im, td.font_main, NULL, - thumb->x + ((thumb->w - tw) / 2), - thumb->y + ((thumb->h - th) / 2), "X", - IMLIB_TEXT_TO_RIGHT, 205, 205, 50, 255); - } else - weprintf(DEFAULT_FONT_TITLE); + + gib_imlib_get_text_size(td.font_main, "X", NULL, &tw, &th, + IMLIB_TEXT_TO_RIGHT); + gib_imlib_text_draw(w->im, td.font_main, NULL, + thumb->x + ((thumb->w - tw) / 2), + thumb->y + ((thumb->h - th) / 2), "X", + IMLIB_TEXT_TO_RIGHT, 205, 205, 50, 255); winwidget_render_image(w, 0, 1); } thumb->exists = 0; @@ -502,12 +498,6 @@ void feh_thumbnail_mark_removed(feh_file * file, int deleted) void feh_thumbnail_calculate_geometry(void) { - gib_list *l; - feh_file *file; - - int x = 0, y = 0; - int fw, fh; - if (!opt.limit_w && !opt.limit_h) { if (td.im_bg) { opt.limit_w = td.bg_w; @@ -843,13 +833,13 @@ int feh_thumbnail_setup_thumbnail_dir(void) if (stat(dir_thumbnails, &sb) != 0) { if (mkdir(dir_thumbnails, 0700) == -1) - weprintf("unable to create %s directory", dir_thumbnails); + weprintf("unable to create directory %s", dir_thumbnails); } free(dir_thumbnails); if (mkdir(dir, 0700) == -1) - weprintf("unable to create %s directory", dir); + weprintf("unable to create directory %s", dir); else status = 1; } |