From ca73b5fede6d9f4548a5c63d66ef124b4fab6f07 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Enrico=20Tr=C3=B6ger?= Date: Fri, 8 Jan 2010 00:13:29 +0100 Subject: [PATCH] Allow DND also for cookie items by using the value of the parent node --- extensions/cookie-manager/cookie-manager-page.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/extensions/cookie-manager/cookie-manager-page.c b/extensions/cookie-manager/cookie-manager-page.c index 5aa9dbcc..1cc2be2a 100644 --- a/extensions/cookie-manager/cookie-manager-page.c +++ b/extensions/cookie-manager/cookie-manager-page.c @@ -568,10 +568,17 @@ static void cm_tree_drag_data_get_cb(GtkWidget *widget, GdkDragContext *drag_con COOKIE_MANAGER_COL_COOKIE, &cookie, -1); - if (cookie == NULL && name != NULL) + if (name != NULL) { - text = cm_skip_leading_dot(name); + GtkTreeIter parent; + /* get the name of the parent item which should be a domain item */ + if (cookie != NULL && gtk_tree_model_iter_parent(model, &parent, &iter)) + { + g_free(name); + gtk_tree_model_get(model, &parent, COOKIE_MANAGER_COL_NAME, &name, -1); + } + text = cm_skip_leading_dot(name); gtk_selection_data_set_text(data, text, -1); } g_free(name); -- 2.39.5