]> spindle.queued.net Git - midori/commitdiff
Delete bookmarks from the folder they reside in
authorAlexander Butenko <a.butenka@gmail.com>
Fri, 2 Jul 2010 15:13:55 +0000 (11:13 -0400)
committerChristian Dywan <christian@twotoasts.de>
Sat, 3 Jul 2010 20:33:45 +0000 (22:33 +0200)
panels/midori-bookmarks.c

index 2624f22ac3971a7c3056fe2cc805bb818acddcbe..b8c9b69c91a986197b2daefba639b8227f8fe5b2 100644 (file)
@@ -231,12 +231,17 @@ midori_bookmarks_remove_item_from_db (sqlite3*   db,
 
     if (KATZE_ITEM_IS_BOOKMARK (item))
         sqlcmd = sqlite3_mprintf (
-            "DELETE FROM bookmarks WHERE uri = '%q'",
-            katze_item_get_uri (item));
+            "DELETE FROM bookmarks WHERE uri = '%q' "
+            " AND folder = '%q'",
+            katze_item_get_uri (item),
+            katze_item_get_meta_string (item, "folder"));
+
     else
        sqlcmd = sqlite3_mprintf (
-            "DELETE FROM bookmarks WHERE title = '%q'",
-            katze_item_get_name (item));
+            "DELETE FROM bookmarks WHERE title = '%q'"
+            " AND folder = '%q'",
+            katze_item_get_name (item),
+            katze_item_get_meta_string (item, "folder"));
 
     if (sqlite3_exec (db, sqlcmd, NULL, NULL, &errmsg) != SQLITE_OK)
     {