gtk_selection_data_get_uris returns garbage pointer
- From: "jim Pharis" <binbrain gmail com>
- To: gtk-devel-list gnome org
- Subject: gtk_selection_data_get_uris returns garbage pointer
- Date: Tue, 18 Apr 2006 13:50:19 -0400
What am I doing wrong?
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]