gimp r26350 - in branches/soc-2008-tagging: . app/widgets
- From: aurisj svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r26350 - in branches/soc-2008-tagging: . app/widgets
- Date: Fri, 1 Aug 2008 20:24:03 +0000 (UTC)
Author: aurisj
Date: Fri Aug 1 20:24:03 2008
New Revision: 26350
URL: http://svn.gnome.org/viewvc/gimp?rev=26350&view=rev
Log:
2008-08-01 Aurimas JuÅka <aurisj svn gnome org>
* app/widgets/gimptagpopup.c: close tag popup on keyboard input.
Modified:
branches/soc-2008-tagging/ChangeLog
branches/soc-2008-tagging/app/widgets/gimptagpopup.c
Modified: branches/soc-2008-tagging/app/widgets/gimptagpopup.c
==============================================================================
--- branches/soc-2008-tagging/app/widgets/gimptagpopup.c (original)
+++ branches/soc-2008-tagging/app/widgets/gimptagpopup.c Fri Aug 1 20:24:03 2008
@@ -121,7 +121,12 @@
gimp_tag_popup_remove_scroll_timeout (tag_popup);
/* FIXME: parent should do this on destroy event */
- tag_popup->combo_entry->popup = NULL;
+ if (tag_popup->combo_entry)
+ {
+ gtk_widget_grab_focus (tag_popup->combo_entry->tag_entry);
+ tag_popup->combo_entry->popup = NULL;
+ tag_popup->combo_entry = NULL;
+ }
if (tag_popup->layout)
{
@@ -172,7 +177,8 @@
gtk_widget_add_events (GTK_WIDGET (popup),
GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
- | GDK_POINTER_MOTION_MASK);
+ | GDK_POINTER_MOTION_MASK
+ | GDK_KEY_RELEASE_MASK);
gtk_window_set_screen (GTK_WINDOW (popup),
gtk_widget_get_screen (GTK_WIDGET (combo_entry)));
@@ -315,7 +321,7 @@
popup);
gtk_grab_add (GTK_WIDGET (popup));
- gtk_widget_grab_focus (combo_entry->tag_entry);
+ gtk_widget_grab_focus (GTK_WIDGET (popup));
grab_status = gdk_pointer_grab (GTK_WIDGET (popup)->window, TRUE,
GDK_BUTTON_PRESS_MASK
| GDK_BUTTON_RELEASE_MASK
@@ -531,6 +537,10 @@
GDK_CURRENT_TIME);
gtk_widget_destroy (widget);
}
+ else if (event->type == GDK_KEY_PRESS)
+ {
+ gtk_widget_destroy (GTK_WIDGET (tag_popup));
+ }
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]