mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 18:13:46 +01:00
Add setting to ignore page number stored in file info. (Closes: #145)
Thanks for the patch to Urchlay.
This commit is contained in:
parent
59f27880a8
commit
01b5750bcc
2
config.c
2
config.c
@ -97,6 +97,8 @@ config_load_default(zathura_t* zathura)
|
||||
girara_setting_add(gsession, "show-hidden", &bool_value, BOOLEAN, false, _("Show hidden files and directories"), NULL, NULL);
|
||||
bool_value = true;
|
||||
girara_setting_add(gsession, "show-directories", &bool_value, BOOLEAN, false, _("Show directories"), NULL, NULL);
|
||||
bool_value = false;
|
||||
girara_setting_add(gsession, "open-first-page", &bool_value, BOOLEAN, false, _("Always open on first page"), NULL, NULL);
|
||||
|
||||
/* define default shortcuts */
|
||||
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_KEY_c, NULL, sc_abort, 0, 0, NULL);
|
||||
|
@ -330,6 +330,13 @@ zathura_document_open(zathura_t* zathura, const char* path, const char* password
|
||||
document->pages[page_id] = page;
|
||||
}
|
||||
|
||||
/* jump to first page if setting enabled */
|
||||
bool always_first_page = false;
|
||||
girara_setting_get(zathura->ui.session, "open-first-page", &always_first_page);
|
||||
if (always_first_page) {
|
||||
document->current_page_number = 0;
|
||||
}
|
||||
|
||||
/* apply open adjustment */
|
||||
char* adjust_open = "best-fit";
|
||||
document->adjust_mode = ADJUST_BESTFIT;
|
||||
|
Loading…
Reference in New Issue
Block a user