diff options
author | Marco Pesenti Gritti <marco@it.gnome.org> | 2003-03-30 01:07:50 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <mpeseng@src.gnome.org> | 2003-03-30 01:07:50 +0800 |
commit | c1a38e77d25cde47f4cc33922f0ef8983e12ae17 (patch) | |
tree | 9e8ca41c5c1bec6f7d8cd59831dc68c15e6813f5 /src/history-dialog.c | |
parent | f1d834f969e790e26fe7a0bd2aa203977113bc88 (diff) | |
download | gsoc2013-epiphany-c1a38e77d25cde47f4cc33922f0ef8983e12ae17.tar gsoc2013-epiphany-c1a38e77d25cde47f4cc33922f0ef8983e12ae17.tar.gz gsoc2013-epiphany-c1a38e77d25cde47f4cc33922f0ef8983e12ae17.tar.bz2 gsoc2013-epiphany-c1a38e77d25cde47f4cc33922f0ef8983e12ae17.tar.lz gsoc2013-epiphany-c1a38e77d25cde47f4cc33922f0ef8983e12ae17.tar.xz gsoc2013-epiphany-c1a38e77d25cde47f4cc33922f0ef8983e12ae17.tar.zst gsoc2013-epiphany-c1a38e77d25cde47f4cc33922f0ef8983e12ae17.zip |
Make dnd code smarter, so it can support more than just urls types.
2003-03-29 Marco Pesenti Gritti <marco@it.gnome.org>
* lib/ephy-dnd.c: (add_one_node), (ephy_dnd_drag_data_get),
(ephy_dnd_node_list_extract_nodes):
* lib/ephy-dnd.h:
* lib/ephy-marshal.list:
* lib/widgets/ephy-tree-model-sort.c: (each_node_get_data_binder),
(ephy_tree_model_sort_multi_drag_data_get):
* src/bookmarks/ephy-bookmarks-editor.c: (cmd_rename),
(cmd_select_all), (ephy_bookmarks_editor_show_popup_cb),
(keyword_node_show_popup_cb), (node_dropped_cb),
(ephy_bookmarks_editor_construct),
(ephy_bookmarks_editor_update_menu):
* src/bookmarks/ephy-node-view.c: (ephy_node_view_class_init),
(ephy_node_view_button_press_cb), (ephy_node_view_has_focus),
(get_node_from_path), (drag_motion_cb), (drag_drop_cb),
(drag_data_received_cb), (ephy_node_view_enable_drag_dest),
(ephy_node_view_enable_drag_source):
* src/bookmarks/ephy-node-view.h:
* src/ephy-favicon-action.c: (connect_proxy):
* src/history-dialog.c: (history_dialog_setup_view):
* src/toolbar.c: (toolbar_get_action_name):
Make dnd code smarter, so it can support more than
just urls types.
Implement drag of bookmarks on topics in bme. What a pain !
Diffstat (limited to 'src/history-dialog.c')
-rwxr-xr-x | src/history-dialog.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/history-dialog.c b/src/history-dialog.c index a8c1221fa..14224523c 100755 --- a/src/history-dialog.c +++ b/src/history-dialog.c @@ -35,6 +35,14 @@ #include <gtk/gtkcellrenderertext.h> #include <bonobo/bonobo-i18n.h> +static GtkTargetEntry url_drag_types [] = +{ + { EPHY_DND_URI_LIST_TYPE, 0, 0 }, + { EPHY_DND_TEXT_TYPE, 0, 1 }, + { EPHY_DND_URL_TYPE, 0, 2 } +}; +static int n_url_drag_types = G_N_ELEMENTS (url_drag_types); + #define CONF_HISTORY_SEARCH_TEXT "/apps/epiphany/history/search_text" #define CONF_HISTORY_SEARCH_TIME "/apps/epiphany/history/search_time" @@ -290,7 +298,10 @@ history_dialog_setup_view (HistoryDialog *dialog) GTK_TREE_MODEL (dialog->priv->sortmodel)); egg_tree_multi_drag_add_drag_support (GTK_TREE_VIEW (dialog->priv->treeview)); - ephy_dnd_enable_model_drag_source (GTK_WIDGET (dialog->priv->treeview)); + gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (dialog->priv->treeview), + GDK_BUTTON1_MASK, + url_drag_types, n_url_drag_types, + GDK_ACTION_COPY); add_column (dialog, _("Title"), EPHY_HISTORY_MODEL_COL_TITLE); add_column (dialog, _("Location"), EPHY_HISTORY_MODEL_COL_LOCATION); @@ -300,7 +311,7 @@ history_dialog_setup_view (HistoryDialog *dialog) "row_activated", G_CALLBACK (history_view_row_activated_cb), dialog); - + g_signal_connect (gtk_tree_view_get_selection (dialog->priv->treeview), "changed", G_CALLBACK (history_view_selection_changed_cb), |