set default values before loading the first config file

This commit is contained in:
Sebastian Ramacher 2011-12-11 00:19:46 +01:00
parent 864dc5bd1d
commit fa6bc5a2e8
2 changed files with 4 additions and 4 deletions

View File

@ -210,6 +210,7 @@ sc_rotate(girara_session_t* session, girara_argument_t* UNUSED(argument),
zathura->document->rotate = (zathura->document->rotate + 90) % 360;
/* render all pages again */
/* XXX: we don't need to rerender, only to resize the widgets and redraw */
render_all(zathura);
return false;

View File

@ -124,6 +124,9 @@ zathura_init(int argc, char* argv[])
/* load plugins */
zathura_document_plugins_load(zathura);
/* configuration */
config_load_default(zathura);
/* load global configuration files */
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;
@ -137,10 +140,6 @@ zathura_init(int argc, char* argv[])
config_load_file(zathura, GLOBAL_RC);
/* configuration */
config_load_default(zathura);
/* load local configuration files */
char* configuration_file = g_build_filename(zathura->config.config_dir, ZATHURA_RC, NULL);
config_load_file(zathura, configuration_file);