aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-automation.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@gnome.org>2003-11-10 03:16:35 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-11-10 03:16:35 +0800
commitd68d147c784bde6f5d13c200eb2d92a40141a5a3 (patch)
tree8d9d57cc6cf037c32acc56aecac0fa99be7169bd /src/ephy-automation.c
parentc135299f16ff6d9669ccc12a7f670d9e574bbaa0 (diff)
downloadgsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.gz
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.bz2
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.lz
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.xz
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.tar.zst
gsoc2013-epiphany-d68d147c784bde6f5d13c200eb2d92a40141a5a3.zip
Cleanup session. Persist also history and bookmarks.
2003-11-09 Marco Pesenti Gritti <marco@gnome.org> * embed/ephy-embed.h: * idl/EphyAutomation.idl: * src/ephy-automation.c: (impl_ephy_automation_loadurl), (impl_ephy_automation_open_bookmarks_editor), (ephy_automation_init), (ephy_automation_object_finalize), (ephy_automation_class_init): * src/ephy-completion-model.c: (root_child_removed_cb): * src/ephy-main.c: (ephy_main_start): * src/ephy-shell.c: (ephy_shell_get_active_window), (toolwindow_show_cb), (toolwindow_hide_cb), (ephy_shell_get_bookmarks_editor), (ephy_shell_get_history_window): * src/ephy-shell.h: * src/ephy-tab.c: (ephy_tab_net_state_cb), (ephy_tab_size_to_cb): * src/ephy-window.c: (remove_from_session), (ephy_window_init): * src/session.c: (session_autoresume), (session_close), (session_dispose), (save_window_geometry), (save_tool_window), (save_ephy_window), (session_save), (session_load), (session_get_windows), (net_stop_cb), (tab_added_cb), (tab_removed_cb), (tabs_reordered_cb), (session_add_window), (session_remove_window), (save_yourself_cb), (session_die_cb), (gnome_session_init), (session_init): * src/session.h: * src/window-commands.c: (window_cmd_go_bookmarks), (window_cmd_go_history): Cleanup session. Persist also history and bookmarks.
Diffstat (limited to 'src/ephy-automation.c')
-rw-r--r--src/ephy-automation.c74
1 files changed, 20 insertions, 54 deletions
diff --git a/src/ephy-automation.c b/src/ephy-automation.c
index 4f5b8b1b4..43bd1eef7 100644
--- a/src/ephy-automation.c
+++ b/src/ephy-automation.c
@@ -32,30 +32,7 @@
#include <bonobo/bonobo-context.h>
static void
-impl_ephy_automation_add_bookmark (PortableServer_Servant _servant,
- const CORBA_char * url,
- CORBA_Environment * ev);
-static void
-impl_ephy_automation_import_bookmarks (PortableServer_Servant _servant,
- const CORBA_char * filename,
- CORBA_Environment * ev);
-static void
-impl_ephy_automation_quit (PortableServer_Servant _servant,
- CORBA_Environment * ev);
-static void
-impl_ephy_automation_load_session (PortableServer_Servant _servant,
- const CORBA_char * filename,
- CORBA_Environment * ev);
-static void
ephy_automation_class_init (EphyAutomationClass *klass);
-static void
-ephy_automation_init (EphyAutomation *a);
-static void
-ephy_automation_object_finalize (GObject *object);
-static BonoboObject *
-ephy_automation_factory (BonoboGenericFactory *this_factory,
- const char *iid,
- gpointer user_data);
static GObjectClass *ephy_automation_parent_class;
@@ -105,14 +82,11 @@ impl_ephy_automation_loadurl (PortableServer_Servant _servant,
session = EPHY_SESSION (ephy_shell_get_session (ephy_shell));
- /* no window open, let's try to autoresume */
- if (session_get_windows (session) == NULL)
+ if (session_autoresume (session) && *url == '\0')
{
- gboolean res;
- res = session_autoresume (session);
/* no need to open the homepage,
* we did already open session windows */
- if (res && *url == '\0') return;
+ return;
}
window = ephy_shell_get_active_window (ephy_shell);
@@ -169,17 +143,6 @@ impl_ephy_automation_import_bookmarks (PortableServer_Servant _servant,
}
static void
-impl_ephy_automation_quit (PortableServer_Servant _servant,
- CORBA_Environment * ev)
-{
- Session *session;
-
- session = EPHY_SESSION (ephy_shell_get_session (ephy_shell));
-
- session_close (session);
-}
-
-static void
impl_ephy_automation_load_session (PortableServer_Servant _servant,
const CORBA_char * filename,
CORBA_Environment * ev)
@@ -194,7 +157,24 @@ static void
impl_ephy_automation_open_bookmarks_editor (PortableServer_Servant _servant,
CORBA_Environment * ev)
{
- ephy_shell_show_bookmarks_editor (ephy_shell, NULL);
+ GtkWidget *editor;
+
+ editor = ephy_shell_get_bookmarks_editor (ephy_shell);
+
+ gtk_window_present (GTK_WINDOW (editor));
+}
+
+static void
+ephy_automation_init (EphyAutomation *c)
+{
+}
+
+static void
+ephy_automation_object_finalize (GObject *object)
+{
+ EphyAutomation *a = EPHY_AUTOMATION (object);
+
+ ephy_automation_parent_class->finalize (G_OBJECT (a));
}
static void
@@ -211,24 +191,10 @@ ephy_automation_class_init (EphyAutomationClass *klass)
epv->loadurl = impl_ephy_automation_loadurl;
epv->addBookmark = impl_ephy_automation_add_bookmark;
epv->importBookmarks = impl_ephy_automation_import_bookmarks;
- epv->quit = impl_ephy_automation_quit;
epv->loadSession = impl_ephy_automation_load_session;
epv->openBookmarksEditor = impl_ephy_automation_open_bookmarks_editor;
}
-static void
-ephy_automation_init (EphyAutomation *c)
-{
-}
-
-static void
-ephy_automation_object_finalize (GObject *object)
-{
- EphyAutomation *a = EPHY_AUTOMATION (object);
-
- ephy_automation_parent_class->finalize (G_OBJECT (a));
-}
-
BONOBO_TYPE_FUNC_FULL (
EphyAutomation,
GNOME_EphyAutomation,