diff options
-rw-r--r-- | shell/e-shell-taskbar.c | 16 | ||||
-rw-r--r-- | shell/e-shell-taskbar.h | 2 |
2 files changed, 18 insertions, 0 deletions
diff --git a/shell/e-shell-taskbar.c b/shell/e-shell-taskbar.c index c3d89d7023..9413394307 100644 --- a/shell/e-shell-taskbar.c +++ b/shell/e-shell-taskbar.c @@ -435,3 +435,19 @@ e_shell_taskbar_unset_message (EShellTaskbar *shell_taskbar) e_shell_taskbar_set_message (shell_taskbar, NULL); } + +/** + * e_shell_taskbar_get_activity_count: + * @shell_taskbar: an #EShellTaskbar + * + * Returns the number of active #EActivity instances being tracked. + * + * Returns: the number of #EActivity instances + **/ +guint +e_shell_taskbar_get_activity_count (EShellTaskbar *shell_taskbar) +{ + g_return_val_if_fail (E_IS_SHELL_TASKBAR (shell_taskbar), 0); + + return g_hash_table_size (shell_taskbar->priv->proxy_table); +} diff --git a/shell/e-shell-taskbar.h b/shell/e-shell-taskbar.h index 3c3d40010e..d2ebfbb0c4 100644 --- a/shell/e-shell-taskbar.h +++ b/shell/e-shell-taskbar.h @@ -81,6 +81,8 @@ const gchar * e_shell_taskbar_get_message (EShellTaskbar *shell_taskbar); void e_shell_taskbar_set_message (EShellTaskbar *shell_taskbar, const gchar *message); void e_shell_taskbar_unset_message (EShellTaskbar *shell_taskbar); +guint e_shell_taskbar_get_activity_count + (EShellTaskbar *shell_taskbar); G_END_DECLS |