[gnome-settings-daemon] a11y-keyboard: Make sticky and slow keys notifications critical
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] a11y-keyboard: Make sticky and slow keys notifications critical
- Date: Fri, 18 Jul 2014 13:52:50 +0000 (UTC)
commit 4dd073d291b13dfef2e4a8d2e48dc8776c4ca746
Author: Rui Matos <tiagomatos gmail com>
Date: Wed May 7 19:38:27 2014 +0200
a11y-keyboard: Make sticky and slow keys notifications critical
Since these features change the way the keyboard behaves we shouldn't
timeout the notifications automatically and leave users confused,
thinking their keyboard is broken, in case they activate them
unknowingly and miss the notification.
We use the critical urgency level to achieve this since it makes
gnome-shell automatically expand the notification, allowing users to
act on the actions immediately, and it also means that the
notification won't disappear until it's explicitly acknowledged.
https://bugzilla.gnome.org/show_bug.cgi?id=729714
plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
---
diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
index b1b7771..a697907 100644
--- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
+++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
@@ -43,7 +43,6 @@
#include "gsd-a11y-keyboard-manager.h"
#define KEYBOARD_A11Y_SCHEMA "org.gnome.desktop.a11y.keyboard"
-#define NOTIFICATION_TIMEOUT 30
#define GSD_A11Y_KEYBOARD_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o),
GSD_TYPE_A11Y_KEYBOARD_MANAGER, GsdA11yKeyboardManagerPrivate))
@@ -409,8 +408,8 @@ ax_slowkeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
message,
"preferences-desktop-accessibility-symbolic");
notify_notification_set_app_name (manager->priv->notification, _("Universal Access"));
- notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
- notify_notification_set_hint (manager->priv->notification, "transient", g_variant_new_boolean
(TRUE));
+ notify_notification_set_timeout (manager->priv->notification, 0);
+ notify_notification_set_urgency (manager->priv->notification, NOTIFY_URGENCY_CRITICAL);
notify_notification_add_action (manager->priv->notification,
"reject",
@@ -477,8 +476,8 @@ ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
message,
"preferences-desktop-accessibility-symbolic");
notify_notification_set_app_name (manager->priv->notification, _("Universal Access"));
- notify_notification_set_timeout (manager->priv->notification, NOTIFICATION_TIMEOUT * 1000);
- notify_notification_set_hint (manager->priv->notification, "transient", g_variant_new_boolean
(TRUE));
+ notify_notification_set_timeout (manager->priv->notification, 0);
+ notify_notification_set_urgency (manager->priv->notification, NOTIFY_URGENCY_CRITICAL);
notify_notification_add_action (manager->priv->notification,
"reject",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]