[evolution] Add e_shell_taskbar_get_activity_count().



commit 9379111ae48dd0e9eaea3fcdd14593414a60c115
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue Dec 1 17:13:17 2009 -0500

    Add e_shell_taskbar_get_activity_count().
    
    For Anjal.
    
    This really belongs in EShellBackend but the infrastructure is not
    there yet.

 shell/e-shell-taskbar.c |   16 ++++++++++++++++
 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 c3d89d7..9413394 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 3c3d400..d2ebfbb 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
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]