Force items dragged onto non-folders to the toplevel
This commit is contained in:
parent
2caaed659c
commit
78cfcb64d9
1 changed files with 11 additions and 3 deletions
|
@ -259,7 +259,6 @@ midori_bookmarks_row_changed_cb (GtkTreeModel* model,
|
||||||
GtkTreeIter* iter,
|
GtkTreeIter* iter,
|
||||||
MidoriBookmarks* bookmarks)
|
MidoriBookmarks* bookmarks)
|
||||||
{
|
{
|
||||||
KatzeItem* parent_item;
|
|
||||||
KatzeItem* item;
|
KatzeItem* item;
|
||||||
GtkTreeIter parent;
|
GtkTreeIter parent;
|
||||||
sqlite3* db;
|
sqlite3* db;
|
||||||
|
@ -270,8 +269,17 @@ midori_bookmarks_row_changed_cb (GtkTreeModel* model,
|
||||||
|
|
||||||
if (gtk_tree_model_iter_parent (model, &parent, iter))
|
if (gtk_tree_model_iter_parent (model, &parent, iter))
|
||||||
{
|
{
|
||||||
gtk_tree_model_get (model, &parent , 0, &parent_item, -1);
|
KatzeItem* new_parent;
|
||||||
parent_name = g_strdup (katze_item_get_name (parent_item));
|
|
||||||
|
gtk_tree_model_get (model, &parent, 0, &new_parent, -1);
|
||||||
|
|
||||||
|
/* Bookmarks must not be moved into non-folder items */
|
||||||
|
if (!KATZE_ITEM_IS_FOLDER (new_parent))
|
||||||
|
parent_name = g_strdup ("");
|
||||||
|
else
|
||||||
|
parent_name = g_strdup (katze_item_get_name (new_parent));
|
||||||
|
|
||||||
|
g_object_unref (new_parent);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
parent_name = g_strdup ("");
|
parent_name = g_strdup ("");
|
||||||
|
|
Loading…
Reference in a new issue