Mercurial > pidgin
changeset 18388:ec29522b76d0
Rework the logic to be (IMHO) easy to read.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 01 Jul 2007 00:59:35 +0000 |
parents | 8c5b9b789bbb |
children | 0ef0b2ead713 |
files | pidgin/gtkimhtmltoolbar.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/gtkimhtmltoolbar.c Sun Jul 01 00:55:03 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Sun Jul 01 00:59:35 2007 +0000 @@ -646,14 +646,14 @@ static gboolean smiley_dialog_input_cb(GtkWidget *dialog, GdkEvent *event, GtkIMHtmlToolbar *toolbar) { - gboolean close_dialog = - (GDK_KEY_PRESS == event->type) ? (GDK_Escape == event->key.keyval) : - (GDK_BUTTON_PRESS == event->type) ? (1 == event->button.button) : FALSE; + if ((event->type == GDK_KEY_PRESS && event->key.keyval == GDK_Escape) || + (event->type == GDK_BUTTON_PRESS && event->button.button == 1)) + { + close_smiley_dialog(NULL, NULL, toolbar); + return TRUE; + } - if (close_dialog) - close_smiley_dialog(NULL, NULL, toolbar); - - return close_dialog; + return FALSE; } static void