diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-06-24 23:25:44 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-06-24 23:25:44 +0800 |
commit | 4e1fe266e73c23d628ebf4765ae931a7b91b4e3f (patch) | |
tree | 6a8e246b945d4af7666c5729f45882ce36e94acb /shell/e-activity-handler.c | |
parent | ea40bb0823d313579eb992f441d6fd08f7ef23a7 (diff) | |
download | gsoc2013-evolution-4e1fe266e73c23d628ebf4765ae931a7b91b4e3f.tar.gz gsoc2013-evolution-4e1fe266e73c23d628ebf4765ae931a7b91b4e3f.tar.zst gsoc2013-evolution-4e1fe266e73c23d628ebf4765ae931a7b91b4e3f.zip |
Derive ETaskWidget from GtkEventBox instead of GtkFrame so that we can
get button_press events from it. Also, get the EActivtyHandler to
properly dispatch "Clicked" events when the user clicks on an
ETaskWidget.
svn path=/trunk/; revision=10450
Diffstat (limited to 'shell/e-activity-handler.c')
-rw-r--r-- | shell/e-activity-handler.c | 34 |
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); } |