[balsa/gtk4: 197/311] mailbox: New GtkTreeDragSource API
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk4: 197/311] mailbox: New GtkTreeDragSource API
- Date: Fri, 17 Dec 2021 19:54:24 +0000 (UTC)
commit f42387542456f1d1685c3ae2c9fa86db18b7fb86
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Fri Oct 9 20:48:47 2020 -0400
mailbox: New GtkTreeDragSource API
Does Balsa support dragging out of a mailbox?
libbalsa/mailbox.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
---
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index 2619a38e9..b79a5682f 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -3481,12 +3481,11 @@ void libbalsa_mailbox_set_encr_icon(const char *name)
* =================================================================== */
static gboolean mailbox_row_draggable(GtkTreeDragSource * drag_source,
- GtkTreePath * path);
-static gboolean mailbox_drag_data_delete(GtkTreeDragSource * drag_source,
GtkTreePath * path);
-static gboolean mailbox_drag_data_get(GtkTreeDragSource * drag_source,
- GtkTreePath * path,
- GtkSelectionData * selection_data);
+static gboolean mailbox_drag_data_delete(GtkTreeDragSource * drag_source,
+ GtkTreePath * path);
+static GdkContentProvider *mailbox_drag_data_get(GtkTreeDragSource * drag_source,
+ GtkTreePath * path);
static void
mailbox_drag_source_init(GtkTreeDragSourceIface * iface)
@@ -3515,13 +3514,16 @@ mailbox_drag_data_delete(GtkTreeDragSource * drag_source, GtkTreePath * path)
return FALSE;
}
-static gboolean
-mailbox_drag_data_get(GtkTreeDragSource * drag_source, GtkTreePath * path,
- GtkSelectionData * selection_data)
+static GdkContentProvider *
+mailbox_drag_data_get(GtkTreeDragSource * drag_source, GtkTreePath * path)
{
- /* The "drag-data-get" callback passes the list of selected messages
- * to the GtkSelectionData, so we don't. */
- return FALSE;
+ /* Asks the #GtkTreeDragSource to return a #GdkContentProvider representing
+ * the row at @path. Should robustly handle a @path no
+ * longer found in the model!
+ *
+ * Returns: (nullable) (transfer full): a #GdkContentProvider for the
+ * given @path or %NULL if none exists */
+ return NULL;
}
/* =================================================================== *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]