mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 08:36:01 +01:00
Don't break backwards compatibility of the settings names
This commit is contained in:
parent
d31a350f23
commit
cd842a8f48
3 changed files with 13 additions and 13 deletions
12
config.c
12
config.c
|
@ -34,19 +34,19 @@ config_load_default(zathura_t* zathura)
|
|||
|
||||
/* zathura settings */
|
||||
int_value = 10;
|
||||
girara_setting_add(gsession, "zoom-step", &int_value, INT, false, "Zoom step", NULL, NULL);
|
||||
girara_setting_add(gsession, "zoom_step", &int_value, INT, false, "Zoom step", NULL, NULL);
|
||||
int_value = 1;
|
||||
girara_setting_add(gsession, "page-padding", &int_value, INT, true, "Padding between pages", NULL, NULL);
|
||||
girara_setting_add(gsession, "page_padding", &int_value, INT, true, "Padding between pages", NULL, NULL);
|
||||
int_value = 2;
|
||||
girara_setting_add(gsession, "pages-per-row", &int_value, INT, false, "Number of pages per row", cb_pages_per_row_value_changed, zathura);
|
||||
girara_setting_add(gsession, "pages_per_row", &int_value, INT, false, "Number of pages per row", cb_pages_per_row_value_changed, zathura);
|
||||
float_value = 40;
|
||||
girara_setting_add(gsession, "scroll-step", &float_value, FLOAT, false, "Scroll step", NULL, NULL);
|
||||
girara_setting_add(gsession, "scroll_step", &float_value, FLOAT, false, "Scroll step", NULL, NULL);
|
||||
|
||||
|
||||
string_value = "#FFFFFF";
|
||||
girara_setting_add(gsession, "recolor-dark-color", string_value, STRING, false, "Recoloring (dark color)", NULL, NULL);
|
||||
girara_setting_add(gsession, "recolor_darkcolor", string_value, STRING, false, "Recoloring (dark color)", NULL, NULL);
|
||||
string_value = "#000000";
|
||||
girara_setting_add(gsession, "recolor-light-color", string_value, STRING, false, "Recoloring (light color)", NULL, NULL);
|
||||
girara_setting_add(gsession, "recolor_lightcolor", string_value, STRING, false, "Recoloring (light color)", NULL, NULL);
|
||||
|
||||
/* define default shortcuts */
|
||||
girara_shortcut_add(gsession, GDK_CONTROL_MASK, GDK_c, NULL, sc_abort, 0, 0, NULL);
|
||||
|
|
|
@ -30,7 +30,7 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument,
|
|||
zathura_t* zathura = session->global.data;
|
||||
g_return_val_if_fail(argument != NULL, false);
|
||||
|
||||
unsigned int* pages_per_row = girara_setting_get(session, "pages-per-row");
|
||||
unsigned int* pages_per_row = girara_setting_get(session, "pages_per_row");
|
||||
|
||||
if (zathura->ui.page_view == NULL || zathura->document == NULL || pages_per_row == NULL) {
|
||||
goto error_ret;
|
||||
|
@ -235,7 +235,7 @@ sc_scroll(girara_session_t* session, girara_argument_t* argument, unsigned int
|
|||
gdouble value = gtk_adjustment_get_value(adjustment);
|
||||
gdouble max = gtk_adjustment_get_upper(adjustment) - view_size;
|
||||
gdouble scroll_step = 40;
|
||||
float* tmp = girara_setting_get(session, "scroll-step");
|
||||
float* tmp = girara_setting_get(session, "scroll_step");
|
||||
if (tmp != NULL) {
|
||||
scroll_step = *tmp;
|
||||
g_free(tmp);
|
||||
|
@ -521,7 +521,7 @@ sc_zoom(girara_session_t* session, girara_argument_t* argument, unsigned int
|
|||
g_return_val_if_fail(zathura->document != NULL, false);
|
||||
|
||||
/* retreive zoom step value */
|
||||
int* value = girara_setting_get(zathura->ui.session, "zoom-step");
|
||||
int* value = girara_setting_get(zathura->ui.session, "zoom_step");
|
||||
if (value == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ zathura_init(int argc, char* argv[])
|
|||
g_signal_connect(G_OBJECT(zathura->ui.session->gtk.window), "destroy", G_CALLBACK(cb_destroy), NULL);
|
||||
|
||||
/* save page padding */
|
||||
int* page_padding = girara_setting_get(zathura->ui.session, "page-padding");
|
||||
int* page_padding = girara_setting_get(zathura->ui.session, "page_padding");
|
||||
zathura->global.page_padding = (page_padding) ? *page_padding : 1;
|
||||
g_free(page_padding);
|
||||
|
||||
|
@ -190,13 +190,13 @@ zathura_init(int argc, char* argv[])
|
|||
gtk_table_set_col_spacings(GTK_TABLE(zathura->ui.page_view), zathura->global.page_padding);
|
||||
|
||||
/* parse colors */
|
||||
char* string_value = girara_setting_get(zathura->ui.session, "recolor-dark-color");
|
||||
char* string_value = girara_setting_get(zathura->ui.session, "recolor_darkcolor");
|
||||
if (string_value != NULL) {
|
||||
gdk_color_parse(string_value, &(zathura->ui.colors.recolor_dark_color));
|
||||
g_free(string_value);
|
||||
}
|
||||
|
||||
string_value = girara_setting_get(zathura->ui.session, "recolor-light-color");
|
||||
string_value = girara_setting_get(zathura->ui.session, "recolor_lightcolor");
|
||||
if (string_value != NULL) {
|
||||
gdk_color_parse(string_value, &(zathura->ui.colors.recolor_light_color));
|
||||
g_free(string_value);
|
||||
|
@ -380,7 +380,7 @@ document_open(zathura_t* zathura, const char* path, const char* password)
|
|||
zathura->document = document;
|
||||
|
||||
/* view mode */
|
||||
int* value = girara_setting_get(zathura->ui.session, "pages-per-row");
|
||||
int* value = girara_setting_get(zathura->ui.session, "pages_per_row");
|
||||
int pages_per_row = (value) ? *value : 1;
|
||||
g_free(value);
|
||||
page_view_set_mode(zathura, pages_per_row);
|
||||
|
|
Loading…
Reference in a new issue