make load_config a bit more readable
This commit is contained in:
parent
f0f135c77d
commit
cfa9ef8f11
31
termite.c
31
termite.c
|
@ -272,29 +272,38 @@ static void load_config(GtkWindow *window, VteTerminal *vte,
|
||||||
gboolean cfgbool;
|
gboolean cfgbool;
|
||||||
gchar *cfgstr;
|
gchar *cfgstr;
|
||||||
|
|
||||||
if (get_config_boolean(config, "options", "resize_grip", &cfgbool))
|
if (get_config_boolean(config, "options", "resize_grip", &cfgbool)) {
|
||||||
gtk_window_set_has_resize_grip(window, cfgbool);
|
gtk_window_set_has_resize_grip(window, cfgbool);
|
||||||
if (get_config_boolean(config, "options", "scroll_on_output", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "scroll_on_output", &cfgbool)) {
|
||||||
vte_terminal_set_scroll_on_output(vte, cfgbool);
|
vte_terminal_set_scroll_on_output(vte, cfgbool);
|
||||||
if (get_config_boolean(config, "options", "scroll_on_keystroke", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "scroll_on_keystroke", &cfgbool)) {
|
||||||
vte_terminal_set_scroll_on_keystroke(vte, cfgbool);
|
vte_terminal_set_scroll_on_keystroke(vte, cfgbool);
|
||||||
if (get_config_boolean(config, "options", "audible_bell", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "audible_bell", &cfgbool)) {
|
||||||
vte_terminal_set_audible_bell(vte, cfgbool);
|
vte_terminal_set_audible_bell(vte, cfgbool);
|
||||||
if (get_config_boolean(config, "options", "visible_bell", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "visible_bell", &cfgbool)) {
|
||||||
vte_terminal_set_visible_bell(vte, cfgbool);
|
vte_terminal_set_visible_bell(vte, cfgbool);
|
||||||
if (get_config_boolean(config, "options", "mouse_autohide", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "mouse_autohide", &cfgbool)) {
|
||||||
vte_terminal_set_mouse_autohide(vte, cfgbool);
|
vte_terminal_set_mouse_autohide(vte, cfgbool);
|
||||||
if (get_config_boolean(config, "options", "allow_bold", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "allow_bold", &cfgbool)) {
|
||||||
vte_terminal_set_allow_bold(vte, cfgbool);
|
vte_terminal_set_allow_bold(vte, cfgbool);
|
||||||
if (get_config_boolean(config, "options", "dynamic_title", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "dynamic_title", &cfgbool)) {
|
||||||
*dynamic_title = cfgbool;
|
*dynamic_title = cfgbool;
|
||||||
if (get_config_boolean(config, "options", "urgent_on_bell", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "urgent_on_bell", &cfgbool)) {
|
||||||
*urgent_on_bell = cfgbool;
|
*urgent_on_bell = cfgbool;
|
||||||
if (get_config_boolean(config, "options", "clickable_url", &cfgbool))
|
}
|
||||||
|
if (get_config_boolean(config, "options", "clickable_url", &cfgbool)) {
|
||||||
*clickable_url = cfgbool;
|
*clickable_url = cfgbool;
|
||||||
|
}
|
||||||
if (get_config_string(config, "options", "browser", &cfgstr)) {
|
if (get_config_string(config, "options", "browser", &cfgstr)) {
|
||||||
browser_cmd[0] = cfgstr;
|
browser_cmd[0] = cfgstr;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
browser_cmd[0] = g_getenv("BROWSER");
|
browser_cmd[0] = g_getenv("BROWSER");
|
||||||
if (!browser_cmd[0]) *clickable_url = false;
|
if (!browser_cmd[0]) *clickable_url = false;
|
||||||
|
|
Loading…
Reference in New Issue