diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-13 20:09:37 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-13 20:09:37 +0800 |
commit | 4032075425d7251642e3f81b9c4732e9a2a23e85 (patch) | |
tree | c22289096822a953f7a25892500f512b247c7639 /widgets/misc/e-attachment-paned.c | |
parent | 6caf022926a6dc7ae0a84e514510def0de87109a (diff) | |
download | gsoc2013-evolution-4032075425d7251642e3f81b9c4732e9a2a23e85.tar.gz gsoc2013-evolution-4032075425d7251642e3f81b9c4732e9a2a23e85.tar.zst gsoc2013-evolution-4032075425d7251642e3f81b9c4732e9a2a23e85.zip |
Bug 624913 - Disallow drag-and-drop within the same attachment bar
Adds a boolean "dragging" property to the EAttachmentView interface,
which becomes TRUE when the user start a drag from the attachment view.
e_attachment_view_drag_motion() and e_attachment_view_drag_drop() both
return FALSE when this property is set.
Also, do not register the entire EMsgComposer window as a drag
destination. Just intercept drag signals from the GtkHTML widget.
Requires gtkhtml commit 344eb5e to fully work correctly.
Diffstat (limited to 'widgets/misc/e-attachment-paned.c')
-rw-r--r-- | widgets/misc/e-attachment-paned.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/widgets/misc/e-attachment-paned.c b/widgets/misc/e-attachment-paned.c index 83a00692d8..64d97ab81f 100644 --- a/widgets/misc/e-attachment-paned.c +++ b/widgets/misc/e-attachment-paned.c @@ -60,6 +60,7 @@ struct _EAttachmentPanedPrivate { enum { PROP_0, PROP_ACTIVE_VIEW, + PROP_DRAGGING, PROP_EDITABLE, PROP_EXPANDED }; @@ -150,6 +151,12 @@ attachment_paned_set_property (GObject *object, g_value_get_int (value)); return; + case PROP_DRAGGING: + e_attachment_view_set_dragging ( + E_ATTACHMENT_VIEW (object), + g_value_get_boolean (value)); + return; + case PROP_EDITABLE: e_attachment_view_set_editable ( E_ATTACHMENT_VIEW (object), @@ -179,6 +186,12 @@ attachment_paned_get_property (GObject *object, E_ATTACHMENT_PANED (object))); return; + case PROP_DRAGGING: + g_value_set_boolean ( + value, e_attachment_view_get_dragging ( + E_ATTACHMENT_VIEW (object))); + return; + case PROP_EDITABLE: g_value_set_boolean ( value, e_attachment_view_get_editable ( @@ -278,6 +291,14 @@ attachment_paned_constructed (GObject *object) priv->notebook, "page"); e_mutual_binding_new ( + object, "dragging", + priv->icon_view, "dragging"); + + e_mutual_binding_new ( + object, "dragging", + priv->tree_view, "dragging"); + + e_mutual_binding_new ( object, "editable", priv->icon_view, "editable"); @@ -457,6 +478,9 @@ attachment_paned_class_init (EAttachmentPanedClass *class) G_PARAM_CONSTRUCT)); g_object_class_override_property ( + object_class, PROP_DRAGGING, "dragging"); + + g_object_class_override_property ( object_class, PROP_EDITABLE, "editable"); } |