diff options
author | Conor Curran <conor.curran@canonical.com> | 2010-03-11 17:23:13 +0000 |
---|---|---|
committer | Conor Curran <conor.curran@canonical.com> | 2010-03-11 17:23:13 +0000 |
commit | b4dfb37242eb867798f778a80d5ece48a568630b (patch) | |
tree | 5c02f8b9a80eb444569ac783d47fb9dc29f40534 /src/dbus-menu-manager.c | |
parent | 633b514efeaf1c4086e1b2e5fbef185b199517c8 (diff) | |
parent | 0391c21a9205ecf2a182a217d74e3f4d3177f81e (diff) | |
download | ayatana-indicator-sound-b4dfb37242eb867798f778a80d5ece48a568630b.tar.gz ayatana-indicator-sound-b4dfb37242eb867798f778a80d5ece48a568630b.tar.bz2 ayatana-indicator-sound-b4dfb37242eb867798f778a80d5ece48a568630b.zip |
merged weeks work plus incremented version in prep for 0.1.3 release
Diffstat (limited to 'src/dbus-menu-manager.c')
-rw-r--r-- | src/dbus-menu-manager.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/dbus-menu-manager.c b/src/dbus-menu-manager.c index 17003df..64f7108 100644 --- a/src/dbus-menu-manager.c +++ b/src/dbus-menu-manager.c @@ -18,7 +18,6 @@ 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> @@ -102,6 +101,8 @@ void dbus_menu_manager_update_pa_state(gboolean pa_state, gboolean sink_availabl 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); @@ -153,12 +154,18 @@ static void refresh_menu() DBUSMENU_MENUITEM_PROP_ENABLED, TRUE); } +/* if(b_all_muted == TRUE){*/ +/* dbusmenu_menuitem_property_set_bool(DBUSMENU_MENUITEM(volume_slider_menuitem), */ +/* DBUSMENU_MENUITEM_PROP_ENABLED,*/ +/* FALSE); */ +/* }*/ } /** - +idle_routine: +Something for glip mainloop to do when idle **/ static gboolean idle_routine (gpointer data) { @@ -199,7 +206,8 @@ static void rebuild_sound_menu(DbusmenuMenuitem *root, SoundServiceDbus *service 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_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); @@ -210,8 +218,8 @@ static void rebuild_sound_menu(DbusmenuMenuitem *root, SoundServiceDbus *service // Sound preferences dialog DbusmenuMenuitem *settings_mi = dbusmenu_menuitem_new(); - dbusmenu_menuitem_property_set(settings_mi, DBUSMENU_MENUITEM_PROP_LABEL, - _("Sound Preferences...")); + 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); |