Commit d32446b2 authored by Margaux Clerc's avatar Margaux Clerc
Browse files

update translation files and dtmf table

parent 77ff807e
......@@ -68,17 +68,14 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from, const cha
const char *display=linphone_address_get_display_name(from);
if (display==NULL || display[0]=='\0') {
display=linphone_address_get_username(from);
}
gtk_text_buffer_insert(buffer,&iter,display,-1);
//gtk_text_buffer_apply_tag_by_name(b,"bold",&begin,&iter);
}
gtk_text_buffer_insert_with_tags_by_name(buffer,&iter,display,-1,"bold",NULL);
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_insert(buffer,&iter,":",-1);
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_insert(buffer,&iter,"\n",-1);
g_object_set_data(G_OBJECT(w),"from_message",linphone_address_as_string(from));
}
//gtk_text_buffer_apply_tag_by_name(b,me ? "green" : "blue" ,&begin,&iter);
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_get_iter_at_offset(buffer,&begin,off);
if(me){
......@@ -218,6 +215,12 @@ GtkWidget* linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddres
gtk_text_buffer_delete (text_buffer, &start, &end);
gtk_text_buffer_insert(text_buffer,&start,buf,-1);
}
gtk_text_buffer_create_tag(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)),
"right","justification", GTK_JUSTIFY_RIGHT,NULL);
gtk_text_buffer_create_tag(gtk_text_view_get_buffer(GTK_TEXT_VIEW(text)),
"bold","weight", PANGO_WEIGHT_BOLD,NULL);
GtkWidget *button = linphone_gtk_get_widget(chat_view,"send");
g_signal_connect_swapped(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_send_text,cr);
......
......@@ -1427,7 +1427,7 @@ void linphone_gtk_load_identities(void){
}
static void linphone_gtk_dtmf_pressed(GtkButton *button){
const char *label=gtk_button_get_label(button);
const char *label=(char *)g_object_get_data(G_OBJECT(button),"label");
GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"uribar");
int pos=-1;
gtk_editable_insert_text(GTK_EDITABLE(uri_bar),label,1,&pos);
......@@ -1611,6 +1611,28 @@ static gboolean on_window_state_event(GtkWidget *w, GdkEventWindowState *event){
}
#endif
void linphone_gtk_init_dtmf_table(GtkWidget *mw){
GtkWidget *dtmf_table=linphone_gtk_get_widget(mw,"dtmf_table");
gtk_widget_set_direction(dtmf_table, GTK_TEXT_DIR_LTR);
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_A")),"label","A");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_B")),"label","B");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_C")),"label","C");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_D")),"label","D");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_1")),"label","1");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_2")),"label","2");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_3")),"label","3");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_4")),"label","4");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_5")),"label","5");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_6")),"label","6");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_7")),"label","7");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_8")),"label","8");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_9")),"label","9");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_0")),"label","0");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_#")),"label","#");
g_object_set_data(G_OBJECT(linphone_gtk_get_widget(mw,"dtmf_*")),"label","*");
}
static void linphone_gtk_init_main_window(){
GtkWidget *main_window;
......@@ -1624,7 +1646,8 @@ static void linphone_gtk_init_main_window(){
linphone_gtk_connect_digits();
main_window=linphone_gtk_get_main_window();
linphone_gtk_call_log_update(main_window);
linphone_gtk_init_dtmf_table(main_window);
linphone_gtk_update_call_buttons (NULL);
g_object_set_data(G_OBJECT(main_window),"is_conf",GINT_TO_POINTER(FALSE));
/*prevent the main window from being destroyed by a user click on WM controls, instead we hide it*/
......
......@@ -772,6 +772,7 @@ static LangCodes supported_langs[]={
{ "zh_CN" , N_("Chinese") },
{ "zh_TW" , N_("Traditional Chinese") },
{ "nb_NO" , N_("Norwegian") },
{ "he" , N_("Hebrew") },
{ NULL , NULL }
};
......
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