Commit 166dac9e authored by Tristan Matthews's avatar Tristan Matthews

* #6860: refactor uimanager, also fixes #6865

More pervasive changes were just to fix "transfert" typo
parent b5637b1a
......@@ -117,7 +117,7 @@
</arg>
</method>
<method name="transfert" tp:name-for-bindings="transfert">
<method name="transfer" tp:name-for-bindings="transfer">
<tp:docstring>
Transfer a call to given phone number.
</tp:docstring>
......
......@@ -167,9 +167,9 @@ CallManager::unhold (const std::string& callID)
}
void
CallManager::transfert (const std::string& callID, const std::string& to)
CallManager::transfer (const std::string& callID, const std::string& to)
{
_debug ("CallManager::transfert received");
_debug ("CallManager::transfer received");
Manager::instance().transferCall (callID, to);
}
......
......@@ -80,7 +80,7 @@ class CallManager
void hangUp (const std::string& callID);
void hold (const std::string& callID);
void unhold (const std::string& callID);
void transfert (const std::string& callID, const std::string& to);
void transfer (const std::string& callID, const std::string& to);
void attendedTransfer(const std::string& transferID, const std::string& targetID);
std::map< std::string, std::string > getCallDetails (const std::string& callID);
std::vector< std::string > getCallList (void);
......
......@@ -3,7 +3,7 @@ icondir = $(datadir)/pixmaps
icon_DATA = sflphone.svg
buttons_DATA = current.svg \
transfert.svg \
transfer.svg \
hold.svg \
unhold.svg \
refuse.svg \
......
......@@ -416,7 +416,7 @@ sflphone_hang_up()
DEBUG ("from sflphone_hang_up : ");
stop_notification();
break;
case CALL_STATE_TRANSFERT:
case CALL_STATE_TRANSFER:
dbus_hang_up (selectedCall);
call_remove_all_errors (selectedCall);
time (&selectedCall->_time_stop);
......@@ -467,8 +467,8 @@ sflphone_pick_up()
dbus_accept (selectedCall);
stop_notification();
break;
case CALL_STATE_TRANSFERT:
dbus_transfert (selectedCall);
case CALL_STATE_TRANSFER:
dbus_transfer (selectedCall);
time (&selectedCall->_time_stop);
calltree_remove_call(current_calls, selectedCall, NULL);
calllist_remove_call(current_calls, selectedCall->_callID);
......@@ -574,12 +574,12 @@ sflphone_record (callable_obj_t * c)
}
void
sflphone_set_transfert()
sflphone_set_transfer()
{
callable_obj_t * c = calltab_get_selected_call (current_calls);
if (c) {
c->_state = CALL_STATE_TRANSFERT;
c->_state = CALL_STATE_TRANSFER;
g_free(c->_trsft_to);
c->_trsft_to = g_strdup ("");
calltree_update_call (current_calls, c, NULL);
......@@ -589,7 +589,7 @@ sflphone_set_transfert()
}
void
sflphone_unset_transfert()
sflphone_unset_transfer()
{
callable_obj_t * c = calltab_get_selected_call (current_calls);
......@@ -643,7 +643,7 @@ void
process_dialing (callable_obj_t *c, guint keyval, gchar *key)
{
// We stop the tone
if (!*c->_peer_number && c->_state != CALL_STATE_TRANSFERT)
if (!*c->_peer_number && c->_state != CALL_STATE_TRANSFER)
dbus_start_tone (FALSE, 0);
switch (keyval) {
......@@ -655,7 +655,7 @@ process_dialing (callable_obj_t *c, guint keyval, gchar *key)
sflphone_hang_up ();
break;
case GDK_BackSpace:
if (c->_state == CALL_STATE_TRANSFERT) {
if (c->_state == CALL_STATE_TRANSFER) {
truncate_last_char(&c->_trsft_to);
calltree_update_call (current_calls, c, NULL);
} else {
......@@ -678,7 +678,7 @@ process_dialing (callable_obj_t *c, guint keyval, gchar *key)
if (keyval < 127 /* ascii */ ||
(keyval >= GDK_Mode_switch && keyval <= GDK_KP_9) /* num keypad */) {
if (c->_state == CALL_STATE_TRANSFERT) {
if (c->_state == CALL_STATE_TRANSFER) {
gchar *new_trsft = g_strconcat (c->_trsft_to, key, NULL);
g_free (c->_trsft_to);
c->_trsft_to = new_trsft;
......@@ -775,19 +775,19 @@ sflphone_keypad (guint keyval, gchar * key)
}
break;
case CALL_STATE_TRANSFERT:
case CALL_STATE_TRANSFER:
switch (keyval) {
case GDK_Return:
case GDK_KP_Enter:
dbus_transfert (c);
dbus_transfer (c);
time (&c->_time_stop);
calltree_remove_call(current_calls, c, NULL);
break;
case GDK_Escape:
sflphone_unset_transfert ();
sflphone_unset_transfer ();
break;
default: // When a call is on transfert, typing new numbers will add it to c->_peer_number
default: // When a call is on transfer, typing new numbers will add it to c->_peer_number
process_dialing (c, keyval, key);
break;
}
......
......@@ -93,12 +93,12 @@ void sflphone_notify_voice_mail (const gchar* accountID , guint count);
* Prepare SFLphone to transfer a call and wait for the user to dial the number to transfer to
* Put the selected call in Transfer state
*/
void sflphone_set_transfert();
void sflphone_set_transfer();
/**
* Cancel the transfer and puts back the selected call to Current state
*/
void sflphone_unset_transfert();
void sflphone_unset_transfer();
/**
* Accept / dial the current call
......
......@@ -80,7 +80,7 @@ typedef enum {
CALL_STATE_HOLD,
CALL_STATE_FAILURE,
CALL_STATE_BUSY,
CALL_STATE_TRANSFERT,
CALL_STATE_TRANSFER,
CALL_STATE_RECORD,
} call_state_t;
......
......@@ -721,21 +721,21 @@ select_audio_manager (void)
if (!must_show_alsa_conf() && !gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pulse))) {
dbus_set_audio_manager (ALSA_API_STR);
alsabox = alsa_box();
gtk_container_add (GTK_CONTAINER (alsa_conf) , alsabox);
gtk_widget_show (alsa_conf);
gtk_widget_set_sensitive (GTK_WIDGET (alsa_conf), TRUE);
gtk_action_set_sensitive (GTK_ACTION (volumeToggle), TRUE);
gtk_container_add (GTK_CONTAINER(alsa_conf), alsabox);
gtk_widget_show(alsa_conf);
gtk_widget_set_sensitive (alsa_conf, TRUE);
gtk_action_set_sensitive (volumeToggle_, TRUE);
} else if (must_show_alsa_conf() && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (pulse))) {
dbus_set_audio_manager (PULSEAUDIO_API_STR);
gtk_container_remove (GTK_CONTAINER (alsa_conf) , alsabox);
gtk_widget_hide (alsa_conf);
if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (volumeToggle))) {
main_window_volume_controls (FALSE);
eel_gconf_set_integer (SHOW_VOLUME_CONTROLS, FALSE);
gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (volumeToggle), FALSE);
gtk_widget_hide(alsa_conf);
if (gtk_toggle_action_get_active(GTK_TOGGLE_ACTION(volumeToggle_))) {
main_window_volume_controls(FALSE);
eel_gconf_set_integer(SHOW_VOLUME_CONTROLS, FALSE);
gtk_toggle_action_set_active(GTK_TOGGLE_ACTION (volumeToggle_), FALSE);
}
gtk_action_set_sensitive (GTK_ACTION (volumeToggle), FALSE);
gtk_action_set_sensitive(volumeToggle_, FALSE);
}
}
......
......@@ -692,7 +692,7 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
gchar * description = NULL;
gchar * audio_codec = call_get_audio_codec (c);
if (c->_state == CALL_STATE_TRANSFERT)
if (c->_state == CALL_STATE_TRANSFER)
description = calltree_display_call_info (c, DISPLAY_TYPE_CALL_TRANSFER, "");
else {
if (c->_sas && display_sas && c->_srtp_state == SRTP_STATE_ZRTP_SAS_UNCONFIRMED && !c->_zrtp_confirmed)
......@@ -727,8 +727,8 @@ calltree_update_call (calltab_t* tab, callable_obj_t * c, GtkTreeIter *parent)
case CALL_STATE_BUSY:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/busy.svg", NULL);
break;
case CALL_STATE_TRANSFERT:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/transfert.svg", NULL);
case CALL_STATE_TRANSFER:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/transfer.svg", NULL);
break;
case CALL_STATE_RECORD:
pixbuf = gdk_pixbuf_new_from_file (ICONS_DIR "/icon_rec.svg", NULL);
......@@ -1294,27 +1294,26 @@ void calltree_display (calltab_t *tab)
DEBUG ("CallTree: Display main tab");
if (active_calltree==contacts)
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton_, FALSE);
else
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton_, FALSE);
}
/* case 2: we want to display the history */
else if (tab == history) {
DEBUG ("ConferenceList: Display history tab");
if (active_calltree == contacts)
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) contactButton_, FALSE);
if (active_calltree==contacts)
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, TRUE);
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) historyButton_, TRUE);
}
else if (tab==contacts) {
DEBUG ("CallTree: Display contact tab");
if (active_calltree==history)
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) historyButton, FALSE);
if (active_calltree == history)
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) historyButton_, FALSE);
gtk_toggle_tool_button_set_active ( (GtkToggleToolButton*) contactButton, TRUE);
gtk_toggle_tool_button_set_active((GtkToggleToolButton*) contactButton_, TRUE);
set_focus_on_addressbook_searchbar();
}
......@@ -1392,7 +1391,7 @@ static void drag_end_cb (GtkWidget * widget UNUSED, GdkDragContext * context UNU
calltree_selected_call->_state == CALL_STATE_INVALID ||
calltree_selected_call->_state == CALL_STATE_FAILURE ||
calltree_selected_call->_state == CALL_STATE_BUSY ||
calltree_selected_call->_state == CALL_STATE_TRANSFERT) {
calltree_selected_call->_state == CALL_STATE_TRANSFER) {
DEBUG ("CallTree: Selected an invalid call");
......@@ -1412,7 +1411,7 @@ static void drag_end_cb (GtkWidget * widget UNUSED, GdkDragContext * context UNU
calltree_dragged_call->_state == CALL_STATE_INVALID ||
calltree_dragged_call->_state == CALL_STATE_FAILURE ||
calltree_dragged_call->_state == CALL_STATE_BUSY ||
calltree_dragged_call->_state == CALL_STATE_TRANSFERT) {
calltree_dragged_call->_state == CALL_STATE_TRANSFER) {
DEBUG ("CallTree: Dragged on an invalid call");
......
......@@ -117,7 +117,7 @@
</arg>
</method>
<method name="transfert" tp:name-for-bindings="transfert">
<method name="transfer" tp:name-for-bindings="transfer">
<tp:docstring>
Transfer a call to given phone number.
</tp:docstring>
......
......@@ -835,13 +835,13 @@ dbus_hang_up_conference (const conference_obj_t * c)
}
void
dbus_transfert (const callable_obj_t * c)
dbus_transfer (const callable_obj_t * c)
{
GError *error = NULL;
org_sflphone_SFLphone_CallManager_transfert (callManagerProxy, c->_callID, c->_trsft_to, &error);
org_sflphone_SFLphone_CallManager_transfer (callManagerProxy, c->_callID, c->_trsft_to, &error);
if (error) {
ERROR ("Failed to call transfert() on CallManager: %s", error->message);
ERROR ("Failed to call transfer() on CallManager: %s", error->message);
g_error_free (error);
}
}
......
......@@ -79,7 +79,7 @@ void dbus_hang_up (const callable_obj_t * c);
* CallManager - Transfer a call
* @param c The call to transfer
*/
void dbus_transfert (const callable_obj_t * c);
void dbus_transfer (const callable_obj_t * c);
/**
* CallManager - Perform an attended transfer on two calls
......
......@@ -116,7 +116,7 @@ toggle_pick_up_hang_up_callback ()
if (selectedCall) {
switch (selectedCall->_state) {
case CALL_STATE_INCOMING:
case CALL_STATE_TRANSFERT:
case CALL_STATE_TRANSFER:
sflphone_pick_up ();
break;
case CALL_STATE_DIALING:
......
This diff is collapsed.
......@@ -35,11 +35,9 @@
G_BEGIN_DECLS
guint holdConnId; //The hold_menu signal connection ID
GtkWidget *historyButton;
GtkWidget *contactButton;
GtkAction *volumeToggle;
GtkWidget *historyButton_;
GtkWidget *contactButton_;
GtkAction *volumeToggle_;
GtkUIManager *uimanager_new (void);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment