mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
prefs: Adapt to re-addition of a separate visual-bell option
Commit d0910da036
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.
This commit is contained in:
parent
7ce7feeb2b
commit
c5468ee391
@ -283,9 +283,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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -293,8 +290,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);
|
||||
|
||||
#ifdef HAVE_LIBCANBERRA
|
||||
if (meta_prefs_bell_is_audible ())
|
||||
|
@ -88,6 +88,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 gnome_accessibility = FALSE;
|
||||
static gboolean gnome_animations = TRUE;
|
||||
@ -302,6 +303,13 @@ static MetaBoolPreference preferences_bool[] =
|
||||
},
|
||||
&auto_raise,
|
||||
},
|
||||
{
|
||||
{ "visual-bell",
|
||||
SCHEMA_GENERAL,
|
||||
META_PREF_VISUAL_BELL,
|
||||
},
|
||||
&bell_is_visible, /* FIXME: change the name: it's confusing */
|
||||
},
|
||||
{
|
||||
{ "audible-bell",
|
||||
SCHEMA_GENERAL,
|
||||
@ -1912,6 +1920,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)
|
||||
{
|
||||
|
@ -268,6 +268,7 @@ void meta_prefs_get_window_binding (const char *name,
|
||||
|
||||
void meta_prefs_get_overlay_binding (MetaKeyCombo *combo);
|
||||
|
||||
gboolean meta_prefs_get_visible_bell (void);
|
||||
gboolean meta_prefs_bell_is_audible (void);
|
||||
GDesktopVisualBellType meta_prefs_get_visual_bell_type (void);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user