mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
[386/906] pixbufdrop: fix example on win32
This commit is contained in:
parent
754299a5fd
commit
757d005662
1 changed files with 6 additions and 1 deletions
|
@ -126,8 +126,11 @@ on_drag_data_received (GtkWidget * widget,
|
|||
GdkDragContext * context, int x, int y,
|
||||
GtkSelectionData * seldata, guint inf, guint time, gpointer data)
|
||||
{
|
||||
GdkPixbufFormat *format;
|
||||
SourceData *userdata = g_new0 (SourceData, 1);
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *filename = g_filename_from_uri (seldata->data, NULL, NULL);
|
||||
#else
|
||||
GdkPixbufFormat *format;
|
||||
gchar **uris = gtk_selection_data_get_uris (seldata);
|
||||
gchar *filename = NULL;
|
||||
|
||||
|
@ -138,6 +141,8 @@ on_drag_data_received (GtkWidget * widget,
|
|||
g_return_if_fail (format);
|
||||
g_print ("received %s image: %s\n", filename,
|
||||
gdk_pixbuf_format_get_name (format));
|
||||
#endif
|
||||
|
||||
userdata->nick = "location";
|
||||
userdata->value = g_strdup (filename);
|
||||
userdata->data = data;
|
||||
|
|
Loading…
Reference in a new issue