From 6fb35107a0d948b4e8f20d13641133ec9643013b Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Thu, 1 Jul 2010 15:42:54 -0400 Subject: [PATCH] Fix for folders in bookmarksbar --- midori/midori-browser.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/midori/midori-browser.c b/midori/midori-browser.c index 5bbba4e9..99488a95 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -6531,7 +6531,20 @@ midori_bookmarkbar_populate (MidoriBrowser* browser) while ((item = katze_array_get_nth_item (KATZE_ARRAY (array), i))) { - midori_bookmarkbar_insert_item (browser->bookmarkbar, item); + if (KATZE_ITEM_IS_BOOKMARK (item)) + midori_bookmarkbar_insert_item (browser->bookmarkbar, item); + else + { + KatzeArray* subfolder; + gchar* subsqlcmd; + + subsqlcmd = g_strdup_printf ("SELECT uri, title, app FROM bookmarks WHERE " + " folder = '%s'", katze_item_get_name (item)); + subfolder = katze_array_from_sqlite (db, sqlcmd); + katze_item_set_name (KATZE_ITEM (subfolder), katze_item_get_name (item)); + midori_bookmarkbar_insert_item (browser->bookmarkbar, KATZE_ITEM (subfolder)); + g_free (subsqlcmd); + } i++; } _action_set_sensitive (browser, "BookmarkAdd", TRUE); -- 2.39.5