← Back to team overview

ayatana-commits team mailing list archive

[Merge] lp:~larsu/indicator-sound/only-show-active-player-on-phone into lp:indicator-sound/0.1

 

Lars Uebernickel has proposed merging lp:~larsu/indicator-sound/only-show-active-player-on-phone into lp:indicator-sound/0.1.

Requested reviews:
  PS Jenkins bot (ps-jenkins): continuous-integration
  Ted Gould (ted)

For more details, see:
https://code.launchpad.net/~larsu/indicator-sound/only-show-active-player-on-phone/+merge/191709

Only display running players in the phone's sound menu

The design says to only display the _one_ running player. This will have that effect, as there's only one player allowed to run at a time on the phone.
-- 
https://code.launchpad.net/~larsu/indicator-sound/only-show-active-player-on-phone/+merge/191709
Your team ayatana-commits is subscribed to branch lp:indicator-sound/0.1.
=== added directory '.bzr-builddeb'
=== added file '.bzr-builddeb/default.conf'
--- .bzr-builddeb/default.conf	1970-01-01 00:00:00 +0000
+++ .bzr-builddeb/default.conf	2013-10-17 20:40:25 +0000
@@ -0,0 +1,2 @@
+[BUILDDEB]
+split = True

=== modified file '.bzrignore'
--- .bzrignore	2010-01-27 13:18:24 +0000
+++ .bzrignore	2013-10-17 20:40:25 +0000
@@ -1,52 +1,15 @@
-*.o
-*~
-compile
-m4
-depcomp
-Makefile.in
-Makefile
-configure
-aclocal.m4
-autom4te.cache
-config.guess
-config.h  
-config.h.in
-config.log  
-config.status
-config.ac
-configure
-config.sub.cdbs-orig
-install-sh
-INSTALL
-libtool
-ltmain.sh
-missing
-mkinstalldirs
-ruby_dbus_scripts
-stamp-h1
-data/indicator-sound.schemas
-data/Makefile.in
-data/Makefile
-data/indicator-sound.service
-.deps
-.libs
-po/stamp-it
-po/POTFILES
-po/.intltool-merge-cache
-po/Makefile.in.in
-config.h
-config.log
-config.sub
-src/Makefile
-src/Makefile.in
-src/libsoundmenu.la
-src/indicator-sound-service
-src/sound-service-client.h
-src/sound-service-server.h
-src/sound-service-marshal.c
-src/sound-service-marshal.h
-src/sound_service_outtakes.txt
-src/libsoundmenu_la-indicator-sound.lo
-src/libsoundmenu_la-sound-service-marshal.lo
-ruby_dbus_scripts/dbus_monitor.rb
-
+/po/POTFILES
+/po/stamp-it
+
+/data/indicator-sound.service
+
+/src/indicator-sound-service
+/src/indicator_sound_service_vala.stamp
+/src/main.c
+/src/media-player-list.c
+/src/media-player.c
+/src/mpris2-interfaces.c
+/src/mpris2-watcher.c
+/src/service.c
+/src/volume-control.c
+/src/freedesktop-interfaces.c

=== modified file 'AUTHORS'
--- AUTHORS	2010-01-27 13:21:02 +0000
+++ AUTHORS	2013-10-17 20:40:25 +0000
@@ -1,2 +1,3 @@
+Charles Kerr <charles.kerr@xxxxxxxxxxxxx>
 Ted Gould <ted@xxxxxxxxxxxxx>
 Cody Russell <crussell@xxxxxxxxxxxxx>

=== added file 'CMakeLists.txt'
--- CMakeLists.txt	1970-01-01 00:00:00 +0000
+++ CMakeLists.txt	2013-10-17 20:40:25 +0000
@@ -0,0 +1,72 @@
+project(indicator-sound C CXX)
+cmake_minimum_required(VERSION 2.8.9)
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" "${CMAKE_MODULE_PATH}")
+
+set(PACKAGE ${CMAKE_PROJECT_NAME})
+set(GETTEXT_PACKAGE indicator-sound)
+set(GNOMELOCALEDIR "${CMAKE_INSTALL_FULL_DATADIR}/locale")
+
+add_definitions( -DGETTEXT_PACKAGE="${GETTEXT_PACKAGE}" )
+
+find_package(PkgConfig REQUIRED)
+include(GNUInstallDirs)
+include(Coverage)
+include(UseVala)
+
+# Workaround for libexecdir on debian
+if (EXISTS "/etc/debian_version") 
+  set(CMAKE_INSTALL_LIBEXECDIR ${CMAKE_INSTALL_LIBDIR})
+  set(CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}")
+endif()
+
+set(SOURCE_DIR "${CMAKE_SOURCE_DIR}/src")
+set(SOURCE_BINARY_DIR "${CMAKE_BINARY_DIR}/src")
+
+set(PULSE_AUDIO_REQUIRED_VERSION 0.9.19)
+set(GIO_2_0_REQUIRED_VERSION 2.25.13)
+set(URL_DISPATCHER_1_REQUIRED_VERSION 1)
+
+pkg_check_modules(
+  PULSEAUDIO REQUIRED
+  libpulse-mainloop-glib>=${PULSE_AUDIO_REQUIRED_VERSION}
+  gio-unix-2.0>=${GIO_2_0_REQUIRED_VERSION}
+  url-dispatcher-1>=${URL_DISPATCHER_1_REQUIRED_VERSION}
+)
+include_directories(${PULSEAUDIO_INCLUDE_DIRS})
+
+pkg_check_modules(
+  SOUNDSERVICE REQUIRED
+  gee-1.0
+  gio-2.0>=${GIO_2_0_REQUIRED_VERSION}
+  gio-unix-2.0
+  libxml-2.0
+  libnotify
+)
+include_directories(${SOUNDSERVICE_INCLUDE_DIRS})
+
+find_package(Vala 0.18)
+
+find_package(GObjectIntrospection 0.9.12)
+
+include_directories(${SOURCE_DIR})
+include_directories(${SOURCE_BINARY_DIR})
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11")
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+
+add_definitions(
+  -Wall
+)
+
+configure_file(
+  "config.h.in"
+  "${CMAKE_CURRENT_BINARY_DIR}/config.h"
+)
+
+add_subdirectory(data)
+add_subdirectory(src)
+
+enable_testing()
+add_subdirectory(tests)
+

=== removed file 'Makefile.am'
--- Makefile.am	2010-03-04 10:23:40 +0000
+++ Makefile.am	1970-01-01 00:00:00 +0000
@@ -1,11 +0,0 @@
-
-SUBDIRS = \
-	src \
-	data \
-	tests \
-	po
-
-EXTRA_DIST = autogen.sh
-
-DISTCHECK_CONFIGURE_FLAGS = --enable-localinstall
-

=== modified file 'NEWS'
--- NEWS	2010-01-27 13:21:02 +0000
+++ NEWS	2013-10-17 20:40:25 +0000
@@ -0,0 +1,10 @@
+12.10.1
+ - Don't include <glib/gi18n.h> in library code
+ - Remove GTK+ 2 build rules from configure.ac
+
+12.10.0
+ - Allow setting preferred media players through a settings key. (LP #1014955)
+ - Fix sound indicator not working after Amarok close. (LP #992262) 
+ - Explicit handling of Ardour
+ - Fix deprecated GTK+ API calls
+

=== removed file 'autogen.sh'
--- autogen.sh	2010-02-12 03:05:09 +0000
+++ autogen.sh	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-PKG_NAME="indicator-sound"
-
-which gnome-autogen.sh || {
-	echo "You need gnome-common from GNOME SVN"
-	exit 1
-}
-
-USE_GNOME2_MACROS=1 \
-. gnome-autogen.sh
-

=== added directory 'cmake'
=== added file 'cmake/COPYING-CMAKE-SCRIPTS'
--- cmake/COPYING-CMAKE-SCRIPTS	1970-01-01 00:00:00 +0000
+++ cmake/COPYING-CMAKE-SCRIPTS	2013-10-17 20:40:25 +0000
@@ -0,0 +1,22 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products 
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

=== added file 'cmake/Coverage.cmake'
--- cmake/Coverage.cmake	1970-01-01 00:00:00 +0000
+++ cmake/Coverage.cmake	2013-10-17 20:40:25 +0000
@@ -0,0 +1,37 @@
+if (CMAKE_BUILD_TYPE MATCHES coverage)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
+  set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
+  set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} --coverage")
+  set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
+
+  find_program(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin")
+  if (NOT GCOVR_EXECUTABLE)
+    message(STATUS "Gcovr binary was not found, can not generate XML coverage info.")
+  else ()
+    message(STATUS "Gcovr found, can generate XML coverage info.")
+    add_custom_target (coverage-xml
+      WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+      COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" --exclude="obj.*" -x -r "${CMAKE_SOURCE_DIR}" 
+      --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml)
+  endif()
+
+  find_program(LCOV_EXECUTABLE lcov HINTS ${LCOV_ROOT} "${GCOVR_ROOT}/bin")
+  find_program(GENHTML_EXECUTABLE genhtml HINTS ${GENHTML_ROOT})
+  if (NOT LCOV_EXECUTABLE)
+    message(STATUS "Lcov binary was not found, can not generate HTML coverage info.")
+  else ()
+    if(NOT GENHTML_EXECUTABLE)
+      message(STATUS "Genthml binary not found, can not generate HTML coverage info.")
+    else()
+      message(STATUS "Lcov and genhtml found, can generate HTML coverage info.")
+      add_custom_target (coverage-html
+        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
+        COMMAND "${LCOV_EXECUTABLE}" --capture --output-file "${CMAKE_BINARY_DIR}/coverage.info" --no-checksum --directory "${CMAKE_BINARY_DIR}"
+        COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '/usr/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" 
+        COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '${CMAKE_BINARY_DIR}/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" 
+        COMMAND "${LCOV_EXECUTABLE}" --remove "${CMAKE_BINARY_DIR}/coverage.info" '${CMAKE_SOURCE_DIR}/tests/*' --output-file "${CMAKE_BINARY_DIR}/coverage.info" 
+        COMMAND "${GENHTML_EXECUTABLE}" --prefix "${CMAKE_BINARY_DIR}" --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info
+        )
+    endif()
+  endif()
+endif()

=== added file 'cmake/FindGObjectIntrospection.cmake'
--- cmake/FindGObjectIntrospection.cmake	1970-01-01 00:00:00 +0000
+++ cmake/FindGObjectIntrospection.cmake	2013-10-17 20:40:25 +0000
@@ -0,0 +1,61 @@
+# - try to find gobject-introspection
+#
+# Once done this will define
+#
+#  INTROSPECTION_FOUND - system has gobject-introspection
+#  INTROSPECTION_SCANNER - the gobject-introspection scanner, g-ir-scanner
+#  INTROSPECTION_COMPILER - the gobject-introspection compiler, g-ir-compiler
+#  INTROSPECTION_GENERATE - the gobject-introspection generate, g-ir-generate
+#  INTROSPECTION_GIRDIR
+#  INTROSPECTION_TYPELIBDIR
+#  INTROSPECTION_CFLAGS
+#  INTROSPECTION_LIBS
+#
+# Copyright (C) 2010, Pino Toscano, <pino@xxxxxxx>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+macro(_GIR_GET_PKGCONFIG_VAR _outvar _varname)
+  execute_process(
+    COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=${_varname} gobject-introspection-1.0
+    OUTPUT_VARIABLE _result
+    RESULT_VARIABLE _null
+  )
+
+  if (_null)
+  else()
+    string(REGEX REPLACE "[\r\n]" " " _result "${_result}")
+    string(REGEX REPLACE " +$" ""  _result "${_result}")
+    separate_arguments(_result)
+    set(${_outvar} ${_result} CACHE INTERNAL "")
+  endif()
+endmacro(_GIR_GET_PKGCONFIG_VAR)
+
+find_package(PkgConfig)
+if(PKG_CONFIG_FOUND)
+  if(PACKAGE_FIND_VERSION_COUNT GREATER 0)
+    set(_gir_version_cmp ">=${PACKAGE_FIND_VERSION}")
+  endif()
+  pkg_check_modules(_pc_gir gobject-introspection-1.0${_gir_version_cmp})
+  if(_pc_gir_FOUND)
+    set(INTROSPECTION_FOUND TRUE)
+    _gir_get_pkgconfig_var(INTROSPECTION_SCANNER "g_ir_scanner")
+    _gir_get_pkgconfig_var(INTROSPECTION_COMPILER "g_ir_compiler")
+    _gir_get_pkgconfig_var(INTROSPECTION_GENERATE "g_ir_generate")
+    _gir_get_pkgconfig_var(INTROSPECTION_GIRDIR "girdir")
+    _gir_get_pkgconfig_var(INTROSPECTION_TYPELIBDIR "typelibdir")
+    set(INTROSPECTION_CFLAGS "${_pc_gir_CFLAGS}")
+    set(INTROSPECTION_LIBS "${_pc_gir_LIBS}")
+  endif()
+endif()
+
+mark_as_advanced(
+  INTROSPECTION_SCANNER
+  INTROSPECTION_COMPILER
+  INTROSPECTION_GENERATE
+  INTROSPECTION_GIRDIR
+  INTROSPECTION_TYPELIBDIR
+  INTROSPECTION_CFLAGS
+  INTROSPECTION_LIBS
+)

=== added file 'cmake/FindVala.cmake'
--- cmake/FindVala.cmake	1970-01-01 00:00:00 +0000
+++ cmake/FindVala.cmake	2013-10-17 20:40:25 +0000
@@ -0,0 +1,57 @@
+# - Find Vala
+# This module looks for valac.
+# This module defines the following values:
+#    VALA_FOUND
+#    VALA_COMPILER
+#    VALA_VERSION
+#    VAPI_GEN
+#    VAPI_GEN_VERSION
+
+#=============================================================================
+# Copyright Přemysl Janouch 2011
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+# OF SUCH DAMAGE.
+#=============================================================================
+
+find_program (VALA_COMPILER "valac")
+
+if (VALA_COMPILER)
+	execute_process (COMMAND ${VALA_COMPILER} --version
+		OUTPUT_VARIABLE VALA_VERSION)
+	string (REGEX MATCH "[.0-9]+" VALA_VERSION "${VALA_VERSION}")
+endif (VALA_COMPILER)
+
+find_program (VAPI_GEN "vapigen")
+
+if (VAPI_GEN)
+	execute_process (COMMAND ${VAPI_GEN} --version
+		OUTPUT_VARIABLE VAPI_GEN_VERSION)
+	string (REGEX MATCH "[.0-9]+" VAPI_GEN_VERSION "${VAPI_GEN_VERSION}")
+endif (VAPI_GEN)
+
+include (FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS (Vala
+	REQUIRED_VARS VALA_COMPILER
+	VERSION_VAR VALA_VERSION)
+
+mark_as_advanced (VALA_COMPILER VALA_VERSION VAPI_GEN)
+

=== added file 'cmake/UseGObjectIntrospection.cmake'
--- cmake/UseGObjectIntrospection.cmake	1970-01-01 00:00:00 +0000
+++ cmake/UseGObjectIntrospection.cmake	2013-10-17 20:40:25 +0000
@@ -0,0 +1,100 @@
+# Copyright (C) 2010, Pino Toscano, <pino@xxxxxxx>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+include(ListOperations)
+
+macro(_gir_list_prefix _outvar _listvar _prefix)
+  set(${_outvar})
+  foreach(_item IN LISTS ${_listvar})
+    list(APPEND ${_outvar} ${_prefix}${_item})
+  endforeach()
+endmacro(_gir_list_prefix)
+
+macro(gir_add_introspections introspections_girs)
+
+  foreach(gir IN LISTS ${introspections_girs})
+
+    set(_gir_name "${gir}")
+
+    ## Transform the gir filename to something which can reference through a variable
+    ## without automake/make complaining, eg Gtk-2.0.gir -> Gtk_2_0_gir
+    string(REPLACE "-" "_" _gir_name "${_gir_name}")
+    string(REPLACE "." "_" _gir_name "${_gir_name}")
+
+    # Namespace and Version is either fetched from the gir filename
+    # or the _NAMESPACE/_VERSION variable combo
+    set(_gir_namespace "${${_gir_name}_NAMESPACE}")
+    if (_gir_namespace STREQUAL "")
+      string(REGEX REPLACE "([^-]+)-.*" "\\1" _gir_namespace "${gir}")
+    endif ()
+    set(_gir_version "${${_gir_name}_VERSION}")
+    if (_gir_version STREQUAL "")
+      string(REGEX REPLACE ".*-([^-]+).gir" "\\1" _gir_version "${gir}")
+    endif ()
+
+    # _PROGRAM is an optional variable which needs it's own --program argument
+    set(_gir_program "${${_gir_name}_PROGRAM}")
+    if (NOT _gir_program STREQUAL "")
+      set(_gir_program "--program=${_gir_program}")
+    endif ()
+
+    # Variables which provides a list of things
+    _gir_list_prefix(_gir_libraries ${_gir_name}_LIBS "--library=")
+    _gir_list_prefix(_gir_packages ${_gir_name}_PACKAGES "--pkg=")
+    _gir_list_prefix(_gir_includes ${_gir_name}_INCLUDES "--include=")
+    _gir_list_prefix(_gir_export_packages ${_gir_name}_EXPORT_PACKAGES "--pkg-export=")
+
+    # Reuse the LIBTOOL variable from by automake if it's set
+    set(_gir_libtool "--no-libtool")
+
+    add_custom_command(
+      COMMAND ${INTROSPECTION_SCANNER}
+              ${INTROSPECTION_SCANNER_ARGS}
+              --namespace=${_gir_namespace}
+              --nsversion=${_gir_version}
+              ${_gir_libtool}
+              ${_gir_program}
+              ${_gir_libraries}
+              ${_gir_packages}
+              ${_gir_includes}
+              ${_gir_export_packages}
+              ${${_gir_name}_SCANNERFLAGS}
+              ${${_gir_name}_CFLAGS}
+              ${${_gir_name}_FILES}
+              --output ${CMAKE_CURRENT_BINARY_DIR}/${gir}
+      DEPENDS ${${_gir_name}_FILES}
+              ${${_gir_name}_LIBS}
+      OUTPUT ${gir}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+      VERBATIM
+    )
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${gir} DESTINATION share/gir-1.0)
+
+    string(REPLACE ".gir" ".typelib" _typelib "${gir}")
+    add_custom_command(
+      COMMAND ${INTROSPECTION_COMPILER}
+              ${INTROSPECTION_COMPILER_ARGS}
+              --includedir=.
+              ${CMAKE_CURRENT_BINARY_DIR}/${gir}
+              -o ${CMAKE_CURRENT_BINARY_DIR}/${_typelib}
+      DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir}
+      OUTPUT ${_typelib}
+      WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+    )
+    install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${_typelib} DESTINATION ${CMAKE_INSTALL_LIBDIR}/girepository-1.0)
+
+    add_custom_target(gir-${gir} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${gir})
+    add_custom_target(gir-typelibs-${_typelib} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${_typelib})
+  endforeach()
+
+endmacro(gir_add_introspections)
+
+macro(gir_get_cflags _output)
+  get_directory_property(_tmp_includes INCLUDE_DIRECTORIES)
+  list_prefix(_includes _tmp_includes "-I")
+  get_directory_property(_tmp_compile_definitions COMPILE_DEFINITIONS)
+  list_prefix(_compile_definitions _tmp_compile_definitions "-D")
+  set(${_output} ${_includes} ${_compile_definitions})
+endmacro(gir_get_cflags)

=== added file 'cmake/UseGSettings.cmake'
--- cmake/UseGSettings.cmake	1970-01-01 00:00:00 +0000
+++ cmake/UseGSettings.cmake	2013-10-17 20:40:25 +0000
@@ -0,0 +1,42 @@
+# GSettings.cmake, CMake macros written for Marlin, feel free to re-use them.
+
+option (GSETTINGS_LOCALINSTALL "Install GSettings Schemas locally instead of to the GLib prefix" OFF)
+
+option (GSETTINGS_COMPILE "Compile GSettings Schemas after installation" OFF)
+
+if(GSETTINGS_LOCALINSTALL)
+    message(STATUS "GSettings schemas will be installed locally.")
+endif()
+
+if(GSETTINGS_COMPILE)
+    message(STATUS "GSettings shemas will be compiled.")
+endif()
+
+macro(add_schema SCHEMA_NAME)
+
+    set(PKG_CONFIG_EXECUTABLE pkg-config)
+    # Have an option to not install the schema into where GLib is
+    if (GSETTINGS_LOCALINSTALL)
+        SET (GSETTINGS_DIR "${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas/")
+    else (GSETTINGS_LOCALINSTALL)
+        execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} glib-2.0 --variable prefix OUTPUT_VARIABLE _glib_prefix OUTPUT_STRIP_TRAILING_WHITESPACE)
+        SET (GSETTINGS_DIR "${_glib_prefix}/share/glib-2.0/schemas/")
+    endif (GSETTINGS_LOCALINSTALL)
+
+    # Run the validator and error if it fails
+    execute_process (COMMAND ${PKG_CONFIG_EXECUTABLE} gio-2.0 --variable glib_compile_schemas  OUTPUT_VARIABLE _glib_comple_schemas OUTPUT_STRIP_TRAILING_WHITESPACE)
+    execute_process (COMMAND ${_glib_comple_schemas} --dry-run --schema-file=${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} ERROR_VARIABLE _schemas_invalid OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+    if (_schemas_invalid)
+      message (SEND_ERROR "Schema validation error: ${_schemas_invalid}")
+    endif (_schemas_invalid)
+
+    # Actually install and recomple schemas
+    message (STATUS "GSettings schemas will be installed into ${GSETTINGS_DIR}")
+    install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME} DESTINATION ${GSETTINGS_DIR} OPTIONAL)
+
+    if (GSETTINGS_COMPILE)
+        install (CODE "message (STATUS \"Compiling GSettings schemas\")")
+        install (CODE "execute_process (COMMAND ${_glib_comple_schemas} ${GSETTINGS_DIR})")
+    endif ()
+endmacro()

