[gnome-settings-daemon] a11y-keyboard: Remove use of GTK+ constants
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] a11y-keyboard: Remove use of GTK+ constants
- Date: Wed, 16 Jan 2013 11:24:48 +0000 (UTC)
commit f3653ccd157304a124723ef9583bf14194dbded5
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jan 16 12:06:21 2013 +0100
a11y-keyboard: Remove use of GTK+ constants
plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c | 29 +++------------------
1 files changed, 4 insertions(+), 25 deletions(-)
---
diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
index 6d5adbe..fe10cb0 100644
--- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
+++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
@@ -35,7 +35,6 @@
#include <glib/gi18n.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
-#include <gtk/gtk.h>
#include <libnotify/notify.h>
#include <X11/XKBlib.h>
@@ -328,11 +327,11 @@ set_server_from_gsettings (GsdA11yKeyboardManager *manager)
static void
ax_response_callback (GsdA11yKeyboardManager *manager,
- gint response_id,
+ const char *action,
guint revert_controls_mask,
gboolean enabled)
{
- if (response_id == GTK_RESPONSE_REJECT) {
+ if (g_strcmp0 (action, "reject") == 0) {
/* we're reverting, so we invert sense of 'enabled' flag */
g_debug ("cancelling AccessX request");
if (revert_controls_mask == XkbStickyKeysMask) {
@@ -362,20 +361,10 @@ on_slow_keys_action (NotifyNotification *notification,
const char *action,
GsdA11yKeyboardManager *manager)
{
- int response_id;
-
g_assert (action != NULL);
- if (strcmp (action, "accept") == 0) {
- response_id = GTK_RESPONSE_ACCEPT;
- } else if (strcmp (action, "reject") == 0) {
- response_id = GTK_RESPONSE_REJECT;
- } else {
- return;
- }
-
ax_response_callback (manager,
- response_id, XkbSlowKeysMask,
+ action, XkbSlowKeysMask,
manager->priv->slowkeys_shortcut_val);
notify_notification_close (manager->priv->notification, NULL);
}
@@ -385,20 +374,10 @@ on_sticky_keys_action (NotifyNotification *notification,
const char *action,
GsdA11yKeyboardManager *manager)
{
- int response_id;
-
g_assert (action != NULL);
- if (strcmp (action, "accept") == 0) {
- response_id = GTK_RESPONSE_ACCEPT;
- } else if (strcmp (action, "reject") == 0) {
- response_id = GTK_RESPONSE_REJECT;
- } else {
- return;
- }
-
ax_response_callback (manager,
- response_id, XkbStickyKeysMask,
+ action, XkbStickyKeysMask,
manager->priv->stickykeys_shortcut_val);
notify_notification_close (manager->priv->notification, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]