From: Alexander Butenko Date: Thu, 1 Jul 2010 19:42:54 +0000 (-0400) Subject: Fix for folders in bookmarksbar X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fb35107a0d948b4e8f20d13641133ec9643013b;p=midori Fix for folders in bookmarksbar --- 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);