15656N/A/jds/bin/diff -uprN gnome-settings-daemon-2.25.3.old/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c gnome-settings-daemon-2.25.3/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c
15656N/A--- gnome-settings-daemon-2.25.3.old/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c 2009-01-13 15:26:10.510762000 +0000
15656N/A+++ gnome-settings-daemon-2.25.3/plugins/a11y-keyboard/gsd-a11y-keyboard-plugin.c 2009-01-13 15:27:08.195002000 +0000
15656N/A@@ -77,8 +77,12 @@ impl_activate (GnomeSettingsPlugin *plug
15559N/A error = NULL;
15559N/A res = gsd_a11y_keyboard_manager_start (GSD_A11Y_KEYBOARD_PLUGIN (plugin)->priv->manager, &error);
15559N/A if (! res) {
15656N/A+ if (error != NULL) {
15559N/A g_warning ("Unable to start a11y_keyboard manager: %s", error->message);
15559N/A g_error_free (error);
15656N/A+ } else {
15559N/A+ g_warning ("Unable to start a11y_keyboard manager.");
15559N/A+ }
15559N/A }
15559N/A }
15559N/A
15656N/A/jds/bin/diff -uprN gnome-settings-daemon-2.25.3.old/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c gnome-settings-daemon-2.25.3/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
15656N/A--- gnome-settings-daemon-2.25.3.old/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c 2009-01-13 15:26:10.509436000 +0000
15656N/A+++ gnome-settings-daemon-2.25.3/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c 2009-01-13 15:33:22.384687000 +0000
15656N/A@@ -655,7 +655,8 @@ ax_slowkeys_warning_post (GsdA11yKeyboar
13941N/A
13941N/A static gboolean
13941N/A ax_stickykeys_warning_post_bubble (GsdA11yKeyboardManager *manager,
13941N/A- gboolean enabled)
13941N/A+ gboolean enabled,
13941N/A+ gboolean key_pressed)
13941N/A {
13941N/A #ifdef HAVE_LIBNOTIFY
13941N/A gboolean res;
15656N/A@@ -666,11 +667,17 @@ ax_stickykeys_warning_post_bubble (GsdA1
13941N/A title = enabled ?
13941N/A _("Do you want to activate Sticky Keys?") :
13941N/A _("Do you want to deactivate Sticky Keys?");
13941N/A- message = enabled ?
13941N/A- _("You just pressed the Shift key 5 times in a row. This is the shortcut "
13941N/A- "for the Sticky Keys feature, which affects the way your keyboard works.") :
13941N/A- _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. "
13941N/A- "This turns off the Sticky Keys feature, which affects the way your keyboard works.");
15656N/A+
13941N/A+ if (enabled) {
13941N/A+ message = _("You just pressed the Shift key 5 times in a row. This is the shortcut "
13941N/A+ "for the Sticky Keys feature, which affects the way your keyboard works.");
13941N/A+ } else if (key_pressed) {
13941N/A+ message = _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. "
13941N/A+ "This turns off the Sticky Keys feature, which affects the way your keyboard works.");
13941N/A+ } else {
13941N/A+ message = _("Sticky Keys have not been used for a while. This inactivity turns off "
13941N/A+ "the Sticky Keys feature, which affects the way your keyboard works.");
13941N/A+ }
13941N/A
15559N/A if (manager->priv->status_icon == NULL || ! gtk_status_icon_is_embedded (manager->priv->status_icon)) {
13941N/A return FALSE;
15656N/A@@ -731,7 +738,8 @@ ax_stickykeys_warning_post_bubble (GsdA1
12248N/A
12248N/A static void
13941N/A ax_stickykeys_warning_post_dialog (GsdA11yKeyboardManager *manager,
12248N/A- gboolean enabled)
12248N/A+ gboolean enabled,
12248N/A+ gboolean key_pressed)
12248N/A {
13941N/A const char *title;
13941N/A const char *message;
15656N/A@@ -739,11 +747,17 @@ ax_stickykeys_warning_post_dialog (GsdA1
13941N/A title = enabled ?
13941N/A _("Do you want to activate Sticky Keys?") :
13941N/A _("Do you want to deactivate Sticky Keys?");
13941N/A- message = enabled ?
13941N/A- _("You just pressed the Shift key 5 times in a row. This is the shortcut "
13941N/A- "for the Sticky Keys feature, which affects the way your keyboard works.") :
13941N/A- _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. "
13941N/A- "This turns off the Sticky Keys feature, which affects the way your keyboard works.");
15656N/A+
13941N/A+ if (enabled) {
13941N/A+ message = _("You just pressed the Shift key 5 times in a row. This is the shortcut "
13941N/A+ "for the Sticky Keys feature, which affects the way your keyboard works.");
13941N/A+ } else if (key_pressed) {
13941N/A+ message = _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. "
13941N/A+ "This turns off the Sticky Keys feature, which affects the way your keyboard works.");
13941N/A+ } else {
13941N/A+ message = _("Sticky Keys have not been used for a while. This inactivity turns off "
13941N/A+ "the Sticky Keys feature, which affects the way your keyboard works.");
13941N/A+ }
12248N/A
12248N/A if (manager->priv->stickykeys_alert != NULL) {
12248N/A gtk_widget_show (manager->priv->stickykeys_alert);
15656N/A@@ -788,19 +802,21 @@ ax_stickykeys_warning_post_dialog (GsdA1
13941N/A
13941N/A static void
13941N/A ax_stickykeys_warning_post (GsdA11yKeyboardManager *manager,
13941N/A- gboolean enabled)
13941N/A+ gboolean enabled,
13941N/A+ gboolean key_pressed)
13941N/A {
12248N/A
13941N/A manager->priv->stickykeys_shortcut_val = enabled;
13941N/A
13941N/A /* alway try to show something */
13941N/A- if (! ax_stickykeys_warning_post_bubble (manager, enabled)) {
13941N/A- ax_stickykeys_warning_post_dialog (manager, enabled);
13941N/A+ if (! ax_stickykeys_warning_post_bubble (manager, enabled, key_pressed)) {
13941N/A+ ax_stickykeys_warning_post_dialog (manager, enabled, key_pressed);
13941N/A }
12248N/A }
12248N/A
12248N/A static void
12248N/A-set_gconf_from_server (GsdA11yKeyboardManager *manager)
13941N/A+set_gconf_from_server (GsdA11yKeyboardManager *manager,
13941N/A+ gboolean key_pressed)
12248N/A {
12248N/A GConfClient *client;
12248N/A GConfChangeSet *cs;
15656N/A@@ -927,7 +943,7 @@ set_gconf_from_server (GsdA11yKeyboardMa
13941N/A desc->ctrls->enabled_ctrls & XkbSlowKeysMask);
12248N/A } else {
13941N/A ax_stickykeys_warning_post (manager,
13941N/A- desc->ctrls->enabled_ctrls & XkbStickyKeysMask);
13941N/A+ desc->ctrls->enabled_ctrls & XkbStickyKeysMask, key_pressed);
12248N/A }
12248N/A }
12248N/A }
15656N/A@@ -952,11 +968,12 @@ cb_xkb_event_filter (GdkXEvent
12248N/A {
12248N/A XEvent *xev = (XEvent *) xevent;
12248N/A XkbEvent *xkbEv = (XkbEvent *) xevent;
12248N/A+ static gboolean key_pressed = FALSE;
12248N/A
12248N/A if (xev->xany.type == (manager->priv->xkbEventBase + XkbEventCode) &&
12248N/A xkbEv->any.xkb_type == XkbControlsNotify) {
13290N/A d ("XKB state changed");
12248N/A- set_gconf_from_server (manager);
13941N/A+ set_gconf_from_server (manager, key_pressed);
12248N/A } else if (xev->xany.type == (manager->priv->xkbEventBase + XkbEventCode) &&
12248N/A xkbEv->any.xkb_type == XkbAccessXNotify) {
12248N/A if (xkbEv->accessx.detail == XkbAXN_AXKWarning) {
15656N/A@@ -967,6 +984,9 @@ cb_xkb_event_filter (GdkXEvent
13941N/A * set_gconf_from_server().
12248N/A */
12248N/A }
13941N/A+ } else if (xev->xany.type == (manager->priv->xkbEventBase + XkbEventCode) &&
13941N/A+ xkbEv->any.xkb_type == XkbStateNotify) {
13941N/A+ key_pressed = TRUE;
12248N/A }
12248N/A
12248N/A return GDK_FILTER_CONTINUE;
15656N/A@@ -1017,7 +1037,7 @@ start_a11y_keyboard_idle_cb (GsdA11yKeyb
15656N/A */
15656N/A manager->priv->original_xkb_desc = get_xkb_desc_rec (manager);
12248N/A
12248N/A- event_mask = XkbControlsNotifyMask;
12248N/A+ event_mask = XkbControlsNotifyMask | XkbStateNotifyMask;
12248N/A #ifdef DEBUG_ACCESSIBILITY
12248N/A event_mask |= XkbAccessXNotifyMask; /* make default when AXN_AXKWarning works */
12248N/A #endif