From: Enrico Tröger Date: Thu, 7 Jan 2010 23:13:29 +0000 (+0100) Subject: Allow DND also for cookie items by using the value of the parent node X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca73b5fede6d9f4548a5c63d66ef124b4fab6f07;p=midori Allow DND also for cookie items by using the value of the parent node --- 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);