aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-activity-handler.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-20 05:13:08 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-20 05:13:08 +0800
commit899db1fe37a9b8d229a2dc67c9b09ccb48a43521 (patch)
treefd712715ea8b801d0821602f9f175220218fc16c /shell/e-activity-handler.c
parent28b4ae90d788b6bbce25ef7b887c96dfa952e5fb (diff)
downloadgsoc2013-evolution-899db1fe37a9b8d229a2dc67c9b09ccb48a43521.tar
gsoc2013-evolution-899db1fe37a9b8d229a2dc67c9b09ccb48a43521.tar.gz
gsoc2013-evolution-899db1fe37a9b8d229a2dc67c9b09ccb48a43521.tar.bz2
gsoc2013-evolution-899db1fe37a9b8d229a2dc67c9b09ccb48a43521.tar.lz
gsoc2013-evolution-899db1fe37a9b8d229a2dc67c9b09ccb48a43521.tar.xz
gsoc2013-evolution-899db1fe37a9b8d229a2dc67c9b09ccb48a43521.tar.zst
gsoc2013-evolution-899db1fe37a9b8d229a2dc67c9b09ccb48a43521.zip
Removed globals `activity_client', `progress'. (timeout_callback_3): Get
* evolution-test-component.c: Removed globals `activity_client', `progress'. (timeout_callback_3): Get the activity client from @data. (timeout_callback_2): Likewise here. Pass the activity client as the user data pointer for `gtk_timeout_add()'. Put the progress count in a "my_progress" GtkObject data key. (timeout_callback_1): Pass the newly created EActivityClient as the user data pointer for `gtk_timeout_add()'. Also, dispatch itself again with a random timeout delay, for a maximum of NUM_ACTIVITES times. Initialize the "my_progress" GtkObject data to be -1. * e-activity-handler.c: New member `component_id' in `ActivityInfo'. (activity_info_new): New arg @component_id. Init the `component_id' member accordingly. (activity_info_free): Free the `component_id' member. (impl_operationStarted): Pass the component_id to `activity_info_new()'. (task_widget_new_from_activity_info): Pass the component_id to the activity_info. * e-task-widget.c: New member `component_id' in `ETaskWidgetPrivate'. (impl_destroy): Free it. (init): Init to NULL. Also init all the other members to NULL as well. (e_task_widget_construct): New arg @component_id. Assign ->component_id to match it. (e_task_widget_new): New arg @component_id here as well. Pass it over to `e_task_widget_construct()'. (e_task_widget_get_component_id): New. svn path=/trunk/; revision=12988
Diffstat (limited to 'shell/e-activity-handler.c')
-rw-r--r--shell/e-activity-handler.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c
index fe3a944bcc..6b4846a712 100644
--- a/shell/e-activity-handler.c
+++ b/shell/e-activity-handler.c
@@ -45,6 +45,7 @@ static BonoboXObjectClass *parent_class = NULL;
struct _ActivityInfo {
+ char *component_id;
GdkPixbuf *icon_pixbuf;
GNOME_Evolution_Activity_ActivityId id;
CORBA_char *information;
@@ -257,7 +258,8 @@ task_widget_button_press_event_callback (GtkWidget *widget,
/* Creating and destroying ActivityInfos. */
static ActivityInfo *
-activity_info_new (GNOME_Evolution_Activity_ActivityId id,
+activity_info_new (const char *component_id,
+ GNOME_Evolution_Activity_ActivityId id,
GdkPixbuf *icon,
const CORBA_char *information,
CORBA_boolean cancellable,
@@ -269,6 +271,7 @@ activity_info_new (GNOME_Evolution_Activity_ActivityId id,
CORBA_exception_init (&ev);
info = g_new (ActivityInfo, 1);
+ info->component_id = g_strdup (component_id);
info->id = id;
info->icon_pixbuf = gdk_pixbuf_ref (icon);
info->information = CORBA_string_dup (information);
@@ -289,6 +292,8 @@ activity_info_free (ActivityInfo *info)
CORBA_exception_init (&ev);
+ g_free (info->component_id);
+
gdk_pixbuf_unref (info->icon_pixbuf);
CORBA_free (info->information);
CORBA_Object_release (info->event_listener, &ev);
@@ -306,7 +311,9 @@ task_widget_new_from_activity_info (ActivityInfo *activity_info)
{
GtkWidget *widget;
- widget = e_task_widget_new (activity_info->icon_pixbuf, activity_info->information);
+ widget = e_task_widget_new (activity_info->icon_pixbuf,
+ activity_info->component_id,
+ activity_info->information);
gtk_widget_show (widget);
gtk_signal_connect (GTK_OBJECT (widget), "button_press_event",
@@ -415,7 +422,8 @@ impl_operationStarted (PortableServer_Servant servant,
activity_id = get_new_activity_id (activity_handler);
- activity_info = activity_info_new (activity_id, icon_pixbuf, information, cancellable, event_listener);
+ activity_info = activity_info_new (component_id, activity_id, icon_pixbuf, information,
+ cancellable, event_listener);
for (p = priv->task_bars; p != NULL; p = p->next)
e_task_bar_prepend_task (E_TASK_BAR (p->data),