From e77740c19c8c96e767e8c77922e2d28179648199 Mon Sep 17 00:00:00 2001 From: Srinivasa Ragavan Date: Mon, 20 Jul 2009 10:45:26 +0530 Subject: Add API for getting task count. --- widgets/misc/e-task-bar.c | 5 +++++ widgets/misc/e-task-bar.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'widgets/misc') diff --git a/widgets/misc/e-task-bar.c b/widgets/misc/e-task-bar.c index e0bdc762a3..e7fc15fe00 100644 --- a/widgets/misc/e-task-bar.c +++ b/widgets/misc/e-task-bar.c @@ -300,3 +300,8 @@ e_task_bar_get_task_widget (ETaskBar *task_bar, return E_TASK_WIDGET (child_info->widget); } +gint +e_task_bar_get_num_children (ETaskBar *task_bar) +{ + return g_list_length (GTK_BOX (task_bar->priv->hbox)->children); +} diff --git a/widgets/misc/e-task-bar.h b/widgets/misc/e-task-bar.h index d88c0697dd..19ed37a2e8 100644 --- a/widgets/misc/e-task-bar.h +++ b/widgets/misc/e-task-bar.h @@ -70,7 +70,7 @@ void e_task_bar_remove_task_from_id (ETaskBar *task_bar, guint id); ETaskWidget *e_task_bar_get_task_widget (ETaskBar *task_bar, gint n); - +gint e_task_bar_get_num_children (ETaskBar *task_bar); G_END_DECLS #endif /* _E_TASK_BAR_H_ */ -- cgit v1.2.3