diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-12-14 23:00:05 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-12-14 23:00:05 +0800 |
commit | 3f6d77a5dbe5ced642287f98b8d7eb146401600b (patch) | |
tree | 812d076b67cd211944b974d86ed3bbc40acd51f1 | |
parent | 772259b5f216c532bffd6624c8ae9a882e0a6ee1 (diff) | |
download | gsoc2013-epiphany-3f6d77a5dbe5ced642287f98b8d7eb146401600b.tar gsoc2013-epiphany-3f6d77a5dbe5ced642287f98b8d7eb146401600b.tar.gz gsoc2013-epiphany-3f6d77a5dbe5ced642287f98b8d7eb146401600b.tar.bz2 gsoc2013-epiphany-3f6d77a5dbe5ced642287f98b8d7eb146401600b.tar.lz gsoc2013-epiphany-3f6d77a5dbe5ced642287f98b8d7eb146401600b.tar.xz gsoc2013-epiphany-3f6d77a5dbe5ced642287f98b8d7eb146401600b.tar.zst gsoc2013-epiphany-3f6d77a5dbe5ced642287f98b8d7eb146401600b.zip |
Don't remember last action target. Fixes bug #128043.
2003-12-14 Christian Persch <chpe@cvs.gnome.org>
* lib/widgets/ephy-location-entry.c: (ephy_location_entry_init),
(ephy_location_entry_activate_cb),
(ephy_location_entry_autocompletion_window_url_activated_cb):
Don't remember last action target. Fixes bug #128043.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | lib/widgets/ephy-location-entry.c | 33 |
2 files changed, 12 insertions, 29 deletions
@@ -1,3 +1,11 @@ +2003-12-14 Christian Persch <chpe@cvs.gnome.org> + + * lib/widgets/ephy-location-entry.c: (ephy_location_entry_init), + (ephy_location_entry_activate_cb), + (ephy_location_entry_autocompletion_window_url_activated_cb): + + Don't remember last action target. Fixes bug #128043. + 2003-12-06 Christian Persch <chpe@cvs.gnome.org> * embed/downloader-view.c: (open_selection_foreach): diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c index 52d69300f..9e9295332 100644 --- a/lib/widgets/ephy-location-entry.c +++ b/lib/widgets/ephy-location-entry.c @@ -50,7 +50,6 @@ struct _EphyLocationEntryPrivate { gboolean user_changed; char *autocompletion_key; - char *last_action_target; }; #define AUTOCOMPLETION_DELAY 10 @@ -216,7 +215,6 @@ ephy_location_entry_init (EphyLocationEntry *w) p = g_new0 (EphyLocationEntryPrivate, 1); w->priv = p; - p->last_action_target = NULL; p->before_completion = NULL; p->user_changed = TRUE; p->autocompletion_key = NULL; @@ -511,14 +509,6 @@ ephy_location_entry_key_press_event_cb (GtkWidget *entry, GdkEventKey *event, Ep return FALSE; } -static gboolean -ephy_location_entry_content_is_text (const char *content) -{ - return ((g_strrstr (content, ".") == NULL) && - (g_strrstr (content, "/") == NULL) && - (g_strrstr (content, ":") == NULL)); -} - static void ephy_location_entry_activate_cb (GtkEntry *entry, EphyLocationEntry *w) { @@ -526,18 +516,9 @@ ephy_location_entry_activate_cb (GtkEntry *entry, EphyLocationEntry *w) char *target = NULL; content = gtk_editable_get_chars (GTK_EDITABLE(entry), 0, -1); - if (w->priv->last_action_target && - ephy_location_entry_content_is_text (content)) - { - target = g_strdup (w->priv->last_action_target); - } - else - { - target = content; - content = NULL; - g_free ( w->priv->last_action_target); - w->priv->last_action_target = NULL; - } + + target = content; + content = NULL; ephy_location_entry_autocompletion_hide_alternatives (w); @@ -669,13 +650,7 @@ ephy_location_entry_autocompletion_window_url_activated_cb (EphyAutocompletionWi { char *content; - if (action) - { - if (w->priv->last_action_target) - g_free (w->priv->last_action_target); - w->priv->last_action_target = g_strdup (target); - } - else + if (!action) { ephy_location_entry_set_location (w, target); } |