aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-activity-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/e-activity-handler.c')
-rw-r--r--shell/e-activity-handler.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c
index 09342b1af4..32076f1f94 100644
--- a/shell/e-activity-handler.c
+++ b/shell/e-activity-handler.c
@@ -134,6 +134,37 @@ lookup_activity (GList *list,
}
+/* ETaskWidget callbacks. */
+
+static int
+task_widget_button_press_event_callback (GtkWidget *widget,
+ GdkEventButton *button_event,
+ void *data)
+{
+ CORBA_Environment ev;
+ ActivityInfo *activity_info;
+ CORBA_any *null_value;
+
+ activity_info = (ActivityInfo *) data;
+
+ CORBA_exception_init (&ev);
+
+ null_value = CORBA_any__alloc ();
+ null_value->_type = TC_null;
+
+ Bonobo_Listener_event (activity_info->event_listener, "Clicked", null_value, &ev);
+ if (ev._major != CORBA_NO_EXCEPTION)
+ g_warning ("EActivityHandler: Cannot report `Clicked' event -- %s",
+ ev._repo_id);
+
+ CORBA_free (null_value);
+
+ CORBA_exception_free (&ev);
+
+ return TRUE;
+}
+
+
/* Creating and destroying ActivityInfos. */
static ActivityInfo *
@@ -184,6 +215,9 @@ task_widget_new_from_activity_info (ActivityInfo *activity_info)
widget = e_task_widget_new (activity_info->icon_pixbuf, activity_info->information);
gtk_widget_show (widget);
+ gtk_signal_connect (GTK_OBJECT (widget), "button_press_event",
+ GTK_SIGNAL_FUNC (task_widget_button_press_event_callback), activity_info);
+
return E_TASK_WIDGET (widget);
}