aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
Diffstat (limited to 'src/bookmarks')
-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
3 files changed, 19 insertions, 5 deletions
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);