diff options
author | Conor Curran <conor.curran@canonical.com> | 2011-02-07 18:12:54 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2011-02-07 18:12:54 +0000 |
commit | 1691ba2e034d688d58fba39fa88d8ef10bf67fe6 (patch) | |
tree | 0c729f8b6106119be61d56a40c25eaab2cc72bba /src/mute-menu-item.c | |
parent | aa063e3e1c57346a6af86cc0a6cee81a846b1154 (diff) | |
parent | fba8f5aa4d7619b6e796ebb7cd4c96d30f5fd0ff (diff) | |
download | ayatana-indicator-sound-1691ba2e034d688d58fba39fa88d8ef10bf67fe6.tar.gz ayatana-indicator-sound-1691ba2e034d688d58fba39fa88d8ef10bf67fe6.tar.bz2 ayatana-indicator-sound-1691ba2e034d688d58fba39fa88d8ef10bf67fe6.zip |
finally a code base which is sane
Diffstat (limited to 'src/mute-menu-item.c')
-rw-r--r-- | src/mute-menu-item.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mute-menu-item.c b/src/mute-menu-item.c index f7f3824..8409b9f 100644 --- a/src/mute-menu-item.c +++ b/src/mute-menu-item.c @@ -24,7 +24,7 @@ with this program. If not, see <http://www.gnu.org/licenses/>. #include "common-defs.h" #include "mute-menu-item.h" -#include "pulse-manager.h" +#include "pulseaudio-mgr.h" typedef struct _MuteMenuItemPrivate MuteMenuItemPrivate; @@ -62,6 +62,9 @@ mute_menu_item_init (MuteMenuItem *self) g_debug("Building new Mute Menu Item"); MuteMenuItemPrivate* priv = MUTE_MENU_ITEM_GET_PRIVATE(self); priv->button = dbusmenu_menuitem_new(); + dbusmenu_menuitem_property_set_bool (priv->button, + DBUSMENU_MENUITEM_PROP_VISIBLE, + TRUE); g_signal_connect (G_OBJECT (priv->button), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, @@ -90,10 +93,8 @@ mute_menu_item_set_global_mute_from_ui (gpointer user_data) DbusmenuMenuitem* button = DBUSMENU_MENUITEM (user_data); gboolean current_value = dbusmenu_menuitem_property_get_bool (button, DBUSMENU_MUTE_MENUITEM_VALUE); - gboolean new_value = !current_value; - // pa manager api - to be refactored - toggle_global_mute (new_value); + pm_update_mute (new_value); } void @@ -113,6 +114,9 @@ void mute_menu_item_enable (MuteMenuItem* item, gboolean active) { MuteMenuItemPrivate* priv = MUTE_MENU_ITEM_GET_PRIVATE (item); + dbusmenu_menuitem_property_set_bool (priv->button, + DBUSMENU_MENUITEM_PROP_VISIBLE, + TRUE); dbusmenu_menuitem_property_set_bool (priv->button, DBUSMENU_MENUITEM_PROP_ENABLED, |