Do not put statusbar text in the location entry if it's focussed

This prevents overwriting what the user may be typing while
accidentally moving the mouse.
This commit is contained in:
Christian Dywan 2009-09-19 21:06:33 +02:00
parent 16e00c379e
commit 4f8deae24d

View file

@ -352,9 +352,13 @@ static void
_midori_browser_set_statusbar_text (MidoriBrowser* browser, _midori_browser_set_statusbar_text (MidoriBrowser* browser,
const gchar* text) const gchar* text)
{ {
GtkWidget* widget = gtk_window_get_focus (GTK_WINDOW (browser));
gboolean is_location = widget ?
MIDORI_IS_LOCATION_ENTRY (gtk_widget_get_parent (widget)) : FALSE;
katze_assign (browser->statusbar_text, g_strdup (text)); katze_assign (browser->statusbar_text, g_strdup (text));
if (!GTK_WIDGET_VISIBLE (browser->statusbar)) if (!GTK_WIDGET_VISIBLE (browser->statusbar) && !is_location)
{ {
GtkAction* action = _action_by_name (browser, "Location"); GtkAction* action = _action_by_name (browser, "Location");
MidoriLocationAction* location_action = MIDORI_LOCATION_ACTION (action); MidoriLocationAction* location_action = MIDORI_LOCATION_ACTION (action);