diff --git a/lang/fr/fr.po b/lang/fr/fr.po index 0f7f47cfed975feb5c359c525c61dbeae92ba273..53cac6638613f2ce611ffda87dd6705d08ee6c59 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 @@ -303,9 +303,8 @@ 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/pixmaps/phone.svg b/sflphone-client-gnome/pixmaps/phone.svg new file mode 100644 index 0000000000000000000000000000000000000000..ba145b34affe5ece4193d99f23a48ace311453b4 --- /dev/null +++ b/sflphone-client-gnome/pixmaps/phone.svg @@ -0,0 +1,255 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="48px" + height="48px" + id="svg7196" + sodipodi:version="0.32" + inkscape:version="0.46" + sodipodi:docname="phone.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs7198"> + <linearGradient + inkscape:collect="always" + id="linearGradient4547"> + <stop + style="stop-color:white;stop-opacity:1;" + offset="0" + id="stop4549" /> + <stop + style="stop-color:white;stop-opacity:0;" + offset="1" + id="stop4551" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4547" + id="linearGradient5367" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.9999998,0,0,0.844121,-0.9999995,-1.5970867)" + x1="21.142857" + y1="8.5714283" + x2="22.453627" + y2="25.181578" /> + <linearGradient + id="linearGradient3792"> + <stop + style="stop-color:#43433c;stop-opacity:1;" + offset="0" + id="stop3794" /> + <stop + style="stop-color:#7e7e71;stop-opacity:1;" + offset="1" + id="stop3796" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3792" + id="linearGradient3798" + x1="25.53125" + y1="28.9375" + x2="27.0625" + y2="27.25" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-50.0625,-58.000001)" /> + <linearGradient + inkscape:collect="always" + id="linearGradient3799"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop3801" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop3803" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3799" + id="linearGradient3805" + x1="11.437499" + y1="6.1083822" + x2="38.375" + y2="37.733383" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,0.9991486,-0.9999995,1.0370383)" /> + <linearGradient + id="linearGradient3835"> + <stop + id="stop3837" + offset="0" + style="stop-color:#d7d9d5;stop-opacity:1;" /> + <stop + style="stop-color:#b9bcb5;stop-opacity:1;" + offset="0.5" + id="stop3841" /> + <stop + id="stop3839" + offset="1" + style="stop-color:#d7d9d5;stop-opacity:1;" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3835" + id="linearGradient3833" + x1="23.6875" + y1="23.960518" + x2="39.75" + y2="23.960518" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,0.9991892,-0.9999995,1.0360463)" /> + <filter + inkscape:collect="always" + x="-0.073290848" + width="1.1465817" + y="-0.41309387" + height="1.8261877" + id="filter3815"> + <feGaussianBlur + inkscape:collect="always" + stdDeviation="0.94667346" + id="feGaussianBlur3817" /> + </filter> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="7" + inkscape:cx="24" + inkscape:cy="24" + inkscape:current-layer="layer1" + showgrid="true" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="641" + inkscape:window-height="690" + inkscape:window-x="145" + inkscape:window-y="122" /> + <metadata + id="metadata7201"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <rect + style="opacity:0.3;fill:#383838;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;filter:url(#filter3815);enable-background:accumulate" + id="rect4607" + width="31" + height="5.5" + x="9.3125" + y="41" + rx="2.8416667" + ry="2.5208333" + transform="matrix(0.8064516,0,0,0.7272727,4.4899195,13.181819)" /> + <rect + ry="2.4514749" + rx="2.174093" + y="1.5000018" + x="13.500001" + height="43.954269" + width="22" + id="rect4021" + style="fill:url(#linearGradient3833);fill-opacity:1;stroke:#888a85;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" /> + <rect + style="fill:#eeeeec;fill-opacity:0.75;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="rect2807" + width="18.000002" + height="9.0625" + x="15.562499" + y="34.5" + rx="1.5201663" + ry="1.5250876" /> + <rect + style="opacity:1;fill:none;fill-opacity:1;stroke:url(#linearGradient3805);stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + id="rect4023" + width="19.9375" + height="42" + x="14.562501" + y="2.5000017" + rx="1.5490928" + ry="1.4185321" /> + <rect + ry="0.42644134" + rx="0.52902919" + y="3.5000036" + x="15.500001" + height="29" + width="18" + id="rect4019" + style="opacity:0.77307691;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + <path + style="fill:none;fill-opacity:1;stroke:#babdb6;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + d="M 16.5,40.438689 L 29.49002,40.488467 L 32.499999,40.500001" + id="path3810" + sodipodi:nodetypes="ccc" /> + <path + sodipodi:nodetypes="ccc" + id="path3782" + d="M 16.5,37.438689 L 29.49002,37.488467 L 32.499999,37.500001" + style="fill:none;fill-opacity:1;stroke:#babdb6;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + <path + style="fill:none;fill-opacity:1;stroke:#babdb6;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + d="M 21.561312,35.500001 L 21.511533,41.183135 L 21.5,42.500001" + id="path3784" + sodipodi:nodetypes="ccc" /> + <path + sodipodi:nodetypes="ccc" + id="path3786" + d="M 27.561312,35.500001 L 27.511533,41.183135 L 27.5,42.500001" + style="fill:none;fill-opacity:1;stroke:#babdb6;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + <rect + style="fill:#eeeeec;fill-opacity:0.75;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="rect3788" + width="17" + height="20" + x="16.000004" + y="6.0000019" + rx="0" + ry="0" /> + <rect + ry="0.65008754" + rx="0.95766622" + y="-31.500002" + x="-26.500002" + height="4" + width="3.9375" + id="rect3790" + style="fill:url(#linearGradient3798);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + transform="scale(-1,-1)" /> + <path + style="opacity:0.5;fill:url(#linearGradient5367);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 16,22.000001 C 18.952382,21.90353 25.464881,13.905144 33,13.373974 L 33,6.0000023 L 16,6.0000023 L 16,22.000001 z" + id="path3657" + sodipodi:nodetypes="ccccc" /> + <path + style="opacity:0.63846154;fill:none;fill-opacity:1;stroke:#babdb6;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + d="M 22.5,4.5000023 L 25.747505,4.5497803 L 26.5,4.5613143" + id="path3800" + sodipodi:nodetypes="ccc" /> + </g> +</svg> diff --git a/sflphone-client-gnome/po/fr/fr.po b/sflphone-client-gnome/po/fr/fr.po index d402e0c484dc2236a7c5a345486bca54cb2a504e..53cac6638613f2ce611ffda87dd6705d08ee6c59 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 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/config/accountconfigdialog.c b/sflphone-client-gnome/src/config/accountconfigdialog.c index 04bf1fa25a7a58b3979bf0110940dae0b0e2b6ec..de52afb74812f60b48c4096f6d3ed983abf9023d 100644 --- a/sflphone-client-gnome/src/config/accountconfigdialog.c +++ b/sflphone-client-gnome/src/config/accountconfigdialog.c @@ -32,6 +32,8 @@ #include <libsexy/sexy-icon-entry.h> #endif +#define PW_HIDDEN "*****" + #include <string.h> #include <dbus/dbus.h> #include <config.h> @@ -44,7 +46,6 @@ * in a private structure. * Local variables */ - GtkDialog * dialog; GtkWidget * hbox; GtkWidget * label; @@ -95,6 +96,14 @@ enum { COLUMN_CREDENTIAL_COUNT }; +/* + * Display / Hide the password + */ +static void show_password_cb (GtkWidget *widget, gpointer data) +{ + gtk_entry_set_visibility (GTK_ENTRY (data), !gtk_entry_get_visibility (GTK_ENTRY (data))); +} + /* Signal to protocolComboBox 'changed' */ void change_protocol_cb (account_t * currentAccount UNUSED) @@ -133,6 +142,7 @@ static GtkWidget * create_basic_tab(account_t **a) GtkWidget * frame; GtkWidget * table; account_t *currentAccount; + GtkWidget * clearTextCheckbox; #if GTK_CHECK_VERSION(2,16,0) #else GtkWidget *image; @@ -169,7 +179,7 @@ static GtkWidget * create_basic_tab(account_t **a) gnome_main_section_new (_("Account Parameters"), &frame); gtk_widget_show(frame); - table = gtk_table_new (9, 2 , FALSE/* homogeneous */); + table = gtk_table_new (7, 2 , FALSE/* homogeneous */); gtk_table_set_row_spacings( GTK_TABLE(table), 10); gtk_table_set_col_spacings( GTK_TABLE(table), 10); gtk_widget_show(table); @@ -242,7 +252,7 @@ static GtkWidget * create_basic_tab(account_t **a) #if GTK_CHECK_VERSION(2,16,0) entryPassword = gtk_entry_new(); GtkSettings *settings = gtk_settings_get_default (); - g_object_set (G_OBJECT (settings), "gtk-entry-password-hint-timeout", 600, NULL); + //g_object_set (G_OBJECT (settings), "gtk-entry-password-hint-timeout", 600, NULL); gtk_entry_set_icon_from_stock (GTK_ENTRY (entryPassword), GTK_ENTRY_ICON_PRIMARY, GTK_STOCK_DIALOG_AUTHENTICATION); #else entryPassword = sexy_icon_entry_new(); @@ -253,16 +263,20 @@ static GtkWidget * create_basic_tab(account_t **a) gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryPassword); gtk_entry_set_text(GTK_ENTRY(entryPassword), curPassword); gtk_table_attach ( GTK_TABLE( table ), entryPassword, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); - g_signal_connect(G_OBJECT (entryPassword), "changed", G_CALLBACK (update_credential_cb), NULL); + g_signal_connect (G_OBJECT (entryPassword), "changed", G_CALLBACK (update_credential_cb), NULL); g_object_set_data (G_OBJECT (entryPassword), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_PASSWORD)); - + + clearTextCheckbox = gtk_check_button_new_with_mnemonic (_("Show password")); + g_signal_connect (clearTextCheckbox, "toggled", G_CALLBACK (show_password_cb), entryPassword); + gtk_table_attach (GTK_TABLE (table), clearTextCheckbox, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + label = gtk_label_new_with_mnemonic (_("_Voicemail number")); - gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); entryMailbox = gtk_entry_new(); gtk_label_set_mnemonic_widget (GTK_LABEL (label), entryMailbox); gtk_entry_set_text(GTK_ENTRY(entryMailbox), curMailbox); - gtk_table_attach ( GTK_TABLE( table ), entryMailbox, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach ( GTK_TABLE( table ), entryMailbox, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_widget_show_all( table ); gtk_container_set_border_width (GTK_CONTAINER(table), 10); @@ -271,7 +285,7 @@ static GtkWidget * create_basic_tab(account_t **a) return frame; } -static void fill_treeview_with_credential(GtkListStore * credentialStore, account_t * account) +static void fill_treeview_with_credential (GtkListStore * credentialStore, account_t * account) { GtkTreeIter iter; gtk_list_store_clear(credentialStore); @@ -374,7 +388,7 @@ static void cell_edited_cb(GtkCellRendererText *renderer, gchar *path_desc, gcha gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (renderer), "column")); if(g_strcasecmp(path_desc, "0") == 0) { - if(g_strcasecmp(text, gtk_entry_get_text(GTK_ENTRY(entryUsername))) != 0) { + if(g_strcasecmp(text, gtk_entry_get_text (GTK_ENTRY(entryUsername))) != 0) { g_signal_handlers_disconnect_by_func (G_OBJECT(entryUsername), G_CALLBACK(update_credential_cb), NULL); } } @@ -388,7 +402,7 @@ static void cell_edited_cb(GtkCellRendererText *renderer, gchar *path_desc, gcha static void editing_started_cb (GtkCellRenderer *cell, GtkCellEditable * editable, const gchar * path, gpointer data) { DEBUG("Editing started"); - gtk_entry_set_visibility(GTK_ENTRY(editable), FALSE); + // gtk_entry_set_text (GTK_ENTRY (editable), gtk_entry_get_text (GTK_ENTRY(entryPassword))); } static void show_advanced_zrtp_options_cb(GtkWidget *widget UNUSED, gpointer data) @@ -460,7 +474,6 @@ static void use_sip_tls_cb(GtkWidget *widget, gpointer data) } } - static set_published_addr_manually_cb(GtkWidget * widget, gpointer data UNUSED) { DEBUG("set_published_addr_manually_cb"); @@ -531,6 +544,7 @@ GtkWidget * create_security_tab(account_t **a) GtkWidget * hbox; GtkWidget * editButton; GtkWidget * addButton; + GtkWidget * clearTextCheckbox; GtkCellRenderer * renderer; GtkTreeViewColumn * treeViewColumn; GtkTreeSelection * treeSelection; @@ -606,7 +620,7 @@ GtkWidget * create_security_tab(account_t **a) renderer = gtk_cell_renderer_text_new(); g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL); - g_signal_connect(G_OBJECT (renderer), "edited", G_CALLBACK(cell_edited_cb), credentialStore); + g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_edited_cb), credentialStore); g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_USERNAME)); treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Authentication name"), renderer, @@ -616,7 +630,7 @@ GtkWidget * create_security_tab(account_t **a) renderer = gtk_cell_renderer_text_new(); g_object_set (renderer, "editable", TRUE, "editable-set", TRUE, NULL); - g_signal_connect(G_OBJECT (renderer), "edited", G_CALLBACK(cell_edited_cb), credentialStore); + g_signal_connect (G_OBJECT (renderer), "edited", G_CALLBACK (cell_edited_cb), credentialStore); g_signal_connect (renderer, "editing-started", G_CALLBACK (editing_started_cb), NULL); g_object_set_data (G_OBJECT (renderer), "column", GINT_TO_POINTER (COLUMN_CREDENTIAL_PASSWORD)); treeViewColumn = gtk_tree_view_column_new_with_attributes (_("Password"), @@ -631,7 +645,7 @@ GtkWidget * create_security_tab(account_t **a) /* Credential Buttons */ hbox = gtk_hbox_new(FALSE, 10); - gtk_table_attach_defaults(GTK_TABLE(table), hbox, 0, 2, 1, 2); + gtk_table_attach_defaults(GTK_TABLE(table), hbox, 0, 3, 1, 2); addButton = gtk_button_new_from_stock (GTK_STOCK_ADD); g_signal_connect (addButton, "clicked", G_CALLBACK (add_credential_cb), credentialStore); @@ -640,7 +654,6 @@ GtkWidget * create_security_tab(account_t **a) deleteCredButton = gtk_button_new_from_stock (GTK_STOCK_REMOVE); g_signal_connect (deleteCredButton, "clicked", G_CALLBACK (delete_credential_cb), treeViewCredential); gtk_box_pack_start(GTK_BOX(hbox), deleteCredButton, FALSE, FALSE, 0); - /* Security Section */ gnome_main_section_new_with_table (_("Security"), &frame, &table, 2, 3); diff --git a/sflphone-client-gnome/src/config/assistant.c b/sflphone-client-gnome/src/config/assistant.c index f9431a66ae05e7072a6bee8dde288b42e541db12..c3be338bced5e9a7771b67165d8c240b44089019 100644 --- a/sflphone-client-gnome/src/config/assistant.c +++ b/sflphone-client-gnome/src/config/assistant.c @@ -59,6 +59,12 @@ void set_account_type( GtkWidget* widget , gpointer data UNUSED ) { } } +static void show_password_cb (GtkWidget *widget, gpointer data) +{ + gtk_entry_set_visibility (GTK_ENTRY (data), !gtk_entry_get_visibility (GTK_ENTRY (data))); +} + + /** * Fills string message with the final message of account registration * with alias, server and username specified. @@ -295,10 +301,11 @@ GtkWidget* build_sip_account_configuration( void ) { GtkWidget* table; GtkWidget* label; GtkWidget *image; + GtkWidget * clearTextCheckbox; wiz->sip_account = create_vbox( GTK_ASSISTANT_PAGE_CONTENT , _("SIP account settings") , _("Please fill the following information")); // table - table = gtk_table_new ( 5, 2 , FALSE/* homogeneous */); + table = gtk_table_new ( 7, 2 , FALSE/* homogeneous */); gtk_table_set_row_spacings( GTK_TABLE(table), 10); gtk_table_set_col_spacings( GTK_TABLE(table), 10); gtk_box_pack_start( GTK_BOX(wiz->sip_account) , table , TRUE, TRUE, 0); @@ -352,19 +359,23 @@ GtkWidget* build_sip_account_configuration( void ) { gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_password); gtk_entry_set_visibility(GTK_ENTRY(wiz->sip_password), FALSE); gtk_table_attach ( GTK_TABLE( table ), wiz->sip_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + + clearTextCheckbox = gtk_check_button_new_with_mnemonic (_("Show password")); + g_signal_connect (clearTextCheckbox, "toggled", G_CALLBACK (show_password_cb), wiz->sip_password); + gtk_table_attach (GTK_TABLE (table), clearTextCheckbox, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); // voicemail number field label = gtk_label_new_with_mnemonic (_("_Voicemail number")); - gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); wiz->sip_voicemail = gtk_entry_new(); gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->sip_voicemail); - gtk_table_attach ( GTK_TABLE( table ), wiz->sip_voicemail, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach ( GTK_TABLE( table ), wiz->sip_voicemail, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); // Security options wiz->zrtp_enable = gtk_check_button_new_with_mnemonic(_("Secure communications with _ZRTP")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(wiz->zrtp_enable), FALSE); - gtk_table_attach ( GTK_TABLE( table ), wiz->zrtp_enable, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach ( GTK_TABLE( table ), wiz->zrtp_enable, 0, 1, 6, 7, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_widget_set_sensitive( GTK_WIDGET( wiz->zrtp_enable ) , TRUE ); //gtk_assistant_set_page_complete(GTK_ASSISTANT(wiz->assistant), wiz->sip_account, TRUE); @@ -403,10 +414,11 @@ GtkWidget* build_iax_account_configuration( void ) { GtkWidget* label; GtkWidget* table; GtkWidget *image; + GtkWidget * clearTextCheckbox; wiz->iax_account = create_vbox( GTK_ASSISTANT_PAGE_CONFIRM , _("IAX2 account settings") , _("Please fill the following information")); - table = gtk_table_new ( 5, 2 , FALSE/* homogeneous */); + table = gtk_table_new ( 6, 2 , FALSE/* homogeneous */); gtk_table_set_row_spacings( GTK_TABLE(table), 10); gtk_table_set_col_spacings( GTK_TABLE(table), 10); gtk_box_pack_start( GTK_BOX(wiz->iax_account) , table , TRUE, TRUE, 0); @@ -458,13 +470,17 @@ GtkWidget* build_iax_account_configuration( void ) { gtk_entry_set_visibility(GTK_ENTRY(wiz->iax_password), FALSE); gtk_table_attach ( GTK_TABLE( table ), wiz->iax_password, 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + clearTextCheckbox = gtk_check_button_new_with_mnemonic (_("Show password")); + g_signal_connect (clearTextCheckbox, "toggled", G_CALLBACK (show_password_cb), wiz->iax_password); + gtk_table_attach (GTK_TABLE (table), clearTextCheckbox, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + // voicemail number field label = gtk_label_new_with_mnemonic (_("_Voicemail number")); - gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach ( GTK_TABLE( table ), label, 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); gtk_misc_set_alignment(GTK_MISC (label), 0, 0.5); wiz->iax_voicemail = gtk_entry_new(); gtk_label_set_mnemonic_widget (GTK_LABEL (label), wiz->iax_voicemail); - gtk_table_attach ( GTK_TABLE( table ), wiz->iax_voicemail, 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); + gtk_table_attach ( GTK_TABLE( table ), wiz->iax_voicemail, 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0); current -> state = ACCOUNT_STATE_UNREGISTERED; diff --git a/sflphone-client-gnome/src/contacts/calllist.c b/sflphone-client-gnome/src/contacts/calllist.c index 5fba11456bd82991a90034b38f31eb6ba51a1b7b..09f428534830c87b3f8e76805075ec8775c4b779 100644 --- a/sflphone-client-gnome/src/contacts/calllist.c +++ b/sflphone-client-gnome/src/contacts/calllist.c @@ -38,13 +38,13 @@ void calllist_add_contact (gchar *contact_name, gchar *contact_phone, contact_ty else { switch (type) { case CONTACT_PHONE_BUSINESS: - pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/face-monkey.svg", NULL); + pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/users.svg", NULL); break; case CONTACT_PHONE_HOME: pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/home.svg", NULL); break; case CONTACT_PHONE_MOBILE: - pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/users.svg", NULL); + pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/phone.svg", NULL); break; default: pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/contact_default.svg", NULL); 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; diff --git a/sflphone-common/src/sip/sdp.cpp b/sflphone-common/src/sip/sdp.cpp index b36386dc91c327c815118c95b7ef484cb15199ed..e269ecd8313dc0dedb31e53269d2ed1ceac17932 100644 --- a/sflphone-common/src/sip/sdp.cpp +++ b/sflphone-common/src/sip/sdp.cpp @@ -418,7 +418,7 @@ void Sdp::set_negotiated_sdp (const pjmedia_sdp_session *sdp) std::string type, dir; CodecsMap codecs_list; CodecsMap::iterator iter; - pjmedia_sdp_attr *attribute; + pjmedia_sdp_attr *attribute = NULL; pjmedia_sdp_rtpmap *rtpmap; _negociated_offer = (pjmedia_sdp_session*) sdp; @@ -440,6 +440,9 @@ void Sdp::set_negotiated_sdp (const pjmedia_sdp_session *sdp) for (j=0 ; j<nb_codecs ; j++) { attribute = pjmedia_sdp_media_find_attr (current, &STR_RTPMAP, NULL); // pj_strtoul(attribute->pt) + if (!attribute) + return; + pjmedia_sdp_attr_to_rtpmap (_pool, attribute, &rtpmap); // _debug("================== set_negociated_offer ===================== %i\n", pj_strtoul(&rtpmap->pt)); diff --git a/sflphone-common/src/sip/sipaccount.cpp b/sflphone-common/src/sip/sipaccount.cpp index 85e9ee2e5b5a23d2c782a79fbae81cf649fda107..07853ad4017aa602c4cc99cc01b1748f68f2019b 100644 --- a/sflphone-common/src/sip/sipaccount.cpp +++ b/sflphone-common/src/sip/sipaccount.cpp @@ -336,6 +336,7 @@ void SIPAccount::loadConfig() setLocalAddress (Manager::instance().getConfigString (_accountID, LOCAL_ADDRESS)); // Published parameters + setPublishedSameasLocal (Manager::instance().getConfigString (_accountID, PUBLISHED_SAMEAS_LOCAL) == TRUE_STR ? true : false); std::string publishedPort = Manager::instance().getConfigString (_accountID, PUBLISHED_PORT); setPublishedPort (atoi (publishedPort.c_str())); setPublishedAddress (Manager::instance().getConfigString (_accountID, PUBLISHED_ADDRESS)); diff --git a/sflphone-common/src/sip/sipvoiplink.cpp b/sflphone-common/src/sip/sipvoiplink.cpp index 68b3f7b1fd80b4f7458ef1f932c8917b8a81617c..9cee5e685e8cfbc2d70c688cca40c3dc72b5a3a2 100644 --- a/sflphone-common/src/sip/sipvoiplink.cpp +++ b/sflphone-common/src/sip/sipvoiplink.cpp @@ -1962,11 +1962,29 @@ int SIPVoIPLink::createUDPServer (AccountID id) pj_bzero (bound_addr.sin_zero, sizeof (bound_addr.sin_zero)); // Create UDP-Server (default port: 5060) - strcpy (tmpIP, listeningAddress.data()); + // Use here either the local information or the published address + if (account != NULL && !account->getPublishedSameasLocal ()) + { + + + // Set the listening address to the published address + listeningAddress = account->getPublishedAddress (); + // Set the listening port to the published port + listeningPort = account->getPublishedPort (); + + _debug (" ******************************** Use the published address %s:%i\n", listeningAddress.c_str (), listeningPort ); + } + + //strcpy (tmpIP, listeningAddress.data()); + /* Init published name */ + pj_bzero (&a_name, sizeof (pjsip_host_port)); + pj_cstr (&a_name.host, listeningAddress.c_str()); + a_name.port = listeningPort; + - pj_strdup2 (_pool, &a_name.host, tmpIP); + //pj_strdup2 (_pool, &a_name.host, tmpIP); - a_name.port = (pj_uint16_t) listeningPort; + //a_name.port = (pj_uint16_t) listeningPort; status = pjsip_udp_transport_start (_endpt, &bound_addr, &a_name, 1, &transport); @@ -2417,7 +2435,6 @@ bool SIPVoIPLink::loadSIPLocalIP (std::string *addr) void SIPVoIPLink::busy_sleep (unsigned msec) { - _debug("SIPVoIPLink::busy_sleep\n"); #if defined(PJ_SYMBIAN) && PJ_SYMBIAN != 0 /* Ideally we shouldn't call pj_thread_sleep() and rather * CActiveScheduler::WaitForAnyRequest() here, but that will