BOOKMARK ISSUES:
. Show on toolbar is not working
- . Refresh of sidebar is not done
. Bookmark menu is not populated
. Bookmark toolbar is broken
. Import is broken
. Integration with locationbar search
+ . Can't remove folder
+ . Can't select folder while adding new bookmark
#if HAVE_SQLITE
midori_bookmarks_remove_item_from_db (db, bookmark);
if (!strcmp (selected, _("Toplevel folder")))
+ {
+ GtkTreeView* treeview;
+ GtkTreeModel* model;
+
midori_bookmarks_insert_item_db (db, bookmark, "");
+ treeview = g_object_get_data (G_OBJECT (browser->bookmarks), "treeview");
+ model = gtk_tree_view_get_model (GTK_TREE_VIEW (treeview));
+ /* FIXME: We need to add item in the end of the list */
+ gtk_tree_store_insert_with_values (GTK_TREE_STORE (model),
+ NULL, NULL, 999, 0, bookmark, -1);
+ }
else
midori_bookmarks_insert_item_db (db, bookmark, selected);
#endif
g_object_ref (app);
bookmarks->array = katze_object_get_object (app, "bookmarks");
+ g_object_set_data (G_OBJECT (bookmarks->array), "treeview", bookmarks->treeview);
#if HAVE_SQLITE
midori_bookmarks_read_from_db (bookmarks, GTK_TREE_STORE (model), NULL, "");
#if HAVE_SQLITE
sqlite3* db;
#endif
+ GtkTreeModel* model;
+ GtkTreeIter iter;
- item = (KatzeItem*)g_object_get_data (G_OBJECT (menuitem), "KatzeItem");
- #if HAVE_SQLITE
- db = g_object_get_data (G_OBJECT (bookmarks->array), "db");
- midori_bookmarks_remove_item_from_db (db, item);
- #endif
- /* FIXME: Refresh menu */
+ if (katze_tree_view_get_selected_iter (GTK_TREE_VIEW (bookmarks->treeview),
+ &model, &iter))
+ {
+ item = (KatzeItem*)g_object_get_data (G_OBJECT (menuitem), "KatzeItem");
+ #if HAVE_SQLITE
+ db = g_object_get_data (G_OBJECT (bookmarks->array), "db");
+ midori_bookmarks_remove_item_from_db (db, item);
+ #endif
+ gtk_tree_store_remove (GTK_TREE_STORE (model), &iter);
+ }
}
static void