New signal drag-perform-drop

The caller is supposed to take action with the specified URIs.
Signed-off-by: Federico Mena Quintero's avatarFederico Mena Quintero <federico@gnome.org>
parent f46b26d2
......@@ -123,3 +123,4 @@ OBJECT:OBJECT,INT,INT
VOID:POINTER,POINTER,POINTER,POINTER,STRING
VOID:OBJECT,STRING,POINTER,POINTER
INT:INT
VOID:POINTER,STRING,INT
......@@ -152,6 +152,10 @@ struct _GtkPlacesSidebarClass {
int *action);
GdkDragAction (* drag_action_ask) (GtkPlacesSidebar *sidebar,
GdkDragAction actions);
void (* drag_perform_drop) (GtkPlacesSidebar *sidebar,
GList *uris,
const char *drop_uri,
GdkDragAction action);
};
enum {
......@@ -197,6 +201,7 @@ enum {
SHOW_ERROR_MESSAGE,
DRAG_ACTION_REQUESTED,
DRAG_ACTION_ASK,
DRAG_PERFORM_DROP,
LAST_SIGNAL,
};
......@@ -351,6 +356,18 @@ emit_drag_action_ask (GtkPlacesSidebar *sidebar,
return ret_action;
}
static void
emit_drag_perform_drop (GtkPlacesSidebar *sidebar,
GList *uris,
const char *drop_uri,
GdkDragAction action)
{
g_signal_emit (sidebar, places_sidebar_signals[DRAG_PERFORM_DROP], 0,
uris,
drop_uri,
action);
}
static gint
get_icon_size (GtkPlacesSidebar *sidebar)
{
......@@ -3761,6 +3778,18 @@ gtk_places_sidebar_class_init (GtkPlacesSidebarClass *class)
_gtk_marshal_INT__INT,
G_TYPE_INT, 1,
G_TYPE_INT);
places_sidebar_signals [DRAG_ACTION_ASK] =
g_signal_new (I_("drag-perform-drop"),
G_OBJECT_CLASS_TYPE (gobject_class),
G_SIGNAL_RUN_FIRST,
G_STRUCT_OFFSET (GtkPlacesSidebarClass, drag_perform_drop),
NULL, NULL,
_gtk_marshal_VOID__POINTER_STRING_INT,
G_TYPE_NONE, 3,
G_TYPE_POINTER, /* FIXME: (GList *) is there something friendlier to language bindings? */
G_TYPE_STRING,
G_TYPE_INT);
}
static void
......
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