[Xfce4-commits] <midori:master> Do not put statusbar text in the location entry if it's focussed
Christian Dywan
noreply at xfce.org
Sun Sep 20 21:00:01 CEST 2009
Updating branch refs/heads/master
to 4f8deae24d6af31d5da9f16b24bcca6d3c0d6da5 (commit)
from 16e00c379e03f6d3e9bc127894e710c1138e76a1 (commit)
commit 4f8deae24d6af31d5da9f16b24bcca6d3c0d6da5
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Sep 19 21:06:33 2009 +0200
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.
midori/midori-browser.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index e4d3faf..720b18b 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -352,9 +352,13 @@ static void
_midori_browser_set_statusbar_text (MidoriBrowser* browser,
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));
- if (!GTK_WIDGET_VISIBLE (browser->statusbar))
+ if (!GTK_WIDGET_VISIBLE (browser->statusbar) && !is_location)
{
GtkAction* action = _action_by_name (browser, "Location");
MidoriLocationAction* location_action = MIDORI_LOCATION_ACTION (action);
More information about the Xfce4-commits
mailing list