Commit 4a6be486 authored by Margaux Clerc's avatar Margaux Clerc Committed by jehan
Browse files

change unread messages picture

chnage time for time change
parent 1d2f4eac
...@@ -66,6 +66,7 @@ static void create_chat_message(char **argv, void *data){ ...@@ -66,6 +66,7 @@ static void create_chat_message(char **argv, void *data){
for(j=0;j<12;j++) { for(j=0;j<12;j++) {
if(strcmp(tmp2,months[j])==0) ret.tm_mon=j; if(strcmp(tmp2,months[j])==0) ret.tm_mon=j;
} }
ret.tm_isdst=-1;
} }
new_message->time=argv[5]!=NULL ? mktime(&ret) : time(NULL); new_message->time=argv[5]!=NULL ? mktime(&ret) : time(NULL);
new_message->state=atoi(argv[7]); new_message->state=atoi(argv[7]);
......
...@@ -1798,6 +1798,7 @@ static void text_received(Sal *sal, eXosip_event_t *ev){ ...@@ -1798,6 +1798,7 @@ static void text_received(Sal *sal, eXosip_event_t *ev){
for(j=0;j<12;j++) { for(j=0;j<12;j++) {
if(strcmp(tmp2,months[j])==0) ret.tm_mon=j; if(strcmp(tmp2,months[j])==0) ret.tm_mon=j;
} }
ret.tm_isdst=-1;
}else ms_warning("No date header in SIP MESSAGE, we don't know when it was sent."); }else ms_warning("No date header in SIP MESSAGE, we don't know when it was sent.");
content_type= osip_message_get_content_type(ev->request); content_type= osip_message_get_content_type(ev->request);
......
...@@ -168,10 +168,10 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from, ...@@ -168,10 +168,10 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from,
case LinphoneChatMessageStateDelivered: case LinphoneChatMessageStateDelivered:
{ {
tnow=time(NULL); tnow=time(NULL);
tm=gmtime(&tnow); tm=localtime(&tnow);
tnow_day=tm->tm_yday; tnow_day=tm->tm_yday;
tnow_year=tm->tm_year; tnow_year=tm->tm_year;
tm=gmtime(&t); tm=localtime(&t);
if(tnow_day != tm->tm_yday || (tnow_day == tm->tm_yday && tnow_year != tm->tm_year)) { if(tnow_day != tm->tm_yday || (tnow_day == tm->tm_yday && tnow_year != tm->tm_year)) {
strftime(buf,80,"%a %x, %H:%M",tm); strftime(buf,80,"%a %x, %H:%M",tm);
} else { } else {
...@@ -237,7 +237,7 @@ void update_chat_state_message(LinphoneChatMessageState state,LinphoneChatMessag ...@@ -237,7 +237,7 @@ void update_chat_state_message(LinphoneChatMessageState state,LinphoneChatMessag
case LinphoneChatMessageStateDelivered: case LinphoneChatMessageStateDelivered:
{ {
time_t t=time(NULL); time_t t=time(NULL);
struct tm *tm=gmtime(&t); struct tm *tm=localtime(&t);
char buf[80]; char buf[80];
strftime(buf,80,"%H:%M",tm); strftime(buf,80,"%H:%M",tm);
result=buf; result=buf;
...@@ -450,10 +450,10 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, ...@@ -450,10 +450,10 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room,
if(w!=NULL){ if(w!=NULL){
char *from_chatview=(char *)g_object_get_data(G_OBJECT(friendlist),"from"); char *from_chatview=(char *)g_object_get_data(G_OBJECT(friendlist),"from");
if(g_strcmp0(from,from_chatview)==0){ if(g_strcmp0(from,from_chatview)==0){
linphone_chat_room_mark_as_read(room);
send=TRUE; send=TRUE;
} else { } else {
if(!linphone_gtk_friend_list_is_contact(linphone_chat_message_get_from(msg))){ if(!linphone_gtk_friend_list_is_contact(linphone_chat_message_get_from(msg))){
//linphone_gtk_load_chatroom(room,linphone_chat_message_get_from(msg),w);
linphone_gtk_chat_add_contact(linphone_chat_message_get_from(msg)); linphone_gtk_chat_add_contact(linphone_chat_message_get_from(msg));
} }
send=FALSE; send=FALSE;
...@@ -461,7 +461,6 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, ...@@ -461,7 +461,6 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room,
} else { } else {
send=FALSE; send=FALSE;
if(!linphone_gtk_friend_list_is_contact(linphone_chat_message_get_from(msg))){ if(!linphone_gtk_friend_list_is_contact(linphone_chat_message_get_from(msg))){
//linphone_gtk_load_chatroom(room,linphone_chat_message_get_from(msg),w);
linphone_gtk_chat_add_contact(linphone_chat_message_get_from(msg)); linphone_gtk_chat_add_contact(linphone_chat_message_get_from(msg));
} }
w=linphone_gtk_init_chatroom(room,linphone_chat_message_get_from(msg)); w=linphone_gtk_init_chatroom(room,linphone_chat_message_get_from(msg));
...@@ -469,6 +468,7 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, ...@@ -469,6 +468,7 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room,
g_object_set_data(G_OBJECT(friendlist),"from",from); g_object_set_data(G_OBJECT(friendlist),"from",from);
} }
get_display_name(linphone_chat_message_get_from(msg)); get_display_name(linphone_chat_message_get_from(msg));
#ifdef HAVE_GTK_OSXs #ifdef HAVE_GTK_OSXs
/* Notified when a new message is sent */ /* Notified when a new message is sent */
linphone_gtk_status_icon_set_blinking(TRUE); linphone_gtk_status_icon_set_blinking(TRUE);
...@@ -491,5 +491,4 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, ...@@ -491,5 +491,4 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room,
} else { } else {
linphone_gtk_show_friends(); linphone_gtk_show_friends();
} }
//linphone_gtk_update_chat_picture();
} }
pixmaps/active_chat.png

3.03 KB | W: | H:

pixmaps/active_chat.png

3.33 KB | W: | H:

pixmaps/active_chat.png
pixmaps/active_chat.png
pixmaps/active_chat.png
pixmaps/active_chat.png
  • 2-up
  • Swipe
  • Onion skin
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