changeset 13803:25a09aff5dde

[gaim-migrate @ 16217] The last of SF Patch #1500267 from Sadrul "if you press Escape when changing the status, it discards the changes and restores the statusbox to reflect current status." committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Sun, 04 Jun 2006 08:19:51 +0000
parents a93eeef163a9
children 18808a4c99b0
files src/gtkstatusbox.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkstatusbox.c	Sun Jun 04 08:14:25 2006 +0000
+++ b/src/gtkstatusbox.c	Sun Jun 04 08:19:51 2006 +0000
@@ -738,6 +738,16 @@
 	}
 	if (!status_box->typing != 0)
 		return FALSE;
+
+	/* Reset the status if Escape was pressed */
+	if (event->keyval == GDK_Escape)
+	{
+		g_source_remove(status_box->typing);
+		status_box->typing = 0;
+		status_menu_refresh_iter(status_box);
+		return TRUE;
+	}
+	
 	gtk_gaim_status_box_pulse_typing(status_box);
 	g_source_remove(status_box->typing);
 	status_box->typing = g_timeout_add(TYPING_TIMEOUT, (GSourceFunc)remove_typing_cb, status_box);