From 659b7c351ebcff1eb2fa5bfdb8a2d85b84f8e978 Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Fri, 2 Jul 2010 11:04:36 -0400 Subject: [PATCH] Add 'folder' property to bookmarks --- midori/midori-array.c | 6 ++++++ midori/midori-browser.c | 2 +- panels/midori-bookmarks.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/midori/midori-array.c b/midori/midori-array.c index e3fec8b8..aa1d2291 100644 --- a/midori/midori-array.c +++ b/midori/midori-array.c @@ -790,6 +790,12 @@ katze_item_set_value_from_column (sqlite3_stmt* stmt, value = sqlite3_column_int64 (stmt, column); katze_item_set_meta_integer (item, name, value); } + else if (g_str_equal (name, "folder")) + { + const unsigned char* folder; + folder = sqlite3_column_text (stmt, column); + katze_item_set_meta_string (item, name, (gchar*)folder); + } else g_warn_if_reached (); } diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 4566d744..388bcdcd 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -6512,7 +6512,7 @@ midori_bookmarkbar_populate (MidoriBrowser* browser) if (!db) return; - sqlcmd = "SELECT uri, title, app FROM bookmarks WHERE " + sqlcmd = "SELECT uri, title, app, folder FROM bookmarks WHERE " " toolbar = 1 ORDER BY type ASC"; array = katze_array_from_sqlite (db, sqlcmd); diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c index 33687c27..2624f22a 100644 --- a/panels/midori-bookmarks.c +++ b/panels/midori-bookmarks.c @@ -148,7 +148,7 @@ midori_bookmarks_read_from_db (MidoriBookmarks* bookmarks, db = g_object_get_data (G_OBJECT (bookmarks->array), "db"); - sqlcmd = "SELECT uri, title, type, app, toolbar from bookmarks where folder = ?" + sqlcmd = "SELECT uri, title, type, app, toolbar, folder from bookmarks where folder = ?" " ORDER BY type DESC"; result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL); sqlite3_bind_text (statement, 1, g_strdup(folder), -1, g_free); -- 2.39.5