From: Christian Dywan Date: Wed, 20 Jan 2010 20:34:17 +0000 (+0100) Subject: Clicking inside the location entry closes the completion window X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0a50c47d3fb48c2598f271c7752fc309ed7baf9;p=midori Clicking inside the location entry closes the completion window --- diff --git a/midori/midori-locationaction.c b/midori/midori-locationaction.c index 1c990526..0078ab92 100644 --- a/midori/midori-locationaction.c +++ b/midori/midori-locationaction.c @@ -843,6 +843,21 @@ midori_location_action_changed_cb (GtkEntry* entry, katze_assign (location_action->text, g_strdup (gtk_entry_get_text (entry))); } +static gboolean +midori_location_action_button_press_event_cb (GtkEntry* entry, + GdkEventKey* event, + MidoriLocationAction* action) +{ + if (action->popup && GTK_WIDGET_VISIBLE (action->popup)) + { + midori_location_action_popdown_completion (action); + + return TRUE; + } + + return FALSE; +} + static gboolean midori_location_action_key_press_event_cb (GtkEntry* entry, GdkEventKey* event, @@ -1434,6 +1449,8 @@ midori_location_action_connect_proxy (GtkAction* action, g_object_connect (child, "signal::changed", midori_location_action_changed_cb, action, + "signal::button-press-event", + midori_location_action_button_press_event_cb, action, "signal::key-press-event", midori_location_action_key_press_event_cb, action, #if GTK_CHECK_VERSION (2, 19, 3)