Commit 12d0751c authored by Alexandre Savard's avatar Alexandre Savard
Browse files

#8762: Add mute button for calls

parent 3e856e19
......@@ -937,6 +937,14 @@ sflphone_rec_call()
update_actions();
}
void
sflphone_mute_call()
{
DEBUG("Actions: Mute call");
toggle_slider_mute();
}
void sflphone_fill_codec_list()
{
guint account_list_size = account_list_get_size();
......
......@@ -197,6 +197,8 @@ void sflphone_record (callable_obj_t *c);
void sflphone_rec_call (void);
void sflphone_mute_call (void);
void status_bar_display_account ();
void sflphone_fill_history (void);
......
......@@ -119,7 +119,7 @@ static void
volume_changed_cb(DBusGProxy *proxy UNUSED, const gchar *device, gdouble value,
void *foo UNUSED)
{
set_slider(device, value);
set_slider_no_update(device, value);
}
static void
......
......@@ -41,22 +41,25 @@ static GtkWidget * button[2];
// icons
static GtkWidget * images[2][4];
enum device_t {
SPEAKER = 0,
MIKE,
DEVICE_SPEAKER = 0,
DEVICE_MIC,
DEVICE_COUNT
} ;
};
enum volume_t {
MUTED = 0,
VOL25,
VOL50,
VOL75
} ;
};
static guint toggledConnId[2]; // The button toggled signal connection ID
static guint movedConnId[2]; // The slider_moved signal connection ID
static guint device_state = DEVICE_STATE_ACTIVE;
void
update_icons(int dev)
{
......@@ -86,20 +89,20 @@ slider_moved(GtkRange* range, gchar* device)
dbus_set_volume(device, slider_value);
if (g_strcmp0(device, "speaker") == 0)
update_icons(SPEAKER);
update_icons(DEVICE_SPEAKER);
else
update_icons(MIKE);
update_icons(DEVICE_MIC);
}
static void
void
mute_cb(GtkWidget *widget, gchar* device)
{
int dev;
if (g_strcmp0(device, "speaker") == 0)
dev = SPEAKER;
dev = DEVICE_SPEAKER;
else
dev = MIKE;
dev = DEVICE_MIC;
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))) { // Save value
DEBUG("Save");
......@@ -113,15 +116,46 @@ mute_cb(GtkWidget *widget, gchar* device)
update_icons(dev);
}
void
set_slider(const gchar * device, gdouble newval)
void set_slider_value(const gchar *device, gdouble newval)
{
int dev;
int dev = 0;
if (g_strcmp0(device, "speaker") == 0)
dev = SPEAKER;
else
dev = MIKE;
if (g_strcmp0(device, "speaker") == 0) {
dev = DEVICE_SPEAKER;
DEBUG("Slider: Set value for speaker: %f\n", newval);
}
else if (g_strcmp0(device, "mic") == 0) {
dev = DEVICE_MIC;
DEBUG("Slider: Set value for mic: %f\n", newval);
}
else {
ERROR("Slider: Unknown device: %s", device);
return;
}
gtk_range_set_value(GTK_RANGE(slider[dev]), newval);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(button[dev]), (newval == 0 ? TRUE: FALSE));
update_icons(dev);
}
void set_slider_no_update (const gchar * device, gdouble newval)
{
int dev = 0;
if (g_strcmp0(device, "speaker") == 0) {
dev = DEVICE_SPEAKER;
DEBUG("Slider: Set value no update for speaker: %f\n", newval);
}
else if (g_strcmp0(device, "mic") == 0) {
dev = DEVICE_MIC;
DEBUG("Slider: Set value no update for mic: %f\n", newval);
}
else {
ERROR("Slider: Unknown device: %s", device);
return;
}
g_signal_handler_block(G_OBJECT(slider[dev]), movedConnId[dev]);
gtk_range_set_value(GTK_RANGE(slider[dev]), newval);
......@@ -134,6 +168,34 @@ set_slider(const gchar * device, gdouble newval)
update_icons(dev);
}
void toggle_slider_mute(void)
{
DEBUG("Slider: Mute/Unmute toggle");
switch(device_state) {
case DEVICE_STATE_ACTIVE:
// value[DEVICE_SPEAKER] = gtk_range_get_value(GTK_RANGE(slider[DEVICE_SPEAKER]));
value[DEVICE_MIC] = gtk_range_get_value(GTK_RANGE(slider[DEVICE_MIC]));
// dbus_set_volume("speaker", 0.0);
dbus_set_volume("mic", 0.0);
device_state = DEVICE_STATE_MUTED;
break;
case DEVICE_STATE_MUTED:
// dbus_set_volume("speaker", value[DEVICE_SPEAKER]);
dbus_set_volume("mic", value[DEVICE_MIC]);
device_state = DEVICE_STATE_ACTIVE;
break;
default:
ERROR("Slider: Unknown state");
break;
}
}
guint get_mute_unmute_audio_state(void)
{
return device_state;
}
/** Generates the speaker slider and mute button */
GtkWidget *
create_slider(const gchar * device)
......@@ -146,25 +208,25 @@ create_slider(const gchar * device)
int dev=0;
if (g_strcmp0(device, "speaker") == 0) {
dev = SPEAKER;
images[SPEAKER][MUTED] = gtk_image_new_from_file(ICONS_DIR "/speaker.svg");
images[SPEAKER][VOL25] = gtk_image_new_from_file(ICONS_DIR "/speaker_25.svg");
images[SPEAKER][VOL50] = gtk_image_new_from_file(ICONS_DIR "/speaker_50.svg");
images[SPEAKER][VOL75] = gtk_image_new_from_file(ICONS_DIR "/speaker_75.svg");
g_object_ref(images[SPEAKER][MUTED]);
g_object_ref(images[SPEAKER][VOL25]);
g_object_ref(images[SPEAKER][VOL50]);
g_object_ref(images[SPEAKER][VOL75]);
dev = DEVICE_SPEAKER;
images[DEVICE_SPEAKER][MUTED] = gtk_image_new_from_file(ICONS_DIR "/speaker.svg");
images[DEVICE_SPEAKER][VOL25] = gtk_image_new_from_file(ICONS_DIR "/speaker_25.svg");
images[DEVICE_SPEAKER][VOL50] = gtk_image_new_from_file(ICONS_DIR "/speaker_50.svg");
images[DEVICE_SPEAKER][VOL75] = gtk_image_new_from_file(ICONS_DIR "/speaker_75.svg");
g_object_ref(images[DEVICE_SPEAKER][MUTED]);
g_object_ref(images[DEVICE_SPEAKER][VOL25]);
g_object_ref(images[DEVICE_SPEAKER][VOL50]);
g_object_ref(images[DEVICE_SPEAKER][VOL75]);
} else if (g_strcmp0(device, "mic") == 0) {
dev = MIKE;
images[MIKE][MUTED] = gtk_image_new_from_file(ICONS_DIR "/mic.svg");
images[MIKE][VOL25] = gtk_image_new_from_file(ICONS_DIR "/mic_25.svg");
images[MIKE][VOL50] = gtk_image_new_from_file(ICONS_DIR "/mic_50.svg");
images[MIKE][VOL75] = gtk_image_new_from_file(ICONS_DIR "/mic_75.svg");
g_object_ref(images[MIKE][MUTED]);
g_object_ref(images[MIKE][VOL25]);
g_object_ref(images[MIKE][VOL50]);
g_object_ref(images[MIKE][VOL75]);
dev = DEVICE_MIC;
images[DEVICE_MIC][MUTED] = gtk_image_new_from_file(ICONS_DIR "/mic.svg");
images[DEVICE_MIC][VOL25] = gtk_image_new_from_file(ICONS_DIR "/mic_25.svg");
images[DEVICE_MIC][VOL50] = gtk_image_new_from_file(ICONS_DIR "/mic_50.svg");
images[DEVICE_MIC][VOL75] = gtk_image_new_from_file(ICONS_DIR "/mic_75.svg");
g_object_ref(images[DEVICE_MIC][MUTED]);
g_object_ref(images[DEVICE_MIC][VOL25]);
g_object_ref(images[DEVICE_MIC][VOL50]);
g_object_ref(images[DEVICE_MIC][VOL75]);
}
ret = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 5 /*spacing*/);
......@@ -185,7 +247,7 @@ create_slider(const gchar * device)
G_CALLBACK(slider_moved), (gpointer) device);
gtk_box_pack_start(GTK_BOX(ret), slider[dev], TRUE /*expand*/, TRUE /*fill*/, 0 /*padding*/);
set_slider(device, dbus_get_volume(device));
set_slider_no_update(device, dbus_get_volume(device));
return ret;
}
......@@ -36,6 +36,12 @@
* @brief Volume sliders at the bottom of the main window.
*/
enum device_state_t {
DEVICE_STATE_MUTED = 0,
DEVICE_STATE_ACTIVE,
DEVICE_STATE_COUNT
};
/**
* Build the sliders widget
* @param device Mic or speaker
......@@ -43,6 +49,12 @@
*/
GtkWidget * create_slider (const gchar * device);
/**
* Update the sliders sending the value to the server
* @param device The device slider to update
* @param value The value to set [0, 1.0]
*/
void set_slider_value(const gchar *device, gdouble value);
/**
* This function updates the sliders without sending the value to the server.
......@@ -51,6 +63,16 @@ GtkWidget * create_slider (const gchar * device);
* @param device The device slider to update {speaker, mic}
* @param value The value to set [0, 1.0]
*/
void set_slider (const gchar * device, gdouble value);
void set_slider_no_update (const gchar * device, gdouble value);
/**
* Mute the audio device setting the sliders to 0
*/
void toggle_slider_mute(void);
/**
* Returns the mute/unmute state
*/
guint get_mute_unmute_state(void);
#endif
......@@ -8,7 +8,7 @@
<menuitem name="OnHoldMenu" action="OnHold"/>
<menuitem action="InstantMessaging"/>
<menuitem action="Record"/>
<menuitem action="MuteCall"/>
<menuitem action="Mute"/>
<separator/>
<menuitem action="AccountAssistant"/>
<separator/>
......@@ -50,9 +50,10 @@
<toolitem name="TransferToolbar" action="Transfer"/>
<toolitem name="InstantMessagingToolbar" action="InstantMessaging"/>
<toolitem name="RecordToolbar" action="Record"/>
<toolitem name="MuteCallToolbar" action="MuteCall"/>
<toolitem name="MuteToolbar" action="Mute"/>
<!-- FIXME: commented out because it is responsible for #7495 -->
<!-- separator/-->
<toolitem name="VoicemailToolbar" action="Voicemail"/>
<toolitem name="HistoryToolbar" action="History"/>
<toolitem name="StartPlaybackRecordToolbar" action="StartPlaybackRecord"/>
......
......@@ -59,6 +59,8 @@
#include <sys/stat.h>
#include <sliders.h>
void show_edit_number(callable_obj_t *call);
static GtkWidget *toolbar_;
......@@ -80,9 +82,9 @@ static GtkWidget * transferToolbar_;
static GtkAction * copyAction_;
static GtkAction * pasteAction_;
static GtkAction * recordAction_;
static GtkAction * muteCallAction_;
static GtkAction * muteAction_;
static GtkWidget * recordWidget_;
static GtkWidget * muteCallWidget_;
static GtkWidget * muteWidget_;
static GtkAction * voicemailAction_;
static GtkWidget * voicemailToolbar_;
static GtkWidget * imToolbar_;
......@@ -120,9 +122,18 @@ static void add_to_toolbar(GtkWidget *toolbar, GtkWidget *item, int pos)
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), GTK_TOOL_ITEM(item), pos);
}
static void
call_mute(void)
{
DEBUG("UIManager: Mute call button pressed");
sflphone_mute_call();
}
void
update_actions()
{
int pos = 0;
gtk_action_set_sensitive(newCallAction_, TRUE);
gtk_action_set_sensitive(pickUpAction_, FALSE);
gtk_action_set_sensitive(hangUpAction_, FALSE);
......@@ -130,7 +141,7 @@ update_actions()
g_object_ref(hangUpWidget_);
g_object_ref(recordWidget_);
g_object_ref(muteCallWidget_);
g_object_ref(muteWidget_);
g_object_ref(holdToolbar_);
g_object_ref(offHoldToolbar_);
......@@ -144,7 +155,7 @@ update_actions()
remove_from_toolbar(hangUpWidget_);
remove_from_toolbar(recordWidget_);
remove_from_toolbar(muteCallWidget_);
remove_from_toolbar(muteWidget_);
remove_from_toolbar(transferToolbar_);
remove_from_toolbar(historyButton_);
......@@ -158,9 +169,9 @@ update_actions()
gtk_widget_set_sensitive(holdToolbar_, FALSE);
gtk_widget_set_sensitive(offHoldToolbar_, FALSE);
gtk_action_set_sensitive(recordAction_, FALSE);
gtk_action_set_sensitive(muteCallAction_, FALSE);
gtk_action_set_sensitive(muteAction_, FALSE);
gtk_widget_set_sensitive(recordWidget_, FALSE);
gtk_widget_set_sensitive(muteCallWidget_, FALSE);
gtk_widget_set_sensitive(muteWidget_, FALSE);
gtk_action_set_sensitive(copyAction_, FALSE);
if (addrbook)
......@@ -186,6 +197,12 @@ update_actions()
gtk_widget_set_sensitive(historyButton_, TRUE);
}
GtkToolItem *separator = gtk_separator_tool_item_new();
gtk_toolbar_insert(GTK_TOOLBAR(toolbar_), separator, -1);
// add mute button
add_to_toolbar(toolbar_, muteWidget_, -1);
gtk_action_set_sensitive(muteAction_, TRUE);
// If addressbook support has been enabled and all addressbooks are loaded, display the icon
if (addrbook && addrbook->is_ready() && addressbook_config_load_parameters()->enable) {
add_to_toolbar(toolbar_, contactButton_, -1);
......@@ -223,9 +240,9 @@ update_actions()
// Replace the dial button with the hangup button
g_object_ref(newCallWidget_);
remove_from_toolbar(newCallWidget_);
int pos = 0;
pos = 0;
add_to_toolbar(toolbar_, pickUpWidget_, pos++);
add_to_toolbar(toolbar_, hangUpWidget_, pos);
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
break;
}
case CALL_STATE_HOLD:
......@@ -237,13 +254,13 @@ update_actions()
gtk_widget_set_sensitive(newCallWidget_, TRUE);
// Replace the hold button with the off-hold button
int pos = 1;
pos = 1;
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
add_to_toolbar(toolbar_, offHoldToolbar_, pos++);
if (instant_messaging_enabled) {
gtk_action_set_sensitive(imAction_, TRUE);
add_to_toolbar(toolbar_, imToolbar_, pos);
add_to_toolbar(toolbar_, imToolbar_, pos++);
}
break;
......@@ -253,8 +270,8 @@ update_actions()
DEBUG("UIManager: Call State Ringing");
gtk_action_set_sensitive(pickUpAction_, TRUE);
gtk_action_set_sensitive(hangUpAction_, TRUE);
int pos = 1;
add_to_toolbar(toolbar_, hangUpWidget_, pos);
pos = 1;
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
break;
}
case CALL_STATE_DIALING:
......@@ -267,7 +284,7 @@ update_actions()
g_object_ref(newCallWidget_);
remove_from_toolbar(newCallWidget_);
int pos = 0;
pos = 0;
add_to_toolbar(toolbar_, pickUpWidget_, pos++);
if (active_calltree_tab == current_calls_tab)
......@@ -275,9 +292,9 @@ update_actions()
else if (active_calltree_tab == history_tab) {
if (is_non_empty(selectedCall->_recordfile)) {
if (selectedCall->_record_is_playing)
add_to_toolbar(toolbar_, stopRecordWidget_, pos);
add_to_toolbar(toolbar_, stopRecordWidget_, pos++);
else
add_to_toolbar(toolbar_, playRecordWidget_, pos);
add_to_toolbar(toolbar_, playRecordWidget_, pos++);
}
}
break;
......@@ -286,30 +303,25 @@ update_actions()
{
DEBUG("UIManager: Call State Current");
gtk_action_set_sensitive(hangUpAction_, TRUE);
int pos = 1;
pos = 1;
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
gtk_widget_set_sensitive(holdMenu_, TRUE);
gtk_widget_set_sensitive(holdToolbar_, TRUE);
gtk_widget_set_sensitive(transferToolbar_, TRUE);
gtk_action_set_sensitive(recordAction_, TRUE);
gtk_action_set_sensitive(muteCallAction_, TRUE);
add_to_toolbar(toolbar_, holdToolbar_, pos++);
add_to_toolbar(toolbar_, transferToolbar_, pos++);
add_to_toolbar(toolbar_, recordWidget_, pos++);
add_to_toolbar(toolbar_, muteCallWidget_, pos++);
g_signal_handler_block(transferToolbar_, transferButtonConnId_);
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(transferToolbar_), FALSE);
g_signal_handler_unblock(transferToolbar_, transferButtonConnId_);
g_signal_handler_block(recordWidget_, recordButtonConnId_);
g_signal_handler_block(muteCallWidget_, muteCallButtonId_);
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(recordWidget_), FALSE);
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(muteCallWidget_), FALSE);
g_signal_handler_unblock(recordWidget_, recordButtonConnId_);
g_signal_handler_unblock(muteCallWidget_, muteCallButtonId_);
if (instant_messaging_enabled) {
gtk_action_set_sensitive(imAction_, TRUE);
add_to_toolbar(toolbar_, imToolbar_, pos);
add_to_toolbar(toolbar_, imToolbar_, pos++);
}
break;
......@@ -318,31 +330,26 @@ update_actions()
case CALL_STATE_RECORD:
{
DEBUG("UIManager: Call State Record");
int pos = 1;
pos = 1;
gtk_action_set_sensitive(hangUpAction_, TRUE);
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
gtk_widget_set_sensitive(holdMenu_, TRUE);
gtk_widget_set_sensitive(holdToolbar_, TRUE);
gtk_widget_set_sensitive(transferToolbar_, TRUE);
gtk_action_set_sensitive(recordAction_, TRUE);
gtk_action_set_sensitive(muteCallAction_, TRUE);
add_to_toolbar(toolbar_, holdToolbar_, pos++);
add_to_toolbar(toolbar_, transferToolbar_, pos++);
add_to_toolbar(toolbar_, recordWidget_, pos++);
add_to_toolbar(toolbar_, muteCallWidget_, pos++);
g_signal_handler_block(transferToolbar_, transferButtonConnId_);
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(transferToolbar_), FALSE);
g_signal_handler_unblock(transferToolbar_, transferButtonConnId_);
g_signal_handler_block(recordWidget_, recordButtonConnId_);
g_signal_handler_block(muteCallWidget_, muteCallButtonId_);
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(recordWidget_), TRUE);
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(muteCallWidget_), TRUE);
g_signal_handler_unblock(recordWidget_, recordButtonConnId_);
g_signal_handler_unblock(muteCallWidget_, muteCallButtonId_);
if (instant_messaging_enabled) {
gtk_action_set_sensitive(imAction_, TRUE);
add_to_toolbar(toolbar_, imToolbar_, pos);
add_to_toolbar(toolbar_, imToolbar_, pos++);
}
break;
......@@ -350,17 +357,17 @@ update_actions()
case CALL_STATE_BUSY:
case CALL_STATE_FAILURE:
{
int pos = 1;
pos = 1;
DEBUG("UIManager: Call State Busy/Failure");
gtk_action_set_sensitive(hangUpAction_, TRUE);
add_to_toolbar(toolbar_, hangUpWidget_, pos);
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
break;
}
case CALL_STATE_TRANSFER:
{
int pos = 1;
pos = 1;
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
add_to_toolbar(toolbar_, transferToolbar_, pos);
add_to_toolbar(toolbar_, transferToolbar_, pos++);
g_signal_handler_block(transferToolbar_, transferButtonConnId_);
gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON(transferToolbar_), TRUE);
g_signal_handler_unblock(transferToolbar_, transferButtonConnId_);
......@@ -374,6 +381,7 @@ update_actions()
ERROR("UIMAnager: Error: Unknown state in action update!");
break;
}
} else if (selectedConf) {
DEBUG("UIManager: Update actions for conference");
......@@ -391,12 +399,10 @@ update_actions()
gtk_action_set_sensitive(hangUpAction_, TRUE);
gtk_widget_set_sensitive(holdToolbar_, TRUE);
gtk_action_set_sensitive(recordAction_, TRUE);
gtk_action_set_sensitive(muteCallAction_, TRUE);
int pos = 1;
pos = 1;
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
add_to_toolbar(toolbar_, holdToolbar_, pos++);
add_to_toolbar(toolbar_, recordWidget_, pos++);
add_to_toolbar(toolbar_, muteCallWidget_, pos++);
if (instant_messaging_enabled) {
gtk_action_set_sensitive(imAction_, TRUE);
......@@ -404,7 +410,7 @@ update_actions()
}
} else if (active_calltree_tab == history_tab) {
if (is_non_empty(selectedConf->_recordfile)) {
int pos = 2;
pos = 2;
if (selectedConf->_record_is_playing)
add_to_toolbar(toolbar_, stopRecordWidget_, pos);
else
......@@ -415,16 +421,14 @@ update_actions()
break;
case CONFERENCE_STATE_ACTIVE_ATTACHED_RECORD:
case CONFERENCE_STATE_ACTIVE_DETACHED_RECORD: {
int pos = 1;
pos = 1;
DEBUG("UIManager: Conference State Record");
gtk_action_set_sensitive(hangUpAction_, TRUE);
gtk_widget_set_sensitive(holdToolbar_, TRUE);
gtk_action_set_sensitive(recordAction_, TRUE);
gtk_action_set_sensitive(muteCallAction_, TRUE);
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
add_to_toolbar(toolbar_, holdToolbar_, pos++);
add_to_toolbar(toolbar_, recordWidget_, pos++);
add_to_toolbar(toolbar_, muteCallWidget_, pos++);
if (instant_messaging_enabled) {
gtk_action_set_sensitive(imAction_, TRUE);
......@@ -436,15 +440,13 @@ update_actions()
case CONFERENCE_STATE_HOLD:
case CONFERENCE_STATE_HOLD_RECORD: {
DEBUG("UIManager: Conference State Hold");
int pos = 1;
pos = 1;
gtk_action_set_sensitive(hangUpAction_, TRUE);
gtk_widget_set_sensitive(offHoldToolbar_, TRUE);
gtk_action_set_sensitive(recordAction_, TRUE);
gtk_action_set_sensitive(muteCallAction_, TRUE);
add_to_toolbar(toolbar_, hangUpWidget_, pos++);
add_to_toolbar(toolbar_, offHoldToolbar_, pos++);
add_to_toolbar(toolbar_, recordWidget_, pos++);
add_to_toolbar(toolbar_, muteCallWidget_, pos++);
if (instant_messaging_enabled) {
gtk_action_set_sensitive(imAction_, TRUE);
......@@ -745,13 +747,6 @@ call_record(void)
sflphone_rec_call();
}
static void
call_mute(void)
{
DEBUG("UIManager: Mute call button pressed");
// sflphone_mute_call();
}
static void
start_playback_record_cb(void)
{
......@@ -1098,12 +1093,12 @@ static const GtkActionEntry menu_entries[] = {
static const GtkToggleActionEntry toggle_menu_entries[] = {
{ "Transfer", GTK_STOCK_TRANSFER, N_("_Transfer"), "<control>T", N_("Transfer the call"), NULL, TRUE },
{ "Record", GTK_STOCK_MEDIA_RECORD, N_("_Record"), "<control>R", N_("Record the current conversation"), NULL, TRUE },
{ "MuteCall", GTK_STOCK_MEDIA_RECORD, N_("_MuteCall"), "<control>M", N_("Mute microphone for this call"), NULL, TRUE },
{ "Mute", GTK_STOCK_CANCEL, N_("_Mute"), "<control>M", N_("Mute microphone for this call"), G_CALLBACK(call_mute), FALSE },
{ "Toolbar", NULL, N_("_Show toolbar"), "<control>T", N_("Show the toolbar"), NULL, TRUE },
{ "Dialpad", NULL, N_("_Dialpad"), "<control>D", N_("Show the dialpad"), G_CALLBACK(dialpad_bar_cb), TRUE },
{ "VolumeControls", NULL, N_("_Volume controls"), "<control>V", N_("Show the volume controls"), G_CALLBACK(volume_bar_cb), TRUE },
{ "History", "appointment-soon", N_("_History"), NULL, N_("Calls history"), G_CALLBACK(toggle_history_cb), FALSE },
{ "Addressbook", GTK_STOCK_ADDRESSBOOK, N_("_Address book"), NULL, N_("Address book"), G_CALLBACK(toggle_addressbook_cb), FALSE }
{ "Addressbook", GTK_STOCK_ADDRESSBOOK, N_("_Address book"), NULL, N_("Address book"), G_CALLBACK(toggle_addressbook_cb), FALSE },
};
GtkUIManager *uimanager_new(void)
......@@ -1639,8 +1634,8 @@ create_menus(GtkUIManager *ui_manager)
ERROR("Could not create record action");
}
muteCallAction_ = gtk_ui_manager_get_action(ui_manager, "/MenuBar/CallMenu/MuteCall");
if(muteCallAction_ == NULL) {
muteAction_ = gtk_ui_manager_get_action(ui_manager, "/MenuBar/CallMenu/Mute");
if(muteAction_ == NULL) {
ERROR("Could not create mute call action");
}
......@@ -1727,8 +1722,8 @@ create_toolbar_actions(GtkUIManager *ui_manager)
ERROR("Could not create record toolbar widget");