Commit 0e095c1a authored by Sebastian Ramacher's avatar Sebastian Ramacher

Use the last value for all unspecified pages per row

This change ensures that configs with "first-page-column=2" before 0.3.4 will
upgrade more sanely.
Signed-off-by: Sebastian Ramacher's avatarSebastian Ramacher <sebastian+dev@ramacher.at>
parent 4696e10c
......@@ -739,8 +739,11 @@ first-page-column
^^^^^^^^^^^^^^^^^
Defines the column in which the first page will be displayed.
This setting is stored separately for every value of pages-per-row according to
the following pattern <1 page per row>:[<2 pages per row>[: ...]]. Per default,
the first column is set to 2 for double-page layout.
the following pattern <1 page per row>:[<2 pages per row>[: ...]]. The last
value in the list will be used for all other number of pages per row if not set
explicitely.
Per default, the first column is set to 2 for double-page layout.
* Value type: String
* Default value: 1:2
......
......@@ -269,6 +269,8 @@ find_first_page_column(const char* first_page_column_list,
unsigned int index = pages_per_row - 1;
if (index < settings_size && *settings[index] != '\0') {
first_page_column = atoi(settings[index]);
} else if (*settings[settings_size - 1] != '\0') {
first_page_column = atoi(settings[settings_size - 1]);
}
/* free buffers */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment