aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2013-02-08 04:00:06 +0800
committerXan Lopez <xan@igalia.com>2013-02-08 04:00:06 +0800
commit370d8d7a79ee3b4270f67fe4664875b288a6f89a (patch)
treea28e19b27d49dfd9bbc8464b245abf337f0a62ff /src
parentb0fff802887880765e36bbfb8ff56c91ecc4666e (diff)
downloadgsoc2013-epiphany-370d8d7a79ee3b4270f67fe4664875b288a6f89a.tar
gsoc2013-epiphany-370d8d7a79ee3b4270f67fe4664875b288a6f89a.tar.gz
gsoc2013-epiphany-370d8d7a79ee3b4270f67fe4664875b288a6f89a.tar.bz2
gsoc2013-epiphany-370d8d7a79ee3b4270f67fe4664875b288a6f89a.tar.lz
gsoc2013-epiphany-370d8d7a79ee3b4270f67fe4664875b288a6f89a.tar.xz
gsoc2013-epiphany-370d8d7a79ee3b4270f67fe4664875b288a6f89a.tar.zst
gsoc2013-epiphany-370d8d7a79ee3b4270f67fe4664875b288a6f89a.zip
ephy-shell: return the proper types for EphySession and GNetworkMonitor
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c14
-rw-r--r--src/ephy-shell.h21
-rw-r--r--src/ephy-window.c4
3 files changed, 20 insertions, 19 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 5236f2aff..81fd0d4c5 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -119,7 +119,7 @@ ephy_shell_startup_continue (EphyShell *shell)
EphyShellStartupContext *ctx;
EphySession *session;
- session = EPHY_SESSION (ephy_shell_get_session (shell));
+ session = ephy_shell_get_session (shell);
g_assert (session != NULL);
ctx = shell->priv->startup_context;
@@ -267,7 +267,7 @@ ephy_shell_activate (GApplication *application)
EphyShellStartupContext *ctx;
ctx = shell->priv->startup_context;
- ephy_session_resume (EPHY_SESSION (ephy_shell_get_session (shell)),
+ ephy_session_resume (ephy_shell_get_session (shell),
ctx->user_time, NULL, session_load_cb, shell);
} else
ephy_shell_startup_continue (shell);
@@ -919,7 +919,7 @@ ephy_shell_new_tab (EphyShell *shell,
*
* Return value: (transfer none): the current session.
**/
-GObject *
+EphySession *
ephy_shell_get_session (EphyShell *shell)
{
g_return_val_if_fail (EPHY_IS_SHELL (shell), NULL);
@@ -927,7 +927,7 @@ ephy_shell_get_session (EphyShell *shell)
if (shell->priv->session == NULL)
shell->priv->session = g_object_new (EPHY_TYPE_SESSION, NULL);
- return G_OBJECT (shell->priv->session);
+ return shell->priv->session;
}
/**
@@ -950,7 +950,7 @@ ephy_shell_get_bookmarks (EphyShell *shell)
*
* Return value: (transfer none):
**/
-GObject *
+GNetworkMonitor *
ephy_shell_get_net_monitor (EphyShell *shell)
{
EphyShellPrivate *priv = shell->priv;
@@ -958,7 +958,7 @@ ephy_shell_get_net_monitor (EphyShell *shell)
if (priv->network_monitor == NULL)
priv->network_monitor = g_network_monitor_get_default ();
- return G_OBJECT (priv->network_monitor);
+ return priv->network_monitor;
}
/**
@@ -1141,7 +1141,7 @@ ephy_shell_close_all_windows (EphyShell *shell)
g_return_val_if_fail (EPHY_IS_SHELL (shell), FALSE);
- ephy_session_close (EPHY_SESSION (ephy_shell_get_session (shell)));
+ ephy_session_close (ephy_shell_get_session (shell));
windows = shell->priv->windows;
while (windows) {
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index 5d0ca9fe8..70ebad26e 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -27,10 +27,11 @@
#ifndef EPHY_SHELL_H
#define EPHY_SHELL_H
-#include "ephy-embed-shell.h"
#include "ephy-bookmarks.h"
-#include "ephy-window.h"
+#include "ephy-embed-shell.h"
#include "ephy-embed.h"
+#include "ephy-session.h"
+#include "ephy-window.h"
#ifdef HAVE_WEBKIT2
#include <webkit2/webkit2.h>
@@ -158,21 +159,21 @@ EphyEmbed *ephy_shell_new_tab_full (EphyShell *shell,
gboolean is_popup,
guint32 user_time);
-GObject *ephy_shell_get_session (EphyShell *shell);
+EphySession *ephy_shell_get_session (EphyShell *shell);
-GObject *ephy_shell_get_net_monitor (EphyShell *shell);
+GNetworkMonitor *ephy_shell_get_net_monitor (EphyShell *shell);
-EphyBookmarks *ephy_shell_get_bookmarks (EphyShell *shell);
+EphyBookmarks *ephy_shell_get_bookmarks (EphyShell *shell);
-GtkWidget *ephy_shell_get_bookmarks_editor (EphyShell *shell);
+GtkWidget *ephy_shell_get_bookmarks_editor (EphyShell *shell);
-GtkWidget *ephy_shell_get_history_window (EphyShell *shell);
+GtkWidget *ephy_shell_get_history_window (EphyShell *shell);
-GObject *ephy_shell_get_pdm_dialog (EphyShell *shell);
+GObject *ephy_shell_get_pdm_dialog (EphyShell *shell);
-GObject *ephy_shell_get_prefs_dialog (EphyShell *shell);
+GObject *ephy_shell_get_prefs_dialog (EphyShell *shell);
-GList *ephy_shell_get_windows (EphyShell *shell);
+GList *ephy_shell_get_windows (EphyShell *shell);
guint ephy_shell_get_n_windows (EphyShell *shell);
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 548df0233..ea183594e 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1697,7 +1697,7 @@ sync_network_status (EphyEmbedSingle *single,
GtkAction *action;
gboolean is_online;
- GNetworkMonitor *monitor = G_NETWORK_MONITOR (ephy_shell_get_net_monitor (ephy_shell_get_default ()));
+ GNetworkMonitor *monitor = ephy_shell_get_net_monitor (ephy_shell_get_default ());
is_online = g_network_monitor_get_network_available (monitor);
action = gtk_action_group_get_action (priv->action_group,
@@ -4422,7 +4422,7 @@ ephy_window_close (EphyWindow *window)
/* If this is the last window, save its state in the session. */
if (ephy_shell_get_n_windows (ephy_shell_get_default ()) == 1)
{
- ephy_session_close (EPHY_SESSION (ephy_shell_get_session (ephy_shell_get_default ())));
+ ephy_session_close (ephy_shell_get_session (ephy_shell_get_default ()));
}
/* See bug #114689 */