Bugfixing update to feh-1.14.2
This commit is contained in:
parent
ab66e1d109
commit
2071e7c1a2
@ -1,9 +1,8 @@
|
|||||||
# $OpenBSD: Makefile,v 1.25 2011/06/28 07:40:08 dcoppa Exp $
|
# $OpenBSD: Makefile,v 1.26 2011/07/05 08:05:35 dcoppa Exp $
|
||||||
|
|
||||||
COMMENT= lightweight image viewer
|
COMMENT= lightweight image viewer
|
||||||
|
|
||||||
DISTNAME= feh-1.14.1
|
DISTNAME= feh-1.14.2
|
||||||
REVISION= 2
|
|
||||||
EXTRACT_SUFX= .tar.bz2
|
EXTRACT_SUFX= .tar.bz2
|
||||||
CATEGORIES= graphics
|
CATEGORIES= graphics
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
MD5 (feh-1.14.1.tar.bz2) = iIF3YfL6VWKfSCZSjfO55Q==
|
MD5 (feh-1.14.2.tar.bz2) = WmSpOuAPL0GJphGeg11EUg==
|
||||||
RMD160 (feh-1.14.1.tar.bz2) = 6Dh5uqd5EMqBgavnUUyAkm7jvXc=
|
RMD160 (feh-1.14.2.tar.bz2) = EKZso4HzthFIv2m4FhWPlnVrPKo=
|
||||||
SHA1 (feh-1.14.1.tar.bz2) = TTWxTEHNinU+bY0zS6shbGk2Fog=
|
SHA1 (feh-1.14.2.tar.bz2) = Va9g81+yGCXlRQtnE/XXgfejTN4=
|
||||||
SHA256 (feh-1.14.1.tar.bz2) = YeIbNvodA80aMhtNWm6PVBUSyAbRR077ll74U6+YWrU=
|
SHA256 (feh-1.14.2.tar.bz2) = mdsCmalKsAv7Y6ZMTSmNgwZRJH7JY4CHQohGGBUL74Q=
|
||||||
SIZE (feh-1.14.1.tar.bz2) = 2229518
|
SIZE (feh-1.14.2.tar.bz2) = 2229963
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
$OpenBSD: patch-man_feh_pre,v 1.4 2011/06/28 07:40:08 dcoppa Exp $
|
|
||||||
--- man/feh.pre.orig Thu May 19 22:36:13 2011
|
|
||||||
+++ man/feh.pre Tue Jun 28 09:33:26 2011
|
|
||||||
@@ -239,6 +239,14 @@ below each thumbnail. Enables
|
|
||||||
.It Cm -F , --fullscreen
|
|
||||||
.
|
|
||||||
Make the window fullscreen.
|
|
||||||
+Note that in this mode, large images will always be scaled down to fit the
|
|
||||||
+screen,
|
|
||||||
+.Cm --zoom Ar zoom
|
|
||||||
+only affects smaller images and never scales larger than necessary to fit the
|
|
||||||
+screen size. The only exception is a
|
|
||||||
+.Ar zoom
|
|
||||||
+of 100, in which case images will always be shown at 100% zoom, no matter
|
|
||||||
+their dimensions.
|
|
||||||
.
|
|
||||||
.It Cm -g , --geometry Ar width No x Ar height
|
|
||||||
.
|
|
||||||
@@ -670,7 +678,7 @@ can also be used as a background setter. It will stor
|
|
||||||
necessary to set the background in
|
|
||||||
.Pa ~/.fehbg ,
|
|
||||||
so to have your background restored everytime you start X, you can add
|
|
||||||
-.Qq `eval cat ~/.fehbg`
|
|
||||||
+.Qq eval $(cat ~/.fehbg)
|
|
||||||
to your X startup script
|
|
||||||
.Pq like Pa ~/.xinitrc .
|
|
||||||
.
|
|
@ -1,17 +0,0 @@
|
|||||||
$OpenBSD: patch-src_filelist_c,v 1.1 2011/05/23 14:03:06 dcoppa Exp $
|
|
||||||
|
|
||||||
Fix memleak in add_file_to_filelist_recursively scandir call
|
|
||||||
(commit f2be037b77015dc9eba66620d49928ef1f0ef3aa)
|
|
||||||
|
|
||||||
--- src/filelist.c.orig Mon May 23 15:56:24 2011
|
|
||||||
+++ src/filelist.c Mon May 23 15:57:13 2011
|
|
||||||
@@ -221,8 +221,8 @@ void add_file_to_filelist_recursively(char *origpath,
|
|
||||||
add_file_to_filelist_recursively(newfile, FILELIST_LAST);
|
|
||||||
|
|
||||||
free(newfile);
|
|
||||||
- free(de[cnt]);
|
|
||||||
}
|
|
||||||
+ free(de[cnt]);
|
|
||||||
}
|
|
||||||
free(de);
|
|
||||||
closedir(dir);
|
|
@ -1,63 +0,0 @@
|
|||||||
$OpenBSD: patch-src_imlib_c,v 1.7 2011/06/28 07:40:08 dcoppa Exp $
|
|
||||||
--- src/imlib.c.orig Thu May 19 22:36:13 2011
|
|
||||||
+++ src/imlib.c Tue Jun 28 09:30:29 2011
|
|
||||||
@@ -434,7 +434,7 @@ void feh_draw_errstr(winwidget w)
|
|
||||||
void feh_draw_filename(winwidget w)
|
|
||||||
{
|
|
||||||
static Imlib_Font fn = NULL;
|
|
||||||
- int tw = 0, th = 0;
|
|
||||||
+ int tw = 0, th = 0, nw = 0;
|
|
||||||
Imlib_Image im = NULL;
|
|
||||||
static DATA8 atab[256];
|
|
||||||
char *s = NULL;
|
|
||||||
@@ -462,10 +462,22 @@ void feh_draw_filename(winwidget w)
|
|
||||||
memset(atab, 0, sizeof(atab));
|
|
||||||
|
|
||||||
/* Work out how high the font is */
|
|
||||||
- gib_imlib_get_text_size(fn, FEH_FILE(w->file->data)->filename, NULL, &tw, &th, IMLIB_TEXT_TO_RIGHT);
|
|
||||||
+ gib_imlib_get_text_size(fn, FEH_FILE(w->file->data)->filename, NULL, &tw,
|
|
||||||
+ &th, IMLIB_TEXT_TO_RIGHT);
|
|
||||||
|
|
||||||
- /* tw is no longer correct, if the filename is shorter than
|
|
||||||
- * the string "%d of %d" used below in fullscreen mode */
|
|
||||||
+ if (gib_list_length(filelist) > 1) {
|
|
||||||
+ len = snprintf(NULL, 0, "%d of %d", gib_list_length(filelist),
|
|
||||||
+ gib_list_length(filelist)) + 1;
|
|
||||||
+ s = emalloc(len);
|
|
||||||
+ snprintf(s, len, "%d of %d", gib_list_num(filelist, current_file) +
|
|
||||||
+ 1, gib_list_length(filelist));
|
|
||||||
+
|
|
||||||
+ gib_imlib_get_text_size(fn, s, NULL, &nw, NULL, IMLIB_TEXT_TO_RIGHT);
|
|
||||||
+
|
|
||||||
+ if (nw > tw)
|
|
||||||
+ tw = nw;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
tw += 3;
|
|
||||||
th += 3;
|
|
||||||
im = imlib_create_image(tw, 2 * th);
|
|
||||||
@@ -473,20 +485,16 @@ void feh_draw_filename(winwidget w)
|
|
||||||
eprintf("Couldn't create image. Out of memory?");
|
|
||||||
|
|
||||||
gib_imlib_image_set_has_alpha(im, 1);
|
|
||||||
- gib_imlib_apply_color_modifier_to_rectangle(im, 0, 0, tw, 2 * th, NULL, NULL, NULL, atab);
|
|
||||||
+ gib_imlib_apply_color_modifier_to_rectangle(im, 0, 0, tw, 2 * th, NULL,
|
|
||||||
+ NULL, NULL, atab);
|
|
||||||
gib_imlib_image_fill_rectangle(im, 0, 0, tw, 2 * th, 0, 0, 0, 0);
|
|
||||||
|
|
||||||
gib_imlib_text_draw(im, fn, NULL, 2, 2, FEH_FILE(w->file->data)->filename,
|
|
||||||
IMLIB_TEXT_TO_RIGHT, 0, 0, 0, 255);
|
|
||||||
gib_imlib_text_draw(im, fn, NULL, 1, 1, FEH_FILE(w->file->data)->filename,
|
|
||||||
IMLIB_TEXT_TO_RIGHT, 255, 255, 255, 255);
|
|
||||||
- /* Print the position in the filelist, if we have >=2 files */
|
|
||||||
- if (gib_list_length(filelist) > 1) {
|
|
||||||
- /* sic! */
|
|
||||||
- len = snprintf(NULL, 0, "%d of %d", gib_list_length(filelist), gib_list_length(filelist)) + 1;
|
|
||||||
- s = emalloc(len);
|
|
||||||
- snprintf(s, len, "%d of %d", gib_list_num(filelist, current_file) + 1, gib_list_length(filelist));
|
|
||||||
- /* This should somehow be right-aligned */
|
|
||||||
+
|
|
||||||
+ if (s) {
|
|
||||||
gib_imlib_text_draw(im, fn, NULL, 2, th + 1, s, IMLIB_TEXT_TO_RIGHT, 0, 0, 0, 255);
|
|
||||||
gib_imlib_text_draw(im, fn, NULL, 1, th, s, IMLIB_TEXT_TO_RIGHT, 255, 255, 255, 255);
|
|
||||||
free(s);
|
|
@ -1,7 +1,7 @@
|
|||||||
$OpenBSD: patch-src_keyevents_c,v 1.4 2011/05/02 21:22:58 dcoppa Exp $
|
$OpenBSD: patch-src_keyevents_c,v 1.5 2011/07/05 08:05:35 dcoppa Exp $
|
||||||
--- src/keyevents.c.orig Fri Dec 3 19:42:44 2010
|
--- src/keyevents.c.orig Mon Jul 4 14:49:17 2011
|
||||||
+++ src/keyevents.c Wed Jan 5 14:07:07 2011
|
+++ src/keyevents.c Tue Jul 5 09:59:07 2011
|
||||||
@@ -155,7 +155,7 @@ void init_keyevents(void) {
|
@@ -156,7 +156,7 @@ void init_keyevents(void) {
|
||||||
|
|
||||||
free(confpath);
|
free(confpath);
|
||||||
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
$OpenBSD: patch-src_winwidget_c,v 1.5 2011/06/28 07:40:08 dcoppa Exp $
|
|
||||||
--- src/winwidget.c.orig Thu May 19 22:36:13 2011
|
|
||||||
+++ src/winwidget.c Tue Jun 28 09:33:26 2011
|
|
||||||
@@ -464,10 +464,12 @@ void winwidget_render_image(winwidget winwid, int resi
|
|
||||||
double old_zoom = winwid->zoom;
|
|
||||||
|
|
||||||
winwid->zoom = 0.01 * opt.default_zoom;
|
|
||||||
- if ((winwid->im_h * winwid->zoom) > max_h)
|
|
||||||
- winwid->zoom = old_zoom;
|
|
||||||
- if ((winwid->im_w * winwid->zoom) > max_w)
|
|
||||||
- winwid->zoom = old_zoom;
|
|
||||||
+ if (winwid->zoom != 1.0) {
|
|
||||||
+ if ((winwid->im_h * winwid->zoom) > max_h)
|
|
||||||
+ winwid->zoom = old_zoom;
|
|
||||||
+ else if ((winwid->im_w * winwid->zoom) > max_w)
|
|
||||||
+ winwid->zoom = old_zoom;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
winwid->im_x = ((int)
|
|
||||||
(max_w - (winwid->im_w * winwid->zoom))) >> 1;
|
|
Loading…
Reference in New Issue
Block a user