diff options
author | Jorn Baayen <jbaayen@gnome.org> | 2005-01-22 03:33:03 +0800 |
---|---|---|
committer | Jorn Baayen <jbaayen@src.gnome.org> | 2005-01-22 03:33:03 +0800 |
commit | 549171e9af818b784548fc2bed4bd375006b7adc (patch) | |
tree | 5a3e639a8fe9f2175adde95c9e60ae77a76a8016 /src/bookmarks/ephy-bookmark-action.c | |
parent | 39f7d93acea222b6b3e1cd53875ac16f5cbdea4f (diff) | |
download | gsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.tar.gz gsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.tar.zst gsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.zip |
Add proper _NETSCAPE_URL drag support, supplying the URL as well as the
2005-01-21 Jorn Baayen <jbaayen@gnome.org>
* lib/widgets/ephy-node-view.c: (ephy_node_view_add_column),
(ephy_node_view_enable_drag_source):
* lib/widgets/ephy-node-view.h:
* lib/widgets/ephy-tree-model-sort.c: (ephy_tree_model_sort_init),
(ephy_tree_model_sort_multi_row_draggable),
(ephy_tree_model_sort_set_base_drag_column_id),
(ephy_tree_model_sort_set_extra_drag_column_id),
(each_property_get_data_binder):
* lib/widgets/ephy-tree-model-sort.h:
* src/bookmarks/ephy-bookmark-action.c: (drag_data_get_cb):
* src/bookmarks/ephy-bookmarks-editor.c:
(ephy_bookmarks_editor_construct):
* src/bookmarks/ephy-topics-selector.c:
(ephy_topics_selector_constructor):
* src/ephy-encoding-dialog.c: (ephy_encoding_dialog_init):
* src/ephy-history-window.c: (ephy_history_window_construct):
Add proper _NETSCAPE_URL drag support, supplying the URL as well as
the title. As a side effect most data_columns in NodeViews have been
obsoleted. Fixes #163937.
Diffstat (limited to 'src/bookmarks/ephy-bookmark-action.c')
-rw-r--r-- | src/bookmarks/ephy-bookmark-action.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-bookmark-action.c b/src/bookmarks/ephy-bookmark-action.c index f219853d6..876c386f4 100644 --- a/src/bookmarks/ephy-bookmark-action.c +++ b/src/bookmarks/ephy-bookmark-action.c @@ -402,7 +402,8 @@ drag_data_get_cb (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint32 time, EphyBookmarkAction *action) { - const char *address; + const char *address, *title; + char *data; g_return_if_fail (action->priv->node != NULL); @@ -410,8 +411,14 @@ drag_data_get_cb (GtkWidget *widget, GdkDragContext *context, EPHY_NODE_BMK_PROP_LOCATION); g_return_if_fail (address != NULL); + title = ephy_node_get_property_string (action->priv->node, + EPHY_NODE_BMK_PROP_TITLE); + g_return_if_fail (title != NULL); + + data = g_strdup_printf ("%s\n%s", address, title); gtk_selection_data_set (selection_data, selection_data->target, 8, - (unsigned char *) address, strlen (address)); + (unsigned char *) data, strlen (data)); + g_free (data); } static int |