diff options
author | Ken VanDine <ken.vandine@canonical.com> | 2011-02-10 13:19:22 -0500 |
---|---|---|
committer | Ken VanDine <ken.vandine@canonical.com> | 2011-02-10 13:19:22 -0500 |
commit | 817f8e1a86aaa026c8de8acee40c5c9664d358d0 (patch) | |
tree | d74ee9e8911c0d7b2ecf6b3df98e1bcdff73fe06 /src/mute-menu-item.c | |
parent | d668df547af9a4add8c18e3614d344b80e0bd6c8 (diff) | |
parent | b4b1c772dc57c3034cc80b785e4b472b8fe1b404 (diff) | |
download | ayatana-indicator-sound-817f8e1a86aaa026c8de8acee40c5c9664d358d0.tar.gz ayatana-indicator-sound-817f8e1a86aaa026c8de8acee40c5c9664d358d0.tar.bz2 ayatana-indicator-sound-817f8e1a86aaa026c8de8acee40c5c9664d358d0.zip |
releasing version 0.5.9-0ubuntu1
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, |