diff options
author | Sven Willner <sven.willner@gmail.com> | 2017-09-01 18:16:45 +0200 |
---|---|---|
committer | Sven Willner <sven.willner@gmail.com> | 2017-09-01 18:16:45 +0200 |
commit | f5ce98d3f379a810103e37fa36baf241668387f1 (patch) | |
tree | 765a537f16b0cfd7b91bc54aaa14840a8949d9f3 /src | |
parent | 177cbff6af7b9845d592fb0497464d70ee423418 (diff) |
changed option from inotify to auto-reload
Diffstat (limited to 'src')
-rw-r--r-- | src/help.raw | 2 | ||||
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/options.c | 4 | ||||
-rw-r--r-- | src/options.h | 2 | ||||
-rw-r--r-- | src/winwidget.c | 2 |
5 files changed, 9 insertions, 9 deletions
diff --git a/src/help.raw b/src/help.raw index 339e1f3..997a259 100644 --- a/src/help.raw +++ b/src/help.raw @@ -94,7 +94,7 @@ OPTIONS --min-dimension WxH Only show images with width >= W and height >= H --max-dimension WxH Only show images with width <= W and height <= H --scroll-step COUNT scroll COUNT pixels when movement key is pressed - --inotify automatically reload shown image if file was changed + --auto-reload automatically reload shown image if file was changed MONTAGE MODE OPTIONS -X, --ignore-aspect Set thumbnail to specified width/height without @@ -59,10 +59,10 @@ int main(int argc, char **argv) init_keyevents(); init_buttonbindings(); #ifdef HAVE_INOTIFY - if (opt.inotify) { + if (opt.auto_reload) { opt.inotify_fd = inotify_init(); if (opt.inotify_fd < 0) { - opt.inotify = 0; + opt.auto_reload = 0; eprintf("inotify_init failed"); } } @@ -162,7 +162,7 @@ int feh_main_iteration(int block) if (control_via_stdin) FD_SET(STDIN_FILENO, &fdset); #ifdef HAVE_INOTIFY - if (opt.inotify) { + if (opt.auto_reload) { FD_SET(opt.inotify_fd, &fdset); if (opt.inotify_fd >= fdsize) fdsize = opt.inotify_fd + 1; @@ -250,7 +250,7 @@ void feh_clean_exit(void) free(opt.menu_font); #ifdef HAVE_INOTIFY - if (opt.inotify) + if (opt.auto_reload) if (close(opt.inotify_fd)) eprintf("inotify close failed"); #endif diff --git a/src/options.c b/src/options.c index d06a4e7..20e6272 100644 --- a/src/options.c +++ b/src/options.c @@ -410,7 +410,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) {"insecure" , 0, 0, 240}, {"no-recursive" , 0, 0, 241}, #ifdef HAVE_INOTIFY - {"inotify" , 0, 0, 243}, + {"auto-reload" , 0, 0, 243}, #endif {0, 0, 0, 0} }; @@ -740,7 +740,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun) #endif #ifdef HAVE_INOTIFY case 243: - opt.inotify = 1; + opt.auto_reload = 1; break; #endif case 224: diff --git a/src/options.h b/src/options.h index 19ff55c..2cfef2f 100644 --- a/src/options.h +++ b/src/options.h @@ -54,7 +54,7 @@ struct __fehoptions { unsigned char auto_rotate; #endif #ifdef HAVE_INOTIFY - unsigned char inotify; + unsigned char auto_reload; int inotify_fd; #endif unsigned char list; diff --git a/src/winwidget.c b/src/winwidget.c index 039a582..b2c340e 100644 --- a/src/winwidget.c +++ b/src/winwidget.c @@ -794,7 +794,7 @@ void winwidget_inotify_remove(winwidget winwid) #ifdef HAVE_INOTIFY void winwidget_inotify_add(winwidget winwid, char *filename) { - if (opt.inotify) { + if (opt.auto_reload) { D(("Adding inotify watch for %s\n", filename)); winwid->inotify_wd = inotify_add_watch(opt.inotify_fd, filename, |