diff options
author | Matthias Clasen <mclasen@redhat.com> | 2008-02-12 15:07:38 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-02-12 15:07:38 +0000 |
commit | 6a80b177a02089cd1d6a6dd257ec850556294306 (patch) | |
tree | 094ec76646faee607b9500ab26f106de6b4b2a01 /gtk/gtkpathbar.c | |
parent | 697a50929e6caec17e83bada861e2bd6a3926af0 (diff) | |
download | gtk+-6a80b177a02089cd1d6a6dd257ec850556294306.tar.gz |
Use gtk_selection_data_set_uris() instead of doing it by hand. (#514890,
2008-02-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserdefault.c (recent_model_sort_drag_data_get):
(recent_model_sort_drag_data_get):
(search_model_sort_drag_data_get):
* gtk/gtkfilesystemmodel.c (drag_source_drag_data_get):
* gtk/gtkpathbar.c (button_drag_data_get_cb):
Use gtk_selection_data_set_uris() instead of doing it
by hand. (#514890, Christian Persch)
svn path=/trunk/; revision=19524
Diffstat (limited to 'gtk/gtkpathbar.c')
-rw-r--r-- | gtk/gtkpathbar.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c index 76eccae0c1..440d875c75 100644 --- a/gtk/gtkpathbar.c +++ b/gtk/gtkpathbar.c @@ -1325,22 +1325,16 @@ button_drag_data_get_cb (GtkWidget *widget, { ButtonData *button_data; GtkPathBar *path_bar; - char *uri; - char *uri_list; + char *uris[2]; button_data = data; path_bar = GTK_PATH_BAR (widget->parent); /* the button's parent *is* the path bar */ - uri = gtk_file_system_path_to_uri (path_bar->file_system, button_data->path); - uri_list = g_strconcat (uri, "\r\n", NULL); - g_free (uri); + uris[0] = gtk_file_system_path_to_uri (path_bar->file_system, button_data->path); + uris[1] = NULL; - gtk_selection_data_set (selection_data, - selection_data->target, - 8, - (guchar *)uri_list, - strlen (uri_list)); - g_free (uri_list); + gtk_selection_data_set_uris (selection_data, uris); + g_free (uris[0]); } static ButtonData * |