[gnome-settings-daemon] a11y-keyboard: Remove impossible switch cases



commit 07abdbe4ba784082ed60382e1be31c6aeb35a297
Author: Bastien Nocera <hadess hadess net>
Date:   Wed Jan 16 11:58:41 2013 +0100

    a11y-keyboard: Remove impossible switch cases
    
    Answers such as GTK_RESPONSE_HELP aren't possible, so remove
    all that code.

 plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c |   28 ---------------------
 1 files changed, 0 insertions(+), 28 deletions(-)
---
diff --git a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
index cc1827b..bc890ba 100644
--- a/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
+++ b/plugins/a11y-keyboard/gsd-a11y-keyboard-manager.c
@@ -334,15 +334,11 @@ ax_response_callback (GsdA11yKeyboardManager *manager,
                       gboolean                enabled)
 {
         GSettings *settings;
-        GdkScreen *screen;
-        GError *err;
 
         settings = manager->priv->settings;
 
         switch (response_id) {
-        case GTK_RESPONSE_DELETE_EVENT:
         case GTK_RESPONSE_REJECT:
-        case GTK_RESPONSE_CANCEL:
 
                 /* we're reverting, so we invert sense of 'enabled' flag */
                 g_debug ("cancelling AccessX request");
@@ -359,30 +355,6 @@ ax_response_callback (GsdA11yKeyboardManager *manager,
                 set_server_from_gsettings (manager);
                 break;
 
-        case GTK_RESPONSE_HELP:
-                if (!parent)
-                        screen = gdk_screen_get_default ();
-                else
-                        screen = gtk_widget_get_screen (GTK_WIDGET (parent));
-
-                err = NULL;
-                if (!gtk_show_uri (screen,
-                                   "help:gnome-help/a11y",
-                                   gtk_get_current_event_time(),
-                                   &err)) {
-                        GtkWidget *error_dialog = gtk_message_dialog_new (parent,
-                                                                          0,
-                                                                          GTK_MESSAGE_ERROR,
-                                                                          GTK_BUTTONS_CLOSE,
-                                                                          _("There was an error displaying help: %s"),
-                                                                          err->message);
-                        g_signal_connect (error_dialog, "response",
-                                          G_CALLBACK (gtk_widget_destroy), NULL);
-                        gtk_window_set_resizable (GTK_WINDOW (error_dialog), FALSE);
-                        gtk_widget_show (error_dialog);
-                        g_error_free (err);
-                }
-                return FALSE;
         default:
                 break;
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]