[gtk+/places-sidebar] New signal drag-perform-drop
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/places-sidebar] New signal drag-perform-drop
- Date: Tue, 4 Dec 2012 19:09:39 +0000 (UTC)
commit 221ea9d4c531f793a7a7947877db6faacc91373e
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Dec 4 12:44:46 2012 -0600
New signal drag-perform-drop
The caller is supposed to take action with the specified URIs.
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkmarshalers.list | 1 +
gtk/gtkplacessidebar.c | 29 +++++++++++++++++++++++++++++
2 files changed, 30 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkmarshalers.list b/gtk/gtkmarshalers.list
index e94fb15..d39a768 100644
--- a/gtk/gtkmarshalers.list
+++ b/gtk/gtkmarshalers.list
@@ -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
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index 80cbf22..f90bf5c 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]