Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
6a9ec135
Commit
6a9ec135
authored
Oct 07, 2009
by
Emmanuel Milou
Browse files
[#1970] Volume controls disable when using pulseaudio
parent
b0256c5e
Changes
5
Hide whitespace changes
Inline
Side-by-side
sflphone-client-gnome/src/config/audioconf.c
View file @
6a9ec135
...
...
@@ -631,7 +631,8 @@ 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
);
gtk_action_set_sensitive
(
GTK_ACTION
(
volumeToggle
),
TRUE
);
}
else
if
(
SHOW_ALSA_CONF
&&
gtk_toggle_button_get_active
(
GTK_TOGGLE_BUTTON
(
pulse
)
))
{
...
...
@@ -640,7 +641,13 @@ 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
);
if
(
gtk_toggle_action_get_active
(
GTK_TOGGLE_ACTION
(
volumeToggle
)))
{
main_window_volume_controls
(
FALSE
);
dbus_set_volume_controls
(
FALSE
);
gtk_toggle_action_set_active
(
GTK_TOGGLE_ACTION
(
volumeToggle
),
FALSE
);
}
gtk_action_set_sensitive
(
GTK_ACTION
(
volumeToggle
),
FALSE
);
}
else
{
DEBUG
(
"alsa conf panel...nothing"
);
}
...
...
sflphone-client-gnome/src/mainwindow.c
View file @
6a9ec135
...
...
@@ -183,8 +183,7 @@ create_main_window ()
ret
=
uimanager_new
(
&
ui_manager
);
if
(
!
ret
)
{
//show_error_dialog (GTK_WINDOW (window), error->message,
// _("Could not load ui.xml. The program may be not properly installed"));
ERROR
(
"Could not load xml GUI
\n
"
);
g_error_free
(
error
);
exit
(
1
);
}
...
...
sflphone-client-gnome/src/ui.xml
View file @
6a9ec135
...
...
@@ -29,7 +29,8 @@
<menuitem
action=
"Toolbar"
/>
<separator/>
<menuitem
action=
"Dialpad"
/>
<menuitem
name=
"VolumeControlsToggle"
action=
"VolumeControls"
/>
<!--menuitem name="VolumeControlsToggle" action="VolumeControls"/-->
<menuitem
action=
"VolumeControls"
/>
<separator/>
<menuitem
action=
"CallWindow"
/>
<menuitem
action=
"History"
/>
...
...
sflphone-client-gnome/src/uimanager.c
View file @
6a9ec135
...
...
@@ -350,15 +350,18 @@ void update_actions()
static
void
volume_bar_cb
(
GtkToggleAction
*
togglemenuitem
,
gpointer
user_data
)
{
gboolean
toggled
=
gtk_toggle_action_get_active
(
togglemenuitem
);
g_print
(
"%i
\n
"
,
toggled
);
main_window_volume_controls
(
toggled
);
dbus_set_volume_controls
(
toggled
);
if
(
toggled
||
SHOW_VOLUME
)
dbus_set_volume_controls
(
toggled
);
}
static
void
dialpad_bar_cb
(
GtkToggleAction
*
togglemenuitem
,
gpointer
user_data
)
{
gboolean
toggled
=
gtk_toggle_action_get_active
(
togglemenuitem
);
main_window_dialpad
(
toggled
);
dbus_set_dialpad
(
toggled
);
if
(
toggled
||
SHOW_DIALPAD
)
dbus_set_dialpad
(
toggled
);
}
static
void
help_contents_cb
(
GtkAction
*
action
)
...
...
@@ -1353,14 +1356,16 @@ 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/VolumeControls
Toggle
"
);
volumeToggle
=
gtk_ui_manager_get_
action
(
ui_manager
,
"/MenuBar/ViewMenu/VolumeControls"
);
// 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/Dialpad"
)),
(
gboolean
)
SHOW_DIALPAD
);
gtk_toggle_action_set_active
(
GTK_TOGGLE_ACTION
(
volumeToggle
),
(
gboolean
)
SHOW_VOLUME
);
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
);
gtk_action_set_sensitive
(
GTK_ACTION
(
volumeToggle
),
SHOW_ALSA_CONF
);
// Disable it right now
gtk_action_set_sensitive
(
GTK_ACTION
(
gtk_ui_manager_get_action
(
ui_manager
,
"/MenuBar/ViewMenu/Toolbar"
)),
FALSE
);
waitingLayer
=
create_waiting_icon
();
gtk_menu_shell_append
(
GTK_MENU_SHELL
(
menu_bar
),
waitingLayer
);
...
...
sflphone-client-gnome/src/uimanager.h
View file @
6a9ec135
...
...
@@ -30,7 +30,7 @@ GtkWidget *historyButton;
GtkWidget
*
contactButton
;
GtkWidget
*
currentCallsButton
;
Gtk
Widget
*
volumeToggle
;
Gtk
Action
*
volumeToggle
;
gboolean
uimanager_new
(
GtkUIManager
**
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment