/pidgin/main: 32bace83b11e: pidgin_request_action: don't allow t...
Tomasz Wasilczyk
tomkiewicz at cpw.pidgin.im
Thu Jul 5 13:24:33 EDT 2012
Changeset: 32bace83b11e8de60d5217e67f4df67b2fa5e24c
Author: Tomasz Wasilczyk <tomkiewicz at cpw.pidgin.im>
Date: 2012-06-29 16:35 +0200
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/32bace83b11e
Description:
pidgin_request_action: don't allow to close dialog window with Escape key
diffstat:
pidgin/gtkrequest.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diffs (24 lines):
diff --git a/pidgin/gtkrequest.c b/pidgin/gtkrequest.c
--- a/pidgin/gtkrequest.c
+++ b/pidgin/gtkrequest.c
@@ -341,6 +341,11 @@
return text;
}
+static void stop_emission_cb(GtkDialog *dialog, const gchar *signal_name)
+{
+ gtk_signal_emit_stop_by_name(GTK_OBJECT(dialog), signal_name);
+}
+
static void *
pidgin_request_input(const char *title, const char *primary,
const char *secondary, const char *default_value,
@@ -655,6 +660,8 @@
data->dialog = dialog = gtk_dialog_new();
gtk_window_set_deletable(GTK_WINDOW(data->dialog), FALSE);
+ g_signal_connect(G_OBJECT(dialog), "close",
+ G_CALLBACK(stop_emission_cb), "close");
if (title != NULL)
gtk_window_set_title(GTK_WINDOW(dialog), title);
More information about the Commits
mailing list