Add option to advance the number of pages per row. (Closes: #167)

This commit is contained in:
Sebastian Ramacher 2012-04-10 17:40:29 +02:00
parent f10cc11bfd
commit ace9718f75
2 changed files with 11 additions and 1 deletions

View file

@ -110,6 +110,8 @@ config_load_default(zathura_t* zathura)
girara_setting_add(gsession, "recolor", &bool_value, BOOLEAN, false, _("Recolor pages"), cb_setting_recolor_change, NULL);
bool_value = false;
girara_setting_add(gsession, "scroll-wrap", &bool_value, BOOLEAN, false, _("Wrap scrolling"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "advance-pages-per-row", &bool_value, BOOLEAN, false, _("Advance number of pages per row"), NULL, NULL);
float_value = 0.5;
girara_setting_add(gsession, "highlight-transparency", &float_value, FLOAT, false, _("Transparency for highlighting"), NULL, NULL);
bool_value = true;

View file

@ -392,7 +392,15 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
bool scroll_wrap = false;
girara_setting_get(session, "scroll-wrap", &scroll_wrap);
t = (t == 0) ? 1 : t;
bool columns_per_row_offset = false;
girara_setting_get(session, "advance-pages-per-row", &columns_per_row_offset);
int offset = 1;
if (columns_per_row_offset == true) {
girara_setting_get(session, "pages-per-row", &offset);
}
t = (t == 0) ? offset : t;
if (argument->n == NEXT) {
if (scroll_wrap == true) {
new_page = new_page + t;