[evolution] Bug 763723 - Do not propagate mouse events to parent of EAttachmentBar
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 763723 - Do not propagate mouse events to parent of EAttachmentBar
- Date: Fri, 1 Apr 2016 09:09:54 +0000 (UTC)
commit 9e29cd1ec4ce566dcacd436087fd468df6dfd74e
Author: Milan Crha <mcrha redhat com>
Date: Fri Apr 1 11:09:43 2016 +0200
Bug 763723 - Do not propagate mouse events to parent of EAttachmentBar
e-util/e-attachment-bar.c | 39 +++++++++++++++++++++++++++++++++++++++
1 files changed, 39 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-attachment-bar.c b/e-util/e-attachment-bar.c
index 8b850e5..8cebf96 100644
--- a/e-util/e-attachment-bar.c
+++ b/e-util/e-attachment-bar.c
@@ -482,10 +482,44 @@ attachment_bar_update_actions (EAttachmentView *view)
e_attachment_view_update_actions (view);
}
+static gboolean
+attachment_bar_button_press_event (GtkWidget *widget,
+ GdkEventButton *event)
+{
+ /* Chain up to parent's button_press_event() method. */
+ GTK_WIDGET_CLASS (e_attachment_bar_parent_class)->button_press_event (widget, event);
+
+ /* Never propagate the event to the parent */
+ return TRUE;
+}
+
+static gboolean
+attachment_bar_button_release_event (GtkWidget *widget,
+ GdkEventButton *event)
+{
+ /* Chain up to parent's button_release_event() method. */
+ GTK_WIDGET_CLASS (e_attachment_bar_parent_class)->button_release_event (widget, event);
+
+ /* Never propagate the event to the parent */
+ return TRUE;
+}
+
+static gboolean
+attachment_bar_motion_notify_event (GtkWidget *widget,
+ GdkEventMotion *event)
+{
+ /* Chain up to parent's motion_notify_event() method. */
+ GTK_WIDGET_CLASS (e_attachment_bar_parent_class)->motion_notify_event (widget, event);
+
+ /* Never propagate the event to the parent */
+ return TRUE;
+}
+
static void
e_attachment_bar_class_init (EAttachmentBarClass *class)
{
GObjectClass *object_class;
+ GtkWidgetClass *widget_class;
g_type_class_add_private (class, sizeof (EAttachmentBarPrivate));
@@ -495,6 +529,11 @@ e_attachment_bar_class_init (EAttachmentBarClass *class)
object_class->dispose = attachment_bar_dispose;
object_class->constructed = attachment_bar_constructed;
+ widget_class = GTK_WIDGET_CLASS (class);
+ widget_class->button_press_event = attachment_bar_button_press_event;
+ widget_class->button_release_event = attachment_bar_button_release_event;
+ widget_class->motion_notify_event = attachment_bar_motion_notify_event;
+
g_object_class_install_property (
object_class,
PROP_ACTIVE_VIEW,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]