gtk_selection_data_get_uris returns garbage
- From: "jim Pharis" <binbrain gmail com>
- To: gtk-app-devel-list gnome org
- Subject: gtk_selection_data_get_uris returns garbage
- Date: Wed, 19 Apr 2006 11:33:14 -0400
I posted the below to the gtk-devel-list and now that I think about it
it was probably the wrong list to post this question. So I apoligize
for the cross-posting, but hopefully someone on this list can help me
out here.
---
I've got drag and drop working for a single item from Nautilus. I need
to support the case where a user drags multiple items though. I found
some good examples on this list, but I've never been able to get the
gtk_selection_data_get_uri to return anything but garbage.
gchar **uri_list;
gchar *path;
gint len;
len = 0;
/* grab nautilus image */
case TARGET_URI:
uri_list = gtk_selection_data_get_uris (sel_data);
while (uri_list[len]) {
path = g_filename_from_uri (uri_list[len], NULL, NULL));
print path
len++;
}
If I try to print the pointer uri_list after the assignment I get nil.
In gdb I get a partial address like 0xcf3 that appears corrupted.
if I just do g_filename_from_uri (sel_data->data... I get a single
filename correctly.
TIA,
--
- Jim Pharis
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]