Commit 658c6d8c authored by Christian Neumair's avatar Christian Neumair Committed by Christian Neumair

Do not emit "location-changed" if the entry is empty. Fixes #543936.

2008-07-21  Christian Neumair  <cneumair@gnome.org>

	* src/nautilus-location-bar.c (editable_activate_callback),
	(nautilus_location_bar_init):
	Do not emit "location-changed" if the entry is empty. Fixes #543936.
	Thanks to Diego Escalante Urrelo.

svn path=/trunk/; revision=14382
parent 6dc13e0f
2008-07-21 Christian Neumair <cneumair@gnome.org>
* src/nautilus-location-bar.c (editable_activate_callback),
(nautilus_location_bar_init):
Do not emit "location-changed" if the entry is empty. Fixes #543936.
Thanks to Diego Escalante Urrelo.
2008-07-20 David Zeuthen <davidz@redhat.com>
* libnautilus-private/nautilus-file-operations.c
......
......@@ -304,6 +304,21 @@ set_position_and_selection_to_end (GtkEditable *editable)
gtk_editable_set_position (editable, end);
}
static void
editable_activate_callback (GtkEntry *entry,
gpointer user_data)
{
NautilusNavigationBar *bar;
const char *entry_text;
bar = NAUTILUS_NAVIGATION_BAR (user_data);
entry_text = gtk_entry_get_text (entry);
if (entry_text != NULL && *entry_text != '\0') {
nautilus_navigation_bar_location_changed (bar);
}
}
static void
editable_event_after_callback (GtkEntry *entry,
GdkEvent *event,
......@@ -417,8 +432,7 @@ nautilus_location_bar_init (NautilusLocationBar *bar)
entry = nautilus_location_entry_new ();
g_signal_connect_object (entry, "activate",
G_CALLBACK (nautilus_navigation_bar_location_changed),
bar, G_CONNECT_SWAPPED);
G_CALLBACK (editable_activate_callback), bar, 0);
g_signal_connect_object (entry, "event_after",
G_CALLBACK (editable_event_after_callback), bar, G_CONNECT_AFTER);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment