diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-08-06 22:34:43 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-08-06 22:34:43 +0800 |
commit | 54f1919cae74d3551c23eef9d00975344d1c78a9 (patch) | |
tree | 817546aea8161746bcf5f1eb4aabfec0d4d0ec18 /src/ephy-notebook.c | |
parent | 394409d0ccca365dd8d9e8a29752d2fb27cb7bbe (diff) | |
download | gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar.gz gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar.bz2 gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar.lz gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar.xz gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.tar.zst gsoc2013-epiphany-54f1919cae74d3551c23eef9d00975344d1c78a9.zip |
Fix dragging of urls which gnome-vfs can't handle. Fix new tab positioning
2004-08-06 Christian Persch <chpe@cvs.gnome.org>
* lib/ephy-string.c: (ephy_string_parse_uri_list):
* lib/ephy-string.h:
* lib/widgets/ephy-node-view.c: (drag_data_received_cb),
(ephy_node_view_class_init):
* src/bookmarks/ephy-bookmarks-editor.c:
* src/ephy-notebook.c: (notebook_drag_data_received_cb):
* src/ephy-notebook.h:
* src/ephy-session.c:
* src/ephy-shell.c: (ephy_shell_new_tab):
* src/ephy-tab.c: (ephy_tab_new_window_cb):
* src/ephy-window.c: (ephy_window_load_in_tabs):
Fix dragging of urls which gnome-vfs can't handle.
Fix new tab positioning when opening tabs from drags.
Diffstat (limited to 'src/ephy-notebook.c')
-rw-r--r-- | src/ephy-notebook.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/ephy-notebook.c b/src/ephy-notebook.c index e55fdc03f..38c8a8c07 100644 --- a/src/ephy-notebook.c +++ b/src/ephy-notebook.c @@ -606,33 +606,32 @@ notebook_drag_data_received_cb (GtkWidget* widget, GdkDragContext *context, { /* URL_TYPE has format: url \n title */ tmp = g_strsplit (selection_data->data, "\n", 2); - if (tmp) + if (tmp != NULL && tmp[0] != NULL) { - uri = gnome_vfs_uri_new (tmp[0]); - if (uri) - { - uri_list = g_list_append (uri_list, uri); - } - g_strfreev (tmp); + uri_list = g_list_prepend (uri_list, g_strdup (tmp[0])); } + + g_strfreev (tmp); } else if (selection_data->target == gdk_atom_intern (EPHY_DND_URI_LIST_TYPE, FALSE)) { - uri_list = gnome_vfs_uri_list_parse (selection_data->data); + uri_list = ephy_string_parse_uri_list (selection_data->data); } else { - g_assert_not_reached (); + g_return_if_reached (); } - if (uri_list) + if (uri_list != NULL) { EphyWindow *window; window = EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (widget))); ephy_window_load_in_tabs (window, tab, uri_list); - gnome_vfs_uri_list_free (uri_list); + + g_list_foreach (uri_list, (GFunc) g_free, NULL); + g_list_free (uri_list); } } |