diff options
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); |