[Xfce4-commits] <midori:master> Add 'folder' property to bookmarks
Christian Dywan
noreply at xfce.org
Sat Jul 3 22:36:02 CEST 2010
Updating branch refs/heads/master
to 659b7c351ebcff1eb2fa5bfdb8a2d85b84f8e978 (commit)
from dbcc8e20540e4d3013427a553e50af43d6ea01d9 (commit)
commit 659b7c351ebcff1eb2fa5bfdb8a2d85b84f8e978
Author: Alexander Butenko <a.butenka at gmail.com>
Date: Fri Jul 2 11:04:36 2010 -0400
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 e3fec8b..aa1d229 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 4566d74..388bcdc 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 33687c2..2624f22 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);
More information about the Xfce4-commits
mailing list