mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2025-01-29 01:14:56 +01:00
Set default adjust mode to none
This commit is contained in:
parent
2534c7abc2
commit
488ab101e9
3 changed files with 7 additions and 6 deletions
2
config.c
2
config.c
|
@ -116,7 +116,7 @@ config_load_default(zathura_t* zathura)
|
|||
girara_setting_add(gsession, "highlight-transparency", &float_value, FLOAT, false, _("Transparency for highlighting"), NULL, NULL);
|
||||
bool_value = true;
|
||||
girara_setting_add(gsession, "render-loading", &bool_value, BOOLEAN, false, _("Render 'Loading ...'"), NULL, NULL);
|
||||
girara_setting_add(gsession, "adjust-open", "best-fit", STRING, false, _("Adjust to when opening file"), NULL, NULL);
|
||||
girara_setting_add(gsession, "adjust-open", "none", STRING, false, _("Adjust to when opening file"), NULL, NULL);
|
||||
bool_value = false;
|
||||
girara_setting_add(gsession, "show-hidden", &bool_value, BOOLEAN, false, _("Show hidden files and directories"), NULL, NULL);
|
||||
bool_value = true;
|
||||
|
|
|
@ -114,10 +114,11 @@ zathura_document_open(zathura_plugin_manager_t* plugin_manager, const char*
|
|||
|
||||
document = g_malloc0(sizeof(zathura_document_t));
|
||||
|
||||
document->file_path = real_path;
|
||||
document->password = password;
|
||||
document->scale = 1.0;
|
||||
document->plugin = plugin;
|
||||
document->file_path = real_path;
|
||||
document->password = password;
|
||||
document->scale = 1.0;
|
||||
document->plugin = plugin;
|
||||
document->adjust_mode = ZATHURA_ADJUST_NONE;
|
||||
|
||||
/* open document */
|
||||
if (plugin->functions.document_open == NULL) {
|
||||
|
|
|
@ -518,7 +518,7 @@ document_open(zathura_t* zathura, const char* path, const char* password)
|
|||
|
||||
/* apply open adjustment */
|
||||
char* adjust_open = "best-fit";
|
||||
zathura_document_set_adjust_mode(document, ZATHURA_ADJUST_BESTFIT);
|
||||
zathura_document_set_adjust_mode(document, ZATHURA_ADJUST_NONE);
|
||||
if (girara_setting_get(zathura->ui.session, "adjust-open", &(adjust_open)) == true) {
|
||||
if (g_strcmp0(adjust_open, "best-fit") == 0) {
|
||||
zathura_document_set_adjust_mode(document, ZATHURA_ADJUST_BESTFIT);
|
||||
|
|
Loading…
Reference in a new issue