mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-01 04:06:00 +01:00
set default values before loading the first config file
This commit is contained in:
parent
864dc5bd1d
commit
fa6bc5a2e8
2 changed files with 4 additions and 4 deletions
|
@ -210,6 +210,7 @@ sc_rotate(girara_session_t* session, girara_argument_t* UNUSED(argument),
|
||||||
zathura->document->rotate = (zathura->document->rotate + 90) % 360;
|
zathura->document->rotate = (zathura->document->rotate + 90) % 360;
|
||||||
|
|
||||||
/* render all pages again */
|
/* render all pages again */
|
||||||
|
/* XXX: we don't need to rerender, only to resize the widgets and redraw */
|
||||||
render_all(zathura);
|
render_all(zathura);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -124,6 +124,9 @@ zathura_init(int argc, char* argv[])
|
||||||
/* load plugins */
|
/* load plugins */
|
||||||
zathura_document_plugins_load(zathura);
|
zathura_document_plugins_load(zathura);
|
||||||
|
|
||||||
|
/* configuration */
|
||||||
|
config_load_default(zathura);
|
||||||
|
|
||||||
/* load global configuration files */
|
/* load global configuration files */
|
||||||
girara_list_t* config_dirs = girara_split_path_array(girara_get_xdg_path(XDG_CONFIG_DIRS));
|
girara_list_t* config_dirs = girara_split_path_array(girara_get_xdg_path(XDG_CONFIG_DIRS));
|
||||||
ssize_t size = girara_list_size(config_dirs) - 1;
|
ssize_t size = girara_list_size(config_dirs) - 1;
|
||||||
|
@ -137,10 +140,6 @@ zathura_init(int argc, char* argv[])
|
||||||
|
|
||||||
config_load_file(zathura, GLOBAL_RC);
|
config_load_file(zathura, GLOBAL_RC);
|
||||||
|
|
||||||
/* configuration */
|
|
||||||
config_load_default(zathura);
|
|
||||||
|
|
||||||
|
|
||||||
/* load local configuration files */
|
/* load local configuration files */
|
||||||
char* configuration_file = g_build_filename(zathura->config.config_dir, ZATHURA_RC, NULL);
|
char* configuration_file = g_build_filename(zathura->config.config_dir, ZATHURA_RC, NULL);
|
||||||
config_load_file(zathura, configuration_file);
|
config_load_file(zathura, configuration_file);
|
||||||
|
|
Loading…
Reference in a new issue