aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-sound.c
diff options
context:
space:
mode:
authorConor Curran <conor.curran@canonical.com>2010-03-02 10:20:25 +0000
committerConor Curran <conor.curran@canonical.com>2010-03-02 10:20:25 +0000
commitbe2b2e73044d5ba0c656431f0d19723af6b55946 (patch)
tree0916a0332591d2dc3b048c40164a5803098842ee /src/indicator-sound.c
parenta6152fcf5ec57d7252617a7ede36aa53de7f2930 (diff)
downloadayatana-indicator-sound-be2b2e73044d5ba0c656431f0d19723af6b55946.tar.gz
ayatana-indicator-sound-be2b2e73044d5ba0c656431f0d19723af6b55946.tar.bz2
ayatana-indicator-sound-be2b2e73044d5ba0c656431f0d19723af6b55946.zip
refactored the indicator tests so as no c file needs to be included
Diffstat (limited to 'src/indicator-sound.c')
-rw-r--r--src/indicator-sound.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/indicator-sound.c b/src/indicator-sound.c
index 546f404..3aca517 100644
--- a/src/indicator-sound.c
+++ b/src/indicator-sound.c
@@ -300,11 +300,22 @@ gint get_state()
return current_state;
}
+gchar* get_state_image_name(gint state)
+{
+ return g_hash_table_lookup(volume_states, GINT_TO_POINTER(state));
+}
+
void prepare_for_tests(IndicatorObject *io)
{
+ prepare_state_machine();
get_icon(io);
}
+void tidy_up_hash()
+{
+ g_hash_table_destroy(volume_states);
+}
+
static void update_state(const gint state)
{
/* g_debug("update state beginning - previous_state = %i", previous_state);*/