aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-09 03:12:33 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-09 03:12:33 +0800
commit74f30634c4d7187f9c04b0b4e7dfad1253c5616c (patch)
treebb5e9c11ecc10e6af05addc7b519e69f9386aa86 /src
parent5df83cc343c496873f84e939a6367b69ad9286bb (diff)
downloadgsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar
gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.gz
gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.bz2
gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.lz
gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.xz
gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.tar.zst
gsoc2013-epiphany-74f30634c4d7187f9c04b0b4e7dfad1253c5616c.zip
More start here page work, importing bookmarks from mozilla now should
2003-01-08 Marco Pesenti Gritti <marco@it.gnome.org> * TODO: * data/starthere/Makefile.am: * data/starthere/index.xml.in: * data/starthere/section.xsl: * data/starthere/smartbookmarks.xml.in: * embed/ephy-embed-shell.c: (ephy_embed_shell_class_init): * embed/ephy-embed-shell.h: * embed/mozilla/StartHereProtocolHandler.cpp: * po/POTFILES.in: * src/ephy-shell.c: (ephy_shell_command_cb), (ephy_shell_init): More start here page work, importing bookmarks from mozilla now should work.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 491b01b5f..2f2c207e6 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -26,7 +26,9 @@
#include "ephy-window.h"
#include "ephy-file-helpers.h"
#include "ephy-thread-helpers.h"
+#include "ephy-bookmarks-import.h"
+#include <string.h>
#include <libgnomeui/gnome-client.h>
#include <bonobo/bonobo-main.h>
#include <bonobo/bonobo-i18n.h>
@@ -121,6 +123,38 @@ ephy_shell_class_init (EphyShellClass *klass)
}
static void
+ephy_shell_command_cb (EphyEmbedShell *shell,
+ char *command,
+ char *param,
+ gpointer data)
+{
+ EphyBookmarks *bookmarks;
+ GtkWidget *dialog;
+
+ bookmarks = ephy_shell_get_bookmarks (EPHY_SHELL (shell));
+
+ if (strcmp (command, "import-bookmarks") == 0)
+ {
+ ephy_bookmarks_import_mozilla (bookmarks, param);
+
+ dialog = gtk_message_dialog_new
+ (NULL,
+ GTK_DIALOG_MODAL,
+ GTK_MESSAGE_ERROR,
+ GTK_BUTTONS_OK,
+ _("Bookmarks imported successfully."));
+ gtk_dialog_run (GTK_DIALOG (dialog));
+ gtk_widget_destroy (dialog);
+ }
+ else if (strcmp (command, "configure-network") == 0)
+ {
+ ephy_file_launch_application ("gnome-network-preferences",
+ NULL,
+ FALSE);
+ }
+}
+
+static void
ephy_shell_new_window_cb (EphyEmbedShell *shell,
EphyEmbed **new_embed,
EmbedChromeMask chromemask,
@@ -173,6 +207,11 @@ ephy_shell_init (EphyShell *gs)
G_CALLBACK(ephy_shell_new_window_cb),
NULL);
+ g_signal_connect (G_OBJECT (gs),
+ "command",
+ G_CALLBACK(ephy_shell_command_cb),
+ NULL);
+
ephy_init_services (gs);
}