aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment-button.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-23 02:29:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-23 02:29:28 +0800
commitdf33c633ee19e9420f7d8f660cac71d71bea90c3 (patch)
tree04a168b76fce4e192b772dac2aa3c62c189ead2a /widgets/misc/e-attachment-button.c
parent94a9b040083f0a2d3b9d75b58ec641fe021e1a98 (diff)
downloadgsoc2013-evolution-df33c633ee19e9420f7d8f660cac71d71bea90c3.tar
gsoc2013-evolution-df33c633ee19e9420f7d8f660cac71d71bea90c3.tar.gz
gsoc2013-evolution-df33c633ee19e9420f7d8f660cac71d71bea90c3.tar.bz2
gsoc2013-evolution-df33c633ee19e9420f7d8f660cac71d71bea90c3.tar.lz
gsoc2013-evolution-df33c633ee19e9420f7d8f660cac71d71bea90c3.tar.xz
gsoc2013-evolution-df33c633ee19e9420f7d8f660cac71d71bea90c3.tar.zst
gsoc2013-evolution-df33c633ee19e9420f7d8f660cac71d71bea90c3.zip
Use an appropriate icon when dragging attachments.
Diffstat (limited to 'widgets/misc/e-attachment-button.c')
-rw-r--r--widgets/misc/e-attachment-button.c44
1 files changed, 42 insertions, 2 deletions
diff --git a/widgets/misc/e-attachment-button.c b/widgets/misc/e-attachment-button.c
index d1b02c09f3..a248cf6ca4 100644
--- a/widgets/misc/e-attachment-button.c
+++ b/widgets/misc/e-attachment-button.c
@@ -247,6 +247,18 @@ attachment_button_expand_clicked_cb (EAttachmentButton *button)
}
static void
+attachment_button_expand_drag_begin_cb (EAttachmentButton *button,
+ GdkDragContext *context)
+{
+ EAttachmentView *view;
+
+ view = e_attachment_button_get_view (button);
+
+ attachment_button_select_path (button);
+ e_attachment_view_drag_begin (view, context);
+}
+
+static void
attachment_button_expand_drag_data_get_cb (EAttachmentButton *button,
GdkDragContext *context,
GtkSelectionData *selection,
@@ -255,14 +267,23 @@ attachment_button_expand_drag_data_get_cb (EAttachmentButton *button,
{
EAttachmentView *view;
- attachment_button_select_path (button);
-
view = e_attachment_button_get_view (button);
e_attachment_view_drag_data_get (
view, context, selection, info, time);
}
+static void
+attachment_button_expand_drag_end_cb (EAttachmentButton *button,
+ GdkDragContext *context)
+{
+ EAttachmentView *view;
+
+ view = e_attachment_button_get_view (button);
+
+ e_attachment_view_drag_end (view, context);
+}
+
static gboolean
attachment_button_toggle_button_press_event_cb (EAttachmentButton *button,
GdkEventButton *event)
@@ -579,20 +600,39 @@ attachment_button_init (EAttachmentButton *button)
G_CALLBACK (attachment_button_expand_clicked_cb), button);
g_signal_connect_swapped (
+ button->priv->expand_button, "drag-begin",
+ G_CALLBACK (attachment_button_expand_drag_begin_cb),
+ button);
+
+ g_signal_connect_swapped (
button->priv->expand_button, "drag-data-get",
G_CALLBACK (attachment_button_expand_drag_data_get_cb),
button);
g_signal_connect_swapped (
+ button->priv->expand_button, "drag-end",
+ G_CALLBACK (attachment_button_expand_drag_end_cb),
+ button);
+
+ g_signal_connect_swapped (
button->priv->toggle_button, "button-press-event",
G_CALLBACK (attachment_button_toggle_button_press_event_cb),
button);
g_signal_connect_swapped (
+ button->priv->toggle_button, "drag-begin",
+ G_CALLBACK (attachment_button_expand_drag_begin_cb),
+ button);
+
+ g_signal_connect_swapped (
button->priv->toggle_button, "drag-data-get",
G_CALLBACK (attachment_button_expand_drag_data_get_cb),
button);
+ g_signal_connect_swapped (
+ button->priv->toggle_button, "drag-end",
+ G_CALLBACK (attachment_button_expand_drag_end_cb),
+ button);
}
GType