Commit f9eae01a authored by Margaux Clerc's avatar Margaux Clerc

Updated translation file

Clear missed call
Add picture for unread messages
parent fead5875
......@@ -61,7 +61,7 @@ void linphone_gtk_call_log_chat_selected(GtkWidget *w){
gtk_tree_model_get(model,&iter,2,&pla,-1);
la=(LinphoneAddress*)pla;
if (la!=NULL){
linphone_gtk_tree_view_set_chat_conversation(la);
linphone_gtk_friend_list_set_chat_conversation(la);
}
}
}
......@@ -192,8 +192,9 @@ void linphone_gtk_call_log_clear_missed_call(){
GtkWidget *box=gtk_hbox_new(FALSE,0);
GtkWidget *image=gtk_image_new_from_stock(GTK_STOCK_REFRESH,GTK_ICON_SIZE_MENU);
GtkWidget *l;
const gchar*text=gtk_label_get_text(GTK_LABEL(linphone_gtk_get_widget(mw,"label3")));
l=gtk_label_new("Recent calls");
l=gtk_label_new(text);
gtk_box_pack_start(GTK_BOX(box),image,FALSE,FALSE,0);
gtk_box_pack_start(GTK_BOX(box),l,FALSE,FALSE,0);
gtk_notebook_set_tab_label(notebook,page,box);
......@@ -359,6 +360,7 @@ void linphone_gtk_history_row_selected(GtkWidget *treeview){
void linphone_gtk_clear_call_logs(GtkWidget *button){
linphone_core_clear_call_logs (linphone_gtk_get_core());
linphone_gtk_call_log_clear_missed_call();
linphone_gtk_call_log_update(gtk_widget_get_toplevel(button));
}
......
......@@ -64,7 +64,7 @@ void linphone_gtk_quit_chatroom(LinphoneChatRoom *cr) {
g_return_if_fail(w!=NULL);
gtk_notebook_remove_page(GTK_NOTEBOOK(nb),gtk_notebook_page_num(GTK_NOTEBOOK(nb),w));
linphone_gtk_create_chat_picture(FALSE);
linphone_gtk_friend_list_update_chat_picture();
g_object_set_data(G_OBJECT(friendlist),"chatview",NULL);
g_object_set_data(G_OBJECT(w),"from_message",NULL);
g_object_set_data(G_OBJECT(w),"cr",NULL);
......@@ -385,6 +385,7 @@ GtkWidget* linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddres
g_signal_connect_swapped(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_send_text,NULL);
entry = linphone_gtk_get_widget(chat_view,"text_entry");
g_signal_connect_swapped(G_OBJECT(entry),"activate",(GCallback)linphone_gtk_send_text,NULL);
g_signal_connect(G_OBJECT(notebook),"switch_page",(GCallback)linphone_gtk_notebook_tab_select,NULL);
ms_free(with_str);
return chat_view;
}
......@@ -404,13 +405,13 @@ void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,
char *uri_only=linphone_address_as_string_uri_only(uri);
MSList *messages=NULL;
linphone_chat_room_mark_as_read(cr);
if(g_strcmp0(from_str,uri_only)!=0){
GtkTextView *text_view=GTK_TEXT_VIEW(linphone_gtk_get_widget(chat_view,"textview"));
GtkTextIter start;
GtkTextIter end;
GtkTextBuffer *text_buffer;
linphone_chat_room_mark_as_read(cr);
text_buffer=gtk_text_view_get_buffer(text_view);
gtk_text_buffer_get_bounds(text_buffer, &start, &end);
gtk_text_buffer_delete (text_buffer, &start, &end);
......
......@@ -87,11 +87,6 @@ static GdkPixbuf *create_chat_picture(){
return pixbuf;
}
/*static GdkPixbuf *create_active_chat_picture(){
GdkPixbuf *pixbuf;
pixbuf = create_pixbuf("active_chat.png");
return pixbuf;
}*/
/*
void linphone_gtk_set_friend_status(GtkWidget *friendlist , LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img){
GtkTreeIter iter;
......@@ -226,18 +221,22 @@ static void linphone_gtk_call_selected(GtkTreeView *treeview){
"start_call"));
}
void linphone_gtk_create_chat_picture(gboolean active){
void linphone_gtk_friend_list_update_chat_picture(){
GtkTreeIter iter;
GtkWidget *w = linphone_gtk_get_main_window();
GtkWidget *friendlist=linphone_gtk_get_widget(w,"contact_list");
GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
LinphoneChatRoom *cr=NULL;
int nbmsg=0;
if (gtk_tree_model_get_iter_first(model,&iter)) {
do{
//if(!active){
gtk_tree_model_get (model, &iter,FRIEND_CHATROOM , &cr, -1);
nbmsg=linphone_chat_room_get_unread_messages_count(cr);
if(nbmsg != 0){
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,create_unread_msg(),-1);
} else {
gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,create_chat_picture(),-1);
//} else {
// gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_CHAT,create_active_chat_picture(),-1);
//}
}
}while(gtk_tree_model_iter_next(model,&iter));
}
}
......@@ -247,7 +246,7 @@ static gboolean grab_focus(GtkWidget *w){
return FALSE;
}
void linphone_gtk_tree_view_set_chat_conversation(const LinphoneAddress *la){
void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la){
GtkTreeIter iter;
GtkListStore *store=NULL;
GtkWidget *w = linphone_gtk_get_main_window();
......@@ -270,7 +269,7 @@ void linphone_gtk_tree_view_set_chat_conversation(const LinphoneAddress *la){
linphone_gtk_load_chatroom(cr,la,chat_view);
}
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,chat_view));
linphone_gtk_create_chat_picture(FALSE);
linphone_gtk_friend_list_update_chat_picture();
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(chat_view,"text_entry"));
} else {
store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
......@@ -295,7 +294,7 @@ void linphone_gtk_tree_view_set_chat_conversation(const LinphoneAddress *la){
linphone_gtk_load_chatroom(cr,uri,chat_view);
}
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,chat_view));
linphone_gtk_create_chat_picture(FALSE);
linphone_gtk_friend_list_update_chat_picture();
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(chat_view,"text_entry"));
break;
}
......@@ -309,17 +308,16 @@ void linphone_gtk_notebook_tab_select(GtkNotebook *notebook,GtkWidget *page,guin
GtkWidget *friendlist=linphone_gtk_get_widget(w,"contact_list");
GtkWidget *chat_view;
LinphoneChatRoom *cr=NULL;
const LinphoneAddress *addr=(const LinphoneAddress *)data;
chat_view=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
if(page != NULL){
notebook=(GtkNotebook *)linphone_gtk_get_widget(w,"viewswitch");
if(gtk_notebook_page_num(notebook,page)==gtk_notebook_page_num(notebook,chat_view)){
cr=linphone_core_get_chat_room(linphone_gtk_get_core(),addr);
if(cr!=NULL){
chat_view=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
if(page != NULL){
notebook=(GtkNotebook *)linphone_gtk_get_widget(w,"viewswitch");
if(gtk_notebook_page_num(notebook,page)==gtk_notebook_page_num(notebook,chat_view)){
cr=g_object_get_data(G_OBJECT(chat_view),"cr");
if(cr!=NULL){
linphone_chat_room_mark_as_read(cr);
linphone_gtk_show_friends();
linphone_gtk_show_friends();
}
}
}
}
}
......@@ -355,9 +353,8 @@ void linphone_gtk_chat_selected(GtkWidget *item){
linphone_gtk_load_chatroom(cr,uri,page);
}
gtk_notebook_set_current_page(notebook,gtk_notebook_page_num(notebook,page));
linphone_gtk_create_chat_picture(FALSE);
linphone_gtk_friend_list_update_chat_picture();
g_idle_add((GSourceFunc)grab_focus,linphone_gtk_get_widget(page,"text_entry"));
g_signal_connect(G_OBJECT(notebook),"switch_page",(GCallback)linphone_gtk_notebook_tab_select,(gpointer)uri);
}
}
......@@ -809,7 +806,6 @@ void linphone_gtk_show_friends(void){
escaped=g_markup_escape_text(uri,-1);
gtk_list_store_set(store,&iter,FRIEND_SIP_ADDRESS,escaped,-1);
g_free(escaped);
//linphone_gtk_update_chat_picture();
//bi=linphone_friend_get_info(lf);
/*if (bi!=NULL && bi->image_data!=NULL){
GdkPixbuf *pbuf=
......
......@@ -75,7 +75,7 @@ static GtkWidget *make_tab_header(int number){
return w;
}
void update_tab_header(LinphoneCall *call,gboolean pause){
void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause){
GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *main_window=linphone_gtk_get_main_window();
GtkNotebook *notebook=GTK_NOTEBOOK(linphone_gtk_get_widget(main_window,"viewswitch"));
......@@ -688,7 +688,7 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
linphone_gtk_in_call_set_animation_image(callview,GTK_STOCK_MEDIA_PLAY,TRUE);
update_tab_header(call,FALSE);
linphone_gtk_call_update_tab_header(call,FALSE);
linphone_gtk_enable_mute_button(
GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),TRUE);
......@@ -843,7 +843,7 @@ void linphone_gtk_draw_hold_button(GtkButton *button, gboolean active){
void linphone_gtk_hold_clicked(GtkButton *button){
int active=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(button),"active"));
LinphoneCall *call=linphone_gtk_get_currently_displayed_call(NULL);
update_tab_header(call,active);
linphone_gtk_call_update_tab_header(call,active);
if (!call) return;
if(!active)
{
......@@ -859,7 +859,7 @@ void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gbo
GtkWidget *callview=(GtkWidget*)linphone_call_get_user_pointer (call);
GtkWidget *button;
g_return_if_fail(callview!=NULL);
update_tab_header(call,!holdon);
linphone_gtk_call_update_tab_header(call,!holdon);
button=linphone_gtk_get_widget(callview,"hold_call");
gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
gtk_widget_set_visible(GTK_WIDGET(button),sensitive);
......
......@@ -58,7 +58,6 @@ GtkWidget *linphone_gtk_create_window(const char *window_name);
GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name);
const char *linphone_gtk_message_storage_get_db_file(const char *filename);
void linphone_gtk_show_assistant(void);
void linphone_gtk_close_assistant(void);
......@@ -68,15 +67,11 @@ GtkWidget *linphone_gtk_get_main_window();
void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
void linphone_gtk_start_call(GtkWidget *button);
void linphone_gtk_call_terminated();
void linphone_gtk_show_friends(void);
void linphone_gtk_show_contact(LinphoneFriend *lf);
void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
void linphone_gtk_show_parameters(void);
void linphone_gtk_fill_soundcards(GtkWidget *pb);
void linphone_gtk_fill_webcams(GtkWidget *pb);
void linphone_gtk_load_identities(void);
LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with);
void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg);
void linphone_gtk_call_log_update(GtkWidget *w);
void linphone_gtk_create_log_window(void);
void linphone_gtk_log_show(void);
......@@ -85,7 +80,6 @@ void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
void linphone_gtk_destroy_log_window(void);
void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to);
gboolean linphone_gtk_check_logs();
void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
int linphone_gtk_get_ui_config_int(const char *key, int def);
void linphone_gtk_set_ui_config_int(const char *key , int val);
......@@ -99,21 +93,25 @@ SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
void linphone_gtk_terminate_call(GtkWidget *button);
void update_tab_header(LinphoneCall *call,gboolean pause);
void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause);
void linphone_gtk_show_directory_search(void);
void linphone_gtk_status_icon_set_blinking(gboolean val);
void linphone_gtk_notify(LinphoneCall *call, const char *msg);
LinphoneChatRoom *linphone_gtk_start_chat(GtkTreeView* t);
void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,GtkWidget *chat_view);
void linphone_gtk_send_text();
GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with);
void linphone_gtk_create_chat_picture(gboolean active);
void linphone_gtk_update_chat_picture();
void linphone_gtk_chat_set_conversation(const LinphoneAddress *uri,gchar *conversation);
gchar * linphone_gtk_chat_get_conversation(const LinphoneAddress *uri);
LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with);
void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg);
void linphone_gtk_friend_list_update_chat_picture();
void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la);
gboolean linphone_gtk_friend_list_is_contact(const LinphoneAddress *addr);
void linphone_gtk_notebook_tab_select(GtkNotebook *notebook,GtkWidget *page,guint page_num, gpointer data);
void linphone_gtk_show_friends(void);
void linphone_gtk_show_contact(LinphoneFriend *lf);
void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
/*functions controlling the different views*/
gboolean linphone_gtk_use_in_call_view();
......@@ -151,6 +149,4 @@ void linphone_gtk_uninit_instance(void);
void linphone_gtk_monitor_usb(void);
void linphone_gtk_unmonitor_usb(void);
gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_conference);
void linphone_gtk_tree_view_set_chat_conversation(const LinphoneAddress *la);
gboolean linphone_gtk_friend_list_is_contact(const LinphoneAddress *addr);
\ No newline at end of file
gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_conference);
\ No newline at end of file
......@@ -1232,10 +1232,10 @@ static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call
break;
case LinphoneCallPausing:
linphone_gtk_enable_hold_button(call,TRUE,FALSE);
update_tab_header(call,FALSE);
linphone_gtk_call_update_tab_header(call,FALSE);
case LinphoneCallPausedByRemote:
linphone_gtk_in_call_view_set_paused(call);
update_tab_header(call,TRUE);
linphone_gtk_call_update_tab_header(call,TRUE);
break;
case LinphoneCallConnected:
linphone_gtk_enable_hold_button (call,TRUE,TRUE);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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