Commit ba00836d authored by Egmont Koblinger's avatar Egmont Koblinger

widget: Remove broken visual bell support

https://bugzilla.gnome.org/show_bug.cgi?id=602726#c19
parent ccd870b7
......@@ -22,8 +22,6 @@ vte_terminal_set_font_scale
vte_terminal_get_font_scale
vte_terminal_set_audible_bell
vte_terminal_get_audible_bell
vte_terminal_set_visible_bell
vte_terminal_get_visible_bell
vte_terminal_set_allow_bold
vte_terminal_get_allow_bold
vte_terminal_set_scroll_on_output
......
......@@ -123,7 +123,6 @@ 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.audible);
/* Style */
if (App.Options.font_string != null) {
......
......@@ -267,7 +267,6 @@ struct _VteTerminalPrivate {
VteEraseBinding backspace_binding, delete_binding;
gboolean meta_sends_escape;
gboolean audible_bell;
gboolean visible_bell;
gboolean margin_bell;
guint bell_margin;
gboolean allow_bold;
......@@ -438,7 +437,6 @@ void _vte_terminal_set_tabstop(VteTerminal *terminal, int column);
void _vte_terminal_update_insert_delta(VteTerminal *terminal);
void _vte_terminal_cleanup_fragments(VteTerminal *terminal, long start, long end);
void _vte_terminal_audible_beep(VteTerminal *terminal);
void _vte_terminal_visible_beep(VteTerminal *terminal);
void _vte_terminal_beep(VteTerminal *terminal);
PangoColor *_vte_terminal_get_color(const VteTerminal *terminal, int idx);
void _vte_terminal_set_color_internal(VteTerminal *terminal,
......
......@@ -173,7 +173,6 @@ enum {
PROP_SCROLL_ON_KEYSTROKE,
PROP_SCROLL_ON_OUTPUT,
PROP_WINDOW_TITLE,
PROP_VISIBLE_BELL,
};
/* these static variables are guarded by the GDK mutex */
......@@ -4621,26 +4620,12 @@ _vte_terminal_audible_beep(VteTerminal *terminal)
gdk_display_beep(display);
}
void
_vte_terminal_visible_beep(VteTerminal *terminal)
{
GtkWidget *widget = &terminal->widget;
if (gtk_widget_get_realized (widget)) {
/* Force the repaint, max delay of UPDATE_REPEAT_TIMEOUT */
_vte_invalidate_all (terminal);
}
}
void
_vte_terminal_beep(VteTerminal *terminal)
{
if (terminal->pvt->audible_bell) {
_vte_terminal_audible_beep (terminal);
}
if (terminal->pvt->visible_bell) {
_vte_terminal_visible_beep (terminal);
}
}
......@@ -10593,9 +10578,6 @@ vte_terminal_get_property (GObject *object,
case PROP_WINDOW_TITLE:
g_value_set_string (value, vte_terminal_get_window_title (terminal));
break;
case PROP_VISIBLE_BELL:
g_value_set_boolean (value, vte_terminal_get_visible_bell (terminal));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
......@@ -10679,9 +10661,6 @@ vte_terminal_set_property (GObject *object,
case PROP_SCROLL_ON_OUTPUT:
vte_terminal_set_scroll_on_output (terminal, g_value_get_boolean (value));
break;
case PROP_VISIBLE_BELL:
vte_terminal_set_visible_bell (terminal, g_value_get_boolean (value));
break;
/* Not writable */
case PROP_CURRENT_DIRECTORY_URI:
......@@ -11623,22 +11602,6 @@ vte_terminal_class_init(VteTerminalClass *klass)
NULL,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
/**
* VteTerminal:visible-bell:
*
* Controls whether the terminal will present a visible bell to the
* user when the child outputs the "bl" sequence. The terminal
* will clear itself to the default foreground color and then repaint itself.
*
* Since: 0.20
*/
g_object_class_install_property
(gobject_class,
PROP_VISIBLE_BELL,
g_param_spec_boolean ("visible-bell", NULL, NULL,
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_EXPLICIT_NOTIFY));
/* Disable GtkWidget's keybindings except for Shift-F10 and MenuKey
* which pop up the context menu.
*/
......@@ -11708,51 +11671,6 @@ vte_terminal_get_audible_bell(VteTerminal *terminal)
return terminal->pvt->audible_bell;
}
/**
* vte_terminal_set_visible_bell:
* @terminal: a #VteTerminal
* @is_visible: whether the terminal should flash on bell
*
* Controls whether or not the terminal will present a visible bell to the
* user when the child outputs the "bl" sequence. The terminal
* will clear itself to the default foreground color and then repaint itself.
*
*/
void
vte_terminal_set_visible_bell(VteTerminal *terminal, gboolean is_visible)
{
VteTerminalPrivate *pvt;
g_return_if_fail(VTE_IS_TERMINAL(terminal));
pvt = terminal->pvt;
is_visible = is_visible != FALSE;
if (is_visible == pvt->visible_bell)
return;
pvt->visible_bell = is_visible;
g_object_notify (G_OBJECT (terminal), "visible-bell");
}
/**
* vte_terminal_get_visible_bell:
* @terminal: a #VteTerminal
*
* Checks whether or not the terminal will present a visible bell to the
* user when the child outputs the "bl" sequence. The terminal
* will clear itself to the default foreground color and then repaint itself.
*
* Returns: %TRUE if visible bell is enabled, %FALSE if not
*/
gboolean
vte_terminal_get_visible_bell(VteTerminal *terminal)
{
g_return_val_if_fail(VTE_IS_TERMINAL(terminal), FALSE);
return terminal->pvt->visible_bell;
}
/**
* vte_terminal_set_allow_bold:
* @terminal: a #VteTerminal
......
......@@ -910,7 +910,6 @@ main(int argc, char **argv)
/* Set some defaults. */
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);
......
......@@ -183,9 +183,6 @@ gdouble vte_terminal_get_font_scale(VteTerminal *terminal) _VTE_GNUC_NONNULL(1);
void vte_terminal_set_audible_bell(VteTerminal *terminal,
gboolean is_audible) _VTE_GNUC_NONNULL(1);
gboolean vte_terminal_get_audible_bell(VteTerminal *terminal);
void vte_terminal_set_visible_bell(VteTerminal *terminal,
gboolean is_visible) _VTE_GNUC_NONNULL(1);
gboolean vte_terminal_get_visible_bell(VteTerminal *terminal);
void vte_terminal_set_scroll_on_output(VteTerminal *terminal,
gboolean scroll) _VTE_GNUC_NONNULL(1);
void vte_terminal_set_scroll_on_keystroke(VteTerminal *terminal,
......
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