diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2003-12-02 11:41:35 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2003-12-02 11:41:35 +0800 |
commit | 492cdaf6f9db2f622ad4a4b292bddaf55631d0b6 (patch) | |
tree | 847eae4fea9d93692e162eec11673c2577691068 /shell/e-activity-handler.c | |
parent | ac0442e31c68ce073e4156bbe47d63da8f7d2523 (diff) | |
download | gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar.gz gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.tar.zst gsoc2013-evolution-492cdaf6f9db2f622ad4a4b292bddaf55631d0b6.zip |
New member activity_handler. (mail_component_init): Initialize.
* mail-component.c (struct _MailComponentPrivate): New member
activity_handler.
(mail_component_init): Initialize.
(impl_dispose): Unref.
(mail_component_peek_activity_handler): New.
(impl_createControls): Create an ETaskBar, attach it to the
ActivityHandler, and return it to the caller as the statusbar
control.
* e-activity-handler.c (e_activity_handler_operation_finished):
Argh, renamed from e_activity_client_operation_finished().
(e_activity_handler_operation_started): Don't unref the pixbuf.
* e-shell-window.c (setup_widgets): Hide the menu hint label.
* e-activity-handler.c (init): Init to next_activity_id to 1 so
callers can rely on it being nonzero.
svn path=/trunk/; revision=23556
Diffstat (limited to 'shell/e-activity-handler.c')
-rw-r--r-- | shell/e-activity-handler.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/shell/e-activity-handler.c b/shell/e-activity-handler.c index 695b7f6606..cdc41d8025 100644 --- a/shell/e-activity-handler.c +++ b/shell/e-activity-handler.c @@ -145,6 +145,8 @@ activity_info_new (const char *component_id, static void activity_info_free (ActivityInfo *info) { + g_print ("activity_info_free %d ref count %d\n", info->id, G_OBJECT (info->icon_pixbuf)->ref_count); + g_free (info->component_id); g_object_unref (info->icon_pixbuf); @@ -267,7 +269,7 @@ init (EActivityHandler *activity_handler) EActivityHandlerPrivate *priv; priv = g_new (EActivityHandlerPrivate, 1); - priv->next_activity_id = 0; + priv->next_activity_id = 1; priv->activity_infos = NULL; priv->task_bars = NULL; @@ -327,8 +329,6 @@ e_activity_handler_operation_started (EActivityHandler *activity_handler, task_widget_new_from_activity_info (activity_info)); } - g_object_unref (icon_pixbuf); - priv->activity_infos = g_list_prepend (priv->activity_infos, activity_info); return activity_id; @@ -371,8 +371,8 @@ e_activity_handler_operation_progressing (EActivityHandler *activity_handler, } void -e_activity_client_operation_finished (EActivityHandler *activity_handler, - guint activity_id) +e_activity_handler_operation_finished (EActivityHandler *activity_handler, + guint activity_id) { EActivityHandlerPrivate *priv = activity_handler->priv; GList *p; @@ -380,6 +380,10 @@ e_activity_client_operation_finished (EActivityHandler *activity_handler, int order_number; p = lookup_activity (priv->activity_infos, activity_id, &order_number); + if (p == NULL) { + g_warning ("e_activity_handler_operation_finished: Unknown activity %d\n", activity_id); + return; + } activity_info_free ((ActivityInfo *) p->data); priv->activity_infos = g_list_remove_link (priv->activity_infos, p); |