Add 'folder' property to bookmarks

This commit is contained in:
Alexander Butenko 2010-07-02 11:04:36 -04:00 committed by Christian Dywan
parent dbcc8e2054
commit 659b7c351e
3 changed files with 8 additions and 2 deletions

View file

@ -790,6 +790,12 @@ katze_item_set_value_from_column (sqlite3_stmt* stmt,
value = sqlite3_column_int64 (stmt, column); value = sqlite3_column_int64 (stmt, column);
katze_item_set_meta_integer (item, name, value); 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 else
g_warn_if_reached (); g_warn_if_reached ();
} }

View file

@ -6512,7 +6512,7 @@ midori_bookmarkbar_populate (MidoriBrowser* browser)
if (!db) if (!db)
return; return;
sqlcmd = "SELECT uri, title, app FROM bookmarks WHERE " sqlcmd = "SELECT uri, title, app, folder FROM bookmarks WHERE "
" toolbar = 1 ORDER BY type ASC"; " toolbar = 1 ORDER BY type ASC";
array = katze_array_from_sqlite (db, sqlcmd); array = katze_array_from_sqlite (db, sqlcmd);

View file

@ -148,7 +148,7 @@ midori_bookmarks_read_from_db (MidoriBookmarks* bookmarks,
db = g_object_get_data (G_OBJECT (bookmarks->array), "db"); 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"; " ORDER BY type DESC";
result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL); result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL);
sqlite3_bind_text (statement, 1, g_strdup(folder), -1, g_free); sqlite3_bind_text (statement, 1, g_strdup(folder), -1, g_free);