=== added file 'cmake/UseVala.cmake'
--- cmake/UseVala.cmake	1970-01-01 00:00:00 +0000
+++ cmake/UseVala.cmake	2013-10-17 20:40:25 +0000
@@ -0,0 +1,241 @@
+# - Precompilation of Vala/Genie source files into C sources
+# Makes use of the parallel build ability introduced in Vala 0.11. Derived
+# from a similar module by Jakob Westhoff and the original GNU Make rules.
+# Might be a bit oversimplified.
+#
+# This module defines three functions. The first one:
+#
+#   vala_init (id
+#     [DIRECTORY dir]          - Output directory (binary dir by default)
+#     [PACKAGES package...]    - Package dependencies
+#     [OPTIONS option...]      - Extra valac options
+#     [CUSTOM_VAPIS file...])  - Custom vapi files to include in the build
+#     [DEPENDS targets...])    - Extra dependencies for code generation
+#
+# initializes a single precompilation unit using the given arguments.
+# You can put files into it via the following function:
+#
+#   vala_add (id source.vala
+#     [DEPENDS source...])     - Vala/Genie source or .vapi dependencies
+#
+# Finally retrieve paths for generated C files by calling:
+#
+#   vala_finish (id
+#     [SOURCES sources_var]          - Input Vala/Genie sources
+#     [OUTPUTS outputs_var]          - Output C sources
+#     [GENERATE_HEADER id.h          - Generate id.h and id_internal.h
+#       [GENERATE_VAPI id.vapi]      - Generate a vapi file
+#       [GENERATE_SYMBOLS id.def]])  - Generate a list of public symbols
+#
+
+#=============================================================================
+# Copyright Přemysl Janouch 2011
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#     * Redistributions of source code must retain the above copyright
+#       notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above copyright
+#       notice, this list of conditions and the following disclaimer in the
+#       documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE
+# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
+# OF SUCH DAMAGE.
+#=============================================================================
+
+find_package (Vala 0.18 REQUIRED)
+include (CMakeParseArguments)
+
+function (vala_init id)
+	set (_multi_value PACKAGES OPTIONS CUSTOM_VAPIS DEPENDS)
+	cmake_parse_arguments (arg "" "DIRECTORY" "${_multi_value}" ${ARGN})
+
+	if (arg_DIRECTORY)
+		set (directory ${arg_DIRECTORY})
+		if (NOT IS_DIRECTORY ${directory})
+			file (MAKE_DIRECTORY ${directory})
+		endif (NOT IS_DIRECTORY ${directory})
+	else (arg_DIRECTORY)
+		set (directory ${CMAKE_CURRENT_BINARY_DIR})
+	endif (arg_DIRECTORY)
+
+	set (pkg_opts)
+	foreach (pkg ${arg_PACKAGES})
+		list (APPEND pkg_opts "--pkg=${pkg}")
+	endforeach (pkg)
+
+	set (VALA_${id}_DIR "${directory}" PARENT_SCOPE)
+	set (VALA_${id}_ARGS ${pkg_opts} ${arg_OPTIONS}
+		${arg_CUSTOM_VAPIS} PARENT_SCOPE)
+	set (VALA_${id}_DEPENDS ${arg_DEPENDS}
+		PARENT_SCOPE)
+
+	set (VALA_${id}_SOURCES "" PARENT_SCOPE)
+	set (VALA_${id}_OUTPUTS "" PARENT_SCOPE)
+	set (VALA_${id}_FAST_VAPI_FILES "" PARENT_SCOPE)
+	set (VALA_${id}_FAST_VAPI_ARGS "" PARENT_SCOPE)
+endfunction (vala_init)
+
+function (vala_add id file)
+	cmake_parse_arguments (arg "" "" "DEPENDS" ${ARGN})
+
+	if (NOT IS_ABSOLUTE "${file}")
+		set (file "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
+	endif (NOT IS_ABSOLUTE "${file}")
+
+	get_filename_component (output_name "${file}" NAME)
+	get_filename_component (output_base "${file}" NAME_WE)
+	set (output_base "${VALA_${id}_DIR}/${output_base}")
+
+	# XXX: It would be best to have it working without touching the vapi
+	#      but it appears this cannot be done in CMake.
+	add_custom_command (OUTPUT "${output_base}.vapi"
+		COMMAND ${VALA_COMPILER} "${file}" "--fast-vapi=${output_base}.vapi"
+		COMMAND ${CMAKE_COMMAND} -E touch "${output_base}.vapi"
+		DEPENDS "${file}"
+		COMMENT "Generating a fast vapi for ${output_name}" VERBATIM)
+
+	set (vapi_opts)
+	set (vapi_depends)
+	foreach (vapi ${arg_DEPENDS})
+		if (NOT IS_ABSOLUTE "${vapi}")
+			set (vapi "${VALA_${id}_DIR}/${vapi}.vapi")
+		endif (NOT IS_ABSOLUTE "${vapi}")
+
+		list (APPEND vapi_opts "--use-fast-vapi=${vapi}")
+		list (APPEND vapi_depends "${vapi}")
+	endforeach (vapi)
+
+	add_custom_command (OUTPUT "${output_base}.c"
+		COMMAND ${VALA_COMPILER} "${file}" -C ${vapi_opts} ${VALA_${id}_ARGS}
+		COMMAND ${CMAKE_COMMAND} -E touch "${output_base}.c"
+		DEPENDS "${file}" ${vapi_depends} ${VALA_${id}_DEPENDS}
+		WORKING_DIRECTORY "${VALA_${id}_DIR}"
+		COMMENT "Precompiling ${output_name}" VERBATIM)
+
+	set (VALA_${id}_SOURCES ${VALA_${id}_SOURCES}
+		"${file}" PARENT_SCOPE)
+	set (VALA_${id}_OUTPUTS ${VALA_${id}_OUTPUTS}
+		"${output_base}.c" PARENT_SCOPE)
+	set (VALA_${id}_FAST_VAPI_FILES ${VALA_${id}_FAST_VAPI_FILES}
+		"${output_base}.vapi" PARENT_SCOPE)
+	set (VALA_${id}_FAST_VAPI_ARGS ${VALA_${id}_FAST_VAPI_ARGS}
+		"--use-fast-vapi=${output_base}.vapi" PARENT_SCOPE)
+endfunction (vala_add)
+
+function (vala_finish id)
+	set (_one_value SOURCES OUTPUTS
+		GENERATE_VAPI GENERATE_HEADER GENERATE_SYMBOLS)
+	cmake_parse_arguments (arg "" "${_one_value}" "" ${ARGN})
+
+	if (arg_SOURCES)
+		set (${arg_SOURCES} ${VALA_${id}_SOURCES} PARENT_SCOPE)
+	endif (arg_SOURCES)
+
+	if (arg_OUTPUTS)
+		set (${arg_OUTPUTS} ${VALA_${id}_OUTPUTS} PARENT_SCOPE)
+	endif (arg_OUTPUTS)
+
+	set (outputs)
+	set (export_args)
+
+	if (arg_GENERATE_VAPI)
+		if (NOT IS_ABSOLUTE "${arg_GENERATE_VAPI}")
+			set (arg_GENERATE_VAPI
+				"${VALA_${id}_DIR}/${arg_GENERATE_VAPI}")
+		endif (NOT IS_ABSOLUTE "${arg_GENERATE_VAPI}")
+
+		list (APPEND outputs "${arg_GENERATE_VAPI}")
+		list (APPEND export_args "--internal-vapi=${arg_GENERATE_VAPI}")
+
+		if (NOT arg_GENERATE_HEADER)
+			message (FATAL_ERROR "Header generation required for vapi")
+		endif (NOT arg_GENERATE_HEADER)
+	endif (arg_GENERATE_VAPI)
+
+	if (arg_GENERATE_SYMBOLS)
+		if (NOT IS_ABSOLUTE "${arg_GENERATE_SYMBOLS}")
+			set (arg_GENERATE_SYMBOLS
+				"${VALA_${id}_DIR}/${arg_GENERATE_SYMBOLS}")
+		endif (NOT IS_ABSOLUTE "${arg_GENERATE_SYMBOLS}")
+
+		list (APPEND outputs "${arg_GENERATE_SYMBOLS}")
+		list (APPEND export_args "--symbols=${arg_GENERATE_SYMBOLS}")
+
+		if (NOT arg_GENERATE_HEADER)
+			message (FATAL_ERROR "Header generation required for symbols")
+		endif (NOT arg_GENERATE_HEADER)
+	endif (arg_GENERATE_SYMBOLS)
+
+	if (arg_GENERATE_HEADER)
+		if (NOT IS_ABSOLUTE "${arg_GENERATE_HEADER}")
+			set (arg_GENERATE_HEADER
+				"${VALA_${id}_DIR}/${arg_GENERATE_HEADER}")
+		endif (NOT IS_ABSOLUTE "${arg_GENERATE_HEADER}")
+
+		get_filename_component (header_path "${arg_GENERATE_HEADER}" PATH)
+		get_filename_component (header_name "${arg_GENERATE_HEADER}" NAME_WE)
+		set (header_base "${header_path}/${header_name}")
+		get_filename_component (header_ext "${arg_GENERATE_HEADER}" EXT)
+
+		list (APPEND outputs
+			"${header_base}${header_ext}"
+			"${header_base}_internal${header_ext}")
+		list (APPEND export_args
+			"--header=${header_base}${header_ext}"
+			"--internal-header=${header_base}_internal${header_ext}")
+	endif (arg_GENERATE_HEADER)
+
+	if (outputs)
+		add_custom_command (OUTPUT ${outputs}
+			COMMAND ${VALA_COMPILER} -C ${VALA_${id}_ARGS}
+				${export_args} ${VALA_${id}_FAST_VAPI_ARGS}
+			DEPENDS ${VALA_${id}_FAST_VAPI_FILES}
+			COMMENT "Generating vapi/headers/symbols" VERBATIM)
+	endif (outputs)
+endfunction (vala_finish id)
+
+
+function (vapi_gen id)
+	set (_one_value LIBRARY INPUT)
+	set (_multi_value PACKAGES)
+	cmake_parse_arguments (arg "" "${_one_value}" "${_multi_value}" ${ARGN})
+
+	set(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${id}.vapi")
+	if (arg_LIBRARY)
+		set (OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${arg_LIBRARY}.vapi")
+	endif (arg_LIBRARY)
+	
+	set("${id}_OUTPUT" ${OUTPUT} PARENT_SCOPE)
+	
+	set(PACKAGE_LIST)
+	foreach(PACKAGE ${arg_PACKAGES})
+		list(APPEND PACKAGE_LIST "--pkg" ${PACKAGE})
+	endforeach()
+	
+	add_custom_command(
+		OUTPUT
+			${OUTPUT}
+		COMMAND
+			${VAPI_GEN}
+			${PACKAGE_LIST}
+			--library=${arg_LIBRARY}
+			${arg_INPUT}
+		DEPENDS
+			${arg_INPUT}
+		VERBATIM
+	)
+	
+	add_custom_target(${id} ALL DEPENDS ${OUTPUT})
+endfunction (vapi_gen id)
+

=== added file 'config.h.in'
--- config.h.in	1970-01-01 00:00:00 +0000
+++ config.h.in	2013-10-17 20:40:25 +0000
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Pete Woods <pete.woods@xxxxxxxxxxxxx>
+ */
+
+#ifndef INDICATOR_SOUND_CONFIG_H_
+#define INDICATOR_SOUND_CONFIG_H_
+
+#define GETTEXT_PACKAGE "@GETTEXT_PACKAGE@"
+#define GNOMELOCALEDIR "@GNOMELOCALEDIR@"
+
+#endif // INDICATOR_SOUND_CONFIG_H_

=== renamed file 'configure.ac' => 'configure.ac.THIS'
=== added file 'data/CMakeLists.txt'
--- data/CMakeLists.txt	1970-01-01 00:00:00 +0000
+++ data/CMakeLists.txt	2013-10-17 20:40:25 +0000
@@ -0,0 +1,43 @@
+
+include(UseGSettings)
+
+###########################
+# Indicator service
+###########################
+
+set(
+  INDICATOR_DIR
+  "${CMAKE_INSTALL_DATADIR}/unity/indicators"
+  CACHE FILEPATH "Indicator directory"
+)
+
+install(
+  FILES "com.canonical.indicator.sound"
+  DESTINATION "${INDICATOR_DIR}"
+)
+
+###########################
+# Dbus Service
+###########################
+
+set(
+  INDICATOR_SOUND_SERVICE
+  "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound.service"
+)
+
+configure_file(
+  "indicator-sound.service.in"
+  ${INDICATOR_SOUND_SERVICE}
+  @ONLY
+)
+
+install(
+  FILES "${INDICATOR_SOUND_SERVICE}"
+  DESTINATION "${CMAKE_INSTALL_DATADIR}/dbus-1/services/"
+)
+
+###########################
+# GSettings
+###########################
+
+add_schema ("com.canonical.indicator.sound.gschema.xml")

=== removed file 'data/Makefile.am'
--- data/Makefile.am	2010-01-27 13:21:02 +0000
+++ data/Makefile.am	1970-01-01 00:00:00 +0000
@@ -1,42 +0,0 @@
-
-dbus_servicesdir = $(DBUSSERVICEDIR)
-service_in_files =  indicator-sound.service.in 
-dbus_services_DATA = $(service_in_files:.service.in=.service)
-
-%.service: %.service.in
-	sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
-
-##############################
-# GConf Schema
-##############################
-
-schemadir =					\
-	$(GCONF_SCHEMA_FILE_DIR)
-
-schema_in_files =				\
-	indicator-sound.schemas.in
-
-schema_DATA =					\
-	$(schema_in_files:.schemas.in=.schemas)
-
-@INTLTOOL_SCHEMAS_RULE@
-
-
-#$(dbus_services_DATA): $(service_in_files) Makefile
-#	sed -e "s|\@libexecdir\@|$(libexecdir)|" $< > $@
-
-EXTRA_DIST =					\
-	$(service_in_files)			\
-	$(schema_in_files)
-
-CLEANFILES =					\
-	$(dbus_services_DATA)			\
-	$(schema_DATA)
-
-if GCONF_SCHEMAS_INSTALL
-install-data-local:
-	GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \
-		gconftool-2 --makefile-install-rule $(schema_DATA)
-else
-install-data-local:
-endif

=== added file 'data/com.canonical.indicator.sound'
--- data/com.canonical.indicator.sound	1970-01-01 00:00:00 +0000
+++ data/com.canonical.indicator.sound	2013-10-17 20:40:25 +0000
@@ -0,0 +1,13 @@
+[Indicator Service]
+Name=indicator-sound
+ObjectPath=/com/canonical/indicator/sound
+Position=30
+
+[desktop]
+ObjectPath=/com/canonical/indicator/sound/desktop
+
+[phone]
+ObjectPath=/com/canonical/indicator/sound/phone
+
+[desktop_greeter]
+ObjectPath=/com/canonical/indicator/sound/desktop_greeter

=== added file 'data/com.canonical.indicator.sound.gschema.xml'
--- data/com.canonical.indicator.sound.gschema.xml	1970-01-01 00:00:00 +0000
+++ data/com.canonical.indicator.sound.gschema.xml	2013-10-17 20:40:25 +0000
@@ -0,0 +1,52 @@
+<schemalist>
+  <schema id="com.canonical.indicator.sound" path="/com/canonical/indicator/sound/" gettext-domain="indicator-sound">
+    <key name="blacklisted-media-players" type="as">
+      <summary>A list of applications blacklisted from the sound menu</summary>
+      <default>[]</default>
+      <description>
+        Each media player which abides by the MPRIS2 spec will automatically appear in the menu.
+        This array should contain the desktop file names (minus .desktop suffix) of applications which
+        do not want to be included in the sound menu.
+      </description>
+    </key>
+    <key name="interested-media-players" type="as">
+      <summary>A list of applications which at some point have registered with the sound menu</summary>
+      <default>[]</default>
+      <description>
+        Each media player which abides by the MPRIS2 spec will automatically appear in the menu.
+        This array should contain the desktop file names (minus .desktop suffix) of applications which
+        have at some point appeared in the menU. This allows the menu remember and display offlined applications.
+      </description>
+    </key>
+    <key name="preferred-media-players" type="as">
+      <summary>A list of applications that will have player controls visible all the time</summary>
+      <default>[ 'rhythmbox' ]</default>
+      <description>
+        A list of applications that will have player controls visible all the time
+      </description>
+    </key>
+    <key name="global-mute" type="b">
+      <default>false</default>
+      <summary>Initial setting for global mute (mute all) on the menu </summary>
+      <description>
+        On start up volume should not be muted.
+      </description>
+    </key>
+    <key name="show-notify-osd-on-scroll" type="b">
+      <default>true</default>
+      <summary>Initial setting for showing notify-osd notification on scroll volume-change</summary>
+      <description>
+        When using the mouse scroll-wheel over the indicator-sound icon, the volume changes.
+        Enabling this setting, every scroll volume-change a notify-osd bubble with the
+        updated volume value will be shown (if supported by your notification daemon).
+      </description>
+    </key>
+    <key name="visible" type="b">
+      <default>true</default>
+      <summary>Whether or not to show the sound indicator in the menu bar.</summary>
+      <description>
+        Whether or not to show the sound indicator in the menu bar.
+      </description>
+    </key>
+  </schema>
+</schemalist>

=== removed file 'data/indicator-sound.schemas.in'
--- data/indicator-sound.schemas.in	2010-01-27 13:21:02 +0000
+++ data/indicator-sound.schemas.in	1970-01-01 00:00:00 +0000
@@ -1,16 +0,0 @@
-<?xml version="1.0"?>
-<gconfschemafile>
-  <schemalist>
-    <schema>
-      <key>/schemas/apps/indicator-sound/volume_mute</key>
-      <applyto>/apps/indicator-sound/volume_mute</applyto>
-      <owner>indicator-sound</owner>
-      <type>bool</type>
-      <default>FALSE</default>
-      <locale name="C">
-	<short>Volume is not muted by default</short>
-	<long>On start up volume should not be muted.</long>
-      </locale>
-    </schema>
-  </schemalist>
-</gconfschemafile>

=== modified file 'data/indicator-sound.service.in'
--- data/indicator-sound.service.in	2010-01-27 13:21:02 +0000
+++ data/indicator-sound.service.in	2013-10-17 20:40:25 +0000
@@ -1,3 +1,3 @@
 [D-BUS Service]
-Name=org.ayatana.indicator.sound
-Exec=@libexecdir@/indicator-sound-service
+Name=com.canonical.indicator.sound
+Exec=@CMAKE_INSTALL_FULL_LIBEXECDIR@/indicator-sound/indicator-sound-service

=== added directory 'debian'
=== added file 'debian/changelog'
--- debian/changelog	1970-01-01 00:00:00 +0000
+++ debian/changelog	2013-10-17 20:40:25 +0000
@@ -0,0 +1,1140 @@
+indicator-sound (12.10.2+13.10.20131004-0ubuntu1) saucy; urgency=low
+
+  [ Pete Woods ]
+  * Fix translation support dh_translations doesn't perform variable
+    substitution when parsing the CMakeLists.txt file. (LP: #1233679)
+
+  [ Ted Gould ]
+  * Add a desktop_greeter menu without settings.
+
+  [ Lars Uebernickel ]
+  * Reconnect when pulseaudio terminates (or crashes). (LP: #1231942)
+  * Show synchronous notification when changing the volume by scrolling
+    over the indicator. (LP: #1225335)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 387
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Fri, 04 Oct 2013 02:29:38 +0000
+
+indicator-sound (12.10.2+13.10.20130930-0ubuntu1) saucy; urgency=low
+
+  [ Charles Kerr ]
+  * Use url-dispatcher instead of invoking system-settings directly.
+    (LP: #1230819)
+
+  [ Ted Gould ]
+  * Update settings URL to settings:///system. (LP: #1231444)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 382
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Mon, 30 Sep 2013 06:33:10 +0000
+
+indicator-sound (12.10.2+13.10.20130924-0ubuntu1) saucy; urgency=low
+
+  [ Ted Gould ]
+  * Recommending gnome-control-center first.
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 379
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Tue, 24 Sep 2013 22:45:08 +0000
+
+indicator-sound (12.10.2+13.10.20130918-0ubuntu1) saucy; urgency=low
+
+  [ Lars Uebernickel ]
+  * Don't show the "Mute" menu item in the phone profile. (LP: #1220215)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 377
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Wed, 18 Sep 2013 06:24:34 +0000
+
+indicator-sound (12.10.2+13.10.20130913-0ubuntu1) saucy; urgency=low
+
+  [ Lars Uebernickel ]
+  * Fixes bug #1221242 and #1204036 (make scrolling and middle clicking
+    work on the sound indicator) It soft-depends on
+    lp:~larsu/libindicator/ng-add-scrolling. That means, this branch can
+    be merged without problems, as it only adds an action and a few
+    attributes on the root item. The bugs won't be fixed until both
+    branches land, though. Please the other merge request for a
+    description of the new attributes. (LP: #1221242, #1204036)
+  * Update POTFILES.in and mark remaining strings as translatable. (LP:
+    #1223500)
+  * Add "title" to the root action state dictionary . (LP: #1223635)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 375
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Fri, 13 Sep 2013 15:16:35 +0000
+
+indicator-sound (12.10.2+13.10.20130829-0ubuntu1) saucy; urgency=low
+
+  [ Lars Uebernickel ]
+  * Use bus_watch_namespace() for more robust monitoring of mpris
+    players appearing or disappearing on the bus.
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 371
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Thu, 29 Aug 2013 02:08:13 +0000
+
+indicator-sound (12.10.2+13.10.20130822-0ubuntu1) saucy; urgency=low
+
+  [ Charles Kerr ]
+  * Don't use deprecated GSimpleActionGroup APIs.
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 369
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Thu, 22 Aug 2013 20:29:51 +0000
+
+indicator-sound (12.10.2+13.10.20130820-0ubuntu1) saucy; urgency=low
+
+  [ Pete Woods ]
+  * Re-write build scripts using cmake.
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 367
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Tue, 20 Aug 2013 10:08:24 +0000
+
+indicator-sound (12.10.2+13.10.20130812.1-0ubuntu1) saucy; urgency=low
+
+  [ Charles Kerr ]
+  * Add back an accessible_desc property to the sound indicator.
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 365
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Mon, 12 Aug 2013 06:06:47 +0000
+
+indicator-sound (12.10.2+13.10.20130731-0ubuntu1) saucy; urgency=low
+
+  [ Charles Kerr ]
+  * add Recommends: u-s-s | g-c-c to debian/control.
+
+  [ Nick Dedekind ]
+  * Fixed max-icon on volume control slider. (LP: #1206534)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 363
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Wed, 31 Jul 2013 02:02:57 +0000
+
+indicator-sound (12.10.2+13.10.20130726-0ubuntu1) saucy; urgency=low
+
+  [ Lars Uebernickel ]
+  * Actually export a phone menu.
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 360
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Fri, 26 Jul 2013 02:03:50 +0000
+
+indicator-sound (12.10.2+13.10.20130725-0ubuntu1) saucy; urgency=low
+
+  [ Lars Uebernickel ]
+  * Specify fallback icons The *-panel suffix is only used by the
+    ubuntu-mono icon themes. . (LP: #1202932)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 358
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Thu, 25 Jul 2013 02:03:43 +0000
+
+indicator-sound (12.10.2+13.10.20130722-0ubuntu1) saucy; urgency=low
+
+  [ Lars Uebernickel ]
+  * Remove Rhythmbox from the default of the 'interested-media-players'
+    setting The sound menu should only contain players that have been
+    started before. (LP: #1202933)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 356
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Mon, 22 Jul 2013 02:03:34 +0000
+
+indicator-sound (12.10.2+13.10.20130716-0ubuntu1) saucy; urgency=low
+
+  [ Ted Gould ]
+  * Add phone profile to indicator config.
+
+  [ Lars Uebernickel ]
+  * Remove gtk and dbusmenu. Sorry for the big changeset. I'd appreciate
+    a good deal of testing before merging this into the wild ;).
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 354
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Tue, 16 Jul 2013 02:02:55 +0000
+
+indicator-sound (12.10.2daily13.06.07-0ubuntu1) saucy; urgency=low
+
+  [ Jeremy Bicha ]
+  * debian/control:
+    - Build with valac (>= 0.18) instead of vala-0.18 for easier transitions
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 351
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Fri, 07 Jun 2013 02:02:47 +0000
+
+indicator-sound (12.10.2daily13.05.02-0ubuntu1) saucy; urgency=low
+
+  * Automatic snapshot from revision 349
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Thu, 02 May 2013 22:59:34 +0000
+
+indicator-sound (12.10.2daily13.04.12-0ubuntu1) raring; urgency=low
+
+  [ Marco Trevisan (Treviño) ]
+  * Indicator-sound should send the event timestamp when launching a
+    player (LP: #1163434)
+  * Player controls are non-functional in all mpris2 supported players
+    (LP: #1167908)
+  * Window management - Apps raised from indicators sometimes dont have
+    the focus (LP: #627195)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 348
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Fri, 12 Apr 2013 02:03:33 +0000
+
+indicator-sound (12.10.2daily13.04.09-0ubuntu1) raring; urgency=low
+
+  * Automatic snapshot from revision 348
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Tue, 09 Apr 2013 02:02:50 +0000
+
+indicator-sound (12.10.2daily13.04.08-0ubuntu1) raring; urgency=low
+
+  [ Marco Trevisan (Treviño) ]
+  * Indicator-sound should send the event timestamp when launching a
+    player (LP: #1163434)
+  * Window management - Apps raised from indicators sometimes dont have
+    the focus (LP: #627195)
+
+  [ Ubuntu daily release ]
+  * Automatic snapshot from revision 347
+
+ -- Ubuntu daily release <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Mon, 08 Apr 2013 02:03:24 +0000
+
+indicator-sound (12.10.2daily13.03.07-0ubuntu1) raring; urgency=low
+
+  * Automatic snapshot from revision 343
+
+ -- Automatic PS uploader <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Thu, 07 Mar 2013 02:01:27 +0000
+
+indicator-sound (12.10.2daily13.02.25-0ubuntu1) raring; urgency=low
+
+  [ Lars Uebernickel ]
+  * ubuntu-themes don't work with gtk 3.7 (LP: #1130183)
+
+  [ Automatic PS uploader ]
+  * Automatic snapshot from revision 341
+
+ -- Automatic PS uploader <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Mon, 25 Feb 2013 02:02:59 +0000
+
+indicator-sound (12.10.2daily12.11.21.1-0ubuntu1) raring; urgency=low
+
+  [ Mathieu Trudel-Lapierre ]
+  * debian/control:
+    - add gnome-common to Build-Depends for use by dh_autoreconf.
+    - update style for constency: use trailing commas at the end of dep lists.
+    - Add Vcs-Bzr, Vcs-Browser fields with comment for uploaders.
+  * debian/rules:
+    - override dh_autoreconf to use autogen.sh for the reconfiguration process.
+    - add export DPKG_GENSYMBOLS_CHECK_LEVEL=4.
+    - enable quilt with the dh sequencer to make sure patches get applied.
+  * debian/compat: bump to compat level 9.
+  * debian/source/format: migrate back to source format 1.0 for consistency
+    with the rest of the indicator stack.
+  * Automatic snapshot from revision 337 (bootstrap):
+    - Add 'check-news' to AM_INIT_AUTOMAKE. (LP: #1075753)
+    - Remove the determine_key function. (LP: #1064255)
+    - Use the file path directly if it's an absolute path. (LP: #1024705)
+
+  [ Automatic PS uploader ]
+  * Automatic snapshot from revision 339
+
+ -- Automatic PS uploader <ps-jenkins@xxxxxxxxxxxxxxxxxxx>  Wed, 21 Nov 2012 11:47:58 +0000
+
+indicator-sound (12.10.1-0ubuntu2) raring; urgency=low
+
+  [ Allan LeSage ]
+  * debian/control: update to debhelper 9.0
+  * debian/rules: change to debhelper 9.0
+
+  [ Ken VanDine ]
+  * debian/control
+    - build depend on dh-translations
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Tue, 30 Oct 2012 21:34:14 +0000
+
+indicator-sound (12.10.1-0ubuntu1) quantal; urgency=low
+
+  * New upstream release.
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Wed, 03 Oct 2012 21:52:53 +0200
+
+indicator-sound (12.10.0-0ubuntu2) quantal; urgency=low
+
+  * Drop GTK2 build since ido stopped providing support for that version
+  * debian/control: build with the current vala version
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Wed, 22 Aug 2012 12:05:18 +0200
+
+indicator-sound (12.10.0-0ubuntu1) quantal; urgency=low
+
+  * New upstream release.
+    - Allow setting preferred media players through a settings key.
+    - Fix sound indicator not working after Amarok close.
+    - Explicit handling of Ardour
+    - Fix deprecated GTK+ API calls
+  * debian/patches/lp_992262.patch:
+  * debian/patches/lp_902715.patch:
+    - dropped, the fix is in the new version
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 12 Jul 2012 20:07:48 +0200
+
+indicator-sound (0.8.5.0-0ubuntu3) quantal; urgency=low
+
+  * debian/patches/lp_992262.patch
+    - fix sound indicator not working after amarok close (LP: #992262)
+  * debian/patches/lp_902715.patch
+    - Partial fix which sets the accessibility property on the volume
+      slider menu item. Previously this was achieved by sending a signal
+      on the indicator object but now it seems the way to update orca is
+      to set/update the appropriate property on the menuitem.  Orca doesn't
+      broadcast volume updates on slider movement but at least it updates
+      when the user moves to the item on the menu, previously it was entirely
+      silent. (LP: #902715)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 03 May 2012 16:07:19 -0700
+
+indicator-sound (0.8.5.0-0ubuntu2) precise; urgency=low
+
+  * debian/patches:
+    - sound_ubuntustudio.patch: added to prefer pavucontrol as the
+      mixer app in Ubuntu Studio. (LP: #972749)
+
+ -- Janne Jokitalo (astraljava) <astraljava@xxxxxxxx>  Sun, 01 Apr 2012 21:45:34 +0300
+
+indicator-sound (0.8.5.0-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+    - Inconsistency between messaging menu and sound menu pips (LP: #933593)
+    - indicator-sound-service crashed with SIGSEGV in 
+      fast_validate() (LP: #949837)
+    - free-memory-read crash in indicator-sound-service's file 
+      monitoring (LP: #965848)
+    - minor memory leaks in blacklist handling (LP: #960578)
+    - FIX (LP: FIX)
+  * -debian/patches/lp_945827.patch, debian/patches/lp_960846.patch
+     - dropped, merged upstream
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 30 Mar 2012 14:45:03 -0400
+
+indicator-sound (0.8.4.1-0ubuntu4) precise; urgency=low
+
+  * debian/patches:
+    - sound_xubuntu.patch: added, prefer pavucontrol over xfce4-mixer on
+      Xubuntu. (lp: #961745)
+
+ -- Lionel Le Folgoc <mrpouit@xxxxxxxxxx>  Thu, 22 Mar 2012 00:17:34 +0100
+
+indicator-sound (0.8.4.1-0ubuntu3) precise; urgency=low
+
+  * debian/patches/lp_960846.patch
+    - check that the active playlists container is not null (LP: #960846)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 21 Mar 2012 11:00:15 -0400
+
+indicator-sound (0.8.4.1-0ubuntu2) precise; urgency=low
+
+  * debian/patches/lp_945827.patch
+    - fix for a playlist crasher (LP: #945827)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Tue, 20 Mar 2012 16:40:24 -0400
+
+indicator-sound (0.8.4.1-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+    - fix i18n of indicator-sound's accessible description (LP: #957517)
+    - don't abort isound via g_error() if it can't connect to the 
+      bus (LP: #953111)
+  * debian/patches/sound_nua.patch
+    - don't try to free a static string (LP: #957387)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Mon, 19 Mar 2012 11:22:00 -0400
+
+indicator-sound (0.8.4.0-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+    - indicator-sound "Choose Playlist" menu item does nothing when using 
+      Rhythmbox (LP: #952550)
+    - crashed with SIGSEGV in g_strdup() (LP: #946607)
+    - crashed with SIGABRT in pa_operation_unref() (LP: #944148)
+    - crashed with signal 5 in g_type_create_instance() (LP: #921755)
+    - slider on unmute resets volume (LP: #921065)
+    - play controls not exposed in HUD (LP: #949032)
+    - unity-panel-service at 100% cpu when opened /w rb without album 
+      cover (LP: #806848)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 16 Mar 2012 14:04:30 -0400
+
+indicator-sound (0.8.3.0-0ubuntu2) precise; urgency=low
+
+  * debian/patches/sound_nua.patch
+    - Sound Settings link doesn't work in GNOME Classic (LP: #941704)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 16 Mar 2012 13:39:03 -0400
+
+indicator-sound (0.8.3.0-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+    - Fixed memory corruption issue (LP: #897218)
+    - crashed with SIGABRT in pa_operation_unref (LP: #908682)
+    - Banshee shown in sound menu after removal until reboot (LP: #771202)
+    - Coverity PASS_BY_VALUE - CID 10620 (LP: #937451)
+    - App icon and name are not aligned (LP: #939929)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 02 Mar 2012 11:26:41 -0500
+
+indicator-sound (0.8.2.0-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+    - crashed with SIGABRT in pa_cvolume_set (LP: #900117)
+    - Mouse on coverart flushes the sound menu (LP: #927733)
+    - album artwork misaligned and not visible (LP: #933359)
+    - unity-panel-service crashed with SIGSEGV in 
+      transport_widget_is_selected (LP: #882109)
+  * -debian/patches/correct_ldflags_use.patch
+    - fixed upstream
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 22 Feb 2012 16:41:12 -0500
+
+indicator-sound (0.8.1.0-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+    - No easy way to turn the sound menu on/off (lp: #829648)
+    - Avoid spawning notification daemon at startup (lp: #912150)
+    - Creation of album-art-cache folder (lp: #799383)
+    - schema id & path are inconsistent with other indicators (lp: #914377)
+  * debian/patches/correct_ldflags_use.patch:
+    - typo fix in ldflags use
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Tue, 14 Feb 2012 19:46:41 +0100
+
+indicator-sound (0.8.0.0-0ubuntu4) precise; urgency=low
+
+  * debian/patches/sound_nua.patch
+    - open the new sound-nua panel in gnome-control-center 
+  * debian/patches/dbusmenu_05_90.patch
+    - fixed FTBFS with dbusmenu 0.5.90
+  * debian/control
+    - bump build depends for dbusmenu to >= 0.5.90
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 09 Feb 2012 16:49:15 -0500
+
+indicator-sound (0.8.0.0-0ubuntu3) precise; urgency=low
+
+  * rebuild for libindicator7
+  * debian/rules
+    - build with no-error=deprecated-declarations 
+  * -debian/patches/disable_Werror.patch
+    - disabled in debian/rules instead
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 25 Jan 2012 10:00:00 -0500
+
+indicator-sound (0.8.0.0-0ubuntu2) precise; urgency=low
+
+  * Add lazy_init.patch: Avoid spawning notification daemon right at startup,
+    instead initialize it lazily when actually doing a notification. Improves
+    boot speed. (LP: #912150)
+  * Add disable_Werror.patch: Build without -Werror, to avoid build failure
+    due to deprecated declarations. (LP: #912160)
+
+ -- Martin Pitt <martin.pitt@xxxxxxxxxx>  Thu, 05 Jan 2012 09:29:36 +0100
+
+indicator-sound (0.8.0.0-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+  * debian/control
+    - removed build depends for libgconf2-dev
+  * debian/patches/fix-864405.patch
+    - dropped, merged upstream
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 01 Dec 2011 14:33:34 -0500
+
+indicator-sound (0.7.9.1-0ubuntu2) precise; urgency=low
+
+  * debian/patches/fix-864405.patch:
+    - Clicking on left 25% of "Pause/Play" circle clicks "Previous".
+      (LP: #864405)
+
+ -- Omer Akram <om26er@xxxxxxxxxx>  Mon, 28 Nov 2011 23:03:20 +0500
+
+indicator-sound (0.7.9.1-0ubuntu1) precise; urgency=low
+
+  * New upstream release.
+    - indicator-sound-service crashed with SIGABRT in raise() (LP: #840986)
+    - don't let the menu grow wide enough to push off the screen (LP: #873006)
+    - bump the limit for number of playlists to 20 (LP: #835384)
+    - indicator-sound-service crashed with SIGSEGV (LP: #864732)
+    - Music player icon is not top-aligned (LP: #874454)
+  * debian/control
+    - build with valac-0.14
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 28 Oct 2011 09:45:22 -0400
+
+indicator-sound (0.7.9-0ubuntu1) oneiric-proposed; urgency=low
+
+  * New upstream release.
+    - Protect against source indexes that are lower than 0 (LP: #850662)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 13 Oct 2011 13:53:21 -0400
+
+indicator-sound (0.7.8-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - indicator-sound interferes with gnome-settings-daemon (LP: #855557)
+  * debian/patches/01_fix_FTBFS.patch
+    - Dropped, fixed upstream
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 28 Sep 2011 14:34:38 -0400
+
+indicator-sound (0.7.7.0-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release
+  * add 01_fix_FTBFS.patch for needed -lm link
+
+ -- Didier Roche <didrocks@xxxxxxxxxx>  Tue, 13 Sep 2011 10:20:29 +0200
+
+indicator-sound (0.7.6.1-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - theming fix for the spinner
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 24 Aug 2011 16:09:29 -0400
+
+indicator-sound (0.7.6-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - mute action crashes the panel (LP: #828114)
+    - Clicking music player does not dismiss the menu  (LP: #818293)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 18 Aug 2011 14:19:06 -0400
+
+indicator-sound (0.7.5-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - Don't allow starting programs via the greeter indicators (LP: #811853)
+    - support libunity's Track and Player specific items (LP: #824050)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 10 Aug 2011 12:51:49 -0400
+
+indicator-sound (0.7.4.1-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - menu resizes on reopen   (LP: #809275)
+    - pulse indication of SoundMenu play button not strong 
+      enough (LP: #742251)
+  * debian/rules
+    - Moved autoreconf to the top
+  * New upstream release.
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 29 Jul 2011 13:21:41 -0400
+
+indicator-sound (0.7.3-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - libindicator scroll signals (LP: #804618)
+    - metadatawidget collapse (LP: #806439)
+  * debian/control
+    - Bumped build depends for libindicator to 0.3.90
+  * debian/patches/gtk3_define.patch
+    - dropped
+  * configure.ac
+    - Fixup pkgconfig check for libindicator-0.4
+  * debian/rules
+    - Added autoreconf.mk
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 07 Jul 2011 15:37:27 -0400
+
+indicator-sound (0.7.2-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - "Sound Preferences..." should be "Sound Settings" (LP: #785571)
+    - Not obvious what track info menu item does (LP: #699899)
+  * debian/patches/lp_750823.patch
+    - Dropped patch, merged upstream
+  * debian/patches/gtk3_define.patch
+    - Wrap another gtk3 block in an ifdef
+  * debian/control
+    - Updated standards version to 3.9.2
+    - Cleaned up description to quiet lintian
+    - Added quilt build dep
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Tue, 28 Jun 2011 10:51:51 -0400
+
+indicator-sound (0.7.0-0ubuntu1) oneiric; urgency=low
+
+  * New upstream release.
+    - Displayed cover don't keep the original ratio (LP: #654196)
+    - show record level control PULSE_PROP_media.role=production (LP: #736049)
+    - Volume notification is based on previous volume; should be based on 
+      the new volume (LP: #748831)
+    - [gnome3] Sound Preferences link doesn't work (LP: #759390)
+  * debian/patches/lp_759390.patch
+    - dropped, merged upstream
+  * debian/control
+    - renamed the libnotify4-dev build depends to libnotify-dev
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 19 May 2011 15:38:19 -0400
+
+indicator-sound (0.6.6.1-0ubuntu3) natty; urgency=low
+
+  * debian/patches/lp_750823.patch
+    - Place timeout in the mpris controller to accommodate flaky mpris dbus 
+      behaviour, it can be seen sometimes that the players emit a property 
+      changed on the metadata property but the actual value of the property 
+      which the service then tries to use is the old value (LP: #750823)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Mon, 18 Apr 2011 15:08:13 -0400
+
+indicator-sound (0.6.6.1-0ubuntu2) natty; urgency=low
+
+  * debian/patches/lp_759390.patch
+    - Sound Preferences link doesn't work in gnome3 (LP: #759390)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 15 Apr 2011 17:12:32 -0400
+
+indicator-sound (0.6.6.1-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Fix crash with SIGABRT (LP: #738051) (LP: #744304)
+    - ensure that if the service crashes the indicator will not show 
+      multiple sliders
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Mon, 04 Apr 2011 10:02:19 -0400
+
+indicator-sound (0.6.5.1-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Don't change the banshee id yet, that will change in 0.9.6 
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 23 Mar 2011 13:46:06 -0400
+
+indicator-sound (0.6.5-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Media player should be automatically started up when play button is 
+      pressed (LP: #714750)
+    - volume goes to zero when using some players like banshee or 
+      rhythmbox (LP: #730925)
+    - handle banshee id change (LP: #737447)
+    - filter out video playlists (LP: #739273)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 23 Mar 2011 12:03:02 -0400
+
+indicator-sound (0.6.4-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Harmonize mute behaviour of both VOIP and volume slider (LP: #731870)
+    - keyboard handling for voip slider not working (LP: #732500)
+    - "Choose Playlist" needs to be marked for translation (LP: #736372)
+    - show record level control on PULSE_PROP_media.role=production 
+      (LP: #736049)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 17 Mar 2011 14:08:17 -0400
+
+indicator-sound (0.6.3-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Broken images on playlist items (LP: #727325)
+    - wrong icon for audio-input slider (LP: #723254)
+    - blacklist dbus api lacks query functionality (LP: #730526)
+    - volume goes to zero when using some players like banshee, 
+      rhythmbox (LP: #730925)
+    - holding the FW or RW button should have an effect (LP: #694258)
+    - With new notify-osd the volume notification on scroll doesn't work as 
+      expected (LP: #729849)
+  * debian/control
+    - Bumped build depends for dbusmenu to >= 0.3.101
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 11 Mar 2011 12:47:26 -0500
+
+indicator-sound (0.6.2-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Fixed crashed with SIGSEGV in pa_context_connect() (LP: #717453)
+    - Fixed crashed with SIGSEGV in pa_pdispatch_run() (LP: #723096)
+    - Fixed crashed with SIGSEGV (LP: #723096)
+    - Fixed crashed with SIGSEGV  (LP: #717557)
+    - Fixed crashed with SIGSEGV in g_variant_builder_add_value() 
+      (LP: #717999)
+    - Sound Menu Play lists show Favorites item twice in menu and icons for 
+      all playlists not found (LP: #728263)
+    - Players are raised too quickly (LP: #723278)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 04 Mar 2011 13:07:40 -0500
+
+indicator-sound (0.6.1-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Icon-only menu titles don't have accessible names (LP: #691677)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 24 Feb 2011 11:19:57 -0500
+
+indicator-sound (0.6.0-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - New voip slider will be displayed in the sound menu while in a call
+    - [Conexant CX20561(Hermosa)] No indicator that input is muted (LP: #683689)
+    - Ctrl+arrow jumps sound to max volume in indicator (LP: #669167)
+    - Fixed build with latest dbusmenu (LP: #717340)
+    - Ported to libnotify >= 0.7.0
+  * debian/control
+    - Changed build depends for libnotify-dev to libnotify4-dev
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 18 Feb 2011 13:20:44 -0500
+
+indicator-sound (0.5.9-0ubuntu2) natty; urgency=low
+
+  * debian/control
+    - bump build depends for libindicator-dev to >= 0.3.19
+    - bump build depends for libdbusmenu-glib-dev to >= 0.3.97
+    - added build depends on dh-autoreconf
+  * src/Makefile.am
+    - Hand Dbusmenu-Glib-0.4 rename to Dbusmenu-0.4
+  * debian/rules
+    - include autoreconf.mk to handle the Dbusmenu rename
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 17 Feb 2011 15:21:33 -0500
+
+indicator-sound (0.5.9-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - crashed with SIGSEGV in pa_cvolume_valid () (LP: #705009)
+    - The players list should be customizable (LP: #685725)
+    - Allow players to set their own title (LP: #709367)
+    - refactor pulse manager (LP: #709371)
+    - listen for playlist changed signal (LP: #715277)
+    - playlist name not updated corrrectly (LP: #715694)
+    - Not enough feedback when changing the volume (LP: #669163)
+    - indicator-sound volume does not detect sink change (LP: #700361)
+  * debian/control
+    - Added new build depends libnotify-dev
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 10 Feb 2011 11:52:59 -0500
+
+indicator-sound (0.5.8-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Media buttons inconsistent with system-wide button behavior (LP: #651006)
+    - update to deal with dbusmenu api chages (LP: #709181)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 28 Jan 2011 09:28:10 -0500
+
+indicator-sound (0.5.7-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Music control buttons flicker (LP: #684755)
+    - Sound Menu should re-read playlists from MPRIS apps when 
+      PropertiesChanged is postec (LP: #707042)
+    - Spotify crashes the service (LP: #707367)
+    - Refactor service dbus code plus state handling (LP: #708793)
+    - changing the volume is impossible while muted (LP: #558784)
+    - Banshee icon changes to coloured icon once in use (LP: #692648)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 27 Jan 2011 15:57:41 -0500
+
+indicator-sound (0.5.6-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Port the sound indicator to the new dbusmenu (LP: #701145)
+  * debian/control
+    - Bumped build depends for dbusmenu to >= 0.3.91
+    - Dropped unneeded build depends for libindicate-dev and dh-autoreconf
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 14 Jan 2011 10:53:50 -0600
+
+indicator-sound (0.5.5-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - unity-panel-service crashed with SIGSEGV in cairo_translate (LP: #683184)
+    - Add MPRIS Playlist support (LP: #692644)
+    - only first word of application name is shown (LP: #695385)
+    - The players list should be customizable (LP: #685725)
+    - gio-unix-2.0 checks (LP: #694828)
+    - Desktop file loading should not manually use full path (LP: #693824)
+    - Banshee mpris interface crashes (LP: #701692)
+  * debian/control
+    - Added build depends for libxml2-dev
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Tue, 11 Jan 2011 16:44:40 -0600
+
+indicator-sound (0.5.3-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Libindicate removed from registration process (LP: #691189)
+    - Vala code now using Gdbus exclusively for mpris interaction 
+    - Fixed memory leak with album art resizing (LP: #689686)
+    - Gconf removed and Gsettings schema added (LP: #656405)
+    - registration process now uses gsettings 
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 16 Dec 2010 15:03:15 -0500
+
+indicator-sound (0.5.2-0ubuntu2) natty; urgency=low
+
+  * debian/control
+    - Bump build depends for libdbusmenu-* to >= 0.3.90
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 09 Dec 2010 11:44:02 -0500
+
+indicator-sound (0.5.2-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - updated to accommodate vala 0.10 to vala 0.12 api changes
+    - grey scale icon for default music player
+    - button and key handling improvements
+  * debian/control
+    - Changed build depends from valac-0.10 to valac, it builds now with 
+      the 0.12 series
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 18 Nov 2010 11:13:32 -0500
+
+indicator-sound (0.5.1-0ubuntu1) natty; urgency=low
+
+  * New upstream release.
+    - Includes a lot of Design updates collected at UDS.
+      * album art border, now rectangular with a simple top and bottom 1 pixel 
+        border. top dark and bottom light.
+      * Empty album art image now has darker background rather than same 
+        colour as menu background
+      * Application icon now uses application image as opposed to generic 
+        image used in maverick
+      * Banshee is now the default player.
+      * spacing between metadata and transport widget has been resolved plus 
+        the spacing between the transport and the separator below it.
+  * debian/control
+    - Bump standards version to 3.9.1
+    - Changed build depends to valac-0.10, until it is ported to valac-0.12
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 12 Nov 2010 10:14:49 -0500
+
+indicator-sound (0.5.0.1-0ubuntu1) maverick-proposed; urgency=low
+
+  * New upstream release.
+    - Fixed a regression, which would show the metadata widget when the
+      player has no current track (LP: #674016)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 12 Nov 2010 09:40:47 -0500
+
+indicator-sound (0.5.0-0ubuntu1) maverick-proposed; urgency=low
+
+  * New upstream release.
+    - Buttons' hover image stays after dragging (LP: #643395)
+    - Sound indicator works incorrect with playing status (LP: #656947)
+    - sound applet volume slider has no effect if pulseaudio is 
+      restarted (LP: #662296)
+    - Default music player should be present in the menu from a clean 
+      install (LP: #664743)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 04 Nov 2010 17:03:08 -0400
+
+indicator-sound (0.4.9-0ubuntu1) maverick-proposed; urgency=low
+
+  * New upstream release.
+    - fixes tranlation mpris name regression (LP: #654140)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 14 Oct 2010 10:40:13 -0400
+
+indicator-sound (0.4.8-0ubuntu1) maverick-proposed; urgency=low
+
+  * New upstream release.
+    - indicator-sound-service eating CPU on second user login (LP: #581173)
+    - Right border of transport control is different colour while using 
+      Ambiance (LP: #632774)
+    - Incorrect ellipsing (LP: #637580)
+    - always show unmuted at startup (LP: #648238)
+    - click or enter on metadata widget does not copy contents to 
+      clipboard (LP: #651246)
+    - Sound menu has two Rhythmbox elements when using 
+      translations (LP: #654140)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 07 Oct 2010 10:08:19 -0400
+
+indicator-sound (0.4.7-0ubuntu2) maverick; urgency=low
+
+  * Rebuild for libindicator ABI change (LP: #637692)
+  * debian/control: depends on latest libindicator-dev 
+
+ -- Didier Roche <didrocks@xxxxxxxxxx>  Wed, 22 Sep 2010 18:40:25 +0200
+
+indicator-sound (0.4.7-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+    - Media Buttons should trigger action only on button release (LP: #624610)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 15 Sep 2010 18:02:13 -0400
+
+indicator-sound (0.4.6-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+    - indicator crashes in the event of the service crashing (LP: #638891)
+    - metadata widget should remain hidden if there is no track 
+      data (LP: #637031)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Wed, 15 Sep 2010 08:47:49 -0400
+
+indicator-sound (0.4.5-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+    - service crashes on last fm playback with rb (LP: #633654)
+    - sound_icon for indicator-sound missing for ubuntu-light (LP: #628896)
+    - indicator-sound-service crashed with signal 5 in dbusmenu_menuitem_handle_event() (LP: #633897)
+    - mpris2 playback status behaving as if it were static (LP: #631893)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Tue, 14 Sep 2010 15:13:50 -0400
+
+indicator-sound (0.4.4-0ubuntu1) maverick; urgency=low
+
+  * New upstream release, fix crash in gtk_range_get_value() (lp: #615277)
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Fri, 10 Sep 2010 17:49:49 +0200
+
+indicator-sound (0.4.3-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Wed, 08 Sep 2010 17:53:33 +0200
+
+indicator-sound (0.4.2-0ubuntu1) maverick; urgency=low
+
+  * New upstream release fixing those issues
+    - Media Buttons should trigger action only on button release (lp: #624610)
+    - Mouse wheel no longer works to change volume (lp: #620858)
+    - Crashes if Rhythmbox is playing from Last.FM (lp: #627505)
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Wed, 08 Sep 2010 12:32:24 +0200
+
+indicator-sound (0.4.1-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 26 Aug 2010 11:38:07 +0200
+
+indicator-sound (0.4.0-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Wed, 18 Aug 2010 15:51:03 +0200
+
+indicator-sound (0.3.9-0ubuntu2) maverick; urgency=low
+
+  * Backport upstream commit to fix the indicator crashing when rhythmbox starts
+    (lp: #612299) 
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Mon, 02 Aug 2010 12:08:57 +0200
+
+indicator-sound (0.3.9-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+    - Scrub bar should now work properly.
+    - Spacing between all UI widgets should be fixed.
+    - Playlist menuitem in place (for now this is just a mock up item, will 
+      complete once there is a client with which I can test against)
+    - Transport bar has been visually tweaked.
+  * debian/control
+    - build depend on libido-0.1-dev (>= 0.1.11)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 29 Jul 2010 11:26:41 -0400
+
+indicator-sound (0.3.8-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+  * debian/control:
+    - update ido requirement
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 22 Jul 2010 21:12:10 +0200
+
+indicator-sound (0.3.6-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Mon, 12 Jul 2010 17:45:06 +0200
+
+indicator-sound (0.3.5-0ubuntu1) maverick; urgency=low
+
+  * New upstream release:
+    -New transport widget integrated
+    -New title widget integrated which allows the user 
+     to launch familiar app directly from the menu
+    - UI tidied
+    - Each player that registers with the menu will be stored in the 
+      cache file allowing the menu to show the application even if it has 
+      not been launched.
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 08 Jul 2010 19:32:29 +0200
+
+indicator-sound (0.3.4-0ubuntu1) maverick; urgency=low
+
+  * New upstream version:
+    - Album art now positioned correctly
+    - Track title, artist name and album name now the correct size, 
+      weight and position
+    - Text truncated with an ellipsis if it is over the an estimated acceptable 
+      width (no guidance given by design).
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Mon, 28 Jun 2010 17:20:03 +0200
+
+indicator-sound (0.3.3-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+    - Fixes menu flicker when playing a song with artwork 
+      displayed (LP: #598438)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Fri, 25 Jun 2010 11:19:15 -0400
+
+indicator-sound (0.3.2-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+    - MPRIS transport status updates reflecting in UI
+      If externally a registered player transport is changed (play/stop) 
+      the menu should reflect that
+    - The first time a player registers its desktop file path should be 
+      stored ~.cache/indicators/sound/familiar-players-db.keyfile (provided 
+      the application indicator has a desktop file set.
+    - Album art dynamically updated
+    - Album title dynamically updated
+    - Track title dynamically updated
+    - Artist name dynamically updated
+    - Play/pause transport control should be working from the menu
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 24 Jun 2010 13:55:01 -0400
+
+indicator-sound (0.3.1-0ubuntu1) maverick; urgency=low
+
+  * New upstream release.
+  * debian/control
+    - bumped build-dep version of libdbusmenu-glib-dev to (>= 0.3.1)
+    - Added build-dep for libindicate-dev (>= 0.4.1)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 17 Jun 2010 16:50:31 -0400
+
+indicator-sound (0.2.3-0ubuntu1) lucid-proposed; urgency=low
+
+  * New upstream version:
+    - "Changing left/right balance in sound-preferences changes the output 
+       volume slider when indicator-applet is running" (lp: #532095)
+    - update the mute animation on theme changes (lp: #568586)
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 29 Apr 2010 11:53:37 +0200
+
+indicator-sound (0.2.2-0ubuntu1) lucid; urgency=low
+
+  * New upstream version
+    - Animation for mute-blocking state greatly improved
+    - Handles sink removal far better
+    - improves scrolling action icon on panel
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Wed, 31 Mar 2010 18:12:47 +0200
+
+indicator-sound (0.2.2-0ubuntu1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Wed, 31 Mar 2010 17:49:12 +0200
+
+indicator-sound (0.2.1-0ubuntu1) lucid; urgency=low
+
+  * New upstream release.
+    - can't change audio using mouse wheel (LP: #521046)
+
+ -- Ken VanDine <ken.vandine@xxxxxxxxxxxxx>  Thu, 18 Mar 2010 15:07:24 -0400
+
+indicator-sound (0.1.3.1-0ubuntu2) lucid; urgency=low
+
+  * Backport upstream changes to fix those issues:
+    - "Wrong i18n for menu entries", thank Luca Ferretti (lp: #538704)
+    - "display a mute icon until volume is changed since update" (lp: #537977)
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Mon, 15 Mar 2010 15:51:35 +0100
+
+indicator-sound (0.1.3.1-0ubuntu1) lucid; urgency=low
+
+  * New upstream version:
+    - clear looks seg fault fix (lp: #537891)
+    - slider resizing properly (lp: #533208)
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Fri, 12 Mar 2010 20:29:25 +0100
+
+indicator-sound (0.1.3-0ubuntu1) lucid; urgency=low
+
+  * New upstream version:
+    - icon sizing fixed.
+    - correct icon names loaded with fallback mechanism
+    - no sink handling improved - now handles going from no sink to one sink 
+      back to no sink properly
+    - Mute blocking state implemented with animation on title image.
+    - smoother sliding due new signals emitted from the 0.1.4 of ido
+  * debian/control:
+    - updated libindicator requirement
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 11 Mar 2010 18:53:58 +0100
+
+indicator-sound (0.1.2-0ubuntu1) lucid; urgency=low
+
+  * New upstream version:
+    - Stability of the service should now be much improved. The backend sound 
+      service should now be able to handle Pulseaudio not being up or flapping.
+      (lp: #529324)
+    - Arrow keys should be working properly allowing users to move between 
+      indicators. (lp: #525733)
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 04 Mar 2010 13:32:10 +0100
+
+indicator-sound (0.1.1-0ubuntu2) lucid; urgency=low
+
+  * Backporting trunk commit to fix keyboard controls (lp: #521088)
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 18 Feb 2010 19:13:03 +0100
+
+indicator-sound (0.1.1-0ubuntu1) lucid; urgency=low
+
+  * New upstream version
+    - resolve the UI keyboard controls which were lacking (lp: #521088)
+    - the volume control should now be far smoother
+    - included is the ability to dynamically swap output devices 
+      using gnome volume control
+    - use of new icons from the new humanity theme.
+    - update volume slider in the right direction on mouse scroll (lp: #521090)
+  * debian/control:
+    - updated ido requirement
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Thu, 18 Feb 2010 17:46:11 +0100
+
+indicator-sound (0.1.0-0ubuntu2) lucid; urgency=low
+
+  * Backport trunk change to fix audiosink detection and volume controls 
+    not working for some users (lp: #521286, #521930)  
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Mon, 15 Feb 2010 16:44:01 +0100
+
+indicator-sound (0.1.0-0ubuntu1) lucid; urgency=low
+
+  * debian/control:
+    - depends on pulseaudio
+    - don't set lib section, the applet is not a library
+  * debian/rules:
+    - build using --as-needed to avoid unnecessary depends
+        
+  [ Ken VanDine ]
+  * Initial release
+
+ -- Sebastien Bacher <seb128@xxxxxxxxxx>  Fri, 12 Feb 2010 11:13:22 +0100

=== added file 'debian/compat'
--- debian/compat	1970-01-01 00:00:00 +0000
+++ debian/compat	2013-10-17 20:40:25 +0000
@@ -0,0 +1,1 @@
+9

=== added file 'debian/control'
--- debian/control	1970-01-01 00:00:00 +0000
+++ debian/control	2013-10-17 20:40:25 +0000
@@ -0,0 +1,36 @@
+Source: indicator-sound
+Section: sound
+Priority: extra
+Maintainer: Ubuntu Desktop Team <ubuntu-desktop@xxxxxxxxxxxxxxxx>
+XSBC-Original-Maintainer: Conor Curran <conor.curran@xxxxxxxxxxxxx>
+Build-Depends: debhelper (>= 9.0),
+               cmake,
+               dh-translations,
+               gnome-common,
+               autotools-dev,
+               valac (>= 0.18),
+               libglib2.0-dev (>= 2.22.3),
+               liburl-dispatcher1-dev,
+               libpulse-dev (>= 0.9.18),
+               libpulse-mainloop-glib0 (>= 0.9.18),
+               libnotify-dev,
+               libgee-dev,
+               libxml2-dev,
+Standards-Version: 3.9.4
+Homepage: https://launchpad.net/indicator-sound
+# If you aren't a member of ~indicator-applet-developers but need to upload
+# packaging changes, just go ahead.  ~indicator-applet-developers will notice
+# and sync up the code again.
+Vcs-Bzr: https://code.launchpad.net/~indicator-applet-developers/indicator-sound/trunk.13.04
+Vcs-Browser: https://bazaar.launchpad.net/~indicator-applet-developers/indicator-sound/trunk.13.04/files
+
+Package: indicator-sound
+Architecture: any
+Depends: ${shlibs:Depends},
+         ${misc:Depends},
+         pulseaudio,
+Recommends: gnome-control-center | ubuntu-system-settings,
+Description: System sound indicator.
+ System sound indicator which provides easy control of the PulseAudio sound 
+ daemon.
+

=== added file 'debian/copyright'
--- debian/copyright	1970-01-01 00:00:00 +0000
+++ debian/copyright	2013-10-17 20:40:25 +0000
@@ -0,0 +1,37 @@
+This package was debianized by:
+
+    Conor Curran <conor.curran@xxxxxxxxxxxxx> on Fri, 22 Jan 2010 11:36:32 +0000
+
+It was downloaded from:
+
+    https://launchpad.net/indicator-sound
+
+Upstream Author(s):
+
+    Conor Curran <conor.curran@xxxxxxxxxxxxx>
+
+Copyright:
+
+    Copyright (C) 2010 Canonical Ltd
+
+License:
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, version 3 of the License.
+
+    This package is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+The Debian packaging is:
+
+    Copyright (C) 2010 Conor Curran <conor.curran@xxxxxxxxxxxxx>
+
+On Debian systems, the complete text of the GNU General
+Public License version 3 can be found in `/usr/share/common-licenses/GPL-3'.

=== added file 'debian/rules'
--- debian/rules	1970-01-01 00:00:00 +0000
+++ debian/rules	2013-10-17 20:40:25 +0000
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+export DPKG_GENSYMBOLS_CHECK_LEVEL=4
+
+%:
+	dh $@ --parallel --fail-missing --with translations
+

=== added directory 'debian/source'
=== added file 'debian/source/format'
--- debian/source/format	1970-01-01 00:00:00 +0000
+++ debian/source/format	2013-10-17 20:40:25 +0000
@@ -0,0 +1,1 @@
+1.0

=== added file 'debian/watch'
--- debian/watch	1970-01-01 00:00:00 +0000
+++ debian/watch	2013-10-17 20:40:25 +0000
@@ -0,0 +1,2 @@
+version=3
+https://launchpad.net/indicator-sound/+download .*/indicator-sound-([0-9.]+)\.tar\.gz

=== modified file 'po/POTFILES.in'
--- po/POTFILES.in	2010-03-15 13:29:31 +0000
+++ po/POTFILES.in	2013-10-17 20:40:25 +0000
@@ -1,3 +1,3 @@
 [encoding: UTF-8]
-data/indicator-sound.schemas.in
-src/dbus-menu-manager.c
+src/service.vala
+src/sound-menu.vala

=== added file 'src/CMakeLists.txt'
--- src/CMakeLists.txt	1970-01-01 00:00:00 +0000
+++ src/CMakeLists.txt	2013-10-17 20:40:25 +0000
@@ -0,0 +1,125 @@
+
+###########################
+# Vala Generation
+###########################
+
+set(HEADER_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.h")
+set(SYMBOLS_PATH "${CMAKE_CURRENT_BINARY_DIR}/indicator-sound-service.def")
+
+vala_init(indicator-sound-service
+  PACKAGES
+    config
+    gio-2.0
+    gio-unix-2.0
+    libxml-2.0
+    libpulse
+    libpulse-mainloop-glib
+    libnotify
+  OPTIONS
+    --ccode
+    --thread
+    --vapidir=${CMAKE_SOURCE_DIR}/vapi/
+    --vapidir=.
+    --target-glib=2.36
+    --pkg=url-dispatcher
+    --pkg=bus-watcher
+)
+
+vala_add(indicator-sound-service
+  service.vala
+  DEPENDS
+    sound-menu
+    volume-control
+    media-player
+    media-player-list
+)
+vala_add(indicator-sound-service
+  main.vala
+  DEPENDS
+    service
+)
+vala_add(indicator-sound-service
+  volume-control.vala
+)
+vala_add(indicator-sound-service
+  media-player.vala
+  DEPENDS
+    mpris2-interfaces
+)
+vala_add(indicator-sound-service
+  media-player-list.vala
+  DEPENDS
+    media-player
+    mpris2-interfaces
+)
+vala_add(indicator-sound-service
+  mpris2-interfaces.vala
+)
+vala_add(indicator-sound-service
+  freedesktop-interfaces.vala
+)
+vala_add(indicator-sound-service
+  sound-menu.vala
+  DEPENDS
+    media-player
+)
+
+vala_finish(indicator-sound-service
+  SOURCES
+    project_VALA_SOURCES
+  OUTPUTS
+    project_VALA_C
+  GENERATE_HEADER
+    ${HEADER_PATH}
+  GENERATE_SYMBOLS
+    ${SYMBOLS_PATH}
+)
+
+set_source_files_properties(
+  ${project_VALA_SOURCES}
+  PROPERTIES
+  HEADER_FILE_ONLY TRUE
+)
+
+set(
+  INDICATOR_SOUND_SOURCES
+  ${project_VALA_SOURCES}
+  ${project_VALA_C}
+  bus-watch-namespace.c
+  ${SYMBOLS_PATH}
+)
+
+###########################
+# Executable
+###########################
+
+add_definitions(
+  -w
+)
+
+add_executable(
+  indicator-sound-service-bin
+  ${INDICATOR_SOUND_SOURCES}
+)
+
+set_target_properties(
+  indicator-sound-service-bin
+  PROPERTIES
+  OUTPUT_NAME "indicator-sound-service"
+)
+
+target_link_libraries(
+  indicator-sound-service-bin
+  ${PULSEAUDIO_LIBRARIES}
+  ${SOUNDSERVICE_LIBRARIES}
+)
+
+###########################
+# Installation
+###########################
+
+install(
+  TARGETS indicator-sound-service-bin
+  RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/indicator-sound/
+)
+

=== renamed file 'src/Makefile.am' => 'src/Makefile.am.THIS'
--- src/Makefile.am	2010-03-24 15:47:37 +0000
+++ src/Makefile.am.THIS	2013-10-17 20:40:25 +0000
@@ -1,75 +1,39 @@
-libexec_PROGRAMS = indicator-sound-service
-
-###################
-# Indicator Stuff
-###################
-
-soundmenulibdir = $(INDICATORDIR)
-soundmenulib_LTLIBRARIES = libsoundmenu.la
-libsoundmenu_la_SOURCES = \
-    common-defs.h \
-	indicator-sound.h \
-	indicator-sound.c \
-	dbus-shared-names.h \
-    sound-service-client.h 
-
-libsoundmenu_la_CFLAGS = $(APPLET_CFLAGS) -Wall -Werror -DG_LOG_DOMAIN=\"Indicator-Sound\"
-libsoundmenu_la_LIBADD = $(APPLET_LIBS)
-libsoundmenu_la_LDFLAGS = -module -avoid-version
-
-checkxml: $(srcdir)/sound-service.xml
-	@xmllint -valid -noout $<
-	@echo $< checks out ok
-
-sound-service-client.h: $(srcdir)/sound-service.xml
-	dbus-binding-tool \
-		--prefix=_sound_service_client \
-		--mode=glib-client \
-		--output=sound-service-client.h \
-		$(srcdir)/sound-service.xml
-
-
-#################
-# Session Stuff
-#################
+pkglibexec_PROGRAMS = indicator-sound-service
+
 indicator_sound_service_SOURCES = \
-    common-defs.h \
-    sound-service.h \
-    sound-service.c \
-    dbus-menu-manager.c \
-    dbus-menu-manager.h \
-    pulse-manager.h \
-    pulse-manager.c \
-    sound-service-dbus.h \
-    sound-service-dbus.c \
-    sound-service-server.h \
-    slider-menu-item.h \
-    slider-menu-item.c
-indicator_sound_service_CFLAGS = $(PULSEAUDIO_CFLAGS) $(SOUNDSERVICE_CFLAGS) $(GCONF_CFLAGS) -DLIBEXECDIR=\"$(libexecdir)\" -Wall -Werror
+	service.vala \
+	main.vala \
+	volume-control.vala \
+	media-player.vala \
+	media-player-list.vala \
+	mpris2-interfaces.vala \
+	freedesktop-interfaces.vala \
+	sound-menu.vala \
+	bus-watch-namespace.c \
+	bus-watch-namespace.h
+
+indicator_sound_service_VALAFLAGS = \
+  --ccode \
+  --vapidir=$(top_srcdir)/vapi/ \
+  --vapidir=./ \
+  --thread \
+  --pkg config \
+  --pkg gio-2.0 \
+  --pkg gio-unix-2.0 \
+  --pkg libxml-2.0 \
+  --pkg libpulse \
+  --pkg libpulse-mainloop-glib \
+  --pkg bus-watcher \
+  --target-glib=2.36
+
+# -w to disable warnings for vala-generated code
+indicator_sound_service_CFLAGS = $(PULSEAUDIO_CFLAGS) \
+	$(SOUNDSERVICE_CFLAGS) \
+	$(GCONF_CFLAGS) \
+	$(COVERAGE_CFLAGS) \
+	-DLIBEXECDIR=\"$(libexecdir)\" \
+	-w \
+	-DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\"
+
 indicator_sound_service_LDADD = $(PULSEAUDIO_LIBS) $(SOUNDSERVICE_LIBS) $(GCONF_LIBS)
-
-sound-service-server.h: $(srcdir)/sound-service.xml
-	dbus-binding-tool \
-		--prefix=_sound_service_server \
-		--mode=glib-server \
-		--output=sound-service-server.h \
-		$(srcdir)/sound-service.xml
-
-###############
-# Other Stuff
-###############
-BUILT_SOURCES = \
-	sound-service-client.h \
-    sound-service-server.h 
-
-EXTRA_DIST = \
-    sound-service.xml \
-    sound-service.list
-
-CLEANFILES = \
-	$(BUILT_SOURCES)
-
-
-
-
-
+indicator_sound_service_LDFLAGS = $(COVERAGE_LDFLAGS)

=== added file 'src/bus-watch-namespace.c'
--- src/bus-watch-namespace.c	1970-01-01 00:00:00 +0000
+++ src/bus-watch-namespace.c	2013-10-17 20:40:25 +0000
@@ -0,0 +1,349 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Lars Uebernickel <lars.uebernickel@xxxxxxxxxxxxx>
+ */
+
+#include <gio/gio.h>
+#include <string.h>
+#include "bus-watch-namespace.h"
+
+typedef struct
+{
+  guint                     id;
+  gchar                    *name_space;
+  GBusNameAppearedCallback  appeared_handler;
+  GBusNameVanishedCallback  vanished_handler;
+  gpointer                  user_data;
+  GDestroyNotify            user_data_destroy;
+
+  GDBusConnection          *connection;
+  GCancellable             *cancellable;
+  GHashTable               *names;
+  guint                     subscription_id;
+} NamespaceWatcher;
+
+typedef struct
+{
+  NamespaceWatcher *watcher;
+  gchar            *name;
+} GetNameOwnerData;
+
+static guint namespace_watcher_next_id;
+static GHashTable *namespace_watcher_watchers;
+
+static void
+namespace_watcher_stop (gpointer data)
+{
+  NamespaceWatcher *watcher = data;
+
+  g_cancellable_cancel (watcher->cancellable);
+  g_object_unref (watcher->cancellable);
+
+  if (watcher->subscription_id)
+    g_dbus_connection_signal_unsubscribe (watcher->connection, watcher->subscription_id);
+
+  if (watcher->vanished_handler)
+    {
+      GHashTableIter it;
+      const gchar *name;
+
+      g_hash_table_iter_init (&it, watcher->names);
+      while (g_hash_table_iter_next (&it, (gpointer *) &name, NULL))
+        watcher->vanished_handler (watcher->connection, name, watcher->user_data);
+    }
+
+  if (watcher->user_data_destroy)
+    watcher->user_data_destroy (watcher->user_data);
+
+  if (watcher->connection)
+    {
+      g_signal_handlers_disconnect_by_func (watcher->connection, namespace_watcher_stop, watcher);
+      g_object_unref (watcher->connection);
+    }
+
+  g_hash_table_unref (watcher->names);
+
+  g_hash_table_remove (namespace_watcher_watchers, GUINT_TO_POINTER (watcher->id));
+  if (g_hash_table_size (namespace_watcher_watchers) == 0)
+    g_clear_pointer (&namespace_watcher_watchers, g_hash_table_destroy);
+
+  g_free (watcher->name_space);
+
+  g_free (watcher);
+}
+
+static void
+namespace_watcher_name_appeared (NamespaceWatcher *watcher,
+                                 const gchar      *name,
+                                 const gchar      *owner)
+{
+  /* There's a race between NameOwnerChanged signals arriving and the
+   * ListNames/GetNameOwner sequence returning, so this function might
+   * be called more than once for the same name. To ensure that
+   * appeared_handler is only called once for each name, it is only
+   * called when inserting the name into watcher->names (each name is
+   * only inserted once there).
+   */
+  if (g_hash_table_contains (watcher->names, name))
+    return;
+
+  g_hash_table_add (watcher->names, g_strdup (name));
+
+  if (watcher->appeared_handler)
+    watcher->appeared_handler (watcher->connection, name, owner, watcher->user_data);
+}
+
+static void
+namespace_watcher_name_vanished (NamespaceWatcher *watcher,
+                                 const gchar      *name)
+{
+  if (g_hash_table_remove (watcher->names, name) && watcher->vanished_handler)
+    watcher->vanished_handler (watcher->connection, name, watcher->user_data);
+}
+
+static gboolean
+dbus_name_has_namespace (const gchar *name,
+                         const gchar *name_space)
+{
+  gint len_name;
+  gint len_namespace;
+
+  len_name = strlen (name);
+  len_namespace = strlen (name_space);
+
+  if (len_name < len_namespace)
+    return FALSE;
+
+  if (memcmp (name_space, name, len_namespace) != 0)
+    return FALSE;
+
+  return len_namespace == len_name || name[len_namespace] == '.';
+}
+
+static void
+name_owner_changed (GDBusConnection *connection,
+                    const gchar     *sender_name,
+                    const gchar     *object_path,
+                    const gchar     *interface_name,
+                    const gchar     *signal_name,
+                    GVariant        *parameters,
+                    gpointer         user_data)
+{
+  NamespaceWatcher *watcher = user_data;
+  const gchar *name;
+  const gchar *old_owner;
+  const gchar *new_owner;
+
+  g_variant_get (parameters, "(&s&s&s)", &name, &old_owner, &new_owner);
+
+  if (old_owner[0] != '\0')
+    namespace_watcher_name_vanished (watcher, name);
+
+  if (new_owner[0] != '\0')
+    namespace_watcher_name_appeared (watcher, name, new_owner);
+}
+
+static void
+got_name_owner (GObject      *object,
+                GAsyncResult *result,
+                gpointer      user_data)
+{
+  GetNameOwnerData *data = user_data;
+  GError *error = NULL;
+  GVariant *reply;
+  const gchar *owner;
+
+  reply = g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &error);
+
+  if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+    {
+      g_error_free (error);
+      goto out;
+    }
+
+  if (reply == NULL)
+    {
+      if (!g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_NAME_HAS_NO_OWNER))
+        g_warning ("bus_watch_namespace: error calling org.freedesktop.DBus.GetNameOwner: %s", error->message);
+      g_error_free (error);
+      goto out;
+    }
+
+  g_variant_get (reply, "(&s)", &owner);
+  namespace_watcher_name_appeared (data->watcher, data->name, owner);
+
+  g_variant_unref (reply);
+
+out:
+  g_free (data->name);
+  g_slice_free (GetNameOwnerData, data);
+}
+
+static void
+names_listed (GObject      *object,
+              GAsyncResult *result,
+              gpointer      user_data)
+{
+  NamespaceWatcher *watcher;
+  GError *error = NULL;
+  GVariant *reply;
+  GVariantIter *iter;
+  const gchar *name;
+
+  reply = g_dbus_connection_call_finish (G_DBUS_CONNECTION (object), result, &error);
+
+  if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+    {
+      g_error_free (error);
+      return;
+    }
+
+  watcher = user_data;
+
+  if (reply == NULL)
+    {
+      g_warning ("bus_watch_namespace: error calling org.freedesktop.DBus.ListNames: %s", error->message);
+      g_error_free (error);
+      return;
+    }
+
+  g_variant_get (reply, "(as)", &iter);
+  while (g_variant_iter_next (iter, "&s", &name))
+    {
+      if (dbus_name_has_namespace (name, watcher->name_space))
+        {
+          GetNameOwnerData *data = g_slice_new (GetNameOwnerData);
+          data->watcher = watcher;
+          data->name = g_strdup (name);
+          g_dbus_connection_call (watcher->connection, "org.freedesktop.DBus", "/",
+                                  "org.freedesktop.DBus", "GetNameOwner",
+                                  g_variant_new ("(s)", name), G_VARIANT_TYPE ("(s)"),
+                                  G_DBUS_CALL_FLAGS_NONE, -1, watcher->cancellable,
+                                  got_name_owner, data);
+        }
+    }
+
+  g_variant_iter_free (iter);
+  g_variant_unref (reply);
+}
+
+static void
+connection_closed (GDBusConnection *connection,
+                   gboolean         remote_peer_vanished,
+                   GError          *error,
+                   gpointer         user_data)
+{
+  NamespaceWatcher *watcher = user_data;
+
+  namespace_watcher_stop (watcher);
+}
+
+static void
+got_bus (GObject      *object,
+         GAsyncResult *result,
+         gpointer      user_data)
+{
+  GDBusConnection *connection;
+  NamespaceWatcher *watcher;
+  GError *error = NULL;
+
+  connection = g_bus_get_finish (result, &error);
+
+  if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+    {
+      g_error_free (error);
+      return;
+    }
+
+  watcher = user_data;
+
+  if (connection == NULL)
+    {
+      namespace_watcher_stop (watcher);
+      return;
+    }
+
+  watcher->connection = connection;
+  g_signal_connect (watcher->connection, "closed", G_CALLBACK (connection_closed), watcher);
+
+  watcher->subscription_id =
+    g_dbus_connection_signal_subscribe (watcher->connection, "org.freedesktop.DBus",
+                                        "org.freedesktop.DBus", "NameOwnerChanged", "/org/freedesktop/DBus",
+                                        watcher->name_space, G_DBUS_SIGNAL_FLAGS_MATCH_ARG0_NAMESPACE,
+                                        name_owner_changed, watcher, NULL);
+
+  g_dbus_connection_call (watcher->connection, "org.freedesktop.DBus", "/",
+                          "org.freedesktop.DBus", "ListNames", NULL, G_VARIANT_TYPE ("(as)"),
+                          G_DBUS_CALL_FLAGS_NONE, -1, watcher->cancellable,
+                          names_listed, watcher);
+}
+
+guint
+bus_watch_namespace (GBusType                  bus_type,
+                     const gchar              *name_space,
+                     GBusNameAppearedCallback  appeared_handler,
+                     GBusNameVanishedCallback  vanished_handler,
+                     gpointer                  user_data,
+                     GDestroyNotify            user_data_destroy)
+{
+  NamespaceWatcher *watcher;
+
+  /* same rules for interfaces and well-known names */
+  g_return_val_if_fail (name_space != NULL && g_dbus_is_interface_name (name_space), 0);
+  g_return_val_if_fail (appeared_handler || vanished_handler, 0);
+
+  watcher = g_new0 (NamespaceWatcher, 1);
+  watcher->id = namespace_watcher_next_id++;
+  watcher->name_space = g_strdup (name_space);
+  watcher->appeared_handler = appeared_handler;
+  watcher->vanished_handler = vanished_handler;
+  watcher->user_data = user_data;
+  watcher->user_data_destroy = user_data_destroy;
+  watcher->cancellable = g_cancellable_new ();
+  watcher->names = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
+
+  if (namespace_watcher_watchers == NULL)
+    namespace_watcher_watchers = g_hash_table_new (g_direct_hash, g_direct_equal);
+  g_hash_table_insert (namespace_watcher_watchers, GUINT_TO_POINTER (watcher->id), watcher);
+
+  g_bus_get (bus_type, watcher->cancellable, got_bus, watcher);
+
+  return watcher->id;
+}
+
+void
+bus_unwatch_namespace (guint id)
+{
+  /* namespace_watcher_stop() might have already removed the watcher
+   * with @id in the case of a connection error. Thus, this function
+   * doesn't warn when @id is absent from the hash table.
+   */
+
+  if (namespace_watcher_watchers)
+    {
+      NamespaceWatcher *watcher;
+
+      watcher = g_hash_table_lookup (namespace_watcher_watchers, GUINT_TO_POINTER (id));
+      if (watcher)
+        {
+          /* make sure vanished() is not called as a result of this function */
+          g_hash_table_remove_all (watcher->names);
+
+          namespace_watcher_stop (watcher);
+        }
+    }
+}

=== added file 'src/bus-watch-namespace.h'
--- src/bus-watch-namespace.h	1970-01-01 00:00:00 +0000
+++ src/bus-watch-namespace.h	2013-10-17 20:40:25 +0000
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Lars Uebernickel <lars.uebernickel@xxxxxxxxxxxxx>
+ */
+
+#ifndef __BUS_WATCH_NAMESPACE_H__
+#define __BUS_WATCH_NAMESPACE_H__
+
+#include <gio/gio.h>
+
+guint       bus_watch_namespace         (GBusType                  bus_type,
+                                         const gchar              *name_space,
+                                         GBusNameAppearedCallback  appeared_handler,
+                                         GBusNameVanishedCallback  vanished_handler,
+                                         gpointer                  user_data,
+                                         GDestroyNotify            user_data_destroy);
+
+void        bus_unwatch_namespace       (guint id);
+
+#endif

=== removed file 'src/common-defs.h'
--- src/common-defs.h	2010-03-08 19:12:18 +0000
+++ src/common-defs.h	1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
-/*
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-/* constants used for signals on the dbus. This file is shared between client and server implementation */
-#define SIGNAL_SINK_INPUT_WHILE_MUTED "SinkInputWhileMuted"
-#define SIGNAL_SINK_VOLUME_UPDATE "SinkVolumeUpdate"
-#define SIGNAL_SINK_MUTE_UPDATE "SinkMuteUpdate"
-#define SIGNAL_SINK_AVAILABLE_UPDATE "SinkAvailableUpdate"
-
-// DBUS items
-#define DBUSMENU_SLIDER_MENUITEM_TYPE          "x-canonical-ido-slider-item"
-#define DBUSMENU_SLIDER_MENUITEM_PROP_VOLUME   "volume"

=== removed file 'src/dbus-menu-manager.c'
--- src/dbus-menu-manager.c	2010-03-25 14:52:24 +0000
+++ src/dbus-menu-manager.c	1970-01-01 00:00:00 +0000
@@ -1,235 +0,0 @@
-/*
-This service primarily controls PulseAudio and is driven by the sound indicator menu on the panel.
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <unistd.h>
-#include <glib/gi18n.h>
-
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-bindings.h>
-
-#include <libdbusmenu-glib/server.h>
-#include <libdbusmenu-glib/menuitem.h>
-#include <libdbusmenu-glib/client.h>
-
-#include "dbus-menu-manager.h" 
-#include "sound-service-dbus.h" 
-#include "pulse-manager.h"
-#include "slider-menu-item.h"
-
-#include "dbus-shared-names.h"
-
-// DBUS items
-static DbusmenuMenuitem *root_menuitem = NULL;
-static DbusmenuMenuitem *mute_all_menuitem = NULL;
-static SliderMenuItem *volume_slider_menuitem = NULL;
-static SoundServiceDbus *dbus_interface = NULL;
-
-// PULSEAUDIO
-static gboolean b_sink_available = FALSE;
-static gboolean b_all_muted = FALSE;
-static gboolean b_pulse_ready = FALSE;
-static gboolean b_startup = TRUE;
-static gdouble volume_percent = 0.0;
-
-static void set_global_mute_from_ui();
-static gboolean idle_routine (gpointer data);
-static void rebuild_sound_menu(DbusmenuMenuitem *root, SoundServiceDbus *service);
-static void refresh_menu();
-
-/*-------------------------------------------------------------------------*/
-//                          Public Methods 
-/*-------------------------------------------------------------------------*/
-
-/**
-setup:
-**/
-void dbus_menu_manager_setup()
-{
-    root_menuitem = dbusmenu_menuitem_new();
-    g_debug("Root ID: %d", dbusmenu_menuitem_get_id(root_menuitem));
-	
-    g_idle_add(idle_routine, root_menuitem);
-
-    dbus_interface = g_object_new(SOUND_SERVICE_DBUS_TYPE, NULL);
-
-    DbusmenuServer *server = dbusmenu_server_new(INDICATOR_SOUND_DBUS_OBJECT);
-    dbusmenu_server_set_root(server, root_menuitem);
-    establish_pulse_activities(dbus_interface);
-}
-
-/**
-teardown:
-**/
-void dbus_menu_manager_teardown()
-{
-    //TODO tidy up dbus_interface and items!
-}
-
-/**
-update_pa_state:
-**/
-void dbus_menu_manager_update_pa_state(gboolean pa_state, gboolean sink_available, gboolean sink_muted, gdouble percent)
-{
-    b_sink_available = sink_available;
-    b_all_muted = sink_muted;
-    b_pulse_ready = pa_state;
-    volume_percent = percent;
-	g_debug("update pa state with state %i, availability of %i, mute value of %i and a volume percent is %f", pa_state, sink_available, sink_muted, volume_percent);
-    // Only rebuild the menu on start up...
-    if(b_startup == TRUE){
-        rebuild_sound_menu(root_menuitem, dbus_interface);
-        b_startup = FALSE;
-    }
-    else{
-        refresh_menu();
-    }
-    // Emit the signals after the menus are setup/torn down
-    // preserve ordering !
-    sound_service_dbus_update_sink_availability(dbus_interface, sink_available); 
-    sound_service_dbus_update_sink_volume(dbus_interface, percent); 
-    sound_service_dbus_update_sink_mute(dbus_interface, sink_muted); 
-    dbus_menu_manager_update_mute_ui(b_all_muted);
-}
-
-/**
-update_mute_ui:
-'public' method allowing the pa manager to update the mute menu item.
-**/
-void dbus_menu_manager_update_mute_ui(gboolean incoming_mute_value)
-{
-    b_all_muted = incoming_mute_value;
-    dbusmenu_menuitem_property_set(mute_all_menuitem,
-                                    DBUSMENU_MENUITEM_PROP_LABEL, 
-                                    b_all_muted == FALSE ? _("Mute All") : _("Unmute"));
-}
-
-
-/*-------------------------------------------------------------------------*/
-//                          Private Methods 
-/*-------------------------------------------------------------------------*/
-
-static void refresh_menu()
-{
-    g_debug("in the refresh menu method");
-    if(b_sink_available == FALSE || b_pulse_ready == FALSE)
-    {
-
-        dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(volume_slider_menuitem), 
-                                            DBUSMENU_MENUITEM_PROP_ENABLED,
-                                            FALSE);   
-        dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(volume_slider_menuitem), 
-                                            DBUSMENU_MENUITEM_PROP_VISIBLE,
-                                            FALSE);   
-        dbusmenu_menuitem_property_set_bool(mute_all_menuitem, 
-                                            DBUSMENU_MENUITEM_PROP_ENABLED,
-                                            FALSE);
-
-    }
-    else if(b_sink_available == TRUE  && b_pulse_ready == TRUE){
-
-        dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(volume_slider_menuitem), 
-                                            DBUSMENU_MENUITEM_PROP_ENABLED,
-                                            TRUE);   
-        dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(volume_slider_menuitem), 
-                                            DBUSMENU_MENUITEM_PROP_VISIBLE,
-                                            TRUE);   
-        dbusmenu_menuitem_property_set_bool(mute_all_menuitem, 
-                                            DBUSMENU_MENUITEM_PROP_ENABLED,
-                                            TRUE);        
-    }
-}
-
-
-/**
-idle_routine:
-Something for glip mainloop to do when idle
-**/
-static gboolean idle_routine (gpointer data)
-{
-    return FALSE;
-}
- 
-
-
-/**
-show_sound_settings_dialog:
-Bring up the gnome volume preferences dialog
-**/
-static void show_sound_settings_dialog (DbusmenuMenuitem *mi, gpointer user_data) 
-{
-    GError * error = NULL;
-    if (!g_spawn_command_line_async("gnome-volume-control", &error)) 
-    {
-        g_warning("Unable to show dialog: %s", error->message);
-        g_error_free(error);
-    }
-}
-
-/**
-rebuild_sound_menu:
-Build the DBus menu items, mute/unmute, slider, separator and sound preferences 'link'
-**/
-static void rebuild_sound_menu(DbusmenuMenuitem *root, SoundServiceDbus *service)
-{
-    // Mute button
-    mute_all_menuitem = dbusmenu_menuitem_new();
-    dbusmenu_menuitem_property_set(mute_all_menuitem, DBUSMENU_MENUITEM_PROP_LABEL, b_all_muted == FALSE ? _("Mute All") : _("Unmute"));
-    g_signal_connect(G_OBJECT(mute_all_menuitem), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(set_global_mute_from_ui), NULL);
-    dbusmenu_menuitem_property_set_bool(mute_all_menuitem, DBUSMENU_MENUITEM_PROP_ENABLED, b_sink_available);
-
-    // Slider
-    volume_slider_menuitem = slider_menu_item_new(b_sink_available, volume_percent);
-    dbusmenu_menuitem_child_append(root, mute_all_menuitem);
-    dbusmenu_menuitem_child_append(root, DBUSMENU_MENUITEM(volume_slider_menuitem));
-    dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(volume_slider_menuitem),
-                                        DBUSMENU_MENUITEM_PROP_ENABLED,
-                                        b_sink_available && !b_all_muted);       
-    g_debug("!!!!!!**in the rebuild sound menu - slider active = %i", b_sink_available && !b_all_muted);
-    dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(volume_slider_menuitem),
-                                        DBUSMENU_MENUITEM_PROP_VISIBLE,
-                                        b_sink_available);   
-    // Separator
-    DbusmenuMenuitem *separator = dbusmenu_menuitem_new();
-    dbusmenu_menuitem_property_set(separator, DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_CLIENT_TYPES_SEPARATOR);
-    dbusmenu_menuitem_child_append(root, separator);
-
-    // Sound preferences dialog
-    DbusmenuMenuitem *settings_mi = dbusmenu_menuitem_new();
-    dbusmenu_menuitem_property_set(settings_mi, DBUSMENU_MENUITEM_PROP_LABEL, _("Sound Preferences..."));
-//_("Sound Preferences..."));
-    dbusmenu_menuitem_child_append(root, settings_mi);
-    g_signal_connect(G_OBJECT(settings_mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED,
-                                         G_CALLBACK(show_sound_settings_dialog), NULL);
-}
-
-/**
-set_global_mute_from_ui:
-Callback for the dbusmenuitem button
-**/
-static void set_global_mute_from_ui()
-{
-    b_all_muted = !b_all_muted;
-    toggle_global_mute(b_all_muted); 
-    dbusmenu_menuitem_property_set(mute_all_menuitem,
-                                   DBUSMENU_MENUITEM_PROP_LABEL,
-                                   b_all_muted == FALSE ? _("Mute All") : _("Unmute"));
-}
-
-

=== removed file 'src/dbus-menu-manager.h'
--- src/dbus-menu-manager.h	2010-03-02 19:36:53 +0000
+++ src/dbus-menu-manager.h	1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-#ifndef __INCLUDE_DBUS_MENU_MANAGER_H__
-#define __INCLUDE_DBUS_MENU_MANAGER_H__
-
-/*
-This handles the management of the dbusmeneu items.
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-void dbus_menu_manager_setup();
-void dbus_menu_manager_teardown();
-void dbus_menu_manager_update_pa_state(gboolean pa_state, gboolean sink_available, gboolean sink_muted, gdouble current_vol);
-// TODO update pa_state should incorporate the method below !
-void dbus_menu_manager_update_mute_ui(gboolean incoming_mute_value);
-
-#endif
-

=== removed file 'src/dbus-shared-names.h'
--- src/dbus-shared-names.h	2010-02-11 15:19:22 +0000
+++ src/dbus-shared-names.h	1970-01-01 00:00:00 +0000
@@ -1,48 +0,0 @@
-/*
-A small wrapper utility to load indicators and put them as menu items
-into the gnome-panel using it's applet interface.
-
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#ifndef __DBUS_SHARED_NAMES_H__
-#define __DBUS_SHARED_NAMES_H__ 1
-
-#define INDICATOR_STATUS_DBUS_NAME  "org.ayatana.indicator.status"
-#define INDICATOR_STATUS_DBUS_OBJECT "/org/ayatana/indicator/status/menu"
-#define INDICATOR_STATUS_SERVICE_DBUS_OBJECT "/org/ayatana/indicator/status/service"
-#define INDICATOR_STATUS_SERVICE_DBUS_INTERFACE "org.ayatana.indicator.status.service"
-
-#define INDICATOR_USERS_DBUS_NAME  "org.ayatana.indicator.users"
-#define INDICATOR_USERS_DBUS_OBJECT "/org/ayatana/indicator/users/menu"
-#define INDICATOR_USERS_SERVICE_DBUS_OBJECT "/org/gnome/DisplayManager/UserManager"
-#define INDICATOR_USERS_SERVICE_DBUS_INTERFACE "org.gnome.DisplayManager.UserManager"
-
-#define INDICATOR_SESSION_DBUS_NAME  "org.ayatana.indicator.session"
-#define INDICATOR_SESSION_DBUS_OBJECT "/org/ayatana/indicator/session/menu"
-#define INDICATOR_SESSION_DBUS_VERSION  0
-
-#define INDICATOR_SOUND_DBUS_NAME  "org.ayatana.indicator.sound"
-#define INDICATOR_SOUND_DBUS_OBJECT "/org/ayatana/indicator/sound/menu"
-#define INDICATOR_SOUND_SERVICE_DBUS_OBJECT "/org/ayatana/indicator/sound/service"
-#define INDICATOR_SOUND_SERVICE_DBUS_INTERFACE "org.ayatana.indicator.sound"
-#define INDICATOR_SOUND_DBUS_VERSION  0
-
-#endif /* __DBUS_SHARED_NAMES_H__ */

=== added file 'src/freedesktop-interfaces.vala'
--- src/freedesktop-interfaces.vala	1970-01-01 00:00:00 +0000
+++ src/freedesktop-interfaces.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,47 @@
+/*
+Copyright 2010 Canonical Ltd.
+
+Authors:
+    Conor Curran <conor.curran@xxxxxxxxxxxxx>
+
+This program is free software: you can redistribute it and/or modify it 
+under the terms of the GNU General Public License version 3, as published 
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but 
+WITHOUT ANY WARRANTY; without even the implied warranties of 
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
+PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along 
+with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+[DBus (name = "org.freedesktop.DBus")]
+public interface FreeDesktopObject: Object {
+  public abstract async string[] list_names() throws IOError;
+  public abstract signal void name_owner_changed ( string name,
+                                                   string old_owner,
+                                                   string new_owner );
+}
+
+[DBus (name = "org.freedesktop.DBus.Introspectable")]
+public interface FreeDesktopIntrospectable: Object {
+  public abstract string Introspect() throws IOError;
+}
+
+[DBus (name = "org.freedesktop.DBus.Properties")]
+public interface FreeDesktopProperties : Object{
+  public signal void PropertiesChanged (string source, HashTable<string, Variant?> changed_properties,
+                                        string[] invalid );
+}
+
+public errordomain XmlError {
+    FILE_NOT_FOUND,
+    XML_DOCUMENT_EMPTY
+}
+
+const string FREEDESKTOP_SERVICE = "org.freedesktop.DBus";
+const string FREEDESKTOP_OBJECT = "/org/freedesktop/DBus";
+
+

=== removed file 'src/indicator-sound.c'
--- src/indicator-sound.c	2010-04-27 10:33:38 +0000
+++ src/indicator-sound.c	1970-01-01 00:00:00 +0000
@@ -1,785 +0,0 @@
-/*
-A small wrapper utility to load indicators and put them as menu items
-into the gnome-panel using it's applet interface.
-
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-    Cody Russell <cody.russell@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#include <math.h>
-#include <glib.h>
-#include <glib-object.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkkeysyms.h>
-#include <libdbusmenu-gtk/menu.h>
-#include <libido/idoscalemenuitem.h>
-
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-bindings.h>
-
-#include <libindicator/indicator.h>
-#include <libindicator/indicator-object.h>
-#include <libindicator/indicator-service-manager.h>
-#include <libindicator/indicator-image-helper.h>
-
-#include "indicator-sound.h"
-#include "dbus-shared-names.h"
-#include "sound-service-client.h"
-#include "common-defs.h"
-
-// GObject Boiler plate
-#define INDICATOR_SOUND_TYPE            (indicator_sound_get_type ())
-#define INDICATOR_SOUND(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), INDICATOR_SOUND_TYPE, IndicatorSound))
-#define INDICATOR_SOUND_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), INDICATOR_SOUND_TYPE, IndicatorSoundClass))
-#define IS_INDICATOR_SOUND(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), INDICATOR_SOUND_TYPE))
-#define IS_INDICATOR_SOUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), INDICATOR_SOUND_TYPE))
-#define INDICATOR_SOUND_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), INDICATOR_SOUND_TYPE, IndicatorSoundClass))
-
-typedef struct _IndicatorSound      IndicatorSound;
-typedef struct _IndicatorSoundClass IndicatorSoundClass;
-
-//GObject class struct
-struct _IndicatorSoundClass {
-	IndicatorObjectClass parent_class;
-};
-
-//GObject instance struct
-struct _IndicatorSound {
-	IndicatorObject parent;
-        GtkWidget *slider;
-	IndicatorServiceManager *service;
-};
-// GObject Boiler plate
-GType indicator_sound_get_type (void);
-INDICATOR_SET_VERSION
-INDICATOR_SET_TYPE(INDICATOR_SOUND_TYPE)
-
-// GObject Boiler plate
-static void indicator_sound_class_init (IndicatorSoundClass *klass);
-static void indicator_sound_init       (IndicatorSound *self);
-static void indicator_sound_dispose    (GObject *object);
-static void indicator_sound_finalize   (GObject *object);
-G_DEFINE_TYPE (IndicatorSound, indicator_sound, INDICATOR_OBJECT_TYPE);
-
-//GTK+ items
-static GtkLabel * get_label (IndicatorObject * io);
-static GtkImage * get_icon (IndicatorObject * io);
-static GtkMenu *  get_menu (IndicatorObject * io);
-static void       scroll   (IndicatorObject*io, gint delta, IndicatorScrollDirection direction);
-
-//Slider related
-static GtkWidget *volume_slider = NULL;
-static gboolean new_slider_item (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client);
-static gboolean value_changed_event_cb(GtkRange *range, gpointer user_data);
-static gboolean key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data);
-static void slider_grabbed(GtkWidget *widget, gpointer user_data);
-static void slider_released(GtkWidget *widget, gpointer user_data);
-static void style_changed_cb(GtkWidget *widget, gpointer user_data);
-
-// DBUS communication
-static DBusGProxy *sound_dbus_proxy = NULL;
-static void connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer userdata);
-static void catch_signal_sink_input_while_muted(DBusGProxy * proxy, gboolean value, gpointer userdata);
-static void catch_signal_sink_volume_update(DBusGProxy * proxy, gdouble volume_percent, gpointer userdata);
-static void catch_signal_sink_mute_update(DBusGProxy *proxy, gboolean mute_value, gpointer userdata);
-static void catch_signal_sink_availability_update(DBusGProxy *proxy, gboolean available_value, gpointer userdata);
-static void fetch_volume_percent_from_dbus();
-static void fetch_mute_value_from_dbus();
-static void fetch_sink_availability_from_dbus();
-
-/****Volume States 'members' ***/
-static void update_state(const gint state);
-
-static const gint STATE_MUTED = 0;
-static const gint STATE_ZERO = 1;
-static const gint STATE_LOW = 2;
-static const gint STATE_MEDIUM = 3;
-static const gint STATE_HIGH = 4;
-static const gint STATE_MUTED_WHILE_INPUT = 5;
-static const gint STATE_SINKS_NONE = 6;
-static const gint OUT_OF_RANGE = -10;
-
-static GHashTable *volume_states = NULL;
-static GtkImage *speaker_image = NULL;
-static gint current_state = 0;
-static gint previous_state = 0;
-
-static gdouble initial_volume_percent;
-static gboolean initial_mute ;
-static gboolean device_available;
-static gboolean slider_in_direct_use;
-static gdouble exterior_vol_update;
-
-static GtkIconSize design_team_size;
-static gint blocked_id;
-static gint animation_id;
-
-static GList * blocked_animation_list = NULL;
-static GList * blocked_iter = NULL;
-static void prepare_blocked_animation();
-static gboolean fade_back_to_mute_image();
-static gboolean start_animation();
-static void reset_mute_blocking_animation();
-static void free_the_animation_list();
-
-
-static void
-indicator_sound_class_init (IndicatorSoundClass *klass)
-{
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-	object_class->dispose = indicator_sound_dispose;
-	object_class->finalize = indicator_sound_finalize;
-
-	IndicatorObjectClass *io_class = INDICATOR_OBJECT_CLASS(klass);
-	io_class->get_label = get_label;
-	io_class->get_image = get_icon;
-	io_class->get_menu  = get_menu;
-    io_class->scroll    = scroll;
-
-    design_team_size = gtk_icon_size_register("design-team-size", 22, 22);
-
-	return;
-}
-
-static void
-indicator_sound_init (IndicatorSound *self)
-{
-	self->service = NULL;
-	self->service = indicator_service_manager_new_version(INDICATOR_SOUND_DBUS_NAME, INDICATOR_SOUND_DBUS_VERSION);
-    prepare_state_machine();
-    prepare_blocked_animation();
-    animation_id = 0;
-    blocked_id = 0;
-    initial_mute = FALSE;
-    device_available = TRUE;
-    slider_in_direct_use = FALSE;
-    exterior_vol_update = OUT_OF_RANGE;
-
-	g_signal_connect(G_OBJECT(self->service), INDICATOR_SERVICE_MANAGER_SIGNAL_CONNECTION_CHANGE, G_CALLBACK(connection_changed), self);
-    return;
-}
-
-static void
-indicator_sound_dispose (GObject *object)
-{
-	IndicatorSound * self = INDICATOR_SOUND(object);
-
-	if (self->service != NULL) {
-		g_object_unref(G_OBJECT(self->service));
-		self->service = NULL;
-	}
-    g_hash_table_destroy(volume_states);
-
-    free_the_animation_list();
-
-	G_OBJECT_CLASS (indicator_sound_parent_class)->dispose (object);
-	return;
-}
-
-static void 
-free_the_animation_list()
-{
-    if(blocked_animation_list != NULL){
-        g_list_foreach (blocked_animation_list, (GFunc)g_object_unref, NULL);
-        g_list_free(blocked_animation_list);
-        blocked_animation_list = NULL;
-    }
-}
-
-static void
-indicator_sound_finalize (GObject *object)
-{
-	G_OBJECT_CLASS (indicator_sound_parent_class)->finalize (object);
-	return;
-}
-
-static GtkLabel *
-get_label (IndicatorObject * io)
-{
-	return NULL;
-}
-
-static GtkImage *
-get_icon (IndicatorObject * io)
-{
-    gchar* current_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(current_state));
-    g_debug("At start-up attempting to set the image to %s", current_name);
-	speaker_image = indicator_image_helper(current_name);
-	gtk_widget_show(GTK_WIDGET(speaker_image));
-	return speaker_image;
-}
-
-/* Indicator based function to get the menu for the whole
-   applet.  This starts up asking for the parts of the menu
-   from the various services. */
-static GtkMenu *
-get_menu (IndicatorObject * io)
-{
-    DbusmenuGtkMenu *menu = dbusmenu_gtkmenu_new(INDICATOR_SOUND_DBUS_NAME, INDICATOR_SOUND_DBUS_OBJECT);
-    DbusmenuGtkClient *client = dbusmenu_gtkmenu_get_client(menu);
-
-    g_object_set_data (G_OBJECT (client),
-                       "indicator", io);
-    dbusmenu_client_add_type_handler(DBUSMENU_CLIENT(client), DBUSMENU_SLIDER_MENUITEM_TYPE, new_slider_item);
-
-    // register Key-press listening on the menu widget as the slider does not allow this.
-    g_signal_connect(menu, "key-press-event", G_CALLBACK(key_press_cb), NULL);
-    return GTK_MENU(menu);
-}
-
-static void
-slider_parent_changed (GtkWidget *widget,
-                       gpointer   user_data)
-{
-    gtk_widget_set_size_request (widget, 200, -1);
-    g_debug("slider parent changed");
-}
-
-/**
-new_slider_item:
-Create a new dBusMenu Slider item.
-**/
-static gboolean
-new_slider_item(DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client)
-{
-    IndicatorObject *io = NULL;
-
-    g_return_val_if_fail(DBUSMENU_IS_MENUITEM(newitem), FALSE);
-    g_return_val_if_fail(DBUSMENU_IS_GTKCLIENT(client), FALSE);
-
-    io = g_object_get_data (G_OBJECT (client), "indicator");
-
-    volume_slider = ido_scale_menu_item_new_with_range ("Volume", initial_volume_percent, 0, 100, 1);
-    g_object_set(volume_slider, "reverse-scroll-events", TRUE, NULL);
-
-    g_signal_connect (volume_slider,
-                      "notify::parent", G_CALLBACK (slider_parent_changed),
-                      NULL);
-
-    GtkMenuItem *menu_volume_slider = GTK_MENU_ITEM(volume_slider);
-
-    dbusmenu_gtkclient_newitem_base(DBUSMENU_GTKCLIENT(client), newitem, menu_volume_slider, parent);
-
-    // register slider changes listening on the range
-    GtkWidget* slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider);
-
-    INDICATOR_SOUND (io)->slider = slider;
-
-    g_signal_connect(slider, "value-changed", G_CALLBACK(value_changed_event_cb), newitem);
-    g_signal_connect(volume_slider, "slider-grabbed", G_CALLBACK(slider_grabbed), NULL);
-    g_signal_connect(volume_slider, "slider-released", G_CALLBACK(slider_released), NULL);
-    g_signal_connect(slider, "style-set", G_CALLBACK(style_changed_cb), NULL);
-
-    // Set images on the ido
-    GtkWidget* primary_image = ido_scale_menu_item_get_primary_image((IdoScaleMenuItem*)volume_slider);
-    GIcon * primary_gicon = g_themed_icon_new_with_default_fallbacks(g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_ZERO)));
-    gtk_image_set_from_gicon(GTK_IMAGE(primary_image), primary_gicon, GTK_ICON_SIZE_MENU);
-    g_object_unref(primary_gicon);
-
-    GtkWidget* secondary_image = ido_scale_menu_item_get_secondary_image((IdoScaleMenuItem*)volume_slider);
-    GIcon * secondary_gicon = g_themed_icon_new_with_default_fallbacks(g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_HIGH)));
-    gtk_image_set_from_gicon(GTK_IMAGE(secondary_image), secondary_gicon, GTK_ICON_SIZE_MENU);
-    g_object_unref(secondary_gicon);
-
-    gtk_widget_set_sensitive(volume_slider, !initial_mute);
-
-    GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (slider));
-    gtk_adjustment_set_step_increment(adj, 3);
-
-    gtk_widget_show_all(volume_slider);
-
-    return TRUE;
-}
-
-static void
-connection_changed (IndicatorServiceManager * sm, gboolean connected, gpointer userdata)
-{
-	if (connected) {
-		if (sound_dbus_proxy == NULL) {
-			GError * error = NULL;
-
-			DBusGConnection * sbus = dbus_g_bus_get(DBUS_BUS_SESSION, NULL);
-
-			sound_dbus_proxy = dbus_g_proxy_new_for_name_owner(sbus,
-														   INDICATOR_SOUND_DBUS_NAME,
-														   INDICATOR_SOUND_SERVICE_DBUS_OBJECT,
-														   INDICATOR_SOUND_SERVICE_DBUS_INTERFACE,
-														   &error);
-
-			if (error != NULL) {
-				g_warning("Unable to get status proxy: %s", error->message);
-				g_error_free(error);
-			}
-            g_debug("about to connect to the signals");
-			dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_SINK_INPUT_WHILE_MUTED, G_TYPE_BOOLEAN, G_TYPE_INVALID);
-
-			dbus_g_proxy_connect_signal(sound_dbus_proxy, SIGNAL_SINK_INPUT_WHILE_MUTED, G_CALLBACK(catch_signal_sink_input_while_muted), NULL, NULL);
-			dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_SINK_VOLUME_UPDATE, G_TYPE_DOUBLE, G_TYPE_INVALID);
-			dbus_g_proxy_connect_signal(sound_dbus_proxy, SIGNAL_SINK_VOLUME_UPDATE, G_CALLBACK(catch_signal_sink_volume_update), NULL, NULL);
-			dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_SINK_MUTE_UPDATE, G_TYPE_BOOLEAN, G_TYPE_INVALID);
-			dbus_g_proxy_connect_signal(sound_dbus_proxy, SIGNAL_SINK_MUTE_UPDATE, G_CALLBACK(catch_signal_sink_mute_update), NULL, NULL);
-			dbus_g_proxy_add_signal(sound_dbus_proxy, SIGNAL_SINK_AVAILABLE_UPDATE, G_TYPE_BOOLEAN, G_TYPE_INVALID);
-			dbus_g_proxy_connect_signal(sound_dbus_proxy, SIGNAL_SINK_AVAILABLE_UPDATE, G_CALLBACK(catch_signal_sink_availability_update), NULL, NULL);
-
-            // Ensure we are in a coherent state with the service at start up.
-            // Preserve ordering!
-            fetch_volume_percent_from_dbus();
-            fetch_mute_value_from_dbus();
-            fetch_sink_availability_from_dbus();
-		}
-
-	} else {
-        //TODO : will need to handle this scenario
-        // Not much can we do here really, if there is no dbus connection tis goosed.
-	}
-
-	return;
-}
-
-/*
-Prepare states Array.
-*/
-void 
-prepare_state_machine()
-{
-    volume_states = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, g_free);
-    g_hash_table_insert(volume_states, GINT_TO_POINTER(STATE_MUTED), g_strdup("audio-volume-muted-panel"));
-    g_hash_table_insert(volume_states, GINT_TO_POINTER(STATE_ZERO), g_strdup("audio-volume-low-zero-panel"));
-    g_hash_table_insert(volume_states, GINT_TO_POINTER(STATE_LOW), g_strdup("audio-volume-low-panel"));
-    g_hash_table_insert(volume_states, GINT_TO_POINTER(STATE_MEDIUM), g_strdup("audio-volume-medium-panel"));
-    g_hash_table_insert(volume_states, GINT_TO_POINTER(STATE_HIGH), g_strdup("audio-volume-high-panel"));
-    g_hash_table_insert(volume_states, GINT_TO_POINTER(STATE_MUTED_WHILE_INPUT), g_strdup("audio-volume-muted-blocking-panel"));
-    g_hash_table_insert(volume_states, GINT_TO_POINTER(STATE_SINKS_NONE), g_strdup("audio-output-none-panel"));
-}
-
-/*
-prepare_blocked_animation:
-Prepares the array of images to be used in the blocked animation.
-Only called at startup.
-*/
-static void
-prepare_blocked_animation()
-{
-    gchar* blocked_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_MUTED_WHILE_INPUT));
-    gchar* muted_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_MUTED));
-
-    GtkImage* temp_image = indicator_image_helper(muted_name);
-    GdkPixbuf* mute_buf = gtk_image_get_pixbuf(temp_image);
-
-    temp_image = indicator_image_helper(blocked_name);
-    GdkPixbuf* blocked_buf = gtk_image_get_pixbuf(temp_image);
-
-    if(mute_buf == NULL || blocked_buf == NULL){
-        g_debug("Don bother with the animation, the theme aint got the goods !");
-        return;
-    }
-
-    int i;
-
-    // sample 51 snapshots - range : 0-256
-    for(i = 0; i < 51; i++)
-    {
-        gdk_pixbuf_composite(mute_buf, blocked_buf, 0, 0,
-                             gdk_pixbuf_get_width(mute_buf),
-                             gdk_pixbuf_get_height(mute_buf),
-                             0, 0, 1, 1, GDK_INTERP_BILINEAR, MIN(255, i * 5));
-        blocked_animation_list = g_list_append(blocked_animation_list, gdk_pixbuf_copy(blocked_buf));
-    }
-    g_object_ref_sink(mute_buf);
-	g_object_unref(mute_buf);
-    g_object_ref_sink(blocked_buf);
-	g_object_unref(blocked_buf);
-}
-
-
-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);*/
-
-    previous_state = current_state;
-
-/*    g_debug("update state 3rd line - previous_state = %i", previous_state);*/
-
-    current_state = state;
-    gchar* image_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(current_state));
-    indicator_image_helper_update(speaker_image, image_name);
-}
-
-
-void
-determine_state_from_volume(gdouble volume_percent)
-{
-/*    g_debug("determine_state_from_volume - previous_state = %i", previous_state);*/
-    if (device_available == FALSE)
-        return;
-    gint state = previous_state;
-    if (volume_percent < 30.0 && volume_percent > 0){
-        state = STATE_LOW;
-    }
-    else if(volume_percent < 70.0 && volume_percent >= 30.0){
-        state = STATE_MEDIUM;
-    }
-    else if(volume_percent >= 70.0){
-        state = STATE_HIGH;
-    }
-    else if(volume_percent == 0.0){
-        state = STATE_ZERO;
-    }
-    update_state(state);
-}
-
-
-static gboolean
-start_animation()
-{
-    blocked_iter = blocked_animation_list;
-    blocked_id = 0;
-    g_debug("exit from blocked hold start the animation\n");
-    animation_id = g_timeout_add(50, fade_back_to_mute_image, NULL);
-    return FALSE;
-}
-
-static gboolean
-fade_back_to_mute_image()
-{
-    if(blocked_iter != NULL)
-    {
-        g_debug("in animation 'loop'\n");
-        gtk_image_set_from_pixbuf(speaker_image, blocked_iter->data);
-        blocked_iter = blocked_iter->next;
-        return TRUE;
-    }
-    else{
-        animation_id = 0;
-        g_debug("exit from animation now\n");
-        return FALSE;
-    }
-}
-
-/*******************************************************************/
-//DBus method handlers
-/*******************************************************************/
-static void
-fetch_sink_availability_from_dbus()
-{
-    GError * error = NULL;
-    gboolean * available_input;
-    available_input = g_new0(gboolean, 1);
-    org_ayatana_indicator_sound_get_sink_availability(sound_dbus_proxy, available_input, &error);
-    if (error != NULL) {
-	    g_warning("Unable to fetch AVAILABILITY at indicator start up: %s", error->message);
-	    g_error_free(error);
-        g_free(available_input);
-        return;
-    }
-    device_available = *available_input;
-    if (device_available == FALSE){
-        update_state(STATE_SINKS_NONE);
-        g_debug("NO DEVICE AVAILABLE");
-    }
-
-    if (GTK_IS_WIDGET (volume_slider))
-        gtk_widget_set_sensitive(volume_slider, device_available);
-    
-    g_free(available_input);
-    g_debug("IndicatorSound::fetch_sink_availability_from_dbus -> AVAILABILTY returned from dbus method is %i", device_available);
-
-}
-
-static void 
-fetch_volume_percent_from_dbus()
-{
-    GError * error = NULL;
-    gdouble *volume_percent_input;
-    volume_percent_input = g_new0(gdouble, 1);
-    org_ayatana_indicator_sound_get_sink_volume(sound_dbus_proxy, volume_percent_input, &error);
-	if (error != NULL) {
-		g_warning("Unable to fetch VOLUME at indicator start up: %s", error->message);
-		g_error_free(error);
-        g_free(volume_percent_input);
-        return;
-	}
-    initial_volume_percent = *volume_percent_input;
-    determine_state_from_volume(initial_volume_percent);
-    g_free(volume_percent_input);
-    g_debug("at the indicator start up and the volume percent returned from dbus method is %f", initial_volume_percent);
-}
-
-static void 
-fetch_mute_value_from_dbus()
-{
-    GError * error = NULL;
-    gboolean *mute_input;
-    mute_input = g_new0(gboolean, 1);
-    org_ayatana_indicator_sound_get_sink_mute(sound_dbus_proxy, mute_input, &error);
-    if (error != NULL) {
-	    g_warning("Unable to fetch MUTE at indicator start up: %s", error->message);
-	    g_error_free(error);
-        g_free(mute_input);
-        return;
-    }
-    initial_mute = *mute_input;
-    if (initial_mute == TRUE)
-        update_state(STATE_MUTED);
-    g_free(mute_input);
-    g_debug("at the indicator start up and the MUTE returned from dbus method is %i", initial_mute);
-}
-
-/*******************************************************************/
-//DBus signal catchers
-/*******************************************************************/
-static void
-catch_signal_sink_input_while_muted(DBusGProxy * proxy, gboolean block_value, gpointer userdata)
-{
-    g_debug("signal caught - sink input while muted with value %i", block_value);
-    if (block_value == 1 && blocked_id == 0 && animation_id == 0 && blocked_animation_list != NULL) {
-        gchar* image_name = g_hash_table_lookup(volume_states, GINT_TO_POINTER(STATE_MUTED_WHILE_INPUT));
-        indicator_image_helper_update(speaker_image, image_name);
-        blocked_id = g_timeout_add_seconds(5, start_animation, NULL);
-    }
-}
-
-
-static void
-catch_signal_sink_volume_update(DBusGProxy *proxy, gdouble volume_percent, gpointer userdata)
-{
-    if (slider_in_direct_use == FALSE){
-        GtkWidget *slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider);
-        GtkRange *range = (GtkRange*)slider;
-
-        // DEBUG
-        gdouble current_value = gtk_range_get_value(range);
-        g_debug("SIGNAL- update sink volume - current_value : %f and new value : %f", current_value, volume_percent);
-        exterior_vol_update = volume_percent;
-        gtk_range_set_value(range, volume_percent);
-        determine_state_from_volume(volume_percent);
-    }
-}
-
-static void
-catch_signal_sink_mute_update(DBusGProxy *proxy, gboolean mute_value, gpointer userdata)
-{
-    //We can be sure the service won't send a mute signal unless it has changed !
-    //UNMUTE's force a volume update therefore icon is updated appropriately => no need for unmute handling here.
-    if(mute_value == TRUE && device_available == TRUE)
-    {
-        update_state(STATE_MUTED);
-    }
-    else{
-        reset_mute_blocking_animation();
-    }
-    g_debug("signal caught - sink mute update with mute value: %i", mute_value);
-    gtk_widget_set_sensitive(volume_slider, !mute_value);
-}
-
-static void
-reset_mute_blocking_animation()
-{
-    if(animation_id != 0){
-        g_debug("about to remove the animation_id callback from the mainloop!!**");
-        g_source_remove(animation_id);
-        animation_id = 0;
-    }
-    if(blocked_id != 0){
-        g_debug("about to remove the blocked_id callback from the mainloop!!**");
-        g_source_remove(blocked_id);
-        blocked_id = 0;            
-    } 
-}
-
-static void
-catch_signal_sink_availability_update(DBusGProxy *proxy, gboolean available_value, gpointer userdata)
-{
-    device_available  = available_value;
-    if (device_available == FALSE){
-        update_state(STATE_SINKS_NONE);
-    }
-    g_debug("signal caught - sink availability update with  value: %i", available_value);
-}
-
-
-
-
-/*******************************************************************/
-//UI callbacks
-/******************************************************************/
-
-/**
-value_changed_event_cb:
-This callback will get triggered irregardless of whether its a user change or a programmatic change.
-**/
-static gboolean
-value_changed_event_cb(GtkRange *range, gpointer user_data)
-{
-    gdouble current_value =  CLAMP(gtk_range_get_value(range), 0, 100);
-    if(current_value == exterior_vol_update){   
-        g_debug("ignore the value changed event - its come from the outside");
-        return FALSE;
-    }
-    DbusmenuMenuitem *item = (DbusmenuMenuitem*)user_data;
-    GValue value = {0};
-    g_value_init(&value, G_TYPE_DOUBLE);
-    g_value_set_double(&value, current_value);
-    g_debug("Value changed callback - = %f", current_value);
-    dbusmenu_menuitem_handle_event (item, "slider_change", &value, 0);
-    // This is not ideal in that the icon ui will update on ui actions and not on actual service feedback.
-    // but necessary for now as the server does not send volume update information if the source of change was this ui.
-    determine_state_from_volume(current_value);
-    return FALSE;
-}
-
-
-static void
-slider_grabbed (GtkWidget *widget, gpointer user_data)
-{
-    slider_in_direct_use = TRUE;
-    g_debug ("!!!!!!  grabbed\n");
-}
-
-static void
-slider_released (GtkWidget *widget, gpointer user_data)
-{
-    slider_in_direct_use = FALSE;
-    g_debug ("!!!!!! released\n");
-}
-
-
-/**
-key_press_cb:
-**/
-static gboolean
-key_press_cb(GtkWidget* widget, GdkEventKey* event, gpointer data)
-{
-    gboolean digested = FALSE;
-
-    GtkWidget* slider = ido_scale_menu_item_get_scale((IdoScaleMenuItem*)volume_slider);
-    GtkRange* range = (GtkRange*)slider;
-    gdouble current_value = gtk_range_get_value(range);
-    gdouble new_value = current_value;
-    const gdouble five_percent = 5;
-    GtkWidget *menuitem;
-
-    menuitem = GTK_MENU_SHELL (widget)->active_menu_item;
-    if(IDO_IS_SCALE_MENU_ITEM(menuitem) == TRUE)
-    {
-        switch(event->keyval)
-            {
-            case GDK_Right:
-                digested = TRUE;
-                if(event->state & GDK_CONTROL_MASK)
-                {
-                    new_value = 100;
-                }
-                else
-                {
-                    new_value = current_value + five_percent;
-                }
-                break;
-            case GDK_Left:
-                digested = TRUE;
-                if(event->state & GDK_CONTROL_MASK)
-                {
-                    new_value = 0;
-                }
-                else
-                {
-                    new_value = current_value - five_percent;
-                }
-                break;
-            case GDK_plus:
-                digested = TRUE;
-                new_value = current_value + five_percent;
-                break;
-            case GDK_minus:
-                digested = TRUE;
-                new_value = current_value - five_percent;
-                break;
-            default:
-                break;
-            }
-
-            new_value = CLAMP(new_value, 0, 100);
-            if(new_value != current_value && current_state != STATE_MUTED)
-            {
-                g_debug("Attempting to set the range from the key listener to %f", new_value);
-                // In order to ensure that the exterior filtering does not catch this, reset the exterior_vol_update
-                // to ensure these updates. 
-                exterior_vol_update = OUT_OF_RANGE;
-                gtk_range_set_value(range, new_value);
-            }
-    }
-    return digested;
-}
-
-static void
-style_changed_cb(GtkWidget *widget, gpointer user_data)
-{
-    g_debug("Just caught a style change event");
-    update_state(current_state);
-    reset_mute_blocking_animation();
-    update_state(current_state);
-    free_the_animation_list();
-    prepare_blocked_animation();
-}
-
-static void
-scroll (IndicatorObject *io, gint delta, IndicatorScrollDirection direction)
-{
-    if (device_available == FALSE || current_state == STATE_MUTED)
-        return;
-
-    IndicatorSound *sound = INDICATOR_SOUND (io);
-    GtkAdjustment *adj = gtk_range_get_adjustment (GTK_RANGE (sound->slider));
-    gdouble value = gtk_range_get_value (GTK_RANGE (sound->slider));
-    
-    if (direction == INDICATOR_OBJECT_SCROLL_UP){
-        value += adj->step_increment;
-    }
-    else{
-        value -= adj->step_increment;
-    }
-    gtk_range_set_value (GTK_RANGE (sound->slider),
-                   value);
-}

=== removed file 'src/indicator-sound.h'
--- src/indicator-sound.h	2010-03-02 19:36:53 +0000
+++ src/indicator-sound.h	1970-01-01 00:00:00 +0000
@@ -1,35 +0,0 @@
-#ifndef __INCLUDE_INDICATOR_SOUND_H__
-#define __INCLUDE_INDICATOR_SOUND_H__
-
-/*
-A small wrapper utility to load indicators and put them as menu items
-into the gnome-panel using it's applet interface.
-
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curra@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-// Essentially these are all exported to faciltiate testing
-void prepare_state_machine();
-void determine_state_from_volume(gdouble volume_percent);
-gint get_state();
-gchar* get_state_image_name(gint state);
-void prepare_for_tests(IndicatorObject * io);
-void tidy_up_hash();
-
-#endif

=== added file 'src/main.vala'
--- src/main.vala	1970-01-01 00:00:00 +0000
+++ src/main.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,14 @@
+
+[CCode (cheader_filename="libintl.h", type="char *")]
+extern unowned string bind_textdomain_codeset (string domainname, string codeset);
+
+static int main (string[] args) {
+	bind_textdomain_codeset (Config.GETTEXT_PACKAGE, "UTF-8");
+	Intl.setlocale (LocaleCategory.ALL, "");
+	Intl.bindtextdomain (Config.GETTEXT_PACKAGE, Config.GNOMELOCALEDIR);
+
+	Notify.init ("indicator-sound");
+
+	var service = new IndicatorSound.Service ();
+	return service.run ();
+}

=== added file 'src/media-player-list.vala'
--- src/media-player-list.vala	1970-01-01 00:00:00 +0000
+++ src/media-player-list.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *      Lars Uebernickel <lars.uebernickel@xxxxxxxxxxxxx>
+ */
+
+/**
+ * MediaPlayerList is a list of media players that should appear in the sound menu.  Its main responsibility is
+ * to listen for MPRIS players on the bus and attach them to the corresponding %Player objects.
+ */
+public class MediaPlayerList {
+
+	public MediaPlayerList () {
+		this._players = new HashTable<string, MediaPlayer> (str_hash, str_equal);
+
+		BusWatcher.watch_namespace (BusType.SESSION, "org.mpris.MediaPlayer2", this.player_appeared, this.player_disappeared);
+	}
+
+	/* only valid while the list is not changed */
+	public class Iterator {
+		HashTableIter<string, MediaPlayer> iter;
+
+		public Iterator (MediaPlayerList list) {
+			this.iter = HashTableIter<string, MediaPlayer> (list._players);
+		}
+
+		public MediaPlayer? next_value () {
+			MediaPlayer? player;
+
+			if (this.iter.next (null, out player))
+				return player;
+			else
+				return null;
+		}
+	}
+
+	public Iterator iterator () {
+		return new Iterator (this);
+	}
+
+	/**
+	 * Adds the player associated with @desktop_id.  Does nothing if such a player already exists.
+	 */
+	MediaPlayer? insert (string desktop_id) {
+		var id = desktop_id.has_suffix (".desktop") ? desktop_id : desktop_id + ".desktop";
+		MediaPlayer? player = this._players.lookup (id);
+
+		if (player == null) {
+			var appinfo = new DesktopAppInfo (id);
+			if (appinfo == null) {
+				warning ("unable to find application '%s'", id);
+				return null;
+			}
+
+			player = new MediaPlayer (appinfo);
+			this._players.insert (player.id, player);
+			this.player_added (player);
+		}
+
+		return player;
+	}
+
+	/**
+	 * Removes the player associated with @desktop_id, unless it is currently running.
+	 */
+	void remove (string desktop_id) {
+		MediaPlayer? player = this._players.lookup (desktop_id);
+
+		if (player != null && !player.is_running) {
+			this._players.remove (desktop_id);
+			this.player_removed (player);
+		}
+	}
+
+	/**
+	 * Synchronizes the player list with @desktop_ids.  After this call, this list will only contain the players
+	 * in @desktop_ids.  Players that were running but are not in @desktop_ids will remain in the list.
+	 */
+	public void sync (string[] desktop_ids) {
+
+		/* hash desktop_ids for faster lookup */
+		var hash = new HashTable<string, unowned string> (str_hash, str_equal);
+		foreach (var id in desktop_ids)
+			hash.add (id);
+
+		/* remove players that are not desktop_ids */
+		foreach (var id in this._players.get_keys ()) {
+			if (!hash.contains (id))
+				this.remove (id);
+		}
+
+		/* insert all players (insert() takes care of not adding a player twice */
+		foreach (var id in desktop_ids)
+			this.insert (id);
+	}
+
+	public signal void player_added (MediaPlayer player);
+	public signal void player_removed (MediaPlayer player);
+
+	HashTable<string, MediaPlayer> _players;
+
+	void player_appeared (DBusConnection connection, string name, string owner) {
+		try {
+			MprisRoot mpris2_root = Bus.get_proxy_sync (BusType.SESSION, name, MPRIS_MEDIA_PLAYER_PATH);
+
+			var player = this.insert (mpris2_root.DesktopEntry);
+			if (player != null)
+				player.attach (name);
+		}
+		catch (Error e) {
+			warning ("unable to create mpris proxy for '%s': %s", name, e.message);
+		}
+	}
+
+	void player_disappeared (DBusConnection connection, string dbus_name) {
+		MediaPlayer? player = this._players.find ( (name, player) => {
+			return player.dbus_name == dbus_name;
+		});
+
+		if (player != null)
+			player.detach ();
+	}
+}

=== added file 'src/media-player.vala'
--- src/media-player.vala	1970-01-01 00:00:00 +0000
+++ src/media-player.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,297 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *      Lars Uebernickel <lars.uebernickel@xxxxxxxxxxxxx>
+ */
+
+/**
+ * MediaPlayer represents an MRPIS-capable media player.
+ */
+public class MediaPlayer: Object {
+
+	public MediaPlayer (DesktopAppInfo appinfo) {
+		this.appinfo = appinfo;
+	}
+
+	/** Desktop id of the player */
+	public string id {
+		get {
+			return this.appinfo.get_id ();
+		}
+	}
+
+	/** Display name of the player */
+	public string name {
+		get {
+			return this.appinfo.get_name ();
+		}
+	}
+
+	/** Application icon of the player */
+	public Icon icon {
+		get {
+			return this.appinfo.get_icon ();
+		}
+	}
+
+	/**
+	 * True if an instance of the player is currently running.
+	 *
+	 * See also: attach(), detach()
+	 */
+	public bool is_running {
+		get {
+			return this.proxy != null;
+		}
+	}
+
+	/** Name of the player on the bus, if an instance is currently running */
+	public string dbus_name {
+		get {
+			return this._dbus_name;
+		}
+	}
+
+	public string state {
+		get; private set; default = "Paused";
+	}
+
+	public class Track : Object {
+		public string artist { get; construct; }
+		public string title { get; construct; }
+		public string album { get; construct; }
+		public string art_url { get; construct; }
+
+		public Track (string artist, string title, string album, string art_url) {
+			Object (artist: artist, title: title, album: album, art_url: art_url);
+		}
+	}
+
+	public Track current_track {
+		get; set;
+	}
+
+	public signal void playlists_changed ();
+
+	/**
+	 * Attach this object to a process of the associated media player.  The player must own @dbus_name and
+	 * implement the org.mpris.MediaPlayer2.Player interface.
+	 *
+	 * Only one player can be attached at any given time.  Use detach() to detach a player.
+	 *
+	 * This method does not block.  If it is successful, "is-running" will be set to %TRUE.
+	 */
+	public void attach (string dbus_name) {
+		return_if_fail (this._dbus_name == null && this.proxy == null);
+
+		this._dbus_name = dbus_name;
+		Bus.get_proxy.begin<MprisPlayer> (BusType.SESSION, dbus_name, "/org/mpris/MediaPlayer2",
+										  DBusProxyFlags.GET_INVALIDATED_PROPERTIES, null, got_proxy);
+		Bus.get_proxy.begin<MprisPlaylists> (BusType.SESSION, dbus_name, "/org/mpris/MediaPlayer2",
+											 DBusProxyFlags.GET_INVALIDATED_PROPERTIES, null, got_playlists_proxy);
+	}
+
+	/**
+	 * Detach this object from a process running the associated media player.
+	 *
+	 * See also: attach()
+	 */
+	public void detach () {
+		this.proxy = null;
+		this._dbus_name = null;
+		this.notify_property ("is-running");
+		this.state = "Paused";
+		this.current_track = null;
+	}
+
+	/**
+	 * Launch the associated media player.
+	 *
+	 * Note: this will _not_ call attach(), because it doesn't know on which dbus-name the player will appear.
+	 * Use attach() to attach this object to a running instance of the player.
+	 */
+	public void launch () {
+		try {
+			this.appinfo.launch (null, null);
+		}
+		catch (Error e) {
+			warning ("unable to launch %s: %s", appinfo.get_name (), e.message);
+		}
+
+		if (this.proxy == null)
+			this.state = "Launching";
+	}
+
+	/**
+	 * Toggles playing status.
+	 */
+	public void play_pause () {
+		if (this.proxy != null) {
+			this.proxy.PlayPause.begin ();
+		}
+		else if (this.state != "Launching") {
+			this.play_when_attached = true;
+			this.launch ();
+		}
+	}
+
+	/**
+	 * Skips to the next track.
+	 */
+	public void next () {
+		if (this.proxy != null)
+			this.proxy.Next.begin ();
+	}
+
+	/**
+	 * Skips to the previous track.
+	 */
+	public void previous () {
+		if (this.proxy != null)
+			this.proxy.Previous.begin ();
+	}
+
+	public uint get_n_playlists () {
+		return this.playlists != null ? this.playlists.length : 0;
+	}
+
+	public string get_playlist_id (int index) {
+		return_val_if_fail (index < this.playlists.length, "");
+		return this.playlists[index].path;
+	}
+
+	public string get_playlist_name (int index) {
+		return_val_if_fail (index < this.playlists.length, "");
+		return this.playlists[index].name;
+	}
+
+	public void activate_playlist_by_name (string name) {
+		if (this.playlists_proxy != null)
+			this.playlists_proxy.ActivatePlaylist.begin (new ObjectPath (name));
+	}
+
+	DesktopAppInfo appinfo;
+	MprisPlayer? proxy;
+	MprisPlaylists ?playlists_proxy;
+	string _dbus_name;
+	bool play_when_attached = false;
+	PlaylistDetails[] playlists = null;
+
+	void got_proxy (Object? obj, AsyncResult res) {
+		try {
+			this.proxy = Bus.get_proxy.end (res);
+
+			/* Connecting to GDBusProxy's "g-properties-changed" signal here, because vala's dbus objects don't
+			 * emit notify signals */
+			var gproxy = this.proxy as DBusProxy;
+			gproxy.g_properties_changed.connect (this.proxy_properties_changed);
+
+			this.notify_property ("is-running");
+			this.state = this.proxy.PlaybackStatus;
+			this.update_current_track (gproxy.get_cached_property ("Metadata"));
+
+			if (this.play_when_attached) {
+				/* wait a little before calling PlayPause, some players need some time to
+				   set themselves up */
+				Timeout.add (1000, () => { proxy.PlayPause.begin (); return false; } );
+				this.play_when_attached = false;
+			}
+		}
+		catch (Error e) {
+			this._dbus_name = null;
+			warning ("unable to attach to media player: %s", e.message);
+		}
+	}
+
+	void fetch_playlists () {
+		/* The proxy is created even when the interface is not supported. GDBusProxy will
+		   return 0 for the PlaylistCount property in that case. */
+		if (this.playlists_proxy != null && this.playlists_proxy.PlaylistCount > 0) {
+			this.playlists_proxy.GetPlaylists.begin (0, 100, "Alphabetical", false, (obj, res) => {
+				try {
+					this.playlists = playlists_proxy.GetPlaylists.end (res);
+					this.playlists_changed ();
+				}
+				catch (Error e) {
+					warning ("could not fetch playlists: %s", e.message);
+					this.playlists = null;
+				}
+			});
+		}
+		else {
+			this.playlists = null;
+			this.playlists_changed ();
+		}
+	}
+
+	void got_playlists_proxy (Object? obj, AsyncResult res) {
+		try {
+			this.playlists_proxy = Bus.get_proxy.end (res);
+
+			var gproxy = this.proxy as DBusProxy;
+			gproxy.g_properties_changed.connect (this.playlists_proxy_properties_changed);
+		}
+		catch (Error e) {
+			warning ("unable to create mpris plalists proxy: %s", e.message);
+			return;
+		}
+
+		Timeout.add (500, () => { this.fetch_playlists (); return false; } );
+	}
+
+	/* some players (e.g. Spotify) don't follow the spec closely and pass single strings in metadata fields
+	 * where an array of string is expected */
+	static string sanitize_metadata_value (Variant? v) {
+		if (v == null)
+			return "";
+		else if (v.is_of_type (VariantType.STRING))
+			return v.get_string ();
+		else if (v.is_of_type (VariantType.STRING_ARRAY))
+			return string.joinv (",", v.get_strv ());
+
+		warn_if_reached ();
+		return "";
+	}
+
+	void proxy_properties_changed (DBusProxy proxy, Variant changed_properties, string[] invalidated_properties) {
+		if (changed_properties.lookup ("PlaybackStatus", "s", null)) {
+			this.state = this.proxy.PlaybackStatus;
+		}
+
+		var metadata = changed_properties.lookup_value ("Metadata", new VariantType ("a{sv}"));
+		if (metadata != null)
+			this.update_current_track (metadata);
+	}
+
+	void playlists_proxy_properties_changed (DBusProxy proxy, Variant changed_properties, string[] invalidated_properties) {
+		if (changed_properties.lookup ("PlaylistCount", "u", null))
+			this.fetch_playlists ();
+	}
+
+	void update_current_track (Variant metadata) {
+		if (metadata != null) {
+			this.current_track = new Track (
+				sanitize_metadata_value (metadata.lookup_value ("xesam:artist", null)),
+				sanitize_metadata_value (metadata.lookup_value ("xesam:title", null)),
+				sanitize_metadata_value (metadata.lookup_value ("xesam:album", null)),
+				sanitize_metadata_value (metadata.lookup_value ("mpris:artUrl", null))
+			);
+		}
+		else {
+			this.current_track = null;
+		}
+	}
+}

=== added file 'src/mpris2-interfaces.vala'
--- src/mpris2-interfaces.vala	1970-01-01 00:00:00 +0000
+++ src/mpris2-interfaces.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,79 @@
+/*
+Copyright 2010 Canonical Ltd.
+Authors:
+    Conor Curran <conor.curran@xxxxxxxxxxxxx>
+
+This program is free software: you can redistribute it and/or modify it 
+under the terms of the GNU General Public License version 3, as published 
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but 
+WITHOUT ANY WARRANTY; without even the implied warranties of 
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
+PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along 
+with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+const string MPRIS_PREFIX = "org.mpris.MediaPlayer2.";
+const string MPRIS_MEDIA_PLAYER_PATH = "/org/mpris/MediaPlayer2";
+
+[DBus (name = "org.mpris.MediaPlayer2")]
+public interface MprisRoot : Object {
+  // properties
+  public abstract bool HasTracklist{owned get; set;}
+  public abstract bool CanQuit{owned get; set;}
+  public abstract bool CanRaise{owned get; set;}
+  public abstract string Identity{owned get; set;}
+  public abstract string DesktopEntry{owned get; set;}
+  // methods
+  public abstract async void Quit() throws IOError;
+  public abstract async void Raise() throws IOError;
+}
+
+[DBus (name = "org.mpris.MediaPlayer2.Player")]
+public interface MprisPlayer : Object {
+  // properties
+  public abstract HashTable<string, Variant?> Metadata{owned get; set;}
+  public abstract int32 Position{owned get; set;}
+  public abstract string PlaybackStatus{owned get; set;}  
+  // methods
+  public abstract async void PlayPause() throws IOError;
+  public abstract async void Next() throws IOError;
+  public abstract async void Previous() throws IOError;
+  public abstract async void Seek(int64 offset) throws IOError;
+  // signals
+  public signal void Seeked(int64 new_position);
+}
+
+// Playlist container
+public struct PlaylistDetails{
+  public ObjectPath? path;
+  public string? name;
+  public string? icon_path;
+}
+
+// Active playlist property container
+public struct ActivePlaylistContainer{
+  public bool valid;
+  public PlaylistDetails? details;
+}
+
+[DBus (name = "org.mpris.MediaPlayer2.Playlists")]
+public interface MprisPlaylists : Object {
+  //properties
+  public abstract string[] Orderings{owned get; set;}
+  public abstract uint32 PlaylistCount{owned get; set;}
+  public abstract ActivePlaylistContainer? ActivePlaylist {owned get; set;}
+  
+  //methods
+  public abstract async void ActivatePlaylist(ObjectPath playlist_id) throws IOError;
+  public abstract async PlaylistDetails[]? GetPlaylists ( uint32 index,
+                                                          uint32 max_count,
+                                                          string order,
+                                                          bool reverse_order ) throws IOError;
+  //signals
+  public signal void PlaylistChanged (PlaylistDetails details);
+  
+}

=== renamed file 'src/pulse-manager.c' => 'src/pulse-manager.c.THIS'
=== removed file 'src/pulse-manager.h'
--- src/pulse-manager.h	2010-03-24 15:47:37 +0000
+++ src/pulse-manager.h	1970-01-01 00:00:00 +0000
@@ -1,48 +0,0 @@
-#ifndef __INCLUDE_PULSE_MANAGER_H__
-#define __INCLUDE_PULSE_MANAGER_H__
-/*
-A small wrapper utility to load indicators and put them as menu items
-into the gnome-panel using it's applet interface.
-
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include <pulse/pulseaudio.h>
-#include <glib.h>
-#include "sound-service-dbus.h"
-
-
-typedef struct {
-    gchar* name;
-    gint index;
-    pa_cvolume volume;
-    pa_channel_map channel_map;
-    gboolean mute;
-    pa_volume_t base_volume;
-} sink_info;
-
-
-pa_context* get_context(void);
-void establish_pulse_activities(SoundServiceDbus *service);
-void set_sink_volume(gdouble percent);
-void toggle_global_mute(gboolean mute_value); 
-void close_pulse_activites();
-
-#endif
-

=== added file 'src/service.vala'
--- src/service.vala	1970-01-01 00:00:00 +0000
+++ src/service.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,327 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *      Lars Uebernickel <lars.uebernickel@xxxxxxxxxxxxx>
+ */
+
+public class IndicatorSound.Service {
+	public Service () {
+		this.settings = new Settings ("com.canonical.indicator.sound");
+
+		this.volume_control = new VolumeControl ();
+
+		this.players = new MediaPlayerList ();
+		this.players.player_added.connect (this.player_added);
+		this.players.player_removed.connect (this.player_removed);
+
+		this.actions = new SimpleActionGroup ();
+		this.actions.add_action_entries (action_entries, this);
+		this.actions.add_action (this.create_mute_action ());
+		this.actions.add_action (this.create_volume_action ());
+		this.actions.add_action (this.create_mic_volume_action ());
+
+		this.menus = new HashTable<string, SoundMenu> (str_hash, str_equal);
+		this.menus.insert ("desktop_greeter", new SoundMenu (null, SoundMenu.DisplayFlags.SHOW_MUTE));
+		this.menus.insert ("desktop", new SoundMenu ("indicator.desktop-settings", SoundMenu.DisplayFlags.SHOW_MUTE));
+		this.menus.insert ("phone", new SoundMenu ("indicator.phone-settings", SoundMenu.DisplayFlags.HIDE_INACTIVE_PLAYERS));
+
+		this.menus.@foreach ( (profile, menu) => {
+			this.volume_control.bind_property ("active-mic", menu, "show-mic-volume", BindingFlags.SYNC_CREATE);
+		});
+
+		this.players.sync (settings.get_strv ("interested-media-players"));
+		this.settings.changed["interested-media-players"].connect ( () => {
+			this.players.sync (settings.get_strv ("interested-media-players"));
+		});
+
+		if (settings.get_boolean ("show-notify-osd-on-scroll")) {
+			unowned List<string> caps = Notify.get_server_caps ();
+			if (caps.find_custom ("x-canonical-private-synchronous", strcmp) != null) {
+				this.notification = new Notify.Notification ("indicator-sound", "", "");
+				this.notification.set_hint_string ("x-canonical-private-synchronous", "indicator-sound");
+			}
+		}
+	}
+
+	public int run () {
+		if (this.loop != null) {
+			warning ("service is already running");
+			return 1;
+		}
+
+		Bus.own_name (BusType.SESSION, "com.canonical.indicator.sound", BusNameOwnerFlags.NONE,
+			this.bus_acquired, null, this.name_lost);
+
+		this.loop = new MainLoop (null, false);
+		this.loop.run ();
+
+		return 0;
+	}
+
+	const ActionEntry[] action_entries = {
+		{ "root", null, null, "@a{sv} {}", null },
+		{ "scroll", activate_scroll_action, "i", null, null },
+		{ "desktop-settings", activate_desktop_settings, null, null, null },
+		{ "phone-settings", activate_phone_settings, null, null, null },
+	};
+
+	MainLoop loop;
+	SimpleActionGroup actions;
+	HashTable<string, SoundMenu> menus;
+	Settings settings;
+	VolumeControl volume_control;
+	MediaPlayerList players;
+	uint player_action_update_id;
+	Notify.Notification notification;
+
+	void activate_scroll_action (SimpleAction action, Variant? param) {
+		const double volume_step_percentage = 0.06;
+		int delta = param.get_int32(); /* positive for up, negative for down */
+
+		double v = this.volume_control.get_volume () + volume_step_percentage * delta;
+		this.volume_control.set_volume (v.clamp (0.0, 1.0));
+
+		if (this.notification != null) {
+			string icon;
+			if (v <= 0.0)
+				icon = "notification-audio-volume-off";
+			else if (v <= 0.3)
+				icon = "notification-audio-volume-low";
+			else if (v <= 0.7)
+				icon = "notification-audio-volume-medium";
+			else
+				icon = "notification-audio-volume-high";
+
+			this.notification.update ("indicator-sound", "", icon);
+			this.notification.set_hint_int32 ("value", ((int32) (100 * v)).clamp (-1, 101));
+			try {
+				this.notification.show ();
+			}
+			catch (Error e) {
+				warning ("unable to show notification: %s", e.message);
+			}
+		}
+	}
+
+	void activate_desktop_settings (SimpleAction action, Variant? param) {
+		var env = Environment.get_variable ("DESKTOP_SESSION");
+		string cmd;
+		if (env == "unity")
+			cmd = "gnome-control-center sound-nua";
+		else if (env == "xubuntu" || env == "ubuntustudio")
+			cmd = "pavucontrol";
+		else
+			cmd = "gnome-control-center sound";
+
+		try {
+			Process.spawn_command_line_async (cmd);
+		} catch (Error e) {
+			warning ("unable to launch sound settings: %s", e.message);
+		}
+	}
+
+	void activate_phone_settings (SimpleAction action, Variant? param) {
+		UrlDispatch.send ("settings:///system/sound");
+	}
+
+	/* Returns a serialized version of @icon_name suited for the panel */
+	static Variant serialize_themed_icon (string icon_name)
+	{
+		var icon = new ThemedIcon.with_default_fallbacks (icon_name);
+		return g_icon_serialize (icon);
+	}
+
+	void update_root_icon () {
+		double volume = this.volume_control.get_volume ();
+		string icon;
+		if (this.volume_control.mute)
+			icon = "audio-volume-muted-panel";
+		else if (volume <= 0.0)
+			icon = "audio-volume-low-zero-panel";
+		else if (volume <= 0.3)
+			icon = "audio-volume-low-panel";
+		else if (volume <= 0.7)
+			icon = "audio-volume-medium-panel";
+		else
+			icon  = "audio-volume-high-panel";
+
+		string accessible_name;
+		if (this.volume_control.mute) {
+			accessible_name = _("Volume (muted)");
+		} else {
+			int volume_int = (int)(volume * 100);
+			accessible_name = "%s (%d%%)".printf (_("Volume"), volume_int);
+		}
+
+		var root_action = actions.lookup_action ("root") as SimpleAction;
+		var builder = new VariantBuilder (new VariantType ("a{sv}"));
+		builder.add ("{sv}", "title", new Variant.string (_("Sound")));
+		builder.add ("{sv}", "accessible-desc", new Variant.string (accessible_name));
+		builder.add ("{sv}", "icon", serialize_themed_icon (icon));
+		builder.add ("{sv}", "visible", new Variant.boolean (true));
+		root_action.set_state (builder.end());
+	}
+
+	Action create_mute_action () {
+		var mute_action = new SimpleAction.stateful ("mute", null, this.volume_control.mute);
+
+		mute_action.activate.connect ( (action, param) => {
+			action.change_state (!action.get_state ().get_boolean ());
+		});
+
+		mute_action.change_state.connect ( (action, val) => {
+			volume_control.set_mute (val.get_boolean ());
+		});
+
+		this.volume_control.notify["mute"].connect ( () => {
+			mute_action.set_state (this.volume_control.mute);
+			this.update_root_icon ();
+		});
+
+		return mute_action;
+	}
+
+	void volume_changed (double volume) {
+		var volume_action = this.actions.lookup_action ("volume") as SimpleAction;
+		volume_action.set_state (volume);
+
+		this.update_root_icon ();
+	}
+
+	Action create_volume_action () {
+		var volume_action = new SimpleAction.stateful ("volume", null, this.volume_control.get_volume ());
+
+		volume_action.change_state.connect ( (action, val) => {
+			volume_control.set_volume (val.get_double ());
+		});
+
+		this.volume_control.volume_changed.connect (volume_changed);
+
+		this.volume_control.bind_property ("ready", volume_action, "enabled", BindingFlags.SYNC_CREATE);
+
+		return volume_action;
+	}
+
+	Action create_mic_volume_action () {
+		var volume_action = new SimpleAction.stateful ("mic-volume", null, this.volume_control.get_mic_volume ());
+
+		volume_action.change_state.connect ( (action, val) => {
+			volume_control.set_mic_volume (val.get_double ());
+		});
+
+		this.volume_control.mic_volume_changed.connect ( (volume) => {
+			volume_action.set_state (volume);
+		});
+
+		this.volume_control.bind_property ("ready", volume_action, "enabled", BindingFlags.SYNC_CREATE);
+
+		return volume_action;
+	}
+
+	void bus_acquired (DBusConnection connection, string name) {
+		try {
+			connection.export_action_group ("/com/canonical/indicator/sound", this.actions);
+		} catch (Error e) {
+			critical ("%s", e.message);
+		}
+
+		this.menus.@foreach ( (profile, menu) => menu.export (connection, @"/com/canonical/indicator/sound/$profile"));
+	}
+
+	void name_lost (DBusConnection connection, string name) {
+		this.loop.quit ();
+	}
+
+	Variant action_state_for_player (MediaPlayer player) {
+		var builder = new VariantBuilder (new VariantType ("a{sv}"));
+		builder.add ("{sv}", "running", new Variant ("b", player.is_running));
+		builder.add ("{sv}", "state", new Variant ("s", player.state));
+		if (player.current_track != null) {
+			builder.add ("{sv}", "title", new Variant ("s", player.current_track.title));
+			builder.add ("{sv}", "artist", new Variant ("s", player.current_track.artist));
+			builder.add ("{sv}", "album", new Variant ("s", player.current_track.album));
+			builder.add ("{sv}", "art-url", new Variant ("s", player.current_track.art_url));
+		}
+		return builder.end ();
+	}
+
+	bool update_player_actions () {
+		foreach (var player in this.players) {
+			SimpleAction? action = this.actions.lookup_action (player.id) as SimpleAction;
+			if (action != null)
+				action.set_state (this.action_state_for_player (player));
+		}
+
+		this.player_action_update_id = 0;
+		return false;
+	}
+
+	void eventually_update_player_actions () {
+		if (player_action_update_id == 0)
+			this.player_action_update_id = Idle.add (this.update_player_actions);
+	}
+
+	void update_preferred_players () {
+		var builder = new VariantBuilder (VariantType.STRING_ARRAY);
+		foreach (var player in this.players)
+			builder.add ("s", player.id);
+		this.settings.set_value ("interested-media-players", builder.end ());
+	}
+
+	void player_added (MediaPlayer player) {
+		this.menus.@foreach ( (profile, menu) => menu.add_player (player));
+
+		SimpleAction action = new SimpleAction.stateful (player.id, null, this.action_state_for_player (player));
+		action.activate.connect ( () => { player.launch (); });
+		this.actions.add_action (action);
+
+		var play_action = new SimpleAction.stateful ("play." + player.id, null, player.state);
+		play_action.activate.connect ( () => player.play_pause () );
+		this.actions.add_action (play_action);
+		player.notify.connect ( (object, pspec) => {
+			if (pspec.name == "state")
+				play_action.set_state (player.state);
+		});
+
+		var next_action = new SimpleAction ("next." + player.id, null);
+		next_action.activate.connect ( () => player.next () );
+		this.actions.add_action (next_action);
+
+		var prev_action = new SimpleAction ("previous." + player.id, null);
+		prev_action.activate.connect ( () => player.previous () );
+		this.actions.add_action (prev_action);
+
+		var playlist_action = new SimpleAction ("play-playlist." + player.id, VariantType.STRING);
+		playlist_action.activate.connect ( (parameter) => player.activate_playlist_by_name (parameter.get_string ()) );
+		this.actions.add_action (playlist_action);
+
+		player.notify.connect (this.eventually_update_player_actions);
+
+		this.update_preferred_players ();
+	}
+
+	void player_removed (MediaPlayer player) {
+		this.actions.remove_action (player.id);
+		this.actions.remove_action ("play." + player.id);
+		this.actions.remove_action ("next." + player.id);
+		this.actions.remove_action ("previous." + player.id);
+		this.actions.remove_action ("play-playlist." + player.id);
+
+		this.menus.@foreach ( (profile, menu) => menu.remove_player (player));
+
+		this.update_preferred_players ();
+	}
+}

=== removed file 'src/slider-menu-item.c'
--- src/slider-menu-item.c	2010-03-26 13:56:46 +0000
+++ src/slider-menu-item.c	1970-01-01 00:00:00 +0000
@@ -1,103 +0,0 @@
-/*
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <glib/gi18n.h>
-#include "slider-menu-item.h"
-#include "pulse-manager.h"
-#include "common-defs.h"
-
-
-typedef struct _SliderMenuItemPrivate SliderMenuItemPrivate;
-
-struct _SliderMenuItemPrivate
-{
-	gdouble slider_value;
-};
-
-#define SLIDER_MENU_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SLIDER_MENU_ITEM_TYPE, SliderMenuItemPrivate))
-
-/* Prototypes */
-static void slider_menu_item_class_init (SliderMenuItemClass *klass);
-static void slider_menu_item_init       (SliderMenuItem *self);
-static void slider_menu_item_dispose    (GObject *object);
-static void slider_menu_item_finalize   (GObject *object);
-static void handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp);
-
-G_DEFINE_TYPE (SliderMenuItem, slider_menu_item, DBUSMENU_TYPE_MENUITEM);
-
-static void slider_menu_item_class_init (SliderMenuItemClass *klass)
-{
-	GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-	g_type_class_add_private (klass, sizeof (SliderMenuItemPrivate));
-
-	object_class->dispose = slider_menu_item_dispose;
-	object_class->finalize = slider_menu_item_finalize;
-
-    DbusmenuMenuitemClass * mclass = DBUSMENU_MENUITEM_CLASS(klass);
-    mclass->handle_event = handle_event;
-	return;
-}
-
-static void slider_menu_item_init (SliderMenuItem *self)
-{
-	g_debug("Building new Slider Menu Item");
-	return;
-}
-
-static void slider_menu_item_dispose (GObject *object)
-{
-	G_OBJECT_CLASS (slider_menu_item_parent_class)->dispose (object);
-	return;
-}
-
-static void
-slider_menu_item_finalize (GObject *object)
-{
-	G_OBJECT_CLASS (slider_menu_item_parent_class)->finalize (object);
-}
-
-
-static void
-handle_event (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp)
-{
-	g_debug("in the handle event method of slider_menu_item");
-    gdouble volume_input = 0;
-    volume_input = g_value_get_double(value);
-    if(value != NULL)
-        set_sink_volume(volume_input);
-}
-
-
-
-SliderMenuItem* slider_menu_item_new(gboolean sinks_available, gdouble start_volume)
-{
-	SliderMenuItem *self = g_object_new(SLIDER_MENU_ITEM_TYPE, NULL);
-    dbusmenu_menuitem_property_set(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_TYPE, DBUSMENU_SLIDER_MENUITEM_TYPE);
-    dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_ENABLED, sinks_available);
-    dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(self), DBUSMENU_MENUITEM_PROP_VISIBLE, sinks_available);
-	return self;
-}
-
-
-
-    

=== removed file 'src/slider-menu-item.h'
--- src/slider-menu-item.h	2010-02-11 15:19:22 +0000
+++ src/slider-menu-item.h	1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
-/*
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-#ifndef __SLIDER_MENU_ITEM_H__
-#define __SLIDER_MENU_ITEM_H__
-
-#include <glib.h>
-#include <glib-object.h>
-
-#include <libdbusmenu-glib/menuitem.h>
-
-G_BEGIN_DECLS
-
-#define SLIDER_MENU_ITEM_TYPE            (slider_menu_item_get_type ())
-#define SLIDER_MENU_ITEM(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SLIDER_MENU_ITEM_TYPE, SliderMenuItem))
-#define SLIDER_MENU_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SLIDER_MENU_ITEM_TYPE, SliderMenuItemClass))
-#define IS_SLIDER_MENU_ITEM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SLIDER_MENU_ITEM_TYPE))
-#define IS_SLIDER_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SLIDER_MENU_ITEM_TYPE))
-#define SLIDER_MENU_ITEM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SLIDER_MENU_ITEM_TYPE, SliderMenuItemClass))
-
-typedef struct _SliderMenuItem      SliderMenuItem;
-typedef struct _SliderMenuItemClass SliderMenuItemClass;
-
-struct _SliderMenuItemClass {
-	DbusmenuMenuitemClass parent_class;
-};
-
-struct _SliderMenuItem {
-	DbusmenuMenuitem parent;
-};
-
-GType slider_menu_item_get_type (void);
-// TODO for now the volume percent param is not being used - remove once init mystery is solved
-SliderMenuItem* slider_menu_item_new(gboolean sinks_available, gdouble current_vol);
-
-G_END_DECLS
-
-#endif
-

=== added file 'src/sound-menu.vala'
--- src/sound-menu.vala	1970-01-01 00:00:00 +0000
+++ src/sound-menu.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,216 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *      Lars Uebernickel <lars.uebernickel@xxxxxxxxxxxxx>
+ */
+
+/* Icon.serialize() is not yet in gio-2.0.vapi; remove this when it is */
+extern Variant? g_icon_serialize (Icon icon);
+
+class SoundMenu: Object
+{
+	public enum DisplayFlags {
+		NONE = 0,
+		SHOW_MUTE = 1,
+		HIDE_INACTIVE_PLAYERS = 2
+	}
+
+	public SoundMenu (string? settings_action, DisplayFlags flags) {
+		/* A sound menu always has at least two sections: the volume section (this.volume_section)
+		 * at the start of the menu, and the settings section at the end. Between those two,
+		 * it has a dynamic amount of player sections, one for each registered player.
+		 */
+
+		this.volume_section = new Menu ();
+		if ((flags & DisplayFlags.SHOW_MUTE) != 0)
+			volume_section.append (_("Mute"), "indicator.mute");
+		volume_section.append_item (this.create_slider_menu_item ("indicator.volume", 0.0, 1.0, 0.01,
+																  "audio-volume-low-zero-panel",
+																  "audio-volume-high-panel"));
+
+		this.menu = new Menu ();
+		this.menu.append_section (null, volume_section);
+
+		if (settings_action != null) {
+			settings_shown = true;
+			this.menu.append (_("Sound Settings…"), settings_action);
+		}
+
+		var root_item = new MenuItem (null, "indicator.root");
+		root_item.set_attribute ("x-canonical-type", "s", "com.canonical.indicator.root");
+		root_item.set_attribute ("x-canonical-scroll-action", "s", "indicator.scroll");
+		root_item.set_attribute ("x-canonical-secondary-action", "s", "indicator.mute");
+		root_item.set_submenu (this.menu);
+
+		this.root = new Menu ();
+		root.append_item (root_item);
+
+		this.hide_inactive = (flags & DisplayFlags.HIDE_INACTIVE_PLAYERS) != 0;
+		this.notify_handlers = new HashTable<MediaPlayer, ulong> (direct_hash, direct_equal);
+	}
+
+	public void export (DBusConnection connection, string object_path) {
+		try {
+			connection.export_menu_model (object_path, this.root);
+		} catch (Error e) {
+			critical ("%s", e.message);
+		}
+	}
+
+	public bool show_mic_volume {
+		get {
+			return this.mic_volume_shown;
+		}
+		set {
+			if (value && !this.mic_volume_shown) {
+				var slider = this.create_slider_menu_item ("indicator.mic-volume", 0.0, 1.0, 0.01,
+														   "audio-input-microphone-low-zero-panel",
+														   "audio-input-microphone-high-panel");
+				volume_section.append_item (slider);
+				this.mic_volume_shown = true;
+			}
+			else if (!value && this.mic_volume_shown) {
+				this.volume_section.remove (this.volume_section.get_n_items () -1);
+				this.mic_volume_shown = false;
+			}
+		}
+	}
+
+	public void add_player (MediaPlayer player) {
+		if (this.notify_handlers.contains (player))
+			return;
+
+		if (player.is_running || !this.hide_inactive)
+			this.insert_player_section (player);
+		this.update_playlists (player);
+
+		var handler_id = player.notify["is-running"].connect ( () => {
+			if (this.hide_inactive) {
+				if (player.is_running)
+					this.insert_player_section (player);
+				else
+					this.remove_player_section (player);
+			}
+			this.update_playlists (player);
+		});
+		this.notify_handlers.insert (player, handler_id);
+
+		player.playlists_changed.connect (this.update_playlists);
+	}
+
+	public void remove_player (MediaPlayer player) {
+		this.remove_player_section (player);
+		this.notify_handlers.remove (player);
+	}
+
+	Menu root;
+	Menu menu;
+	Menu volume_section;
+	bool mic_volume_shown;
+	bool settings_shown = false;
+	bool hide_inactive;
+	HashTable<MediaPlayer, ulong> notify_handlers;
+
+	/* returns the position in this.menu of the section that's associated with @player */
+	int find_player_section (MediaPlayer player) {
+		string action_name = @"indicator.$(player.id)";
+		int n = this.menu.get_n_items () -1;
+		for (int i = 1; i < n; i++) {
+			var section = this.menu.get_item_link (i, Menu.LINK_SECTION);
+			string action;
+			section.get_item_attribute (0, "action", "s", out action);
+			if (action == action_name)
+				return i;
+		}
+
+		return -1;
+	}
+
+	void insert_player_section (MediaPlayer player) {
+		var section = new Menu ();
+
+		var player_item = new MenuItem (player.name, "indicator." + player.id);
+		player_item.set_attribute ("x-canonical-type", "s", "com.canonical.unity.media-player");
+		player_item.set_attribute_value ("icon", g_icon_serialize (player.icon));
+		section.append_item (player_item);
+
+		var playback_item = new MenuItem (null, null);
+		playback_item.set_attribute ("x-canonical-type", "s", "com.canonical.unity.playback-item");
+		playback_item.set_attribute ("x-canonical-play-action", "s", "indicator.play." + player.id);
+		playback_item.set_attribute ("x-canonical-next-action", "s", "indicator.next." + player.id);
+		playback_item.set_attribute ("x-canonical-previous-action", "s", "indicator.previous." + player.id);
+		section.append_item (playback_item);
+
+		/* Add new players to the end of the player sections, just before the settings */
+		if (settings_shown) {
+			this.menu.insert_section (this.menu.get_n_items () -1, null, section);
+		} else {
+			this.menu.append_section (null, section);
+		}
+	}
+
+	void remove_player_section (MediaPlayer player) {
+		int index = this.find_player_section (player);
+		if (index >= 0)
+			this.menu.remove (index);
+	}
+
+	void update_playlists (MediaPlayer player) {
+		int index = find_player_section (player);
+		if (index < 0)
+			return;
+
+		var player_section = this.menu.get_item_link (index, Menu.LINK_SECTION) as Menu;
+
+		/* if a section has three items, the playlists menu is in it */
+		if (player_section.get_n_items () == 3)
+			player_section.remove (2);
+
+		if (!player.is_running)
+			return;
+
+		var count = player.get_n_playlists ();
+		if (count == 0)
+			return;
+
+		var playlists_section = new Menu ();
+		for (int i = 0; i < count; i++) {
+			var playlist_id = player.get_playlist_id (i);
+			playlists_section.append (player.get_playlist_name (i),
+									  @"indicator.play-playlist.$(player.id)::$playlist_id");
+
+		}
+
+		var submenu = new Menu ();
+		submenu.append_section (null, playlists_section);
+		player_section.append_submenu (_("Choose Playlist"), submenu);
+	}
+
+	MenuItem create_slider_menu_item (string action, double min, double max, double step, string min_icon_name, string max_icon_name) {
+		var min_icon = new ThemedIcon.with_default_fallbacks (min_icon_name);
+		var max_icon = new ThemedIcon.with_default_fallbacks (max_icon_name);
+
+		var slider = new MenuItem (null, action);
+		slider.set_attribute ("x-canonical-type", "s", "com.canonical.unity.slider");
+		slider.set_attribute_value ("min-icon", g_icon_serialize (min_icon));
+		slider.set_attribute_value ("max-icon", g_icon_serialize (max_icon));
+		slider.set_attribute ("min-value", "d", min);
+		slider.set_attribute ("max-value", "d", max);
+		slider.set_attribute ("step", "d", step);
+
+		return slider;
+	}
+}

=== removed file 'src/sound-service-dbus.c'
--- src/sound-service-dbus.c	2010-03-23 16:05:35 +0000
+++ src/sound-service-dbus.c	1970-01-01 00:00:00 +0000
@@ -1,248 +0,0 @@
-/*
- * Copyright 2010 Canonical Ltd.
- *
- * Authors:
- *     Conor Curran <conor.curran@xxxxxxxxxxxxx>
- *     Cody Russell <crussell@xxxxxxxxxxxxx>
- *
- * This program is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 3, as published
- * by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranties of
- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <dbus/dbus-glib.h>
-#include "dbus-shared-names.h"
-#include "sound-service-dbus.h"
-#include "common-defs.h"
-#include "pulse-manager.h"
-
-// DBUS methods 
-static gboolean sound_service_dbus_get_sink_volume(SoundServiceDbus* service, gdouble* volume_percent_input, GError** gerror);
-static gboolean sound_service_dbus_get_sink_mute(SoundServiceDbus* service, gboolean* mute_input, GError** gerror);
-static gboolean sound_service_dbus_get_sink_availability(SoundServiceDbus* service, gboolean* availability_input, GError** gerror);
-static void sound_service_dbus_set_sink_volume(SoundServiceDbus* service, const guint volume_percent, GError** gerror);
-
-#include "sound-service-server.h"
-
-typedef struct _SoundServiceDbusPrivate SoundServiceDbusPrivate;
-
-struct _SoundServiceDbusPrivate
-{
-    DBusGConnection *connection;
-    gdouble         volume_percent;
-    gboolean        mute;
-    gboolean        sink_availability;
-};
-
-
-/* Signals */
-enum {
-  SINK_INPUT_WHILE_MUTED,
-  SINK_VOLUME_UPDATE,
-  SINK_MUTE_UPDATE,
-  SINK_AVAILABLE_UPDATE,
-  LAST_SIGNAL
-};
-
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-#define SOUND_SERVICE_DBUS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SOUND_SERVICE_DBUS_TYPE, SoundServiceDbusPrivate))
-
-static void sound_service_dbus_class_init (SoundServiceDbusClass *klass);
-static void sound_service_dbus_init       (SoundServiceDbus *self);
-static void sound_service_dbus_dispose    (GObject *object);
-static void sound_service_dbus_finalize   (GObject *object);
-
-
-/* GObject Boilerplate */
-G_DEFINE_TYPE (SoundServiceDbus, sound_service_dbus, G_TYPE_OBJECT);
-
-static void
-sound_service_dbus_class_init (SoundServiceDbusClass *klass)
-{
-    GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
-    g_type_class_add_private (object_class, sizeof(SoundServiceDbusPrivate));
-
-    object_class->dispose = sound_service_dbus_dispose;
-    object_class->finalize = sound_service_dbus_finalize;
-
-    g_assert(klass != NULL);
-    dbus_g_object_type_install_info(SOUND_SERVICE_DBUS_TYPE,
-                                 &dbus_glib__sound_service_server_object_info);
-  
-    signals[SINK_INPUT_WHILE_MUTED] =  g_signal_new("sink-input-while-muted",
-                                                    G_TYPE_FROM_CLASS (klass),
-                                                    G_SIGNAL_RUN_LAST,
-                                                    0,
-                                                    NULL, NULL,
-                                                    g_cclosure_marshal_VOID__BOOLEAN,
-                                                    G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-
-    signals[SINK_VOLUME_UPDATE] =  g_signal_new("sink-volume-update",
-                                                    G_TYPE_FROM_CLASS (klass),
-                                                    G_SIGNAL_RUN_LAST,
-                                                    0,
-                                                    NULL, NULL,
-                                                    g_cclosure_marshal_VOID__DOUBLE,
-                                                    G_TYPE_NONE, 1, G_TYPE_DOUBLE);
-
-    signals[SINK_MUTE_UPDATE] =  g_signal_new("sink-mute-update",
-                                                    G_TYPE_FROM_CLASS (klass),
-                                                    G_SIGNAL_RUN_LAST,
-                                                    0,
-                                                    NULL, NULL,
-                                                    g_cclosure_marshal_VOID__BOOLEAN,
-                                                    G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-    signals[SINK_AVAILABLE_UPDATE] =  g_signal_new("sink-available-update",
-                                                    G_TYPE_FROM_CLASS (klass),
-                                                    G_SIGNAL_RUN_LAST,
-                                                    0,
-                                                    NULL, NULL,
-                                                    g_cclosure_marshal_VOID__BOOLEAN,
-                                                    G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-
-
-
-}
-
-static void
-sound_service_dbus_init (SoundServiceDbus *self)
-{
-    GError *error = NULL;
-    SoundServiceDbusPrivate * priv = SOUND_SERVICE_DBUS_GET_PRIVATE(self);
-
-	priv->connection = NULL;
-    priv->volume_percent = 0;
-    priv->mute = FALSE;
-    priv->sink_availability = FALSE;
-
-	/* Fetch the session bus */
-	priv->connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
-
-	if (error != NULL) {
-		g_error("sound-service-dbus:Unable to connect to the session bus when creating indicator sound service : %s", error->message);
-		g_error_free(error);
-		return;
-	}
-    /* register the service on it */
-	dbus_g_connection_register_g_object(priv->connection,
-	                                    INDICATOR_SOUND_SERVICE_DBUS_OBJECT,
-	                                    G_OBJECT(self));
-}
-
-
-static void
-sound_service_dbus_dispose (GObject *object)
-{
-	G_OBJECT_CLASS (sound_service_dbus_parent_class)->dispose (object);
-	return;
-}
-
-static void
-sound_service_dbus_finalize (GObject *object)
-{
-	G_OBJECT_CLASS (sound_service_dbus_parent_class)->finalize (object);
-	return;
-}
-
-
-/**
-DBUS Method Callbacks
-**/
-static void sound_service_dbus_set_sink_volume(SoundServiceDbus* service, const guint volume_percent, GError** gerror)
-{
-    g_debug("in the set sink volume method in the sound service dbus!, with volume_percent of %i", volume_percent);
-    set_sink_volume(volume_percent);
-}
-
-static gboolean sound_service_dbus_get_sink_volume (SoundServiceDbus *self, gdouble *volume_percent_input, GError** gerror)
-{
-    SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (self);
-    g_debug("Get sink volume method in the sound service dbus!, about to send over volume percent of  %f", priv->volume_percent);
-    *volume_percent_input = priv->volume_percent;
-    return TRUE;
-}
-
-static gboolean sound_service_dbus_get_sink_mute (SoundServiceDbus *self, gboolean *mute_input, GError** gerror)
-{
-    SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (self);
-    g_debug("Get sink mute - sound service dbus!, about to send over mute_value of  %i", priv->mute);
-    *mute_input = priv->mute;
-    return TRUE;
-}
-
-static gboolean sound_service_dbus_get_sink_availability (SoundServiceDbus *self, gboolean *availability_input, GError** gerror)
-{
-    SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (self);
-    g_debug("Get sink availability - sound service dbus!, about to send over availability_value of  %i", priv->sink_availability);
-    *availability_input = priv->sink_availability;
-    return TRUE;
-}
-
-/**
-SIGNALS
-Utility methods to emit signals from the service into the ether.
-**/
-void sound_service_dbus_sink_input_while_muted(SoundServiceDbus* obj,  gboolean block_value)
-{
-    g_debug("Emitting signal: SINK_INPUT_WHILE_MUTED, with  block_value: %i", block_value);
-    g_signal_emit(obj,
-                signals[SINK_INPUT_WHILE_MUTED],
-                0,
-                block_value);
-}
-
-void sound_service_dbus_update_sink_volume(SoundServiceDbus* obj, gdouble sink_volume)
-{
-    SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (obj);
-    priv->volume_percent = sink_volume;            
-
-    g_debug("Emitting signal: SINK_VOLUME_UPDATE, with sink_volme %f", priv->volume_percent);
-    g_signal_emit(obj,
-                signals[SINK_VOLUME_UPDATE],
-                0,
-                priv->volume_percent);
-}
-
-void sound_service_dbus_update_sink_mute(SoundServiceDbus* obj, gboolean sink_mute)
-{
-    g_debug("Emitting signal: SINK_MUTE_UPDATE, with sink mute %i", sink_mute);
-
-    SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (obj);
-    priv->mute = sink_mute;            
-
-    g_signal_emit(obj,
-                signals[SINK_MUTE_UPDATE],
-                0,
-                priv->mute);
-}
-
-void sound_service_dbus_update_sink_availability(SoundServiceDbus* obj, gboolean sink_availability)
-{
-    g_debug("Emitting signal: SINK_AVAILABILITY_UPDATE, with value %i", sink_availability);
-
-    SoundServiceDbusPrivate *priv = SOUND_SERVICE_DBUS_GET_PRIVATE (obj);
-    priv->sink_availability = sink_availability;            
-
-    g_signal_emit(obj,
-                signals[SINK_AVAILABLE_UPDATE],
-                0,
-                priv->sink_availability);
-}
-
-     
-

=== removed file 'src/sound-service-dbus.h'
--- src/sound-service-dbus.h	2010-03-08 19:12:18 +0000
+++ src/sound-service-dbus.h	1970-01-01 00:00:00 +0000
@@ -1,63 +0,0 @@
-/*
- * Copyright 2010 Canonical Ltd.
- *
- * Authors:
- *     Conor Curran <conor.curran@xxxxxxxxxxxxx>
- *     Cody Russell <crussell@xxxxxxxxxxxxx>
- *
- * This program is free software: you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 3, as published
- * by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranties of
- * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef __SOUND_SERVICE_DBUS_H__
-#define __SOUND_SERVICE_DBUS_H__
-
-#include <glib.h>
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define SOUND_SERVICE_DBUS_TYPE         (sound_service_dbus_get_type ())
-#define SOUND_SERVICE_DBUS(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), SOUND_SERVICE_DBUS_TYPE, SoundServiceDbus))
-#define SOUND_SERVICE_DBUS_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST ((k), SOUND_SERVICE_DBUS_TYPE, SoundServiceDbusClass))
-#define IS_SOUND_SERVICE_DBUS(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), SOUND_SERVICE_DBUS_TYPE))
-#define IS_SOUND_SERVICE_DBUS_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), SOUND_SERVICE_DBUS_TYPE))
-#define SOUND_SERVICE_DBUS_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), SOUND_SERVICE_DBUS_TYPE, SoundServiceDbusClass))
-
-
-typedef struct _SoundServiceDbus      SoundServiceDbus;
-typedef struct _SoundServiceDbusClass SoundServiceDbusClass;
-typedef struct _SoundData             SoundData;
-
-struct _SoundData
-{
-  SoundServiceDbus *service;
-};
-
-struct _SoundServiceDbus {
-  GObject parent;
-};
-
-struct _SoundServiceDbusClass {
-  GObjectClass parent_class;
-}; 
-GType sound_service_dbus_get_type  (void) G_GNUC_CONST;
-
-// Utility methods to get the SIGNAL messages across into the sound-service-dbus
-void sound_service_dbus_sink_input_while_muted (SoundServiceDbus* obj, gboolean block_value);
-void sound_service_dbus_update_sink_volume(SoundServiceDbus* obj, gdouble sink_volume);
-void sound_service_dbus_update_sink_mute(SoundServiceDbus* obj, gboolean sink_mute);
-void sound_service_dbus_update_sink_availability(SoundServiceDbus* obj, gboolean sink_availibity);
-
-G_END_DECLS
-
-#endif

=== removed file 'src/sound-service.c'
--- src/sound-service.c	2010-03-26 17:16:37 +0000
+++ src/sound-service.c	1970-01-01 00:00:00 +0000
@@ -1,83 +0,0 @@
-/*
-This service primarily controls PulseAudio and is driven by the sound indicator menu on the panel.
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-    Cody Russell <crussell@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include "sound-service.h"
-#include "dbus-menu-manager.h"
-#include "pulse-manager.h"
-
-static GMainLoop *mainloop = NULL;
-
-
-/**********************************************************************************************************************/
-//    Init and exit functions
-/**********************************************************************************************************************/
-
-/**
-service_shutdown:
-When the service interface starts to shutdown, we
-should follow it. 
-**/
-
-void
-service_shutdown (IndicatorService *service, gpointer user_data)
-{
-
-	if (mainloop != NULL) {
-		g_debug("Service shutdown !");
-        // TODO: uncomment for release !!
-       	close_pulse_activites();
-        g_main_loop_quit(mainloop);
-	}
-	return;
-}
-
-
-/**
-main: 
-**/
-int
-main (int argc, char ** argv)
-{
-    g_type_init();
-
-	setlocale (LC_ALL, "");
-	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
-	textdomain (GETTEXT_PACKAGE);
-
-	IndicatorService *service = indicator_service_new_version(INDICATOR_SOUND_DBUS_NAME,
-	                                                           INDICATOR_SOUND_DBUS_VERSION);
-	g_signal_connect(G_OBJECT(service),
-	                 INDICATOR_SERVICE_SIGNAL_SHUTDOWN,
-	                 G_CALLBACK(service_shutdown), NULL);    
-
-    dbus_menu_manager_setup();
-
-    // Run the loop
-    mainloop = g_main_loop_new(NULL, FALSE);
-    g_main_loop_run(mainloop);
-
-    return 0;
-}
-
-
-
-

=== removed file 'src/sound-service.h'
--- src/sound-service.h	2010-03-02 19:36:53 +0000
+++ src/sound-service.h	1970-01-01 00:00:00 +0000
@@ -1,38 +0,0 @@
-#ifndef __INCLUDE_SOUND_SERVICE_H__
-#define __INCLUDE_SOUND_SERVICE_H__
-
-/*
-This service primarily controls PulseAudio and is driven by the sound indicator menu on the panel.
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-    Cody Russell <crussell@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <config.h>
-#include <unistd.h>
-#include <glib/gi18n.h>
-
-#include <libindicator/indicator-service.h>
-
-#include "dbus-shared-names.h"
-
-// ENTRY AND EXIT POINTS
-void service_shutdown(IndicatorService * service, gpointer user_data);
-int main (int argc, char ** argv);
-
-#endif

=== removed file 'src/sound-service.list'
--- src/sound-service.list	2010-01-28 18:26:00 +0000
+++ src/sound-service.list	1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
-VOID:INT,BOOLEAN
-

=== removed file 'src/sound-service.xml'
--- src/sound-service.xml	2010-03-08 19:12:18 +0000
+++ src/sound-service.xml	1970-01-01 00:00:00 +0000
@@ -1,45 +0,0 @@
-<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
-<node name="/org/ayatana/indicator/sound">
-  <interface name="org.ayatana.indicator.sound">
-    <method name = "SetSinkVolume">
-        <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="sound_service_dbus_set_sink_volume"/>
-        <arg type='u' name='volume_percent' direction="in"/>
-    </method>
-
-    <method name = "GetSinkVolume">
-        <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="sound_service_dbus_get_sink_volume"/>
-        <arg type='d' name='volume_percent_input' direction="out"/>
-    </method>
-
-    <method name = "GetSinkMute">
-        <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="sound_service_dbus_get_sink_mute"/>
-        <arg type='b' name='mute_input' direction="out"/>
-    </method>
-
-    <method name = "GetSinkAvailability">
-        <annotation name="org.freedesktop.DBus.GLib.CSymbol" value="sound_service_dbus_get_sink_availability"/>
-        <arg type='b' name='availability_input' direction="out"/>
-    </method>
-
-<!-- Will need to hook up another signal which monitors for volume change 
-Our respective UI element should listen to this and therefore will be updated with accurate setting-->
-<!-- Triggered when a sink is muted but the input has been sent to that sink -->
-    <signal name="SinkInputWhileMuted">
-      <arg name="block_value" type="b" direction="out"/>
-    </signal>
-    
-    <signal name="SinkVolumeUpdate">
-      <arg name="volume_percent" type="u" direction="out"/>
-    </signal>
-
-    <signal name="SinkMuteUpdate">
-      <arg name="mute_value" type="b" direction="out"/>
-    </signal>
-
-    <signal name="SinkAvailableUpdate">
-      <arg name="available_value" type="b" direction="out"/>
-    </signal>
-
-  </interface>
-</node>
-

=== added file 'src/voip-input-menu-item.h'
--- src/voip-input-menu-item.h	1970-01-01 00:00:00 +0000
+++ src/voip-input-menu-item.h	2013-10-17 20:40:25 +0000
@@ -0,0 +1,70 @@
+/*
+Copyright 2011 Canonical Ltd.
+
+Authors:
+    Conor Curran <conor.curran@xxxxxxxxxxxxx>
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License version 3, as published
+by the Free Software Foundation.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranties of
+MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
+PURPOSE.  See the GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#ifndef __VOIP_INPUT_MENU_ITEM_H__
+#define __VOIP_INPUT_MENU_ITEM_H__
+
+#include <glib.h>
+#include <pulse/pulseaudio.h>
+#include <libdbusmenu-glib/menuitem.h>
+#include "device.h"
+
+G_BEGIN_DECLS
+
+#define VOIP_INPUT_MENU_ITEM_TYPE            (voip_input_menu_item_get_type ())
+#define VOIP_INPUT_MENU_ITEM(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), VOIP_INPUT_MENU_ITEM_TYPE, VoipInputMenuItem))
+#define VOIP_INPUT_MENU_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), VOIP_INPUT_MENU_ITEM_TYPE, VoipInputMenuItemClass))
+#define IS_VOIP_INPUT_MENU_ITEM(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VOIP_INPUT_MENU_ITEM_TYPE))
+#define IS_VOIP_INPUT_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VOIP_INPUT_MENU_ITEM_TYPE))
+#define VOIP_INPUT_MENU_ITEM_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), VOIP_INPUT_MENU_ITEM_TYPE, VoipInputMenuItemClass))
+
+typedef struct _VoipInputMenuItem      VoipInputMenuItem;
+typedef struct _VoipInputMenuItemClass VoipInputMenuItemClass;
+
+struct _VoipInputMenuItemClass {
+  DbusmenuMenuitemClass parent_class;
+};
+
+struct _VoipInputMenuItem {
+  DbusmenuMenuitem parent;
+};
+
+GType voip_input_menu_item_get_type (void);
+
+void voip_input_menu_item_update (VoipInputMenuItem* item,
+                                  const pa_source_info* source);
+void voip_input_menu_item_enable (VoipInputMenuItem* item, gboolean active);
+gboolean voip_input_menu_item_is_interested (VoipInputMenuItem* item,
+                                             gint source_output_index,
+                                             gint client_index);
+gboolean voip_input_menu_item_is_active (VoipInputMenuItem* item);
+gboolean voip_input_menu_item_is_populated (VoipInputMenuItem* item);
+// TODO rename get source index
+gint voip_input_menu_item_get_index (VoipInputMenuItem* item);
+
+gint voip_input_menu_item_get_source_output_index (VoipInputMenuItem* item);
+
+void voip_input_menu_item_deactivate_source (VoipInputMenuItem* item, gboolean visible);
+void voip_input_menu_item_deactivate_voip_client (VoipInputMenuItem* item);
+
+VoipInputMenuItem* voip_input_menu_item_new (Device* sink);
+
+G_END_DECLS
+
+#endif
+

=== added file 'src/volume-control.vala'
--- src/volume-control.vala	1970-01-01 00:00:00 +0000
+++ src/volume-control.vala	2013-10-17 20:40:25 +0000
@@ -0,0 +1,287 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *      Alberto Ruiz <alberto.ruiz@xxxxxxxxxxxxx>
+ */
+
+using PulseAudio;
+
+[CCode(cname="pa_cvolume_set", cheader_filename = "pulse/volume.h")]
+extern unowned PulseAudio.CVolume? vol_set (PulseAudio.CVolume? cv, uint channels, PulseAudio.Volume v);
+
+public class VolumeControl : Object
+{
+	/* this is static to ensure it being freed after @context (loop does not have ref counting) */
+	private static PulseAudio.GLibMainLoop loop;
+
+	private PulseAudio.Context context;
+	private bool   _mute = true;
+	private double _volume = 0.0;
+	private double _mic_volume = 0.0;
+
+	public signal void volume_changed (double v);
+	public signal void mic_volume_changed (double v);
+
+	/** true when connected to the pulse server */
+	public bool ready { get; set; }
+
+	/** true when a microphone is active **/
+	public bool active_mic { get; private set; default = false; }
+
+	public VolumeControl ()
+	{
+		if (loop == null)
+			loop = new PulseAudio.GLibMainLoop ();
+
+		this.reconnect_to_pulse ();
+	}
+
+	/* PulseAudio logic*/
+	private void context_events_cb (Context c, Context.SubscriptionEventType t, uint32 index)
+	{
+		switch (t & Context.SubscriptionEventType.FACILITY_MASK)
+		{
+			case Context.SubscriptionEventType.SINK:
+				update_sink ();
+				break;
+
+			case Context.SubscriptionEventType.SOURCE:
+				update_source ();
+				break;
+
+			case Context.SubscriptionEventType.SOURCE_OUTPUT:
+				switch (t & Context.SubscriptionEventType.TYPE_MASK)
+				{
+					case Context.SubscriptionEventType.NEW:
+						c.get_source_output_info (index, source_output_info_cb);
+						break;
+
+					case Context.SubscriptionEventType.REMOVE:
+						this.active_mic = false;
+						break;
+				}
+				break;
+		}
+	}
+
+	private void sink_info_cb_for_props (Context c, SinkInfo? i, int eol)
+	{
+		if (i == null)
+			return;
+
+		if (_mute != (bool)i.mute)
+		{
+			_mute = (bool)i.mute;
+			this.notify_property ("mute");
+		}
+
+		if (_volume != volume_to_double (i.volume.values[0]))
+		{
+			_volume = volume_to_double (i.volume.values[0]);
+			volume_changed (_volume);
+		}
+	}
+
+	private void source_info_cb (Context c, SourceInfo? i, int eol)
+	{
+		if (i == null)
+			return;
+
+		if (_mic_volume != volume_to_double (i.volume.values[0]))
+		{
+			_mic_volume = volume_to_double (i.volume.values[0]);
+			mic_volume_changed (_mic_volume);
+		}
+	}
+
+	private void server_info_cb_for_props (Context c, ServerInfo? i)
+	{
+		if (i == null)
+			return;
+		context.get_sink_info_by_name (i.default_sink_name, sink_info_cb_for_props);
+	}
+
+	private void update_sink ()
+	{
+		context.get_server_info (server_info_cb_for_props);
+	}
+
+	private void update_source ()
+	{
+		context.get_server_info ( (c, i) => {
+			if (i != null)
+				context.get_source_info_by_name (i.default_source_name, source_info_cb);
+		});
+	}
+
+	private void source_output_info_cb (Context c, SourceOutputInfo? i, int eol)
+	{
+		if (i == null)
+			return;
+
+		var role = i.proplist.gets (PulseAudio.Proplist.PROP_MEDIA_ROLE);
+		if (role == "phone" || role == "production")
+			this.active_mic = true;
+	}
+
+	private void context_state_callback (Context c)
+	{
+		switch (c.get_state ()) {
+			case Context.State.READY:
+				c.subscribe (PulseAudio.Context.SubscriptionMask.SINK |
+							 PulseAudio.Context.SubscriptionMask.SOURCE |
+							 PulseAudio.Context.SubscriptionMask.SOURCE_OUTPUT);
+				c.set_subscribe_callback (context_events_cb);
+				update_sink ();
+				update_source ();
+				this.ready = true;
+				break;
+
+			case Context.State.FAILED:
+			case Context.State.TERMINATED:
+				this.reconnect_to_pulse ();
+				break;
+
+			default: 
+				this.ready = false;
+				break;
+		}
+	}
+
+	void reconnect_to_pulse ()
+	{
+		if (this.ready) {
+			this.context.disconnect ();
+			this.context = null;
+			this.ready = false;
+		}
+
+		var props = new Proplist ();
+		props.sets (Proplist.PROP_APPLICATION_NAME, "Ubuntu Audio Settings");
+		props.sets (Proplist.PROP_APPLICATION_ID, "com.canonical.settings.sound");
+		props.sets (Proplist.PROP_APPLICATION_ICON_NAME, "multimedia-volume-control");
+		props.sets (Proplist.PROP_APPLICATION_VERSION, "0.1");
+
+		this.context = new PulseAudio.Context (loop.get_api(), null, props);
+		this.context.set_state_callback (context_state_callback);
+
+		if (context.connect(null, Context.Flags.NOFAIL, null) < 0)
+			warning( "pa_context_connect() failed: %s\n", PulseAudio.strerror(context.errno()));
+	}
+
+	/* Mute operations */
+	public void set_mute (bool mute)
+	{
+		return_if_fail (context.get_state () == Context.State.READY);
+
+		context.get_sink_info_list ((context, sink, eol) => {
+			if (sink != null)
+				context.set_sink_mute_by_index (sink.index, mute, null);
+		});
+	}
+
+	public void toggle_mute ()
+	{
+		this.set_mute (!this._mute);
+	}
+
+	public bool mute
+	{
+		get
+		{
+			return this._mute;
+		}
+	}
+
+	/* Volume operations */
+	private static PulseAudio.Volume double_to_volume (double vol)
+	{
+		double tmp = (double)(PulseAudio.Volume.NORM - PulseAudio.Volume.MUTED) * vol;
+		return (PulseAudio.Volume)tmp + PulseAudio.Volume.MUTED;
+	}
+
+	private static double volume_to_double (PulseAudio.Volume vol)
+	{
+		double tmp = (double)(vol - PulseAudio.Volume.MUTED);
+		return tmp / (double)(PulseAudio.Volume.NORM - PulseAudio.Volume.MUTED);
+	}
+
+	private void set_volume_success_cb (Context c, int success)
+	{
+		if ((bool)success)
+			volume_changed (_volume);
+	}
+
+	private void sink_info_set_volume_cb (Context c, SinkInfo? i, int eol)
+	{
+		if (i == null)
+			return;
+
+		unowned CVolume cvol = vol_set (i.volume, 1, double_to_volume (_volume));
+		c.set_sink_volume_by_index (i.index, cvol, set_volume_success_cb);
+	}
+
+	private void server_info_cb_for_set_volume (Context c, ServerInfo? i)
+	{
+		if (i == null)
+		{
+			warning ("Could not get PulseAudio server info");
+			return;
+		}
+
+		context.get_sink_info_by_name (i.default_sink_name, sink_info_set_volume_cb);
+	}
+
+	public void set_volume (double volume)
+	{
+		return_if_fail (context.get_state () == Context.State.READY);
+
+		_volume = volume;
+
+		context.get_server_info (server_info_cb_for_set_volume);
+	}
+
+	void set_mic_volume_success_cb (Context c, int success)
+	{
+		if ((bool)success)
+			mic_volume_changed (_mic_volume);
+	}
+
+	public void set_mic_volume (double volume)
+	{
+		return_if_fail (context.get_state () == Context.State.READY);
+
+		_mic_volume = volume;
+
+		context.get_server_info ( (c, i) => {
+			if (i != null) {
+				unowned CVolume cvol = CVolume ();
+				cvol = vol_set (cvol, 1, double_to_volume (_mic_volume));
+				c.set_source_volume_by_name (i.default_source_name, cvol, set_mic_volume_success_cb);
+			}
+		});
+	}
+
+	public double get_volume ()
+	{
+		return _volume;
+	}
+
+	public double get_mic_volume ()
+	{
+		return _mic_volume;
+	}
+}

=== added file 'tests/CMakeLists.txt'
=== removed file 'tests/Makefile.am'
--- tests/Makefile.am	2010-03-31 11:40:08 +0000
+++ tests/Makefile.am	1970-01-01 00:00:00 +0000
@@ -1,147 +0,0 @@
-check_PROGRAMS = \
-	test-indicator-sound \
-	test-pulse-manager \
-	test-indicator-sound-dbus-client \
-	test-indicator-sound-dbus-server 
-
-TESTS = \
-	test-indicator-sound \
-	test-pulse-manager
-
-DISTCLEANFILES = $(TESTS)
-
-noinst_LTLIBRARIES        = libmockpulse.la
-libmockpulse_la_SOURCES   = mockpulse.c mockpulse.h
-libmockpulse_la_CFLAGS    = $(PULSEAUDIO_CFLAGS)
-
-
-#########################################
-##  test-indicator-sound
-#########################################
-test_indicator_sound_SOURCES = \
-	test-indicator-sound.c \
-    $(top_builddir)/src/indicator-sound.c
-    
-test_indicator_sound_CFLAGS = \
-	$(PULSEAUDIO_CFLAGS) \
-	$(APPLET_CFLAGS) \
-	-Wall -Werror \
-	-I$(srcdir) \
-	-DTOP_BUILD_DIR="\"${abs_top_builddir}\""
-
-test_indicator_sound_LDADD = \
-	libmockpulse.la \
-	$(PULSEAUDIO_LIBS) \
-	$(APPLET_LIBS) 
-
-
-#########################################
-##  test-pulse-manager
-#########################################
-
-check_PROGRAMS += test-pulse-manager
-
-test_pulse_manager_SOURCES = \
-	test-pulse-manager.c \
-    $(top_builddir)/src/dbus-menu-manager.c \
-    $(top_builddir)/src/sound-service-dbus.c \
-    $(top_builddir)/src/slider-menu-item.c 
-
-test_pulse_manager_CFLAGS = \
-	$(PULSEAUDIO_CFLAGS) \
-	$(SOUNDSERVICE_CFLAGS) \
-	$(GCONF_CFLAGS) \
-	-Wall -Werror \
-	-I$(srcdir) \
-	-I$(SOUNDSERVICE_CFLAGS)
-
-test_pulse_manager_LDADD = \
-	libmockpulse.la \
-	$(PULSEAUDIO_LIBS) \
-	$(SOUNDSERVICE_LIBS) \
-	$(GCONF_LIBS) \
-	$(APPLET_LIBS) 
-
-#########################################
-##  test-indicator-sound-dbus-client
-#########################################
-test_indicator_sound_dbus_client_SOURCES = \
-	test-defines.h \
-	test-indicator-sound-dbus-client.c
-
-test_indicator_sound_dbus_client_CFLAGS = \
-	$(PULSEAUDIO_CFLAGS) \
-	$(SOUNDSERVICE_CFLAGS) \
-	-Wall -Werror \
-	-I$(srcdir) \
-	-I$(SOUNDSERVICE_CFLAGS)
-
-test_indicator_sound_dbus_client_LDADD = \
-	$(PULSEAUDIO_LIBS) \
-	$(SOUNDSERVICE_LIBS)
-
-########################################
-#  test-indicator-sound-dbus-server
-########################################
-test_indicator_sound_dbus_server_SOURCES = \
-	test-defines.h \
-    test-indicator-sound-dbus-server.c \
-    $(top_builddir)/src/sound-service-dbus.c \
-    $(top_builddir)/src/pulse-manager.c \
-    $(top_builddir)/src/slider-menu-item.c \
-    $(top_builddir)/src/dbus-menu-manager.c
-
-test_indicator_sound_dbus_server_CFLAGS = \
-    $(SOUNDSERVICE_CFLAGS) \
-	-Wall -Werror \
-	-I$(srcdir) 
-
-test_indicator_sound_dbus_server_LDADD = \
-	$(SOUNDSERVICE_LIBS) \
-	$(PULSEAUDIO_LIBS) 
-
-
-#########################################
-##  Actual tests
-#########################################
-
-XML_REPORT   = indicator-sound-check-results.xml
-HTML_REPORT  = indicator-sound-check-results.html
-
-indicator-sound-tests: indicator-sound-tests-gtester Makefile.am
-	@echo "#!/bin/sh" > $@
-	@echo $(DBUS_RUNNER) --task ./indicator-sound-tests-gtester >> $@
-	@chmod +x $@
-
-indicator-sound-tests-gtester: test-indicator-sound Makefile.am
-	@echo "#!/bin/sh" > $@
-	@echo gtester -k --verbose -o=$(XML_REPORT) ./test-indicator-sound >> $@
-	@chmod +x $@
-
-TESTS += indicator-sound-tests-gtester
-
-PULSE_XML_REPORT = pulse-manager-check-results.xml
-
-pulse-manager-tests-gtester: test-pulse-manager Makefile.am
-	@echo "#!/bin/sh" > $@
-	@echo gtester -k --verbose -o=$(PULSE_XML_REPORT) ./test-pulse-manager >> $@
-	@chmod +x $@
-
-TESTS += pulse-manager-tests-gtester
-
-DISTCLEANFILES += $(XML_REPORT) $(PULSE_XML_REPORT) $(HTML_REPORT) indicator-sound-tests-gtester
-
-DBUS_RUNNER=dbus-test-runner --dbus-config /usr/share/dbus-test-runner/session.conf
-
-test-indicator-sound-dbus: test-indicator-sound-dbus-client test-indicator-sound-dbus-server Makefile.am
-	@echo "#!/bin/sh" > test-indicator-sound-dbus
-	@echo $(DBUS_RUNNER) --task ./test-indicator-sound-dbus-server --task-name Server --ignore-return >> test-indicator-sound-dbus --task ./test-indicator-sound-dbus-client --task-name Client
-	@chmod +x test-indicator-sound-dbus
-
-TESTS += test-indicator-sound-dbus
-
-
-
-
-
-

=== removed file 'tests/mockpulse.c'
--- tests/mockpulse.c	2010-03-22 17:32:57 +0000
+++ tests/mockpulse.c	1970-01-01 00:00:00 +0000
@@ -1,105 +0,0 @@
-/*
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Robert Collins <robert.collins@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include <pulse/glib-mainloop.h>
-#include <pulse/context.h>
-#include <pulse/operation.h>
-#include <pulse/introspect.h>
-#include "mockpulse.h"
-
-struct pa_context {
-  int refcount;
-  pa_context_notify_cb_t cb;
-  void *cbdata;
-  pa_context_state_t state;
-};
-
-pa_glib_mainloop *
-pa_glib_mainloop_new(GMainContext *c)
-{
-    return NULL;
-}
-
-pa_context *
-pa_context_new(pa_mainloop_api *loop, char const *name) {
-  struct pa_context * result = g_new(pa_context, 1);
-  result->refcount = 1;
-  return result;
-}
-
-void
-pa_context_unref(pa_context * context) {
-  context->refcount--;
-  if (!context->refcount)
-    g_free(context);
-}
-
-void
-pa_context_set_state_callback(pa_context *c, pa_context_notify_cb_t cb, void *userdata)
-{
-  c->cb = cb;
-  c->cbdata = userdata;
-}
-
-void set_pa_context_get_state_result(pa_context *c, pa_context_state_t state)
-{
-  c->state = state;
-}
-
-pa_context_state_t
-pa_context_get_state(pa_context *c)
-{
-  return c->state;
-}
-
-struct pa_operation {
-  int refcount;
-};
-
-
-/*void pa_context_connect(pa_context* c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api)*/
-/*{*/
-/*    set_pa_context_get_state_result(c, PA_CONTEXT_CONNECTING);*/
-/*}*/
-
-/* Can be made into a list if we need multiple callbacks */
-static pa_sink_info *next_sink_info;
-
-void
-set_pa_context_get_sink_info(pa_sink_info *info) {
-  next_sink_info = info;
-}
-
-pa_operation *
-pa_context_get_sink_info_by_index(pa_context *c, uint32_t idx, pa_sink_info_cb_t cb, void * userdata)
-{
-  pa_operation *result = g_new(pa_operation, 1);
-  result->refcount = 1;
-  cb(c, next_sink_info, 0, userdata);
-  return result;
-}
-
-void
-pa_operation_unref(pa_operation * foo)
-{
-  foo->refcount--;
-  if (!foo->refcount)
-    g_free(foo);
-}

=== removed file 'tests/mockpulse.h'
--- tests/mockpulse.h	2010-03-09 03:37:03 +0000
+++ tests/mockpulse.h	1970-01-01 00:00:00 +0000
@@ -1,26 +0,0 @@
-/*
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Robert Collins <robert.collins@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
- * Control interface for the mocked pa-glib-mainloop test library 
- */
-#include <pulse/glib-mainloop.h>
-
-void set_pa_context_get_state_result(pa_context *, pa_context_state_t state);
-void set_pa_context_get_sink_info(pa_sink_info *info);

=== removed file 'tests/run-xvfb.sh'
--- tests/run-xvfb.sh	2010-02-25 14:12:05 +0000
+++ tests/run-xvfb.sh	1970-01-01 00:00:00 +0000
@@ -1,8 +0,0 @@
-if [ "$DISPLAY" == "" ]; then
-Xvfb -ac -noreset -screen 0 800x600x16 -help 2>/dev/null 1>&2
-XID=`for id in 101 102 103 104 105 106 107 197 199 211 223 227 293 307 308 309 310 311 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 4703 4721 4723 4729 4733 4751 9973 9974 9975 9976 9977 9978 9979 9980 9981 9982 9983 9984 9985 9986 9987 9988 9989 9990 9991 9992 9993 9994 9995 9996 9997 9998 9999 ; do test -e /tmp/.X$id-lock || { echo $id; exit 0; }; done; exit 1`
-{ Xvfb -ac -noreset -screen 0 800x600x16 :$XID -screen 0 800x600x16 -nolisten tcp -auth /dev/null >/dev/null 2>&1 & trap "kill -15 $! " 0 HUP INT QUIT TRAP USR1 PIPE TERM ; } || { echo "Gtk+Tests:ERROR: Failed to start Xvfb environment for X11 target tests."; exit 1; }
-DISPLAY=:$XID
-export DISPLAY
-echo Setting display: $DISPLAY
-fi

=== removed file 'tests/test-defines.h'
--- tests/test-defines.h	2010-03-23 16:05:35 +0000
+++ tests/test-defines.h	1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-/*
-Testing defines to be shared between various tests.
-
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#define     TEST_MUTE_VALUE                 TRUE
-#define     TEST_VOLUME_VALUE               77.77777
-#define     TEST_AVAILABLE_VALUE            TRUE

=== removed file 'tests/test-indicator-sound-dbus-client.c'
--- tests/test-indicator-sound-dbus-client.c	2010-03-23 16:05:35 +0000
+++ tests/test-indicator-sound-dbus-client.c	1970-01-01 00:00:00 +0000
@@ -1,135 +0,0 @@
-/*
-Tests for the libappindicator library that are over DBus.  This is
-the client side of those tests.
-
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include "../src/dbus-shared-names.h"
-#include "test-defines.h"
-#include "../src/sound-service-client.h"
-
-static GMainLoop * mainloop = NULL;
-static DBusGProxy * proxy= NULL;
-
-static void
-test_fetch_mute(DBusGProxy * proxy)
-{
-    GError * error = NULL;
-    gboolean *fetched_mute_value;
-    fetched_mute_value = g_new0(gboolean, 1);
-    org_ayatana_indicator_sound_get_sink_mute(proxy, fetched_mute_value, &error);
-	if (error != NULL) {
-		g_warning("test-indicator-sound-dbus-client::test_fetch_mute - Unable to fetch mute: %s", error->message);
-		g_error_free(error);
-        g_free(fetched_mute_value);
-        return;
-	}
-    g_assert(TEST_MUTE_VALUE == *fetched_mute_value); 
-    g_free(fetched_mute_value);
-}
-
-static void
-test_fetch_volume(DBusGProxy * proxy)
-{
-	GError * error = NULL;
-    gdouble *volume_percent_input;
-    volume_percent_input = g_new0(gdouble, 1);
-    org_ayatana_indicator_sound_get_sink_volume(proxy, volume_percent_input, &error);
-	if (error != NULL) {
-		g_warning("test-indicator-sound-dbus-client::test_fetch_volume - Unable to fetch VOLUME: %s", error->message);
-		g_error_free(error);
-        g_free(volume_percent_input);
-        return;
-	}
-    g_assert(TEST_VOLUME_VALUE == *volume_percent_input); 
-    g_free(volume_percent_input);
-}
-
-static void 
-test_fetch_availability(DBusGProxy * proxy)
-{
-    GError * error = NULL;
-    gboolean * available_input;
-    available_input = g_new0(gboolean, 1);
-    org_ayatana_indicator_sound_get_sink_availability(proxy, available_input, &error);
-    if (error != NULL) {
-	    g_warning("test-indicator-sound-dbus-client::test_fetch_availability - unable to fetch availability %s", error->message);
-	    g_error_free(error);
-        g_free(available_input);
-        return;
-    }
-    g_assert(TEST_AVAILABLE_VALUE == *available_input);
-    g_free(available_input);
-}
-
-
-gboolean
-kill_func (gpointer userdata)
-{
-    g_free(proxy);
-	g_main_loop_quit(mainloop);
-	return FALSE;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
-	g_type_init();
-	g_test_init(&argc, &argv, NULL);
-
-	g_usleep(500000);
-
-	GError * error = NULL;
-	DBusGConnection * session_bus = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
-	if (error != NULL) {
-		g_error("Unable to get session bus: %s", error->message);
-		return 1;
-	}
-
-	DBusGProxy * proxy = dbus_g_proxy_new_for_name_owner(session_bus,
-                                            ":1.0",
-											 INDICATOR_SOUND_SERVICE_DBUS_OBJECT,
-                                             INDICATOR_SOUND_SERVICE_DBUS_INTERFACE,
-                                             &error);
-	if (error != NULL) {
-		g_error("Unable to get property proxy: %s", error->message);
-		return 1;
-	}
-
-/*    g_test_add_func("/test-indicator-sound-dbus/test-fetch-mute", test_fetch_mute);*/
-/*    g_test_add_func("/test-indicator-sound-dbus/test-fetch-volume", test_fetch_volume);*/
-/*    g_test_add_func("/test-indicator-sound-dbus/test-fetch-availability", test_fetch_availability);*/
-/*    g_test_queue_free(proxy);*/
-/*    return g_test_run();*/
-
-    test_fetch_mute(proxy);
-    test_fetch_volume(proxy);    
-    test_fetch_availability(proxy);    
-
-	g_timeout_add_seconds(2, kill_func, NULL);
-
-	mainloop = g_main_loop_new(NULL, FALSE);
-	g_main_loop_run(mainloop);
-
-	return 0;
-}

=== removed file 'tests/test-indicator-sound-dbus-server.c'
--- tests/test-indicator-sound-dbus-server.c	2010-03-23 16:05:35 +0000
+++ tests/test-indicator-sound-dbus-server.c	1970-01-01 00:00:00 +0000
@@ -1,67 +0,0 @@
-/*
-Tests for the libappindicator library that are over DBus.  This is
-the server side of those tests.
-
-Copyright 2009 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-    Ted Gould <ted@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it
-under the terms of the GNU General Public License version 3, as published
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranties of
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <glib.h>
-#include "../src/sound-service-dbus.h"
-#include "test-defines.h"
-
-static GMainLoop * mainloop = NULL;
-static SoundServiceDbus *dbus_interface = NULL;
-
-gboolean
-kill_func (gpointer userdata)
-{
-	g_main_loop_quit(mainloop);
-    // TODO free the dbus interface !!
-	return FALSE;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
-    g_type_init();
-   
-	//g_debug("DBus ID: %s", dbus_connection_get_server_id(dbus_g_connection_get_connection(dbus_g_bus_get(DBUS_BUS_SESSION, NULL))));
-
-    dbus_interface = g_object_new(SOUND_SERVICE_DBUS_TYPE, NULL);
-
-    // Set the mute value
-    sound_service_dbus_update_sink_mute(dbus_interface, TEST_MUTE_VALUE);
-    sound_service_dbus_update_sink_volume(dbus_interface, TEST_VOLUME_VALUE);
-    sound_service_dbus_update_sink_availability(dbus_interface, TEST_AVAILABLE_VALUE);
-
-    g_timeout_add_seconds(4, kill_func, NULL);
-
-    // Run the loop
-    mainloop = g_main_loop_new(NULL, FALSE);
-    g_main_loop_run(mainloop);
-
-	g_debug("Quiting");
-
-    return 0;
-}
-
-

=== removed file 'tests/test-indicator-sound.c'
--- tests/test-indicator-sound.c	2010-03-18 20:20:26 +0000
+++ tests/test-indicator-sound.c	1970-01-01 00:00:00 +0000
@@ -1,100 +0,0 @@
-/*
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <string.h>
-#include <gtk/gtk.h>
-#include <libindicator/indicator-object.h>
-#include "../src/indicator-sound.h"
-
-static const gint STATE_MUTED = 0;
-static const gint STATE_ZERO = 1;
-static const gint STATE_LOW = 2;
-static const gint STATE_MEDIUM = 3;
-static const gint STATE_HIGH = 4;
-static const gint STATE_MUTED_WHILE_INPUT = 5;
-static const gint STATE_SINKS_NONE = 6;
-
-void test_libindicator_sound_init()
-{
-	IndicatorObject * sound_menu = indicator_object_new_from_file(TOP_BUILD_DIR "/src/.libs/libsoundmenu.so");
-	g_assert(sound_menu != NULL);
-	g_object_unref(G_OBJECT(sound_menu));
-}
-
-void test_libindicator_determine_state()
-{
-	IndicatorObject * sound_menu = indicator_object_new_from_file(TOP_BUILD_DIR "/src/.libs/libsoundmenu.so");
-    prepare_for_tests(sound_menu);
-
-    determine_state_from_volume(40);
-	g_assert(get_state() == STATE_MEDIUM);
-
-    determine_state_from_volume(0);
-	g_assert(get_state() == STATE_ZERO);
-
-    determine_state_from_volume(15);
-	g_assert(get_state() == STATE_LOW);
-
-    determine_state_from_volume(70);
-	g_assert(get_state() == STATE_HIGH);
-
-	g_object_unref(G_OBJECT(sound_menu));
-}
-
-void test_libindicator_image_names()
-{
-    prepare_state_machine();
-
-    gchar* muted_name = get_state_image_name(STATE_MUTED);        
-    g_assert(g_ascii_strncasecmp("audio-volume-muted-panel", muted_name, strlen("audio-volume-muted-panel")) == 0);
-
-    gchar* zero_name = get_state_image_name(STATE_ZERO);        
-    g_assert(g_ascii_strncasecmp("audio-volume-low-zero-panel", zero_name, strlen("audio-volume-low-zero-panel")) == 0);
-
-    gchar* low_name = get_state_image_name(STATE_LOW);        
-    g_assert(g_ascii_strncasecmp("audio-volume-low-panel", low_name, strlen("audio-volume-low-panel")) == 0);
-
-    gchar* medium_name = get_state_image_name(STATE_MEDIUM);        
-    g_assert(g_ascii_strncasecmp("audio-volume-medium-panel", medium_name, strlen("audio-volume-medium-panel")) == 0);
-
-    gchar* high_name = get_state_image_name(STATE_HIGH);        
-    g_assert(g_ascii_strncasecmp("audio-volume-high-panel", high_name, strlen("audio-volume-high-panel")) == 0);
-
-    gchar* blocked_name = get_state_image_name(STATE_MUTED_WHILE_INPUT);        
-    g_assert(g_ascii_strncasecmp("audio-volume-muted-blocking-panel", blocked_name, strlen("audio-volume-muted-blocking-panel")) == 0);
-
-    gchar* none_name = get_state_image_name(STATE_SINKS_NONE);        
-    g_assert(g_ascii_strncasecmp("audio-output-none-panel", none_name, strlen("audio-output-none-panel")) == 0);
-    
-    tidy_up_hash();
-}
-
-
-gint main (gint argc, gchar * argv[])
-{
-	g_type_init();
-	g_test_init(&argc, &argv, NULL);
-
-/*    g_test_add_func("/indicator-sound/indicator-sound/init", test_libindicator_sound_init);*/
-/*    g_test_add_func("/indicator-sound/indicator-sound/state_machine", test_libindicator_determine_state);*/
-    g_test_add_func("/indicator-sound/indicator-sound/image_names", test_libindicator_image_names);
-
-	return g_test_run ();
-}
-

=== removed file 'tests/test-pulse-manager.c'
--- tests/test-pulse-manager.c	2010-03-24 15:47:37 +0000
+++ tests/test-pulse-manager.c	1970-01-01 00:00:00 +0000
@@ -1,139 +0,0 @@
-/*
-Copyright 2010 Canonical Ltd.
-
-Authors:
-    Robert Collins <robert.collins@xxxxxxxxxxxxx>
-    Conor Curran <conor.curran@xxxxxxxxxxxxx>
-
-This program is free software: you can redistribute it and/or modify it 
-under the terms of the GNU General Public License version 3, as published 
-by the Free Software Foundation.
-
-This program is distributed in the hope that it will be useful, but 
-WITHOUT ANY WARRANTY; without even the implied warranties of 
-MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 
-PURPOSE.  See the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along 
-with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <string.h>
-
-/* we intend to test static functions 
-which are not to be exported
-hence the inclusion of the C file*/
-#include "../src/pulse-manager.c"
-#include "mockpulse.h"
-
-
-/**
-Helper Methods
-**/
-static pa_sink_info* 
-mock_sink_info() 
-{
-    pa_sink_info* mock_sink;
-    mock_sink = g_new0(pa_sink_info, 1);
-    mock_sink->index = 8;
-    mock_sink->name = g_strdup("mock_sink");
-    mock_sink->mute = 0;
-    pa_cvolume volume; // nearly full volume:
-    pa_cvolume_set(&volume, 1, 30000);
-    mock_sink->volume = volume;
-    return mock_sink;
-}
-
-
-
-/*static void test_pa_context_exit()*/
-/*{*/
-/*    pa_context* context = pa_context_new(NULL, "foo");*/
-
-/*    pa_context_set_state_callback(context, context_state_callback, NULL);*/
-/*    // => call context_state_callback(context, NULL);*/
-/*    // pa_context_get_state is mocked to return the right FAIL flag.*/
-/*    set_pa_context_get_state_result(context, PA_CONTEXT_FAILED);*/
-/*    context_state_callback(context, NULL);*/
-/*    // Test to ensure context is tidied after failure.*/
-/*    g_assert(context == NULL);*/
-/*    // 2. then using the same pa_context_get_state we could ensure the manager*/
-/*    // is attempting to reconnect to PA. */
-/*    //g_assert(PA_CONTEXT_CONNECTING == pa_context_get_state(get_context()));*/
-/*    //pa_context_unref(context);*/
-/*}*/
-
-static void test_sink_update()
-{
-    pa_context* context = pa_context_new(NULL, "foo");    
-    pa_sink_info* mock_sink = mock_sink_info();
-    set_pa_context_get_sink_info(mock_sink);
-    sink_hash = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, destroy_sink_info);
-
-    pa_context_get_sink_info_by_index(context, mock_sink->index, pulse_sink_info_callback, NULL);
-
-    mock_sink->mute = 1;
-    pa_cvolume volume; // nearly full volume:
-    pa_cvolume_set(&volume, 1, 10000);
-    mock_sink->volume = volume;
-
-    set_pa_context_get_sink_info(mock_sink);
-
-    pa_context_get_sink_info_by_index(context, mock_sink->index, update_sink_info, NULL);
-
-    GList *keys = g_hash_table_get_keys(sink_hash);
-    gint position =  g_list_index(keys, GINT_TO_POINTER(mock_sink->index));
-
-    g_assert(position >= 0);
-
-    sink_info* stored_sink_info = g_hash_table_lookup(sink_hash, GINT_TO_POINTER(mock_sink->index));
-
-    g_assert(!!mock_sink->mute == stored_sink_info->mute);
-    g_assert(pa_cvolume_equal(&mock_sink->volume, &stored_sink_info->volume));
-
-
-    g_free(mock_sink);
-    g_hash_table_destroy(sink_hash);
-    pa_context_unref(context);
-}
-
-
-static void test_sink_cache_population()
-{
-    pa_context* context = pa_context_new(NULL, "foo");    
-    pa_sink_info* mock_sink = mock_sink_info();
-    set_pa_context_get_sink_info(mock_sink);
-    sink_hash = g_hash_table_new_full(g_direct_hash, g_direct_equal, NULL, destroy_sink_info);
-
-    pa_context_get_sink_info_by_index(context, mock_sink->index, pulse_sink_info_callback, NULL);
-
-    GList *keys = g_hash_table_get_keys(sink_hash);
-    gint position =  g_list_index(keys, GINT_TO_POINTER(mock_sink->index));
-
-    g_assert(position >= 0);
-
-    sink_info* stored_sink_info = g_hash_table_lookup(sink_hash, GINT_TO_POINTER(mock_sink->index));
-
-    g_assert(g_ascii_strncasecmp(mock_sink->name, stored_sink_info->name, strlen(mock_sink->name)) == 0);
-    g_assert(!!mock_sink->mute == stored_sink_info->mute);
-    g_assert(mock_sink->index == stored_sink_info->index);
-    g_assert(pa_cvolume_equal(&mock_sink->volume, &stored_sink_info->volume));
-
-    g_free(mock_sink);
-    g_hash_table_destroy(sink_hash);
-    pa_context_unref(context);
-}
-
-
-gint main (gint argc, gchar * argv[])
-{
-  g_type_init();
-  g_test_init(&argc, &argv, NULL);
-  
-  g_test_add_func("/indicator-sound/pulse-manager/sink-cache-population", test_sink_cache_population);
-  g_test_add_func("/indicator-sound/pulse-manager/sink-update", test_sink_update);
-
-  //g_test_add_func("/indicator-sound/pulse-manager/pa-context-exit", test_pa_context_exit);
-  
-  return g_test_run ();
-}

=== added directory 'vapi'
=== added file 'vapi/bus-watcher.vapi'
--- vapi/bus-watcher.vapi	1970-01-01 00:00:00 +0000
+++ vapi/bus-watcher.vapi	2013-10-17 20:40:25 +0000
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2013 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *      Lars Uebernickel <lars.uebernickel@xxxxxxxxxxxxx>
+ */
+
+namespace BusWatcher {
+	[CCode (cheader_filename = "bus-watch-namespace.h", cname = "bus_watch_namespace")]
+	public static uint watch_namespace (GLib.BusType bus_type, string name_space,
+			[CCode (delegate_target_pos = 4.9)] owned GLib.BusNameAppearedCallback? name_appeared,
+			[CCode (delegate_target_pos = 4.9)] owned GLib.BusNameVanishedCallback? name_vanished);
+}

=== added file 'vapi/config.vapi'
--- vapi/config.vapi	1970-01-01 00:00:00 +0000
+++ vapi/config.vapi	2013-10-17 20:40:25 +0000
@@ -0,0 +1,8 @@
+[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "../config.h")]
+namespace Config {
+  public const string GETTEXT_PACKAGE;
+  public const string GNOMELOCALEDIR;
+  public const string PKGDATADIR;
+  public const string PACKAGE_NAME;
+  public const string PACKAGE_VERSION;
+}

=== added file 'vapi/url-dispatcher.vapi'
--- vapi/url-dispatcher.vapi	1970-01-01 00:00:00 +0000
+++ vapi/url-dispatcher.vapi	2013-10-17 20:40:25 +0000
@@ -0,0 +1,9 @@
+[CCode (cprefix="", lower_case_cprefix="", cheader_filename="liburl-dispatcher-1/url-dispatcher.h")]
+
+namespace UrlDispatch
+{
+  public delegate void DispatchCallback ();
+
+  [CCode (cname = "url_dispatch_send")]
+  public static void send (string url, DispatchCallback? func = null);
+}