mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-23 16:48:32 +00:00
fix display name in call_log
This commit is contained in:
parent
7bf3cb7654
commit
a9dee01c72
2 changed files with 13 additions and 5 deletions
|
|
@ -210,13 +210,14 @@ void linphone_gtk_call_log_update(GtkWidget *w){
|
||||||
for (logs=linphone_core_get_call_logs(linphone_gtk_get_core());logs!=NULL;logs=logs->next){
|
for (logs=linphone_core_get_call_logs(linphone_gtk_get_core());logs!=NULL;logs=logs->next){
|
||||||
LinphoneCallLog *cl=(LinphoneCallLog*)logs->data;
|
LinphoneCallLog *cl=(LinphoneCallLog*)logs->data;
|
||||||
GtkTreeIter iter, iter2;
|
GtkTreeIter iter, iter2;
|
||||||
LinphoneAddress *la=linphone_call_log_get_dir(cl)==LinphoneCallIncoming ? linphone_call_log_get_from(cl) : linphone_call_log_get_to(cl);
|
const LinphoneAddress *la=linphone_call_log_get_dir(cl)==LinphoneCallIncoming ? linphone_call_log_get_from(cl) : linphone_call_log_get_to(cl);
|
||||||
char *addr= linphone_address_as_string_uri_only (la);
|
char *addr= linphone_address_as_string(la);
|
||||||
const char *display;
|
const char *display;
|
||||||
gchar *logtxt, *headtxt, *minutes, *seconds;
|
gchar *logtxt, *headtxt, *minutes, *seconds;
|
||||||
gchar quality[20];
|
gchar quality[20];
|
||||||
const char *status=NULL;
|
const char *status=NULL;
|
||||||
gchar *start_date=NULL;
|
gchar *start_date=NULL;
|
||||||
|
LinphoneFriend *lf=NULL;
|
||||||
int duration=linphone_call_log_get_duration(cl);
|
int duration=linphone_call_log_get_duration(cl);
|
||||||
time_t start_date_time=linphone_call_log_get_start_date(cl);
|
time_t start_date_time=linphone_call_log_get_start_date(cl);
|
||||||
|
|
||||||
|
|
@ -229,12 +230,19 @@ void linphone_gtk_call_log_update(GtkWidget *w){
|
||||||
#else
|
#else
|
||||||
start_date=g_strdup(ctime(&start_date_time));
|
start_date=g_strdup(ctime(&start_date_time));
|
||||||
#endif
|
#endif
|
||||||
|
lf=linphone_core_get_friend_by_address(linphone_gtk_get_core(),addr);
|
||||||
|
if(lf != NULL){
|
||||||
|
la=linphone_friend_get_address(lf);
|
||||||
|
display=linphone_address_get_display_name(la);
|
||||||
|
} else {
|
||||||
|
display=linphone_address_get_display_name(la);
|
||||||
|
}
|
||||||
|
|
||||||
display=linphone_address_get_display_name (la);
|
|
||||||
if (display==NULL){
|
if (display==NULL){
|
||||||
display=linphone_address_get_username (la);
|
display=linphone_address_get_username (la);
|
||||||
if (display==NULL)
|
if (display==NULL){
|
||||||
display=linphone_address_get_domain (la);
|
display=linphone_address_get_domain (la);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (linphone_call_log_get_quality(cl)!=-1){
|
if (linphone_call_log_get_quality(cl)!=-1){
|
||||||
snprintf(quality,sizeof(quality),"%.1f",linphone_call_log_get_quality(cl));
|
snprintf(quality,sizeof(quality),"%.1f",linphone_call_log_get_quality(cl));
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ To add a translation file in linphone project you should first :
|
||||||
- then add the file .po in the directory /po
|
- then add the file .po in the directory /po
|
||||||
- run ./autogen.sh
|
- run ./autogen.sh
|
||||||
|
|
||||||
Update the tranlation files
|
Update the translation files
|
||||||
***************************
|
***************************
|
||||||
To update all the translation files, in the directory /po run the following command
|
To update all the translation files, in the directory /po run the following command
|
||||||
$ make update-po
|
$ make update-po
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue