aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-history-window.c
diff options
context:
space:
mode:
authorJorn Baayen <jbaayen@gnome.org>2005-01-22 03:33:03 +0800
committerJorn Baayen <jbaayen@src.gnome.org>2005-01-22 03:33:03 +0800
commit549171e9af818b784548fc2bed4bd375006b7adc (patch)
tree5a3e639a8fe9f2175adde95c9e60ae77a76a8016 /src/ephy-history-window.c
parent39f7d93acea222b6b3e1cd53875ac16f5cbdea4f (diff)
downloadgsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.tar
gsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.tar.gz
gsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.tar.bz2
gsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.tar.lz
gsoc2013-epiphany-549171e9af818b784548fc2bed4bd375006b7adc.tar.xz
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/ephy-history-window.c')
-rw-r--r--src/ephy-history-window.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c
index 01f864338..3343c5a04 100644
--- a/src/ephy-history-window.c
+++ b/src/ephy-history-window.c
@@ -1189,7 +1189,7 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
EphyNode *node;
GtkUIManager *ui_merge;
GtkActionGroup *action_group;
- int col_id, details_value;
+ int url_col_id, title_col_id, details_value;
gtk_window_set_title (GTK_WINDOW (editor), _("History"));
gtk_window_set_icon_name (GTK_WINDOW (editor), EPHY_STOCK_HISTORY);
@@ -1249,21 +1249,24 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
editor->priv->sites_filter = ephy_node_filter_new ();
sites_view = ephy_node_view_new (node, editor->priv->sites_filter);
add_focus_monitor (editor, sites_view);
- col_id = ephy_node_view_add_data_column (EPHY_NODE_VIEW (sites_view),
- G_TYPE_STRING,
- EPHY_NODE_PAGE_PROP_LOCATION,
- NULL, NULL);
+ url_col_id = ephy_node_view_add_data_column (EPHY_NODE_VIEW (sites_view),
+ G_TYPE_STRING,
+ EPHY_NODE_PAGE_PROP_LOCATION,
+ NULL, NULL);
+ title_col_id = ephy_node_view_add_column (EPHY_NODE_VIEW (sites_view), _("Sites"),
+ G_TYPE_STRING,
+ EPHY_NODE_PAGE_PROP_TITLE,
+ EPHY_NODE_VIEW_SEARCHABLE |
+ EPHY_NODE_VIEW_SHOW_PRIORITY,
+ provide_favicon,
+ NULL);
ephy_node_view_enable_drag_source (EPHY_NODE_VIEW (sites_view),
page_drag_types,
- n_page_drag_types, col_id);
+ n_page_drag_types,
+ url_col_id,
+ title_col_id);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (sites_view));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
- ephy_node_view_add_column (EPHY_NODE_VIEW (sites_view), _("Sites"),
- G_TYPE_STRING,
- EPHY_NODE_PAGE_PROP_TITLE,
- EPHY_NODE_VIEW_SEARCHABLE |
- EPHY_NODE_VIEW_SHOW_PRIORITY,
- provide_favicon);
ephy_node_view_set_priority (EPHY_NODE_VIEW (sites_view),
EPHY_NODE_PAGE_PROP_PRIORITY);
ephy_node_view_set_sort (EPHY_NODE_VIEW (sites_view), G_TYPE_STRING,
@@ -1313,24 +1316,21 @@ ephy_history_window_construct (EphyHistoryWindow *editor)
add_focus_monitor (editor, pages_view);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (pages_view));
gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (pages_view), TRUE);
- col_id = ephy_node_view_add_data_column (EPHY_NODE_VIEW (pages_view),
- G_TYPE_STRING,
- EPHY_NODE_PAGE_PROP_LOCATION,
- NULL, NULL);
- ephy_node_view_enable_drag_source (EPHY_NODE_VIEW (pages_view),
- page_drag_types,
- n_page_drag_types, col_id);
- col = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Title"),
- G_TYPE_STRING, EPHY_NODE_PAGE_PROP_TITLE,
- EPHY_NODE_VIEW_SORTABLE |
- EPHY_NODE_VIEW_SEARCHABLE, NULL);
+ title_col_id = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Title"),
+ G_TYPE_STRING, EPHY_NODE_PAGE_PROP_TITLE,
+ EPHY_NODE_VIEW_SORTABLE |
+ EPHY_NODE_VIEW_SEARCHABLE, NULL, &col);
gtk_tree_view_column_set_max_width (col, 250);
editor->priv->title_col = col;
- col = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Address"),
- G_TYPE_STRING, EPHY_NODE_PAGE_PROP_LOCATION,
- EPHY_NODE_VIEW_SORTABLE, NULL);
+ url_col_id = ephy_node_view_add_column (EPHY_NODE_VIEW (pages_view), _("Address"),
+ G_TYPE_STRING, EPHY_NODE_PAGE_PROP_LOCATION,
+ EPHY_NODE_VIEW_SORTABLE, NULL, &col);
gtk_tree_view_column_set_max_width (col, 200);
editor->priv->address_col = col;
+ ephy_node_view_enable_drag_source (EPHY_NODE_VIEW (pages_view),
+ page_drag_types,
+ n_page_drag_types,
+ url_col_id, title_col_id);
ephy_node_view_set_sort (EPHY_NODE_VIEW (pages_view), G_TYPE_INT,
EPHY_NODE_PAGE_PROP_LAST_VISIT,
GTK_SORT_DESCENDING);