aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-location-action.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@src.gnome.org>2007-12-27 03:00:00 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2007-12-27 03:00:00 +0800
commit7236ef4936158ed4f713d5d5da061e0696e9ea76 (patch)
treec3580d9a07dedbcfc6ade32b1dc195031a7f1a79 /src/ephy-location-action.c
parent0b39aeca159fdd8126cb7423dbe8753bf1b5c1e7 (diff)
downloadgsoc2013-epiphany-7236ef4936158ed4f713d5d5da061e0696e9ea76.tar
gsoc2013-epiphany-7236ef4936158ed4f713d5d5da061e0696e9ea76.tar.gz
gsoc2013-epiphany-7236ef4936158ed4f713d5d5da061e0696e9ea76.tar.bz2
gsoc2013-epiphany-7236ef4936158ed4f713d5d5da061e0696e9ea76.tar.lz
gsoc2013-epiphany-7236ef4936158ed4f713d5d5da061e0696e9ea76.tar.xz
gsoc2013-epiphany-7236ef4936158ed4f713d5d5da061e0696e9ea76.tar.zst
gsoc2013-epiphany-7236ef4936158ed4f713d5d5da061e0696e9ea76.zip
Catch bookmarks and history in EphyLocationActionPrivate, it's smarter.
Fixes bug #505777. svn path=/trunk/; revision=7828
Diffstat (limited to 'src/ephy-location-action.c')
-rw-r--r--src/ephy-location-action.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/ephy-location-action.c b/src/ephy-location-action.c
index 3d7ef7838..73f817089 100644
--- a/src/ephy-location-action.c
+++ b/src/ephy-location-action.c
@@ -51,6 +51,7 @@ struct _EphyLocationActionPrivate
char *typed_address;
EphyNode *smart_bmks;
EphyBookmarks *bookmarks;
+ EphyNode *history;
GdkPixbuf *icon;
char *lock_stock_id;
char *lock_tooltip;
@@ -155,9 +156,9 @@ completion_func (GtkEntryCompletion *completion,
gboolean ret = FALSE;
GtkTreeModel *model;
GtkTreeIter iter2;
+ EphyLocationActionPrivate *priv;
- EphyNode *history;
- EphyBookmarks *bookmarks;
+ priv = EPHY_LOCATION_ACTION (data)->priv;
model = gtk_entry_completion_get_model (completion);
@@ -201,10 +202,6 @@ completion_func (GtkEntryCompletion *completion,
}
}
- bookmarks = ephy_shell_get_bookmarks (ephy_shell);
- history = ephy_history_get_pages (EPHY_HISTORY (
- ephy_embed_shell_get_global_history (embed_shell)));
-
gtk_tree_model_sort_convert_iter_to_child_iter
(GTK_TREE_MODEL_SORT (model), &iter2, iter);
@@ -212,8 +209,8 @@ completion_func (GtkEntryCompletion *completion,
* and we are seeing an history item, then we skip showing it.
* The bookmark will be shown instead since we are not filtering it out.
*/
- if (ephy_bookmarks_find_bookmark (bookmarks, url) != NULL &&
- (iter2.user_data2 == history))
+ if (ephy_bookmarks_find_bookmark (priv->bookmarks, url) != NULL &&
+ (iter2.user_data2 == priv->history))
ret = FALSE;
g_free (item);
@@ -514,7 +511,8 @@ connect_proxy (GtkAction *action, GtkWidget *proxy)
EPHY_COMPLETION_URL_COL);
ephy_location_entry_set_completion_func (EPHY_LOCATION_ENTRY (proxy),
- completion_func);
+ completion_func,
+ EPHY_LOCATION_ACTION (action));
add_completion_actions (action, proxy);
@@ -871,6 +869,9 @@ ephy_location_action_init (EphyLocationAction *action)
(action->priv->bookmarks);
init_actions_list (action);
+
+ priv->history = ephy_history_get_pages (EPHY_HISTORY (
+ ephy_embed_shell_get_global_history (embed_shell)));
ephy_node_signal_connect_object (priv->smart_bmks,
EPHY_NODE_CHILD_ADDED,