Commit cc6aa186 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/widgets/gimpdnd.[ch] app/widgets/gimpselectiondata.[ch] changed

2004-06-30  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdnd.[ch]
	* app/widgets/gimpselectiondata.[ch]
	* app/widgets/gimpcontainertreeview.[ch]: changed "files" and "uris"
	to "uri_list" in all function names, parameters and typedefs.

	* app/widgets/gimpcontainertreeview-dnd.c
	* app/widgets/gimpdocumentview.c
	* app/widgets/gimplayertreeview.c
	* app/widgets/gimptoolbox-dnd.c
	* app/display/gimpdisplayshell-dnd.[ch]
	* app/display/gimpdisplayshell.c: changed accordingly.
parent 8040a22a
2004-06-30 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdnd.[ch]
* app/widgets/gimpselectiondata.[ch]
* app/widgets/gimpcontainertreeview.[ch]: changed "files" and "uris"
to "uri_list" in all function names, parameters and typedefs.
* app/widgets/gimpcontainertreeview-dnd.c
* app/widgets/gimpdocumentview.c
* app/widgets/gimplayertreeview.c
* app/widgets/gimptoolbox-dnd.c
* app/display/gimpdisplayshell-dnd.[ch]
* app/display/gimpdisplayshell.c: changed accordingly.
2004-06-30 Sven Neumann <sven@gimp.org> 2004-06-30 Sven Neumann <sven@gimp.org>
* plug-ins/maze/maze_face.c: made the dialog look a little less * plug-ins/maze/maze_face.c: made the dialog look a little less
......
...@@ -279,20 +279,20 @@ gimp_display_shell_drop_buffer (GtkWidget *widget, ...@@ -279,20 +279,20 @@ gimp_display_shell_drop_buffer (GtkWidget *widget,
} }
void void
gimp_display_shell_drop_files (GtkWidget *widget, gimp_display_shell_drop_uri_list (GtkWidget *widget,
GList *files, GList *uri_list,
gpointer data) gpointer data)
{ {
GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data); GimpDisplayShell *shell = GIMP_DISPLAY_SHELL (data);
GimpImage *gimage = shell->gdisp->gimage;; GimpImage *gimage = shell->gdisp->gimage;;
GimpContext *context; GimpContext *context;
GList *list; GList *list;
D (g_print ("drop files on canvas\n")); D (g_print ("drop uri list on canvas\n"));
context = gimp_get_user_context (gimage->gimp); context = gimp_get_user_context (gimage->gimp);
for (list = files; list; list = g_list_next (list)) for (list = uri_list; list; list = g_list_next (list))
{ {
const gchar *uri = list->data; const gchar *uri = list->data;
GimpLayer *new_layer; GimpLayer *new_layer;
......
...@@ -39,8 +39,8 @@ void gimp_display_shell_drop_color (GtkWidget *widget, ...@@ -39,8 +39,8 @@ void gimp_display_shell_drop_color (GtkWidget *widget,
void gimp_display_shell_drop_buffer (GtkWidget *widget, void gimp_display_shell_drop_buffer (GtkWidget *widget,
GimpViewable *viewable, GimpViewable *viewable,
gpointer data); gpointer data);
void gimp_display_shell_drop_files (GtkWidget *widget, void gimp_display_shell_drop_uri_list (GtkWidget *widget,
GList *files, GList *uri_list,
gpointer data); gpointer data);
......
...@@ -350,8 +350,8 @@ gimp_display_shell_init (GimpDisplayShell *shell) ...@@ -350,8 +350,8 @@ gimp_display_shell_init (GimpDisplayShell *shell)
shell); shell);
/* dnd stuff */ /* dnd stuff */
gimp_dnd_file_dest_add (GTK_WIDGET (shell), gimp_dnd_uri_list_dest_add (GTK_WIDGET (shell),
gimp_display_shell_drop_files, gimp_display_shell_drop_uri_list,
shell); shell);
gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_LAYER, gimp_dnd_viewable_dest_add (GTK_WIDGET (shell), GIMP_TYPE_LAYER,
gimp_display_shell_drop_drawable, gimp_display_shell_drop_drawable,
......
...@@ -307,10 +307,8 @@ gimp_container_tree_view_drag_drop (GtkWidget *widget, ...@@ -307,10 +307,8 @@ gimp_container_tree_view_drag_drop (GtkWidget *widget,
tree_view_class = GIMP_CONTAINER_TREE_VIEW_GET_CLASS (tree_view); tree_view_class = GIMP_CONTAINER_TREE_VIEW_GET_CLASS (tree_view);
if (src_viewable) if (src_viewable)
tree_view_class->drop_viewable (tree_view, tree_view_class->drop_viewable (tree_view, src_viewable,
src_viewable, dest_viewable, drop_pos);
dest_viewable,
drop_pos);
else else
gtk_drag_get_data (widget, context, target, time); gtk_drag_get_data (widget, context, target, time);
...@@ -348,16 +346,16 @@ gimp_container_tree_view_drag_data_received (GtkWidget *widget, ...@@ -348,16 +346,16 @@ gimp_container_tree_view_drag_data_received (GtkWidget *widget,
case GIMP_DND_TYPE_URI_LIST: case GIMP_DND_TYPE_URI_LIST:
case GIMP_DND_TYPE_TEXT_PLAIN: case GIMP_DND_TYPE_TEXT_PLAIN:
case GIMP_DND_TYPE_NETSCAPE_URL: case GIMP_DND_TYPE_NETSCAPE_URL:
if (tree_view_class->drop_files) if (tree_view_class->drop_uri_list)
{ {
GList *uri_list; GList *uri_list;
uri_list = gimp_selection_data_get_uris (selection_data); uri_list = gimp_selection_data_get_uri_list (selection_data);
if (uri_list) if (uri_list)
{ {
tree_view_class->drop_files (tree_view, uri_list, tree_view_class->drop_uri_list (tree_view, uri_list,
dest_viewable, drop_pos); dest_viewable, drop_pos);
g_list_foreach (uri_list, (GFunc) g_free, NULL); g_list_foreach (uri_list, (GFunc) g_free, NULL);
g_list_free (uri_list); g_list_free (uri_list);
......
...@@ -157,7 +157,7 @@ gimp_container_tree_view_class_init (GimpContainerTreeViewClass *klass) ...@@ -157,7 +157,7 @@ gimp_container_tree_view_class_init (GimpContainerTreeViewClass *klass)
klass->drop_possible = gimp_container_tree_view_real_drop_possible; klass->drop_possible = gimp_container_tree_view_real_drop_possible;
klass->drop_viewable = gimp_container_tree_view_real_drop_viewable; klass->drop_viewable = gimp_container_tree_view_real_drop_viewable;
klass->drop_color = NULL; klass->drop_color = NULL;
klass->drop_files = NULL; klass->drop_uri_list = NULL;
klass->drop_svg = NULL; klass->drop_svg = NULL;
} }
......
...@@ -87,8 +87,8 @@ struct _GimpContainerTreeViewClass ...@@ -87,8 +87,8 @@ struct _GimpContainerTreeViewClass
const GimpRGB *src_color, const GimpRGB *src_color,
GimpViewable *dest_viewable, GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos); GtkTreeViewDropPosition drop_pos);
void (* drop_files) (GimpContainerTreeView *tree_view, void (* drop_uri_list) (GimpContainerTreeView *tree_view,
GList *files, GList *uri_list,
GimpViewable *dest_viewable, GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos); GtkTreeViewDropPosition drop_pos);
void (* drop_svg) (GimpContainerTreeView *tree_view, void (* drop_svg) (GimpContainerTreeView *tree_view,
......
...@@ -103,14 +103,14 @@ static GtkWidget * gimp_dnd_get_color_icon (GtkWidget *widget, ...@@ -103,14 +103,14 @@ static GtkWidget * gimp_dnd_get_color_icon (GtkWidget *widget,
GCallback get_color_func, GCallback get_color_func,
gpointer get_color_data); gpointer get_color_data);
static void gimp_dnd_get_file_data (GtkWidget *widget, static void gimp_dnd_get_uri_list_data (GtkWidget *widget,
GCallback get_file_func, GCallback get_uri_list_func,
gpointer get_file_data, gpointer get_uri_list_data,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom); GdkAtom atom);
static gboolean gimp_dnd_set_file_data (GtkWidget *widget, static gboolean gimp_dnd_set_uri_list_data (GtkWidget *widget,
GCallback set_file_func, GCallback set_uri_list_func,
gpointer set_file_data, gpointer set_uri_list_data,
GtkSelectionData *selection); GtkSelectionData *selection);
static void gimp_dnd_get_color_data (GtkWidget *widget, static void gimp_dnd_get_color_data (GtkWidget *widget,
...@@ -214,15 +214,15 @@ static GimpDndDataDef dnd_data_defs[] = ...@@ -214,15 +214,15 @@ static GimpDndDataDef dnd_data_defs[] =
{ {
GIMP_TARGET_URI_LIST, GIMP_TARGET_URI_LIST,
"gimp-dnd-get-file-func", "gimp-dnd-get-uri-list-func",
"gimp-dnd-get-file-data", "gimp-dnd-get-uri-list-data",
"gimp-dnd-set-file-func", "gimp-dnd-set-uri-list-func",
"gimp-dnd-set-file-data", "gimp-dnd-set-uri-list-data",
NULL, NULL,
gimp_dnd_get_file_data, gimp_dnd_get_uri_list_data,
gimp_dnd_set_file_data gimp_dnd_set_uri_list_data
}, },
{ {
...@@ -231,12 +231,12 @@ static GimpDndDataDef dnd_data_defs[] = ...@@ -231,12 +231,12 @@ static GimpDndDataDef dnd_data_defs[] =
NULL, NULL,
NULL, NULL,
"gimp-dnd-set-file-func", "gimp-dnd-set-uri-list-func",
"gimp-dnd-set-file-data", "gimp-dnd-set-uri-list-data",
NULL, NULL,
NULL, NULL,
gimp_dnd_set_file_data gimp_dnd_set_uri_list_data
}, },
{ {
...@@ -245,12 +245,12 @@ static GimpDndDataDef dnd_data_defs[] = ...@@ -245,12 +245,12 @@ static GimpDndDataDef dnd_data_defs[] =
NULL, NULL,
NULL, NULL,
"gimp-dnd-set-file-func", "gimp-dnd-set-uri-list-func",
"gimp-dnd-set-file-data", "gimp-dnd-set-uri-list-data",
NULL, NULL,
NULL, NULL,
gimp_dnd_set_file_data gimp_dnd_set_uri_list_data
}, },
{ {
...@@ -911,40 +911,44 @@ gimp_dnd_data_dest_remove (GimpDndType data_type, ...@@ -911,40 +911,44 @@ gimp_dnd_data_dest_remove (GimpDndType data_type,
} }
/************************/ /****************************/
/* file dnd functions */ /* uri list dnd functions */
/************************/ /****************************/
static void static void
gimp_dnd_get_file_data (GtkWidget *widget, gimp_dnd_get_uri_list_data (GtkWidget *widget,
GCallback get_file_func, GCallback get_uri_list_func,
gpointer get_file_data, gpointer get_uri_list_data,
GtkSelectionData *selection, GtkSelectionData *selection,
GdkAtom atom) GdkAtom atom)
{ {
GList *uri_list; GList *uri_list;
uri_list = (* (GimpDndDragFileFunc) get_file_func) (widget, get_file_data); uri_list = (* (GimpDndDragUriListFunc) get_uri_list_func) (widget,
get_uri_list_data);
if (uri_list) if (uri_list)
{ {
gimp_selection_data_set_uris (selection, atom, uri_list); gimp_selection_data_set_uri_list (selection, atom, uri_list);
g_list_foreach (uri_list, (GFunc) g_free, NULL);
g_list_free (uri_list); g_list_free (uri_list);
} }
} }
static gboolean static gboolean
gimp_dnd_set_file_data (GtkWidget *widget, gimp_dnd_set_uri_list_data (GtkWidget *widget,
GCallback set_file_func, GCallback set_uri_list_func,
gpointer set_file_data, gpointer set_uri_list_data,
GtkSelectionData *selection) GtkSelectionData *selection)
{ {
GList *uri_list = gimp_selection_data_get_uris (selection); GList *uri_list = gimp_selection_data_get_uri_list (selection);
if (! uri_list) if (! uri_list)
return FALSE; return FALSE;
(* (GimpDndDropFileFunc) set_file_func) (widget, uri_list, set_file_data); (* (GimpDndDropUriListFunc) set_uri_list_func) (widget, uri_list,
set_uri_list_data);
g_list_foreach (uri_list, (GFunc) g_free, NULL); g_list_foreach (uri_list, (GFunc) g_free, NULL);
g_list_free (uri_list); g_list_free (uri_list);
...@@ -953,19 +957,19 @@ gimp_dnd_set_file_data (GtkWidget *widget, ...@@ -953,19 +957,19 @@ gimp_dnd_set_file_data (GtkWidget *widget,
} }
void void
gimp_dnd_file_source_add (GtkWidget *widget, gimp_dnd_uri_list_source_add (GtkWidget *widget,
GimpDndDragFileFunc get_file_func, GimpDndDragUriListFunc get_uri_list_func,
gpointer data) gpointer data)
{ {
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
gimp_dnd_data_source_add (GIMP_DND_TYPE_URI_LIST, widget, gimp_dnd_data_source_add (GIMP_DND_TYPE_URI_LIST, widget,
G_CALLBACK (get_file_func), G_CALLBACK (get_uri_list_func),
data); data);
} }
void void
gimp_dnd_file_source_remove (GtkWidget *widget) gimp_dnd_uri_list_source_remove (GtkWidget *widget)
{ {
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
...@@ -973,9 +977,9 @@ gimp_dnd_file_source_remove (GtkWidget *widget) ...@@ -973,9 +977,9 @@ gimp_dnd_file_source_remove (GtkWidget *widget)
} }
void void
gimp_dnd_file_dest_add (GtkWidget *widget, gimp_dnd_uri_list_dest_add (GtkWidget *widget,
GimpDndDropFileFunc set_file_func, GimpDndDropUriListFunc set_uri_list_func,
gpointer data) gpointer data)
{ {
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
...@@ -989,18 +993,18 @@ gimp_dnd_file_dest_add (GtkWidget *widget, ...@@ -989,18 +993,18 @@ gimp_dnd_file_dest_add (GtkWidget *widget,
GDK_ACTION_COPY | GDK_ACTION_MOVE); GDK_ACTION_COPY | GDK_ACTION_MOVE);
gimp_dnd_data_dest_add (GIMP_DND_TYPE_NETSCAPE_URL, widget, gimp_dnd_data_dest_add (GIMP_DND_TYPE_NETSCAPE_URL, widget,
G_CALLBACK (set_file_func), G_CALLBACK (set_uri_list_func),
data); data);
gimp_dnd_data_dest_add (GIMP_DND_TYPE_TEXT_PLAIN, widget, gimp_dnd_data_dest_add (GIMP_DND_TYPE_TEXT_PLAIN, widget,
G_CALLBACK (set_file_func), G_CALLBACK (set_uri_list_func),
data); data);
gimp_dnd_data_dest_add (GIMP_DND_TYPE_URI_LIST, widget, gimp_dnd_data_dest_add (GIMP_DND_TYPE_URI_LIST, widget,
G_CALLBACK (set_file_func), G_CALLBACK (set_uri_list_func),
data); data);
} }
void void
gimp_dnd_file_dest_remove (GtkWidget *widget) gimp_dnd_uri_list_dest_remove (GtkWidget *widget)
{ {
g_return_if_fail (GTK_IS_WIDGET (widget)); g_return_if_fail (GTK_IS_WIDGET (widget));
......
...@@ -95,23 +95,23 @@ ...@@ -95,23 +95,23 @@
void gimp_dnd_init (Gimp *gimp); void gimp_dnd_init (Gimp *gimp);
/* file / url dnd functions */ /* uri list dnd functions */
typedef GList * (* GimpDndDragFileFunc) (GtkWidget *widget, typedef GList * (* GimpDndDragUriListFunc) (GtkWidget *widget,
gpointer data); gpointer data);
typedef void (* GimpDndDropFileFunc) (GtkWidget *widget, typedef void (* GimpDndDropUriListFunc) (GtkWidget *widget,
GList *files, GList *uri_list,
gpointer data); gpointer data);
void gimp_dnd_file_source_add (GtkWidget *widget, void gimp_dnd_uri_list_source_add (GtkWidget *widget,
GimpDndDragFileFunc get_file_func, GimpDndDragUriListFunc get_uri_list_func,
gpointer data); gpointer data);
void gimp_dnd_file_source_remove (GtkWidget *widget); void gimp_dnd_uri_list_source_remove (GtkWidget *widget);
void gimp_dnd_file_dest_add (GtkWidget *widget, void gimp_dnd_uri_list_dest_add (GtkWidget *widget,
GimpDndDropFileFunc set_file_func, GimpDndDropUriListFunc set_uri_list_func,
gpointer data); gpointer data);
void gimp_dnd_file_dest_remove (GtkWidget *widget); void gimp_dnd_uri_list_dest_remove (GtkWidget *widget);
/* color dnd functions */ /* color dnd functions */
......
...@@ -47,7 +47,7 @@ static void gimp_document_view_init (GimpDocumentView *view); ...@@ -47,7 +47,7 @@ static void gimp_document_view_init (GimpDocumentView *view);
static void gimp_document_view_activate_item (GimpContainerEditor *editor, static void gimp_document_view_activate_item (GimpContainerEditor *editor,
GimpViewable *viewable); GimpViewable *viewable);
static GList * gimp_document_view_drag_file (GtkWidget *widget, static GList * gimp_document_view_drag_uri_list (GtkWidget *widget,
gpointer data); gpointer data);
...@@ -181,9 +181,9 @@ gimp_document_view_new (GimpViewType view_type, ...@@ -181,9 +181,9 @@ gimp_document_view_new (GimpViewType view_type,
dnd_widget = gimp_container_view_get_dnd_widget (editor->view); dnd_widget = gimp_container_view_get_dnd_widget (editor->view);
gimp_dnd_file_source_add (dnd_widget, gimp_dnd_uri_list_source_add (dnd_widget,
gimp_document_view_drag_file, gimp_document_view_drag_uri_list,
editor); editor);
} }
gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager, editor); gimp_ui_manager_update (GIMP_EDITOR (editor->view)->ui_manager, editor);
...@@ -210,8 +210,8 @@ gimp_document_view_activate_item (GimpContainerEditor *editor, ...@@ -210,8 +210,8 @@ gimp_document_view_activate_item (GimpContainerEditor *editor,
} }
static GList * static GList *
gimp_document_view_drag_file (GtkWidget *widget, gimp_document_view_drag_uri_list (GtkWidget *widget,
gpointer data) gpointer data)
{ {
GimpViewable *viewable = gimp_dnd_get_drag_data (widget); GimpViewable *viewable = gimp_dnd_get_drag_data (widget);
......
...@@ -97,8 +97,8 @@ static void gimp_layer_tree_view_drop_color (GimpContainerTreeView *view, ...@@ -97,8 +97,8 @@ static void gimp_layer_tree_view_drop_color (GimpContainerTreeView *view,
const GimpRGB *color, const GimpRGB *color,
GimpViewable *dest_viewable, GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos); GtkTreeViewDropPosition drop_pos);
static void gimp_layer_tree_view_drop_files (GimpContainerTreeView *view, static void gimp_layer_tree_view_drop_uri_list (GimpContainerTreeView *view,
GList *files, GList *uri_list,
GimpViewable *dest_viewable, GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos); GtkTreeViewDropPosition drop_pos);
...@@ -221,7 +221,7 @@ gimp_layer_tree_view_class_init (GimpLayerTreeViewClass *klass) ...@@ -221,7 +221,7 @@ gimp_layer_tree_view_class_init (GimpLayerTreeViewClass *klass)
tree_view_class->drop_possible = gimp_layer_tree_view_drop_possible; tree_view_class->drop_possible = gimp_layer_tree_view_drop_possible;
tree_view_class->drop_viewable = gimp_layer_tree_view_drop_viewable; tree_view_class->drop_viewable = gimp_layer_tree_view_drop_viewable;
tree_view_class->drop_color = gimp_layer_tree_view_drop_color; tree_view_class->drop_color = gimp_layer_tree_view_drop_color;
tree_view_class->drop_files = gimp_layer_tree_view_drop_files; tree_view_class->drop_uri_list = gimp_layer_tree_view_drop_uri_list;
item_view_class->set_image = gimp_layer_tree_view_set_image; item_view_class->set_image = gimp_layer_tree_view_set_image;
item_view_class->get_container = gimp_image_get_layers; item_view_class->get_container = gimp_image_get_layers;
...@@ -408,8 +408,8 @@ gimp_layer_tree_view_constructor (GType type, ...@@ -408,8 +408,8 @@ gimp_layer_tree_view_constructor (GType type,
G_CALLBACK (gimp_layer_tree_view_mask_clicked), G_CALLBACK (gimp_layer_tree_view_mask_clicked),
layer_view); layer_view);
gimp_dnd_file_dest_add (GTK_WIDGET (tree_view->view), gimp_dnd_uri_list_dest_add (GTK_WIDGET (tree_view->view),
NULL, tree_view); NULL, tree_view);
gimp_dnd_color_dest_add (GTK_WIDGET (tree_view->view), gimp_dnd_color_dest_add (GTK_WIDGET (tree_view->view),
NULL, tree_view); NULL, tree_view);
gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_PATTERN, gimp_dnd_viewable_dest_add (GTK_WIDGET (tree_view->view), GIMP_TYPE_PATTERN,
...@@ -769,10 +769,10 @@ gimp_layer_tree_view_drop_color (GimpContainerTreeView *view, ...@@ -769,10 +769,10 @@ gimp_layer_tree_view_drop_color (GimpContainerTreeView *view,
} }
static void static void
gimp_layer_tree_view_drop_files (GimpContainerTreeView *view, gimp_layer_tree_view_drop_uri_list (GimpContainerTreeView *view,
GList *files, GList *uri_list,
GimpViewable *dest_viewable, GimpViewable *dest_viewable,
GtkTreeViewDropPosition drop_pos) GtkTreeViewDropPosition drop_pos)
{ {
GimpItemTreeView *item_view = GIMP_ITEM_TREE_VIEW (view); GimpItemTreeView *item_view = GIMP_ITEM_TREE_VIEW (view);
GimpImage *gimage = item_view->gimage; GimpImage *gimage = item_view->gimage;
...@@ -784,7 +784,7 @@ gimp_layer_tree_view_drop_files (GimpContainerTreeView *view, ...@@ -784,7 +784,7 @@ gimp_layer_tree_view_drop_files (GimpContainerTreeView *view,
if (drop_pos == GTK_TREE_VIEW_DROP_AFTER) if (drop_pos == GTK_TREE_VIEW_DROP_AFTER)
index++; index++;
for (list = files; list; list = g_list_next (list)) for (list = uri_list; list; list = g_list_next (list))
{ {
const gchar *uri = list->data; const gchar *uri = list->data;
GimpLayer *new_layer; GimpLayer *new_layer;
......
...@@ -56,18 +56,18 @@ ...@@ -56,18 +56,18 @@
void void
gimp_selection_data_set_uris (GtkSelectionData *selection, gimp_selection_data_set_uri_list (GtkSelectionData *selection,
GdkAtom atom, GdkAtom atom,
GList *uris) GList *uri_list)
{ {
GList *list; GList *list;
gchar *vals = NULL; gchar *vals = NULL;
g_return_if_fail (selection != NULL); g_return_if_fail (selection != NULL);
g_return_if_fail (atom != GDK_NONE); g_return_if_fail (atom != GDK_NONE);
g_return_if_fail (uris != NULL); g_return_if_fail (uri_list != NULL);
for (list = uris; list; list = g_list_next (list)) for (list = uri_list; list; list = g_list_next (list))
{ {
if (vals) if (vals)
{ {
...@@ -175,7 +175,7 @@ gimp_unescape_uri_string (const char *escaped, ...@@ -175,7 +175,7 @@ gimp_unescape_uri_string (const char *escaped,
} }
GList * GList *
gimp_selection_data_get_uris (GtkSelectionData *selection) gimp_selection_data_get_uri_list (GtkSelectionData *selection)
{ {
GList *crap_list = NULL; GList *crap_list = NULL;
GList *uri_list = NULL; GList *uri_list = NULL;
......
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
/* uri list */ /* uri list */
void gimp_selection_data_set_uris (GtkSelectionData *selection, void gimp_selection_data_set_uri_list (GtkSelectionData *selection,
GdkAtom atom, GdkAtom atom,
GList *uris); GList *uris);
GList * gimp_selection_data_get_uris (GtkSelectionData *selection); GList * gimp_selection_data_get_uri_list (GtkSelectionData *selection);
/* color */ /* color */
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
/* local function prototypes */ /* local function prototypes */
static void gimp_toolbox_drop_files (GtkWidget *widget, static void gimp_toolbox_drop_uri_list (GtkWidget *widget,
GList *files, GList *uri_list,
gpointer data); gpointer data);
static void gimp_toolbox_drop_drawable (GtkWidget *widget, static void gimp_toolbox_drop_drawable (GtkWidget *widget,
GimpViewable *viewable, GimpViewable *viewable,
...@@ -71,12 +71,12 @@ gimp_toolbox_dnd_init (GimpToolbox *toolbox) ...@@ -71,12 +71,12 @@ gimp_toolbox_dnd_init (GimpToolbox *toolbox)
dock = GIMP_DOCK (toolbox); dock = GIMP_DOCK (toolbox);
gimp_dnd_file_dest_add (GTK_WIDGET (toolbox), gimp_dnd_uri_list_dest_add (GTK_WIDGET (toolbox),
gimp_toolbox_drop_files, gimp_toolbox_drop_uri_list,
dock->context); dock->context);
gimp_dnd_file_dest_add (toolbox->tool_wbox, gimp_dnd_uri_list_dest_add (toolbox->tool_wbox,
gimp_toolbox_drop_files, gimp_toolbox_drop_uri_list,
dock->context); dock->context);
gimp_dnd_viewable_dest_add (toolbox->tool_wbox, GIMP_TYPE_LAYER, gimp_dnd_viewable_dest_add (toolbox->tool_wbox, GIMP_TYPE_LAYER,
gimp_toolbox_drop_drawable, gimp_toolbox_drop_drawable,
...@@ -99,14 +99,14 @@ gimp_toolbox_dnd_init (GimpToolbox *toolbox) ...@@ -99,14 +99,14 @@ gimp_toolbox_dnd_init (GimpToolbox *toolbox)
/* private functions */ /* private functions */
static void static void
gimp_toolbox_drop_files (GtkWidget *widget, gimp_toolbox_drop_uri_list (GtkWidget *widget,
GList *files, GList *uri_list,
gpointer data) gpointer data)
{ {
GimpContext *context = GIMP_CONTEXT (data); GimpContext *context = GIMP_CONTEXT (data);
GList *list; GList *list;
for (list = files; list; list = g_list_next (list)) for (list = uri_list; list; list = g_list_next (list))
{ {
const gchar *uri = list->data; const gchar *uri = list->data;
GimpImage *gimage; GimpImage *gimage;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment