aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--lib/widgets/ephy-location-entry.c23
2 files changed, 27 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b6f40e677..89c9f709e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-07-20 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/widgets/ephy-location-entry.c: (entry_key_press_cb),
+ (entry_activate_after_cb), (action_activated_after_cb),
+ (ephy_location_entry_reset_internal), (ephy_location_entry_reset):
+
+ When resetting the entry also emit user-changed, to restore the original
+ URI in the tab's property. Bug #345934.
+
2006-07-18 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyPromptService.cpp:
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index d55a8de28..16b2c523b 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -110,6 +110,7 @@ static const GdkColor fallback_bg_colour = { 0, 0xf7f7, 0xf7f7, 0xbebe }; /* yel
static void ephy_location_entry_class_init (EphyLocationEntryClass *klass);
static void ephy_location_entry_init (EphyLocationEntry *le);
+static gboolean ephy_location_entry_reset_internal (EphyLocationEntry *, gboolean);
static GObjectClass *parent_class = NULL;
@@ -385,7 +386,7 @@ entry_key_press_cb (GtkEntry *entry,
if (event->keyval == GDK_Escape && state == 0)
{
- ephy_location_entry_reset (lentry);
+ ephy_location_entry_reset_internal (lentry, TRUE);
/* don't return TRUE since we want to cancel the autocompletion popup too */
}
@@ -426,7 +427,7 @@ entry_activate_after_cb (GtkEntry *entry,
if (priv->needs_reset)
{
- ephy_location_entry_reset (lentry);
+ ephy_location_entry_reset_internal (lentry, TRUE);
priv->needs_reset = FALSE;
}
}
@@ -552,7 +553,7 @@ action_activated_after_cb (GtkEntryCompletion *completion,
state == (GDK_CONTROL_MASK | GDK_SHIFT_MASK)) ||
button == 2)
{
- ephy_location_entry_reset (lentry);
+ ephy_location_entry_reset_internal (lentry, TRUE);
}
}
@@ -1082,8 +1083,9 @@ ephy_location_entry_get_location (EphyLocationEntry *entry)
return gtk_entry_get_text (GTK_ENTRY (priv->icon_entry->entry));
}
-gboolean
-ephy_location_entry_reset (EphyLocationEntry *entry)
+static gboolean
+ephy_location_entry_reset_internal (EphyLocationEntry *entry,
+ gboolean notify)
{
EphyLocationEntryPrivate *priv = entry->priv;
const char *text, *old_text;
@@ -1100,9 +1102,20 @@ ephy_location_entry_reset (EphyLocationEntry *entry)
ephy_location_entry_set_location (entry, text, NULL);
g_free (url);
+ if (notify)
+ {
+ g_signal_emit (entry, signals[USER_CHANGED], 0);
+ }
+
return retval;
}
+gboolean
+ephy_location_entry_reset (EphyLocationEntry *entry)
+{
+ return ephy_location_entry_reset_internal (entry, FALSE);
+}
+
void
ephy_location_entry_activate (EphyLocationEntry *entry)
{