aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-28 21:14:47 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-28 21:14:47 +0800
commitc1ced24c7457d8991bc2e44c7cc784fe1215947c (patch)
tree59427b00f369dbe6f139a0187bf0c710a99c1bd9
parentcc8e17fdc6434920c709ecdc8aef54ed70f9c66e (diff)
downloadgsoc2013-epiphany-c1ced24c7457d8991bc2e44c7cc784fe1215947c.tar
gsoc2013-epiphany-c1ced24c7457d8991bc2e44c7cc784fe1215947c.tar.gz
gsoc2013-epiphany-c1ced24c7457d8991bc2e44c7cc784fe1215947c.tar.bz2
gsoc2013-epiphany-c1ced24c7457d8991bc2e44c7cc784fe1215947c.tar.lz
gsoc2013-epiphany-c1ced24c7457d8991bc2e44c7cc784fe1215947c.tar.xz
gsoc2013-epiphany-c1ced24c7457d8991bc2e44c7cc784fe1215947c.tar.zst
gsoc2013-epiphany-c1ced24c7457d8991bc2e44c7cc784fe1215947c.zip
Fallback using directories to detect format if the mime is not relevant.
2003-06-28 Marco Pesenti Gritti <marco@it.gnome.org> * configure.in: * src/bookmarks/ephy-bookmarks-editor.c: (cmd_bookmarks_import): * src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import): * src/bookmarks/ephy-bookmarks-import.h: Fallback using directories to detect format if the mime is not relevant.
-rw-r--r--ChangeLog10
-rw-r--r--configure.in2
-rw-r--r--src/bookmarks/ephy-bookmarks-editor.c7
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c13
-rw-r--r--src/bookmarks/ephy-bookmarks-import.h4
5 files changed, 30 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 116a2c4f0..ca085c37f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2003-06-28 Marco Pesenti Gritti <marco@it.gnome.org>
+ * configure.in:
+ * src/bookmarks/ephy-bookmarks-editor.c: (cmd_bookmarks_import):
+ * src/bookmarks/ephy-bookmarks-import.c: (ephy_bookmarks_import):
+ * src/bookmarks/ephy-bookmarks-import.h:
+
+ Fallback using directories to detect format if the mime
+ is not relevant.
+
+2003-06-28 Marco Pesenti Gritti <marco@it.gnome.org>
+
* NEWS:
* configure.in:
diff --git a/configure.in b/configure.in
index ea39b6982..054e8f391 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
-AC_INIT(epiphany, 0.7.1,
+AC_INIT(epiphany, 0.7.2,
[http://bugzilla.gnome.org/enter_bug.cgi?product=epiphany])
AM_CONFIG_HEADER(config.h)
diff --git a/src/bookmarks/ephy-bookmarks-editor.c b/src/bookmarks/ephy-bookmarks-editor.c
index 95e878b3d..789239ad7 100644
--- a/src/bookmarks/ephy-bookmarks-editor.c
+++ b/src/bookmarks/ephy-bookmarks-editor.c
@@ -535,12 +535,11 @@ cmd_bookmarks_import (EggAction *action,
gtk_widget_show (menu);
add_bookmarks_source_menu (menu, _("Mozilla bookmarks"),
- ".mozilla", "bookmarks.html");
+ MOZILLA_BOOKMARKS_DIR, "bookmarks.html");
add_bookmarks_source_menu (menu, _("Galeon bookmarks"),
- ".galeon", "bookmarks.xbel");
+ GALEON_BOOKMARKS_DIR, "bookmarks.xbel");
add_bookmarks_source_menu (menu, _("Konqueror bookmarks"),
- ".kde/share/apps/konqueror",
- "bookmarks.xml");
+ KDE_BOOKMARKS_DIR, "bookmarks.xml");
option_menu = gtk_option_menu_new ();
gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu);
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 778186039..884b856ee 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -77,10 +77,21 @@ ephy_bookmarks_import (EphyBookmarks *bookmarks,
{
return ephy_bookmarks_import_mozilla (bookmarks, filename);
}
- else
+ else if (strcmp (type, "application/xbel") == 0)
{
return ephy_bookmarks_import_xbel (bookmarks, filename);
}
+ else if (strstr (filename, MOZILLA_BOOKMARKS_DIR) != NULL)
+ {
+ return ephy_bookmarks_import_mozilla (bookmarks, filename);
+ }
+ else if (strstr (filename, GALEON_BOOKMARKS_DIR) != NULL ||
+ strstr (filename, KDE_BOOKMARKS_DIR) != NULL)
+ {
+ return ephy_bookmarks_import_xbel (bookmarks, filename);
+ }
+
+ return FALSE;
}
static void
diff --git a/src/bookmarks/ephy-bookmarks-import.h b/src/bookmarks/ephy-bookmarks-import.h
index fad58fc11..1aec1fa53 100644
--- a/src/bookmarks/ephy-bookmarks-import.h
+++ b/src/bookmarks/ephy-bookmarks-import.h
@@ -23,6 +23,10 @@
G_BEGIN_DECLS
+#define MOZILLA_BOOKMARKS_DIR ".mozilla"
+#define GALEON_BOOKMARKS_DIR ".galeon"
+#define KDE_BOOKMARKS_DIR ".kde/share/apps/konqueror"
+
gboolean ephy_bookmarks_import (EphyBookmarks *bookmarks,
const char *filename);