Commit c77ef566 authored by Florian Müllner's avatar Florian Müllner

prefs: Adapt to re-addition of a separate visual-bell option

Commit a228546d merged the visual-bell/visual-bell-type options,
but the change turned out too disruptive for gnome-control-center /
gnome-shell, so gsettings-desktop-schemas commit a5819b2a4e9 re-added
the separate option.
parent 1f18a6b5
......@@ -271,9 +271,6 @@ bell_visual_notify (MetaDisplay *display,
case G_DESKTOP_VISUAL_BELL_FRAME_FLASH:
bell_flash_frame (display, xkb_ev); /* does nothing yet */
break;
case G_DESKTOP_VISUAL_BELL_NONE:
/* do nothing */
break;
}
}
......@@ -281,8 +278,9 @@ void
meta_bell_notify (MetaDisplay *display,
XkbAnyEvent *xkb_ev)
{
/* flash something if appropriate */
bell_visual_notify (display, xkb_ev);
/* flash something */
if (meta_prefs_get_visual_bell ())
bell_visual_notify (display, xkb_ev);
if (meta_prefs_bell_is_audible ())
{
......
......@@ -80,6 +80,7 @@ static gboolean application_based = FALSE;
static gboolean disable_workarounds = FALSE;
static gboolean auto_raise = FALSE;
static gboolean auto_raise_delay = 500;
static gboolean bell_is_visible = FALSE;
static gboolean bell_is_audible = TRUE;
static gboolean reduced_resources = FALSE;
static gboolean gnome_accessibility = FALSE;
......@@ -288,6 +289,14 @@ static MetaBoolPreference preferences_bool[] =
&auto_raise,
FALSE,
},
{
{ "visual-bell",
SCHEMA_GENERAL,
META_PREF_VISUAL_BELL,
},
&bell_is_visible, /* FIXME: change the name: it's confusing */
FALSE,
},
{
{ "audible-bell",
SCHEMA_GENERAL,
......@@ -1655,6 +1664,12 @@ meta_prefs_get_button_layout (MetaButtonLayout *button_layout_p)
*button_layout_p = button_layout;
}
gboolean
meta_prefs_get_visual_bell (void)
{
return bell_is_visible;
}
gboolean
meta_prefs_bell_is_audible (void)
{
......
......@@ -201,6 +201,7 @@ void meta_prefs_get_window_binding (const char *name,
unsigned int *keysym,
MetaVirtualModifier *modifiers);
gboolean meta_prefs_get_visual_bell (void);
gboolean meta_prefs_bell_is_audible (void);
GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
......
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