aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-automation.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-09-19 20:14:45 +0800
committerChristian Persch <chpe@src.gnome.org>2003-09-19 20:14:45 +0800
commit54d2149bf268430f3b5f11e58c4492b1ab4c6ff5 (patch)
tree1a9e84386f79bffde79a7df3d5b45b6b52e4b599 /src/ephy-automation.c
parentd3873ae5a566d733c31cdde300a6e5997dc4b7ce (diff)
downloadgsoc2013-epiphany-54d2149bf268430f3b5f11e58c4492b1ab4c6ff5.tar
gsoc2013-epiphany-54d2149bf268430f3b5f11e58c4492b1ab4c6ff5.tar.gz
gsoc2013-epiphany-54d2149bf268430f3b5f11e58c4492b1ab4c6ff5.tar.bz2
gsoc2013-epiphany-54d2149bf268430f3b5f11e58c4492b1ab4c6ff5.tar.lz
gsoc2013-epiphany-54d2149bf268430f3b5f11e58c4492b1ab4c6ff5.tar.xz
gsoc2013-epiphany-54d2149bf268430f3b5f11e58c4492b1ab4c6ff5.tar.zst
gsoc2013-epiphany-54d2149bf268430f3b5f11e58c4492b1ab4c6ff5.zip
Add an --import-bookmarks command line option, and really implement the
2003-09-19 Christian Persch <chpe@cvs.gnome.org> * idl/EphyAutomation.idl: * src/ephy-automation.c: (impl_ephy_automation_add_bookmark), (impl_ephy_automation_import_bookmarks), (ephy_automation_class_init): * src/ephy-main.c: (ephy_main_start): Add an --import-bookmarks command line option, and really implement the --add-bookmark one.
Diffstat (limited to 'src/ephy-automation.c')
-rw-r--r--src/ephy-automation.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ephy-automation.c b/src/ephy-automation.c
index 529b1854e..5980f9c09 100644
--- a/src/ephy-automation.c
+++ b/src/ephy-automation.c
@@ -24,6 +24,8 @@
#include "ephy-embed.h"
#include "ephy-window.h"
#include "session.h"
+#include "ephy-bookmarks.h"
+#include "ephy-bookmarks-import.h"
#include <string.h>
#include <bonobo/bonobo-generic-factory.h>
@@ -35,6 +37,10 @@ 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,
const CORBA_boolean disableServer,
CORBA_Environment * ev);
@@ -149,6 +155,17 @@ impl_ephy_automation_add_bookmark (PortableServer_Servant _servant,
const CORBA_char * url,
CORBA_Environment * ev)
{
+ ephy_bookmarks_add (ephy_shell_get_bookmarks (ephy_shell),
+ url /* title */, url);
+}
+
+static void
+impl_ephy_automation_import_bookmarks (PortableServer_Servant _servant,
+ const CORBA_char * filename,
+ CORBA_Environment * ev)
+{
+ ephy_bookmarks_import (ephy_shell_get_bookmarks (ephy_shell),
+ filename);
}
static void
@@ -194,6 +211,7 @@ ephy_automation_class_init (EphyAutomationClass *klass)
/* connect implementation callbacks */
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;