Commit 0e31c3a9 authored by Margaux Clerc's avatar Margaux Clerc
Browse files

ui improvement

parent 20233479
......@@ -110,12 +110,14 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from,
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_insert_with_tags_by_name(buffer,&iter,display,-1,"bold",me ? "left" : "left",NULL);
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_insert_with_tags_by_name(buffer,&iter," : ",-1,"bold",me ? "left" : "left",NULL);
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_get_end_iter(buffer,&iter);
gtk_text_buffer_get_iter_at_offset(buffer,&begin,off);
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_insert_with_tags_by_name(buffer,&iter,message,-1,me ? "left" : "left",NULL);
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_insert(buffer,&iter,"\n",-1);
......@@ -140,14 +142,12 @@ void linphone_gtk_push_text(GtkWidget *w, const LinphoneAddress *from,
} else {
struct tm *tm=localtime(&t);
char buf[80];
strftime(buf,80,"%H:%M",tm);
strftime(buf,80,"Received at %H:%M",tm);
gtk_text_buffer_insert_with_tags_by_name(buffer,&iter,buf,-1,
"italic","right","small","font_grey",NULL);
"italic","right","small","font_grey",NULL);
}
gtk_text_buffer_get_end_iter(buffer,&iter);
gtk_text_buffer_insert(buffer,&iter,"\n",-1);
GtkTextMark *mark=gtk_text_buffer_create_mark(buffer,NULL,&iter,FALSE);
gtk_text_view_scroll_mark_onscreen(text,mark);
}
......
......@@ -1503,7 +1503,7 @@ static void linphone_gtk_configure_main_window(){
static const char *search_icon;
static gboolean update_check_menu;
static gboolean buttons_have_borders;
//static gboolean show_abcd;
static gboolean show_abcd;
GtkWidget *w=linphone_gtk_get_main_window();
GHashTable *contacts_history;
......@@ -1518,7 +1518,7 @@ static void linphone_gtk_configure_main_window(){
search_icon=linphone_gtk_get_ui_config("directory_search_icon",NULL);
update_check_menu=linphone_gtk_get_ui_config_int("update_check_menu",0);
buttons_have_borders=linphone_gtk_get_ui_config_int("buttons_border",1);
//show_abcd=linphone_gtk_get_ui_config_int("show_abcd",1);
show_abcd=linphone_gtk_get_ui_config_int("show_abcd",1);
config_loaded=TRUE;
}
linphone_gtk_configure_window(w,"main_window");
......@@ -1578,13 +1578,7 @@ static void linphone_gtk_configure_main_window(){
if (update_check_menu){
gtk_widget_show(linphone_gtk_get_widget(w,"versioncheck_item"));
}
/*if (!show_abcd){
gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_A"));
gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_B"));
gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_C"));
gtk_widget_hide(linphone_gtk_get_widget(w,"dtmf_D"));
gtk_table_resize(GTK_TABLE(linphone_gtk_get_widget(w,"dtmf_table")),4,3);
}*/
g_object_set_data(G_OBJECT(w),"show_abcd",GINT_TO_POINTER(show_abcd));
}
void linphone_gtk_manage_login(void){
......@@ -1599,7 +1593,6 @@ void linphone_gtk_manage_login(void){
}
}
gboolean linphone_gtk_close(GtkWidget *mw){
/*shutdown calls if any*/
LinphoneCore *lc=linphone_gtk_get_core();
......@@ -1660,6 +1653,13 @@ void linphone_gtk_create_keypad(GtkWidget *button){
linphone_gtk_connect_digits(keypad);
linphone_gtk_init_dtmf_table(keypad);
g_object_set_data(G_OBJECT(mw),"keypad",(gpointer)keypad);
if(!GPOINTER_TO_INT(g_object_get_data(G_OBJECT(mw),"show_abcd"))){
gtk_widget_hide(linphone_gtk_get_widget(keypad,"dtmf_A"));
gtk_widget_hide(linphone_gtk_get_widget(keypad,"dtmf_B"));
gtk_widget_hide(linphone_gtk_get_widget(keypad,"dtmf_C"));
gtk_widget_hide(linphone_gtk_get_widget(keypad,"dtmf_D"));
gtk_table_resize(GTK_TABLE(linphone_gtk_get_widget(keypad,"dtmf_table")),4,3);
}
gtk_widget_show(keypad);
}
......
......@@ -282,6 +282,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
......@@ -329,6 +330,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">2</property>
</packing>
</child>
......@@ -416,6 +418,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="padding">2</property>
<property name="position">2</property>
</packing>
</child>
......@@ -958,6 +961,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
......@@ -973,9 +977,23 @@
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">6</property>
<property name="pack_type">end</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="dialpad">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
......@@ -1091,22 +1109,6 @@
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_action_appearance">False</property>
<property name="image">image18</property>
<signal name="clicked" handler="linphone_gtk_create_keypad" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
......
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