mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 06:46:00 +01:00
Add new value to filemonitor setting
This commit is contained in:
parent
47469cf2eb
commit
f64f8c3947
2 changed files with 7 additions and 3 deletions
|
@ -685,8 +685,9 @@ synchronization is not available.
|
||||||
|
|
||||||
filemonitor
|
filemonitor
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
Defines the filemonitor backend. Possible values are "glib" and "signal" (if
|
Defines the file monitor backend used to check for changes in files. Possible
|
||||||
signal handling is supported).
|
values are "glib", "signal" (if signal handling is supported), and "noop". The
|
||||||
|
"noop" file monitor does not trigger reloads.
|
||||||
|
|
||||||
* Value type: String
|
* Value type: String
|
||||||
* Default value: glib
|
* Default value: glib
|
||||||
|
|
|
@ -1057,8 +1057,11 @@ document_open(zathura_t* zathura, const char* path, const char* uri, const char*
|
||||||
char* filemonitor_backend = NULL;
|
char* filemonitor_backend = NULL;
|
||||||
girara_setting_get(zathura->ui.session, "filemonitor", &filemonitor_backend);
|
girara_setting_get(zathura->ui.session, "filemonitor", &filemonitor_backend);
|
||||||
zathura_filemonitor_type_t type = ZATHURA_FILEMONITOR_GLIB;
|
zathura_filemonitor_type_t type = ZATHURA_FILEMONITOR_GLIB;
|
||||||
|
if (g_strcmp0(filemonitor_backend, "noop") == 0) {
|
||||||
|
type = ZATHURA_FILEMONITOR_NOOP;
|
||||||
|
}
|
||||||
#ifdef G_OS_UNIX
|
#ifdef G_OS_UNIX
|
||||||
if (g_strcmp0(filemonitor_backend, "signal") == 0) {
|
else if (g_strcmp0(filemonitor_backend, "signal") == 0) {
|
||||||
type = ZATHURA_FILEMONITOR_SIGNAL;
|
type = ZATHURA_FILEMONITOR_SIGNAL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue