/pidgin/main: 3ee545012e46: Make keypad Enter enable, and Escape...
Elliott Sales de Andrade
qulogic at pidgin.im
Wed Nov 12 03:59:48 EST 2014
Changeset: 3ee545012e463768a5b4ecd2c2467f3ba10cd59a
Author: Elliott Sales de Andrade <qulogic at pidgin.im>
Date: 2014-11-12 03:59 -0500
Branch: default
URL: https://hg.pidgin.im/pidgin/main/rev/3ee545012e46
Description:
Make keypad Enter enable, and Escape disable, debug filtering.
diffstat:
pidgin/gtkdebug.c | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diffs (27 lines):
diff --git a/pidgin/gtkdebug.c b/pidgin/gtkdebug.c
--- a/pidgin/gtkdebug.c
+++ b/pidgin/gtkdebug.c
@@ -311,11 +311,18 @@ regex_changed_cb(GtkWidget *w, DebugWind
static void
regex_key_release_cb(GtkWidget *w, GdkEventKey *e, DebugWindow *win) {
- if(e->keyval == GDK_KEY_Return &&
- gtk_widget_is_sensitive(win->filter) &&
- !gtk_toggle_tool_button_get_active(GTK_TOGGLE_TOOL_BUTTON(win->filter)))
- {
- gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(win->filter), TRUE);
+ if (gtk_widget_is_sensitive(win->filter)) {
+ GtkToggleToolButton *tb = GTK_TOGGLE_TOOL_BUTTON(win->filter);
+ if ((e->keyval == GDK_KEY_Return || e->keyval == GDK_KEY_KP_Enter) &&
+ !gtk_toggle_tool_button_get_active(tb))
+ {
+ gtk_toggle_tool_button_set_active(tb, TRUE);
+ }
+ if (e->keyval == GDK_KEY_Escape &&
+ gtk_toggle_tool_button_get_active(tb))
+ {
+ gtk_toggle_tool_button_set_active(tb, FALSE);
+ }
}
}
More information about the Commits
mailing list