src/prefs_actions.c
authorMelvin Hadasht <melvin.hadasht@free.fr>
Sat, 18 Jan 2003 18:33:28 +0000 (18:33 +0000)
committerMelvin Hadasht <melvin.hadasht@free.fr>
Sat, 18 Jan 2003 18:33:28 +0000 (18:33 +0000)
Actions' IO dialog: when the action ends the "Close" button now has
focus and [Escape] closes the window

ChangeLog.claws
configure.ac
src/prefs_actions.c

index 81971e3ef4adccfc52cfc7278f778d94f11b7bbd..f06a6ad7308cda6375c864c17ee90b2df56df7bf 100644 (file)
@@ -1,3 +1,10 @@
+2003-01-18 [melvin]    0.8.8claws115
+
+       * src/prefs_actions.c
+               Actions IO dialog: when the action ends
+               the "Close" button now has focus and [Escape] closes the
+               window.
+
 2003-01-18 [christoph] 0.8.8claws114
 
        * src/procmsg.c
index df1c49e5d98b0e8f903a48be60b3e69e894bb8ef..23ea2fd986829efc87a759cac3171a1f3810acfa 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws114
+EXTRA_VERSION=claws115
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 828467d46502f7d7323c7590e21e8a3c1f2ee3bf..6a4e2e43f1582f56e587e35afc6daf46e3013710 100644 (file)
@@ -208,7 +208,9 @@ static void update_io_dialog                (Children       *children);
 
 static void hide_io_dialog_cb          (GtkWidget      *widget,
                                         gpointer        data);
-
+static gint io_dialog_key_pressed_cb   (GtkWidget      *widget,
+                                        GdkEventKey    *event,
+                                        gpointer        data);
 static void catch_output               (gpointer                data,
                                         gint                    source,
                                         GdkInputCondition       cond);
@@ -1523,6 +1525,15 @@ static void hide_io_dialog_cb(GtkWidget *w, gpointer data)
        }
 }
 
+static gint io_dialog_key_pressed_cb(GtkWidget *widget,
+                                    GdkEventKey        *event,
+                                    gpointer    data)
+{
+       if (event && event->keyval == GDK_Escape)
+               hide_io_dialog_cb(widget, data);
+       return TRUE;    
+}
+
 static void childinfo_close_pipes(ChildInfo *child_info)
 {
        if (child_info->tag_in > 0)
@@ -1567,6 +1578,11 @@ static void update_io_dialog(Children *children)
                gtk_widget_set_sensitive(children->close_btn, TRUE);
                if (children->input_hbox)
                        gtk_widget_set_sensitive(children->input_hbox, FALSE);
+               gtk_widget_grab_focus(children->close_btn);
+               gtk_signal_connect(GTK_OBJECT(children->dialog), 
+                                  "key_press_event",
+                                  GTK_SIGNAL_FUNC(io_dialog_key_pressed_cb),
+                                  children);
        }
 
        if (children->output) {