Commit a4ef99ac authored by Egmont Koblinger's avatar Egmont Koblinger

Revert "vteapp: Three-state bell option"

This reverts commit 983b3840.
parent 4b6acd5b
......@@ -114,7 +114,7 @@ class Window : Gtk.ApplicationWindow
}
}
terminal.set_audible_bell(App.Options.bell_string == "audible");
terminal.set_audible_bell(App.Options.audible);
terminal.set_cjk_ambiguous_width(App.Options.get_cjk_ambiguous_width());
terminal.set_cursor_blink_mode(App.Options.get_cursor_blink_mode());
terminal.set_cursor_shape(App.Options.get_cursor_shape());
......@@ -123,7 +123,7 @@ class Window : Gtk.ApplicationWindow
terminal.set_scroll_on_output(false);
terminal.set_scroll_on_keystroke(true);
terminal.set_scrollback_lines(App.Options.scrollback_lines);
terminal.set_visible_bell(App.Options.bell_string == "visual");
terminal.set_visible_bell(!App.Options.audible);
/* Style */
if (App.Options.font_string != null) {
......@@ -537,7 +537,7 @@ class App : Gtk.Application
public struct Options
{
public static string? bell_string = null;
public static bool audible = false;
public static string? command = null;
private static string? cjk_ambiguous_width_string = null;
private static string? cursor_blink_mode_string = null;
......@@ -700,8 +700,8 @@ class App : Gtk.Application
}
public static const OptionEntry[] entries = {
{ "bell", 0, 0, OptionArg.STRING, ref bell_string,
"Set bell mode (none|audible|visual)", "MODE" },
{ "audible-bell", 'a', 0, OptionArg.NONE, ref audible,
"Use audible terminal bell", null },
{ "command", 'c', 0, OptionArg.STRING, ref command,
"Execute a command in the terminal", null },
{ "cjk-width", 0, 0, OptionArg.STRING, ref cjk_ambiguous_width_string,
......@@ -711,7 +711,7 @@ class App : Gtk.Application
{ "cursor-color", 0, 0, OptionArg.STRING, ref cursor_color_string,
"Enable a colored cursor", null },
{ "cursor-shape", 0, 0, OptionArg.STRING, ref cursor_shape_string,
"Set cursor shape (block|underline|ibeam)", "SHAPE" },
"Set cursor shape (block|underline|ibeam)", null },
{ "dingu", 'D', 0, OptionArg.STRING_ARRAY, ref dingus,
"Add regex highlight", null },
{ "debug", 'd', 0,OptionArg.NONE, ref debug,
......
......@@ -563,7 +563,8 @@ main(int argc, char **argv)
char *transparent = NULL;
char *encoding = NULL;
char *cjk_ambiguous_width = NULL;
gboolean debug = FALSE, no_builtin_dingus = FALSE, dbuffer = TRUE,
gboolean audible = TRUE,
debug = FALSE, no_builtin_dingus = FALSE, dbuffer = TRUE,
console = FALSE, keep = FALSE,
icon_title = FALSE, shell = TRUE,
reverse = FALSE, use_geometry_hints = TRUE,
......@@ -577,7 +578,6 @@ main(int argc, char **argv)
const char *working_directory = NULL;
const char *output_file = NULL;
char *pty_flags_string = NULL;
char *bell_string = NULL;
char *cursor_blink_mode_string = NULL;
char *cursor_shape_string = NULL;
char *scrollbar_policy_string = NULL;
......@@ -623,6 +623,12 @@ main(int argc, char **argv)
G_OPTION_ARG_NONE, &dbuffer,
"Disable double-buffering", NULL
},
{
"audible", 'a', G_OPTION_FLAG_REVERSE,
G_OPTION_ARG_NONE, &audible,
"Use visible, instead of audible, terminal bell",
NULL
},
{
"command", 'c', 0,
G_OPTION_ARG_STRING, &command,
......@@ -668,11 +674,6 @@ main(int argc, char **argv)
G_OPTION_ARG_INT, &lines,
"Specify the number of scrollback-lines", NULL
},
{
"bell", 0, 0,
G_OPTION_ARG_STRING, &bell_string,
"Set bell mode (none|audible|visual)", "MODE"
},
{
"cursor-blink", 0, 0,
G_OPTION_ARG_STRING, &cursor_blink_mode_string,
......@@ -686,7 +687,7 @@ main(int argc, char **argv)
{
"cursor-shape", 0, 0,
G_OPTION_ARG_STRING, &cursor_shape_string,
"Set cursor shape (block|underline|ibeam)", "SHAPE"
"Set cursor shape (block|underline|ibeam)", NULL
},
{
"encoding", 0, 0,
......@@ -908,8 +909,8 @@ main(int argc, char **argv)
}
/* Set some defaults. */
vte_terminal_set_audible_bell(terminal, g_strcmp0(bell_string, "audible") == 0);
vte_terminal_set_visible_bell(terminal, g_strcmp0(bell_string, "visual") == 0);
vte_terminal_set_audible_bell(terminal, audible);
vte_terminal_set_visible_bell(terminal, !audible);
vte_terminal_set_cursor_blink_mode(terminal, cursor_blink_mode);
vte_terminal_set_scroll_on_output(terminal, FALSE);
vte_terminal_set_scroll_on_keystroke(terminal, TRUE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment