mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 13:16:00 +01:00
add continuous history save
This commit is contained in:
parent
080597c079
commit
4be0983080
3 changed files with 16 additions and 0 deletions
|
@ -652,6 +652,14 @@ Defines if the number of pages per row should be honored when advancing a page.
|
||||||
* Value type: Boolean
|
* Value type: Boolean
|
||||||
* Default value: false
|
* Default value: false
|
||||||
|
|
||||||
|
continuous-hist-save
|
||||||
|
^^^^^^^^^^^^^^^^^^^^
|
||||||
|
Tells zathura whether to save document history at each page change or only when
|
||||||
|
closing a document.
|
||||||
|
|
||||||
|
* Value type: Boolean
|
||||||
|
* Default value: false
|
||||||
|
|
||||||
database
|
database
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
Defines the database backend to use for bookmarks and input history. Possible
|
Defines the database backend to use for bookmarks and input history. Possible
|
||||||
|
|
|
@ -242,6 +242,8 @@ config_load_default(zathura_t* zathura)
|
||||||
girara_setting_add(gsession, "synctex-editor-command", string_value, STRING, false, _("Synctex editor command"), NULL, NULL);
|
girara_setting_add(gsession, "synctex-editor-command", string_value, STRING, false, _("Synctex editor command"), NULL, NULL);
|
||||||
bool_value = true;
|
bool_value = true;
|
||||||
girara_setting_add(gsession, "dbus-service", &bool_value, BOOLEAN, false, _("Enable D-Bus service"), NULL, NULL);
|
girara_setting_add(gsession, "dbus-service", &bool_value, BOOLEAN, false, _("Enable D-Bus service"), NULL, NULL);
|
||||||
|
bool_value = false;
|
||||||
|
girara_setting_add(gsession, "continuous-hist-save", &bool_value, BOOLEAN, false, _("Save history at each page change"), NULL, NULL);
|
||||||
string_value = "primary";
|
string_value = "primary";
|
||||||
girara_setting_add(gsession, "selection-clipboard", string_value, STRING, false, _("The clipboard into which mouse-selected data will be written"), NULL, NULL);
|
girara_setting_add(gsession, "selection-clipboard", string_value, STRING, false, _("The clipboard into which mouse-selected data will be written"), NULL, NULL);
|
||||||
bool_value = true;
|
bool_value = true;
|
||||||
|
|
|
@ -1281,6 +1281,12 @@ page_set(zathura_t* zathura, unsigned int page_id)
|
||||||
|
|
||||||
zathura_document_set_current_page_number(zathura->document, page_id);
|
zathura_document_set_current_page_number(zathura->document, page_id);
|
||||||
|
|
||||||
|
bool continuous_hist_save = false;
|
||||||
|
girara_setting_get(zathura->ui.session, "continuous-hist-save", &continuous_hist_save);
|
||||||
|
if (continuous_hist_save) {
|
||||||
|
save_fileinfo_to_db(zathura);
|
||||||
|
}
|
||||||
|
|
||||||
/* negative position means auto */
|
/* negative position means auto */
|
||||||
return position_set(zathura, -1, -1);
|
return position_set(zathura, -1, -1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue