folder = sqlite3_column_text (stmt, column);
katze_item_set_meta_string (item, name, (gchar*)folder);
}
+ else if (g_str_equal (name, "desc"))
+ {
+ const unsigned char* text;
+ text = sqlite3_column_text (stmt, column);
+ katze_item_set_text (item, (gchar*)text);
+ }
else
g_warn_if_reached ();
}
if (!db)
return;
- sqlcmd = "SELECT uri, title, app, folder, toolbar FROM bookmarks WHERE "
+ sqlcmd = "SELECT uri, title, desc, app, folder, toolbar FROM bookmarks WHERE "
" toolbar = 1 ORDER BY uri ASC";
array = katze_array_from_sqlite (db, sqlcmd);
KatzeArray* subfolder;
gchar* subsqlcmd;
- subsqlcmd = g_strdup_printf ("SELECT uri, title, app FROM bookmarks WHERE "
+ subsqlcmd = g_strdup_printf ("SELECT uri, title, desc, app FROM bookmarks WHERE "
" folder = '%s' and uri != ''", katze_item_get_name (item));
subfolder = katze_array_from_sqlite (db, subsqlcmd);
katze_item_set_name (KATZE_ITEM (subfolder), katze_item_get_name (item));
if (keyword && *keyword)
{
gchar* filterstr;
- sqlcmd = "SELECT uri, title, app, toolbar, folder from bookmarks where "
+ sqlcmd = "SELECT uri, title, desc, app, toolbar, folder from bookmarks where "
" title like ? ORDER BY uri DESC";
result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL);
filterstr = g_strdup_printf ("%%%s%%", keyword);
{
if (!folder)
folder = "";
- sqlcmd = "SELECT uri, title, app, toolbar, folder from bookmarks where "
+ sqlcmd = "SELECT uri, title, desc, app, toolbar, folder from bookmarks where "
" folder = ? ORDER BY uri DESC";
result = sqlite3_prepare_v2 (db, sqlcmd, -1, &statement, NULL);
sqlite3_bind_text (statement, 1, g_strdup (folder), -1, g_free);
parent = g_strdup ("");
sqlcmd = sqlite3_mprintf (
- "INSERT into bookmarks (uri, title, folder, toolbar, app) values"
- " ('%q', '%q', '%q', %d, %d)",
+ "INSERT into bookmarks (uri, title, desc, folder, toolbar, app) values"
+ " ('%q', '%q', '%q', '%q', %d, %d)",
uri,
katze_item_get_name (item),
+ katze_item_get_text (item),
parent,
katze_item_get_meta_boolean (item, "toolbar"),
katze_item_get_meta_boolean (item, "app"));