diff options
Diffstat (limited to 'embed')
-rw-r--r-- | embed/ephy-embed-shell.c | 27 | ||||
-rw-r--r-- | embed/ephy-embed-shell.h | 2 |
2 files changed, 29 insertions, 0 deletions
diff --git a/embed/ephy-embed-shell.c b/embed/ephy-embed-shell.c index 29f8f1bfd..47541ded2 100644 --- a/embed/ephy-embed-shell.c +++ b/embed/ephy-embed-shell.c @@ -57,6 +57,7 @@ typedef struct { WebKitWebContext *web_context; EphyHistoryService *global_history_service; + EphyGSBService *global_gsb_service; EphyEncodings *encodings; GtkPageSetup *page_setup; GtkPrintSettings *print_settings; @@ -168,6 +169,7 @@ ephy_embed_shell_dispose (GObject *object) g_clear_object (&priv->page_setup); g_clear_object (&priv->print_settings); g_clear_object (&priv->global_history_service); + g_clear_object (&priv->global_gsb_service); g_clear_object (&priv->about_handler); g_clear_object (&priv->user_content); g_clear_object (&priv->downloads_manager); @@ -575,6 +577,31 @@ ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell) return priv->global_history_service; } +/** + * ephy_embed_shell_get_global_gsb_service: + * @shell: the #EphyEmbedShell + * + * Return value: (transfer none): the global #EphyGSBService + **/ +EphyGSBService * +ephy_embed_shell_get_global_gsb_service (EphyEmbedShell *shell) +{ + EphyEmbedShellPrivate *priv = ephy_embed_shell_get_instance_private (shell); + + g_return_val_if_fail (EPHY_IS_EMBED_SHELL (shell), NULL); + + if (priv->global_gsb_service == NULL) { + char *filename; + + filename = g_build_filename (ephy_dot_dir (), EPHY_GSB_FILE, NULL); + priv->global_gsb_service = ephy_gsb_service_new (filename); + + g_free (filename); + } + + return priv->global_gsb_service; +} + static void snapshot_saved_cb (EphySnapshotService *service, const char *url, diff --git a/embed/ephy-embed-shell.h b/embed/ephy-embed-shell.h index 6d9b2d00e..44d6cc72e 100644 --- a/embed/ephy-embed-shell.h +++ b/embed/ephy-embed-shell.h @@ -26,6 +26,7 @@ #include "ephy-downloads-manager.h" #include "ephy-encodings.h" +#include "ephy-gsb-service.h" #include "ephy-history-service.h" #include "ephy-permissions-manager.h" #include "ephy-search-engine-manager.h" @@ -58,6 +59,7 @@ EphyEmbedShell *ephy_embed_shell_get_default (void); WebKitWebContext *ephy_embed_shell_get_web_context (EphyEmbedShell *shell); EphyHistoryService *ephy_embed_shell_get_global_history_service (EphyEmbedShell *shell); +EphyGSBService *ephy_embed_shell_get_global_gsb_service (EphyEmbedShell *shell); EphyEncodings *ephy_embed_shell_get_encodings (EphyEmbedShell *shell); void ephy_embed_shell_restored_window (EphyEmbedShell *shell); void ephy_embed_shell_set_page_setup (EphyEmbedShell *shell, |