[Xfce4-commits] <midori:master> Export to a new, empty bookmark array
Christian Dywan
noreply at xfce.org
Sat Jan 22 21:18:02 CET 2011
Updating branch refs/heads/master
to 7a0d04ac52782a34e3dda6ebd0053c2459ab9ade (commit)
from 2e8d6558d0d469773466777ad5407d395359ff00 (commit)
commit 7a0d04ac52782a34e3dda6ebd0053c2459ab9ade
Author: Christian Dywan <christian at twotoasts.de>
Date: Sat Jan 22 21:17:37 2011 +0100
Export to a new, empty bookmark array
midori/midori-browser.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/midori/midori-browser.c b/midori/midori-browser.c
index 802806a..6cccaca 100644
--- a/midori/midori-browser.c
+++ b/midori/midori-browser.c
@@ -4134,6 +4134,7 @@ _action_bookmarks_export_activate (GtkAction* action,
gchar* path = NULL;
GError* error;
sqlite3* db;
+ KatzeArray* bookmarks;
if (!browser->bookmarks || !gtk_widget_get_visible (GTK_WIDGET (browser)))
return;
@@ -4151,14 +4152,16 @@ _action_bookmarks_export_activate (GtkAction* action,
error = NULL;
db = g_object_get_data (G_OBJECT (browser->history), "db");
- midori_bookmarks_export_array_db (db, browser->bookmarks, "");
- if (!midori_array_to_file (browser->bookmarks, path, "xbel", &error))
+ bookmarks = katze_array_new (KATZE_TYPE_ARRAY);
+ midori_bookmarks_export_array_db (db, bookmarks, "");
+ if (!midori_array_to_file (bookmarks, path, "xbel", &error))
{
sokoke_message_dialog (GTK_MESSAGE_ERROR,
_("Failed to export bookmarks"), error ? error->message : "");
if (error)
g_error_free (error);
}
+ g_object_unref (bookmarks);
g_free (path);
}
More information about the Xfce4-commits
mailing list