Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
feh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
derf
feh
Commits
c274eafe
Commit
c274eafe
authored
8 years ago
by
Ernie Ewert
Browse files
Options
Downloads
Patches
Plain Diff
Added a "zoom fit" key binding for the current image.
Fixed(?) Makefile document build issue for README.md
parent
215732ab
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+2
-2
2 additions, 2 deletions
Makefile
src/keyevents.c
+13
-3
13 additions, 3 deletions
src/keyevents.c
src/options.h
+1
-0
1 addition, 0 deletions
src/options.h
with
16 additions
and
5 deletions
Makefile
+
2
−
2
View file @
c274eafe
...
...
@@ -51,8 +51,8 @@ install-man:
install-doc
:
@
echo
installing docs to
${
doc_dir
}
@
mkdir
-p
${
doc_dir
}
@
cp
AUTHORS ChangeLog README TODO
${
doc_dir
}
@
chmod
644
${
doc_dir
}
/AUTHORS
${
doc_dir
}
/ChangeLog
${
doc_dir
}
/README
\
@
cp
AUTHORS ChangeLog README
.md
TODO
${
doc_dir
}
@
chmod
644
${
doc_dir
}
/AUTHORS
${
doc_dir
}
/ChangeLog
${
doc_dir
}
/README
.md
\
${
doc_dir
}
/TODO
install-bin
:
...
...
This diff is collapsed.
Click to expand it.
src/keyevents.c
+
13
−
3
View file @
c274eafe
...
...
@@ -140,7 +140,7 @@ void init_keyevents(void) {
feh_set_kb
(
&
keys
.
toggle_aliasing
,
0
,
XK_A
,
0
,
0
,
0
,
0
);
feh_set_kb
(
&
keys
.
toggle_filenames
,
0
,
XK_d
,
0
,
0
,
0
,
0
);
#ifdef HAVE_LIBEXIF
feh_set_kb
(
&
keys
.
toggle_exif
,
0
,
XK_e
,
0
,
0
,
0
,
0
);
feh_set_kb
(
&
keys
.
toggle_exif
,
0
,
XK_e
,
0
,
0
,
0
,
0
);
#endif
feh_set_kb
(
&
keys
.
toggle_info
,
0
,
XK_i
,
0
,
0
,
0
,
0
);
feh_set_kb
(
&
keys
.
toggle_pointer
,
0
,
XK_o
,
0
,
0
,
0
,
0
);
...
...
@@ -439,6 +439,8 @@ fehkey *feh_str_to_kb(char *action)
return
&
keys
.
zoom_default
;
else
if
(
!
strcmp
(
action
,
"zoom_fit"
))
return
&
keys
.
zoom_fit
;
else
if
(
!
strcmp
(
action
,
"zoom_fill"
))
return
&
keys
.
zoom_fill
;
else
if
(
!
strcmp
(
action
,
"size_to_image"
))
return
&
keys
.
size_to_image
;
else
if
(
!
strcmp
(
action
,
"render"
))
...
...
@@ -653,6 +655,14 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy
winwidget_center_image
(
winwid
);
winwidget_render_image
(
winwid
,
0
,
0
);
}
else
if
(
feh_is_kp
(
&
keys
.
zoom_fill
,
state
,
keysym
,
button
))
{
int
save_zoom
=
opt
.
zoom_mode
;
opt
.
zoom_mode
=
ZOOM_MODE_FILL
;
feh_calc_needed_zoom
(
&
winwid
->
zoom
,
winwid
->
im_w
,
winwid
->
im_h
,
winwid
->
w
,
winwid
->
h
);
winwidget_center_image
(
winwid
);
winwidget_render_image
(
winwid
,
0
,
0
);
opt
.
zoom_mode
=
save_zoom
;
}
else
if
(
feh_is_kp
(
&
keys
.
render
,
state
,
keysym
,
button
))
{
if
(
winwid
->
type
==
WIN_TYPE_THUMBNAIL
)
feh_thumbnail_show_selected
();
...
...
@@ -677,7 +687,7 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy
opt
.
draw_exif
=
!
opt
.
draw_exif
;
winwidget_rerender_all
(
0
);
}
#endif
#endif
else
if
(
feh_is_kp
(
&
keys
.
toggle_info
,
state
,
keysym
,
button
))
{
opt
.
draw_info
=
!
opt
.
draw_info
;
winwidget_rerender_all
(
0
);
...
...
@@ -777,7 +787,7 @@ void feh_event_handle_generic(winwidget winwid, unsigned int state, KeySym keysy
}
#endif
/* HAVE_LIBXINERAMA */
}
else
if
(
feh_is_kp
(
&
keys
.
reload_plus
,
state
,
keysym
,
button
)){
else
if
(
feh_is_kp
(
&
keys
.
reload_plus
,
state
,
keysym
,
button
)){
if
(
opt
.
reload
<
SLIDESHOW_RELOAD_MAX
)
opt
.
reload
++
;
else
if
(
opt
.
verbose
)
...
...
This diff is collapsed.
Click to expand it.
src/options.h
+
1
−
0
View file @
c274eafe
...
...
@@ -175,6 +175,7 @@ struct __fehkb {
struct
__fehkey
zoom_out
;
struct
__fehkey
zoom_default
;
struct
__fehkey
zoom_fit
;
struct
__fehkey
zoom_fill
;
struct
__fehkey
render
;
struct
__fehkey
toggle_actions
;
struct
__fehkey
toggle_filenames
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment