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);
} else if (p[0] == '&') {
if (p[1] == 0x00)
action_type |= ACTION_ASYNC;
- else
- action_type = ACTION_ERROR;
}
p++;
}
}
}
+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)
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) {
* When adding new lines, remember to put one string for each line
*/
static gchar *actions_desc_strings[] = {
- N_("Menu name:"),
- N_(" Use / in menu name to make submenus."),
- "",
- N_("Command line:"),
- N_("* Begin with:"),
- N_(" | to send message body or selection to command"),
- N_(" > to send user provided text to command"),
- N_(" * to send user provided hidden text to command"),
- N_("* End with:"),
- N_(" | to replace message body or selection with command output"),
- N_(" > to insert command's output without replacing old text"),
- N_(" & to run command asynchronously"),
- N_("* Use:"),
- N_(" %f for message file name"),
- N_(" %F for the list of the file names of selected messages"),
- N_(" %p for the selected message MIME part."),
+ N_("Menu name:"), NULL,
+ " ", N_("Use / in menu name to make submenus."),
+ "", NULL,
+ N_("Command line:"), NULL,
+ N_("* Begin with:"), NULL,
+ " |", N_("to send message body or selection to command"),
+ " >", N_("to send user provided text to command"),
+ " *", N_("to send user provided hidden text to command"),
+ N_("* End with:"), NULL,
+ " |", N_("to replace message body or selection with command output"),
+ " >", N_("to insert command's output without replacing old text"),
+ " &", N_("to run command asynchronously"),
+ N_("* Use:"), NULL,
+ " %f", N_("for message file name"),
+ " %F", N_("for the list of the file names of selected messages"),
+ " %p", N_("for the selected message MIME part."),
NULL
};
static DescriptionWindow actions_desc_win = {
NULL,
- 1,
+ 2,
N_("Description of symbols"),
actions_desc_strings
};