Add syntex-dbus-service setting to en/disable D-Bus service for synctex

This commit is contained in:
Sebastian Ramacher 2014-01-05 14:57:48 +01:00
parent db1f2c98a8
commit f9ef7598a4
4 changed files with 17 additions and 4 deletions

View file

@ -205,6 +205,8 @@ config_load_default(zathura_t* zathura)
girara_setting_add(gsession, "statusbar-basename", &bool_value, BOOLEAN, false, _("Use basename of the file in the statusbar"), NULL, NULL);
bool_value = false;
girara_setting_add(gsession, "synctex", &bool_value, BOOLEAN, false, _("Enable synctex support"), NULL, NULL);
bool_value = true;
girara_setting_add(gsession, "synctex-dbus-service", &bool_value, BOOLEAN, false, _("Enable D-Bus service for synctex forward synchronization support"), NULL, NULL);
string_value = "primary";
girara_setting_add(gsession, "selection-clipboard", string_value, STRING, false, _("The clipboard into which mouse-selected data will be written"), NULL, NULL);

2
main.c
View file

@ -97,7 +97,7 @@ main(int argc, char* argv[])
if (synctex_fwd != NULL) {
if (argc != 2) {
girara_error("Too many arguments or missing filename while running with --syntex-forward");
girara_error("Too many arguments or missing filename while running with --synctex-forward");
return -1;
}

View file

@ -805,8 +805,12 @@ document_open(zathura_t* zathura, const char* path, const char* password,
position_set(zathura, file_info.position_x, file_info.position_y);
}
/* Start D-Bus */
zathura->synctex.dbus = zathura_synctex_dbus_new(zathura);
/* Start D-Bus service for synctex forward synchronization */
bool synctex_dbus = true;
girara_setting_get(zathura->ui.session, "synctex-dbus-service", &synctex_dbus);
if (synctex_dbus == true) {
zathura->synctex.dbus = zathura_synctex_dbus_new(zathura);
}
return true;

View file

@ -752,7 +752,7 @@ zoom-center
^^^^^^^^^^^
En/Disables horizontally centered zooming
* Value type: Bool
* Value type: Boolean
* Default value: False
zoom-max
@ -787,6 +787,13 @@ middle mouse button, or the Shift-Insert key combination.
* Value type: String
* Default value: primary
syntex-dbus-service
^^^^^^^^^^^^^^^^^^^
En/disables the D-Bus service required for synctex forward synchronization.
* Value type: Boolean
* Default value: true
SEE ALSO
========