12248N/A@@ -470,29 +470,54 @@ ax_slowkeys_warning_dialog_post (GsdA11y
12248N/A ax_stickykeys_warning_dialog_post (GsdA11yKeyboardManager *manager,
12248N/A+ gboolean already_created = FALSE;
12248N/A manager->priv->stickykeys_shortcut_val = enabled;
12248N/A if (manager->priv->stickykeys_alert != NULL) {
12248N/A+ g_object_set(manager->priv->stickykeys_alert, "text", enabled ?
12248N/A+ _("Do you want to activate Sticky Keys?") :
12248N/A+ _("Do you want to deactivate Sticky Keys?"),
12248N/A+ manager->priv->stickykeys_alert = gtk_message_dialog_new (NULL,
12248N/A+ _("Do you want to activate Sticky Keys?") :
12248N/A+ _("Do you want to deactivate Sticky Keys?"));
12248N/A+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (manager->priv->stickykeys_alert),
12248N/A+ _("You just pressed the Shift key 5 times in a row. This is the shortcut "
12248N/A+ "for the Sticky Keys feature, which affects the way your keyboard works."));
12248N/A+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (manager->priv->stickykeys_alert),
12248N/A+ _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. "
12248N/A+ "This turns off the Sticky Keys feature, which affects the way your keyboard works."));
12248N/A+ gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (manager->priv->stickykeys_alert),
12248N/A+ _("Sticky Keys have not been used for a while. This inactivity turns off "
12248N/A+ "the Sticky Keys feature, which affects the way your keyboard works."));
12248N/A+ /* If dialog was already in existance then do no more and return */
12248N/A gtk_widget_show (manager->priv->stickykeys_alert);
12248N/A- manager->priv->stickykeys_alert = gtk_message_dialog_new (NULL,
12248N/A- _("Do you want to activate Sticky Keys?") :
12248N/A- _("Do you want to deactivate Sticky Keys?"));
12248N/A- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (manager->priv->stickykeys_alert),
12248N/A- enabled ? _("You just pressed the Shift key 5 times in a row. This is the shortcut "
12248N/A- "for the Sticky Keys feature, which affects the way your keyboard works.") :
12248N/A- _("You just pressed two keys at once, or pressed the Shift key 5 times in a row. "
12248N/A- "This turns off the Sticky Keys feature, which affects the way your keyboard works."));
12248N/A gtk_dialog_add_button (GTK_DIALOG (manager->priv->stickykeys_alert),
12248N/A@@ -521,7 +546,7 @@ ax_stickykeys_warning_dialog_post (GsdA1
12248N/A-set_gconf_from_server (GsdA11yKeyboardManager *manager)
12248N/A+set_gconf_from_server (GsdA11yKeyboardManager *manager, gboolean key_pressed)
12248N/A@@ -649,7 +674,8 @@ set_gconf_from_server (GsdA11yKeyboardMa
12248N/A desc->ctrls->enabled_ctrls & XkbSlowKeysMask);
12248N/A ax_stickykeys_warning_dialog_post (manager,
12248N/A- desc->ctrls->enabled_ctrls & XkbStickyKeysMask);
12248N/A+ desc->ctrls->enabled_ctrls & XkbStickyKeysMask,
12248N/A@@ -674,11 +700,12 @@ cb_xkb_event_filter (GdkXEvent
12248N/A XEvent *xev = (XEvent *) xevent;
12248N/A XkbEvent *xkbEv = (XkbEvent *) xevent;
12248N/A+ static gboolean key_pressed = FALSE;
12248N/A d ("Someone changed XKB state\n");
12248N/A- set_gconf_from_server (manager);
12248N/A+ set_gconf_from_server (manager, key_pressed );
12248N/A } else if (xev->
xany.type == (manager->priv->xkbEventBase + XkbEventCode) &&
12248N/A@@ -690,6 +717,10 @@ cb_xkb_event_filter (GdkXEvent
12248N/A@@ -731,7 +762,7 @@ gsd_a11y_keyboard_manager_start (GsdA11y
12248N/A (GConfClientNotifyFunc)keyboard_callback);
12248N/A- event_mask = XkbControlsNotifyMask;
12248N/A+ event_mask = XkbControlsNotifyMask | XkbStateNotifyMask;
12248N/A event_mask |= XkbAccessXNotifyMask; /* make default when AXN_AXKWarning works */
12248N/A@@ -77,8 +77,13 @@ impl_activate (GnomeSettingsPlugin *plug
12248N/A res = gsd_a11y_keyboard_manager_start (GSD_A11Y_KEYBOARD_PLUGIN (plugin)->priv->manager, &error);
12248N/A g_warning ("Unable to start a11y_keyboard manager: %s", error->message);
12248N/A+ g_warning ("Unable to start a11y_keyboard manager.");