diff --git a/lang/fr/fr.po b/lang/fr/fr.po index 0f7f47cfed975feb5c359c525c61dbeae92ba273..53c670db0e768b9fceb03e5a8961e2fa615b77d5 100644 --- a/lang/fr/fr.po +++ b/lang/fr/fr.po @@ -80,7 +80,7 @@ msgstr "" #: ../sflphone-client-gnome/src/actions.c:879 msgid "Direct SIP call" -msgstr "Appels IP" +msgstr "Appel direct SIP" #: ../sflphone-client-gnome/src/actions.c:1071 #, c-format diff --git a/sflphone-client-gnome/po/fr/fr.po b/sflphone-client-gnome/po/fr/fr.po index d402e0c484dc2236a7c5a345486bca54cb2a504e..53c670db0e768b9fceb03e5a8961e2fa615b77d5 100644 --- a/sflphone-client-gnome/po/fr/fr.po +++ b/sflphone-client-gnome/po/fr/fr.po @@ -80,7 +80,7 @@ msgstr "" #: ../sflphone-client-gnome/src/actions.c:879 msgid "Direct SIP call" -msgstr "Appels IP" +msgstr "Appel direct SIP" #: ../sflphone-client-gnome/src/actions.c:1071 #, c-format @@ -303,8 +303,9 @@ msgid "About SFLphone" msgstr "A propos de SFLphone" #: ../sflphone-client-gnome/src/uimanager.c:654 +#, fuzzy msgid "Call" -msgstr "Actions" +msgstr "_Actions" #: ../sflphone-client-gnome/src/uimanager.c:655 #: ../sflphone-client-gnome/src/uimanager.c:1119 diff --git a/sflphone-client-gnome/src/accountlist.h b/sflphone-client-gnome/src/accountlist.h index cf87d3ca8e4bd22b16c06c047bc3f786eae37a92..9823a9a387b259c3b187571b150565a4d6384639 100644 --- a/sflphone-client-gnome/src/accountlist.h +++ b/sflphone-client-gnome/src/accountlist.h @@ -64,15 +64,14 @@ typedef enum */ typedef struct { - gchar * accountID; - account_state_t state; - gchar * protocol_state_description; - guint protocol_state_code; - GHashTable * properties; - GPtrArray * credential_information; - - guint _messages_number; - + gchar * accountID; + account_state_t state; + gchar * protocol_state_description; + guint protocol_state_code; + GHashTable * properties; + GPtrArray * credential_information; + + guint _messages_number; } account_t; diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index b0bbe93cc79d8f211f0b52ae122112c5e07dff13..598a91f7c72e4d52ac18bc626a44fe9109a49553 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -58,6 +58,32 @@ sflphone_notify_voice_mail (const gchar* accountID , guint count) notify_voice_mails (count, current); } +/* + * Place a call with the current account. + * If there is no default account selected, place a call with the first + * registered account of the account list + * Else, check if it an IP call. if not, popup an error message + */ + +static gboolean _is_direct_call(callable_obj_t * c) { + + if(g_strcasecmp(c->_accountID, EMPTY_ENTRY) == 0) { + if(!g_str_has_prefix (c->_peer_number, "sip:")) { + gchar * new_number = g_strconcat("sip:", c->_peer_number, NULL); + g_free(c->_peer_number); + c->_peer_number = new_number; + } + return 1; + } + + if(g_str_has_prefix (c->_peer_number, "sip:")) { + return 1; + } + + return 0; +} + + void status_bar_display_account () { @@ -528,12 +554,22 @@ sflphone_display_transfer_status(const gchar* message) void sflphone_incoming_call (callable_obj_t * c) { + gchar *msg = ""; + c->_history_state = MISSED; calllist_add ( current_calls, c ); calllist_add( history, c ); calltree_add_call( current_calls, c, NULL); update_actions(); calltree_display (current_calls); + + // Change the status bar if we are dealing with a direct SIP call + if(_is_direct_call(c)) { + msg = g_markup_printf_escaped (_("Direct SIP call")); + statusbar_pop_message(__MSG_ACCOUNT_DEFAULT); + statusbar_push_message( msg , __MSG_ACCOUNT_DEFAULT); + g_free(msg); + } } void @@ -769,31 +805,6 @@ sflphone_keypad( guint keyval, gchar * key) } } -/* - * Place a call with the current account. - * If there is no default account selected, place a call with the first - * registered account of the account list - * Else, check if it an IP call. if not, popup an error message - */ - -static gboolean _is_direct_call(callable_obj_t * c) { - - if(g_strcasecmp(c->_accountID, EMPTY_ENTRY) == 0) { - if(!g_str_has_prefix (c->_peer_number, "sip:")) { - gchar * new_number = g_strconcat("sip:", c->_peer_number, NULL); - g_free(c->_peer_number); - c->_peer_number = new_number; - } - return 1; - } - - if(g_str_has_prefix (c->_peer_number, "sip:")) { - return 1; - } - - return 0; -} - static int _place_direct_call(const callable_obj_t * c) { if (c->_state == CALL_STATE_DIALING) { dbus_place_call (c); diff --git a/sflphone-client-gnome/src/dbus/dbus.c b/sflphone-client-gnome/src/dbus/dbus.c index 7f9f0f732999dc7e1533ca02d14e18ded5b4dd9e..3a5798348a546e97f7b9a10c5ea83f6b42c87f1f 100644 --- a/sflphone-client-gnome/src/dbus/dbus.c +++ b/sflphone-client-gnome/src/dbus/dbus.c @@ -50,8 +50,7 @@ incoming_call_cb (DBusGProxy *proxy UNUSED, const gchar* from, void * foo UNUSED ) { - DEBUG("Incoming call! %s", callID); - DEBUG(" from: %s", from); + DEBUG("Incoming call (%s) from %s", callID, from); callable_obj_t * c; gchar *peer_name, *peer_number;