Skip to content
Snippets Groups Projects
Commit 460e89ca authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

[#1970] Disable volume controls when using pulseaudio

parent f54d4220
Branches
Tags
No related merge requests found
......@@ -631,6 +631,7 @@ select_audio_manager( void )
gtk_widget_show( alsa_conf );
gtk_widget_set_sensitive(GTK_WIDGET(alsa_conf), TRUE);
gtk_widget_set_sensitive(GTK_WIDGET(pa_mute_widget), FALSE);
gtk_widget_set_sensitive (GTK_WIDGET (volumeToggle), TRUE);
}
else if( SHOW_ALSA_CONF && gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(pulse) ))
{
......@@ -639,6 +640,7 @@ select_audio_manager( void )
gtk_container_remove( GTK_CONTAINER(alsa_conf) , alsabox );
gtk_widget_hide( alsa_conf );
gtk_widget_set_sensitive(GTK_WIDGET(pa_mute_widget), TRUE);
gtk_widget_set_sensitive (GTK_WIDGET (volumeToggle), FALSE);
} else {
DEBUG("alsa conf panel...nothing");
}
......
......@@ -115,10 +115,10 @@ log4c_category_t* log4c_sfl_gtk_category;
#define __POPUP_WINDOW ( dbus_popup_mode() )
/** Show/Hide the dialpad */
#define SHOW_DIALPAD ( dbus_get_dialpad() )
/** Show/Hide the volume controls */
#define SHOW_VOLUME ( dbus_get_volume_controls() )
/** Show/Hide the alsa configuration panel */
#define SHOW_ALSA_CONF ( dbus_get_audio_manager() == ALSA )
/** Show/Hide the volume controls */
#define SHOW_VOLUME (dbus_get_volume_controls() && SHOW_ALSA_CONF)
/** Audio Managers */
#define ALSA 0
......
......@@ -29,7 +29,7 @@
<menuitem action="Toolbar"/>
<separator/>
<menuitem action="Dialpad"/>
<menuitem action="VolumeControls"/>
<menuitem name="VolumeControlsToggle" action="VolumeControls"/>
<separator/>
<menuitem action="CallWindow"/>
<menuitem action="History"/>
......
......@@ -1353,13 +1353,14 @@ GtkWidget* create_menus (GtkUIManager *ui_manager)
recordAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/CallMenu/Record");
copyAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Copy");
pasteAction = gtk_ui_manager_get_action (ui_manager, "/MenuBar/EditMenu/Paste");
volumeToggle = gtk_ui_manager_get_widget (ui_manager, "/MenuBar/ViewMenu/VolumeControlsToggle");
// Set the toggle buttons
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/Dialpad")), (gboolean)SHOW_DIALPAD);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/VolumeControls")), (gboolean) SHOW_VOLUME);
//gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (gtk_ui_manager_get_action (ui_manager, "/MenuBar/ViewMenu/VolumeControls")), (gboolean) SHOW_VOLUME);
// GtkWidget * newCallMenu;
gtk_widget_set_sensitive (GTK_WIDGET (volumeToggle), SHOW_ALSA_CONF);
gtk_widget_set_sensitive (GTK_WIDGET (gtk_ui_manager_get_widget (ui_manager, "/MenuBar/ViewMenu/Toolbar")), SHOW_ALSA_CONF);
waitingLayer = create_waiting_icon ();
gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), waitingLayer);
......
......@@ -30,6 +30,8 @@ GtkWidget *historyButton;
GtkWidget *contactButton;
GtkWidget *currentCallsButton;
GtkWidget *volumeToggle;
gboolean uimanager_new (GtkUIManager**);
G_END_DECLS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment