From 1721164d2a3573df3681eb944199d036b10f159d Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Fri, 26 Aug 2011 14:25:39 +0300 Subject: Add a EphyBrowseHistory instance to EphyEmbedShell --- embed/ephy-embed-shell.c | 27 +++++++++++++++++++++++++++ embed/ephy-embed-shell.h | 2 ++ 2 files changed, 29 insertions(+) diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index f0332b26b..63fe5c1d3 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -37,6 +37,7 @@ #include "ephy-favicon-cache.h" #include "ephy-file-helpers.h" #include "ephy-history.h" +#include "ephy-browse-history.h" #include "ephy-print-utils.h" @@ -52,6 +53,7 @@ struct _EphyEmbedShellPrivate { EphyHistory *global_history; + EphyBrowseHistory *global_browse_history; GList *downloads; EphyFaviconCache *favicon_cache; EphyEmbedSingle *embed_single; @@ -143,6 +145,12 @@ ephy_embed_shell_finalize (GObject *object) g_object_unref (shell->priv->global_history); } + if (shell->priv->global_browse_history) + { + LOG ("Unref browse history"); + g_object_unref (shell->priv->global_browse_history); + } + if (shell->priv->embed_single) { LOG ("Unref embed single"); @@ -199,6 +207,25 @@ ephy_embed_shell_get_global_history (EphyEmbedShell *shell) return G_OBJECT (shell->priv->global_history); } +/** + * ephy_embed_shell_get_global_browse_history: + * @shell: the #EphyEmbedShell + * + * Return value: (transfer none): + **/ +GObject * +ephy_embed_shell_get_global_browse_history (EphyEmbedShell *shell) +{ + g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL); + + if (shell->priv->global_browse_history == NULL) + { + shell->priv->global_browse_history = ephy_browse_history_new (); + } + + return G_OBJECT (shell->priv->global_browse_history); +} + static GObject * impl_get_embed_single (EphyEmbedShell *shell) { diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h index fab9dd449..a31d290e5 100644 --- a/embed/ephy-embed-shell.h +++ b/embed/ephy-embed-shell.h @@ -83,6 +83,8 @@ GObject *ephy_embed_shell_get_favicon_cache (EphyEmbedShell *shell); GObject *ephy_embed_shell_get_global_history (EphyEmbedShell *shell); +GObject *ephy_embed_shell_get_global_browse_history (EphyEmbedShell *shell); + GObject *ephy_embed_shell_get_encodings (EphyEmbedShell *shell); GObject *ephy_embed_shell_get_embed_single (EphyEmbedShell *shell); -- cgit v1.2.3