Commit 199133a7 authored by Margaux Clerc's avatar Margaux Clerc
Browse files

removed keypad

parent 77a03fbd
......@@ -5,6 +5,7 @@ UI_FILES= about.ui \
parameters.ui \
sip_account.ui \
call_logs.ui \
keypad.ui \
log.ui \
buddylookup.ui \
tunnel_config.ui \
......
......@@ -194,12 +194,12 @@ void update_chat_state_message(LinphoneChatMessageState state){
default : result="Message in progress.. ";
}
GDateTime *dt=g_date_time_new_now_local();
/*GDateTime *dt=g_date_time_new_now_local();
char *time=g_date_time_format(dt,"%k:%M");
gchar result2[80];
sprintf(result2,"%s %s",result,time);
sprintf(result2,"%s %s",result,time);*/
gtk_text_buffer_insert_with_tags_by_name(b,&iter,result2,-1,
gtk_text_buffer_insert_with_tags_by_name(b,&iter,result,-1,
"italic","right","small","font_grey",NULL);
list=g_list_remove(list,g_list_nth_data(list,0));
g_object_set_data(G_OBJECT(page),"list",list);
......@@ -342,8 +342,8 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const
GtkWidget *main_window=linphone_gtk_get_main_window();
GtkWidget *friendlist=linphone_gtk_get_widget(main_window,"contact_list");
GtkWidget *w;
GDateTime *dt=g_date_time_new_now_local();
char *time=g_date_time_format(dt,"%k:%M");
/*GDateTime *dt=g_date_time_new_now_local();
char *time=g_date_time_format(dt,"%k:%M");*/
w=(GtkWidget*)g_object_get_data(G_OBJECT(friendlist),"chatview");
if(w!=NULL){
......@@ -365,9 +365,9 @@ void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const
#else
if(!gtk_window_is_active(GTK_WINDOW(main_window))){
if(!GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"is_notified"))){
gchar result2[80];
sprintf(result2,"%s \n %s sent at %s",message,display,time);
linphone_gtk_notify(NULL,result2);
/*gchar result2[80];
sprintf(result2,"%s \n %s sent at %s",message,display,time);*/
linphone_gtk_notify(NULL,message);
g_object_set_data(G_OBJECT(w),"is_notified",GINT_TO_POINTER(TRUE));
} else {
g_object_set_data(G_OBJECT(w),"is_notified",GINT_TO_POINTER(FALSE));
......
......@@ -361,6 +361,13 @@ void linphone_gtk_create_in_call_view(LinphoneCall *call){
g_signal_connect(G_OBJECT(transfer),"clicked",(GCallback)transfer_button_clicked,call);
gtk_widget_hide(transfer);
GtkWidget *keypad = linphone_gtk_get_widget(call_view,"keypad");
//gtk_button_set_image(GTK_BUTTON(keypad),gtk_image_new_from_stock
// (GTK_STOCK_GO_FORWARD,GTK_ICON_SIZE_BUTTON));
g_signal_connect_swapped(G_OBJECT(keypad),"clicked",(GCallback)linphone_gtk_create_keypad,call);
gtk_widget_hide(keypad);
GtkWidget *conf = linphone_gtk_get_widget(call_view,"conference_button");
gtk_button_set_image(GTK_BUTTON(conf),gtk_image_new_from_stock (GTK_STOCK_ADD,GTK_ICON_SIZE_BUTTON));
g_signal_connect(G_OBJECT(conf),"clicked",(GCallback)conference_button_clicked,call);
......@@ -673,6 +680,9 @@ void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call){
gtk_widget_hide(linphone_gtk_get_widget(callview,"answer_decline_panel"));
gtk_label_set_markup(GTK_LABEL(status),in_conf ? _("In conference") : _("<b>In call</b>"));
/** keypad button **/
//gtk_widget_set_visible(linphone_gtk_get_widget(callview,"keypad"),!in_conf);
gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"conference_button"),!in_conf);
gtk_widget_set_sensitive(linphone_gtk_get_widget(callview,"transfer_button"),!in_conf);
......@@ -745,10 +755,15 @@ void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_m
gtk_widget_hide(linphone_gtk_get_widget(callview,"video_button"));
gtk_widget_hide(linphone_gtk_get_widget(callview,"transfer_button"));
gtk_widget_hide(linphone_gtk_get_widget(callview,"conference_button"));
gtk_widget_hide(linphone_gtk_get_widget(callview,"keypad"));
linphone_gtk_enable_mute_button(
GTK_BUTTON(linphone_gtk_get_widget(callview,"incall_mute")),FALSE);
linphone_gtk_enable_hold_button(call,FALSE,TRUE);
GtkWidget *keypad=(GtkWidget *)g_object_get_data(G_OBJECT(callview),"keypad");
if(keypad!=NULL)
gtk_widget_destroy(keypad);
if (taskid!=0) g_source_remove(taskid);
g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,call);
if (in_conf)
......
......@@ -89,6 +89,7 @@ int linphone_gtk_get_ui_config_int(const char *key, int def);
void linphone_gtk_set_ui_config_int(const char *key , int val);
void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show);
void linphone_gtk_create_keypad(LinphoneCall *call);
void linphone_gtk_open_browser(const char *url);
void linphone_gtk_check_for_new_version(void);
const char *linphone_gtk_get_lang(const char *config_file);
......@@ -102,7 +103,6 @@ void linphone_gtk_terminate_call(GtkWidget *button);
void 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);
......
......@@ -744,7 +744,9 @@ static void linphone_gtk_update_call_buttons(LinphoneCall *call){
linphone_gtk_enable_conference_button(lc,FALSE);
}
update_video_title();
if (call) linphone_gtk_update_video_button(call);
if (call) {
linphone_gtk_update_video_button(call);
}
}
static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
......@@ -1444,7 +1446,7 @@ void linphone_gtk_load_identities(void){
static void linphone_gtk_dtmf_pressed(GtkButton *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");
GtkWidget *uri_bar=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar");
int pos=-1;
gtk_editable_insert_text(GTK_EDITABLE(uri_bar),label,1,&pos);
linphone_core_play_dtmf (linphone_gtk_get_core(),label[0],-1);
......@@ -1458,8 +1460,8 @@ static void linphone_gtk_dtmf_released(GtkButton *button){
}
static void linphone_gtk_connect_digits(void){
GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"dtmf_table"));
static void linphone_gtk_connect_digits(GtkWidget *w){
GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(w,"dtmf_table"));
GList *children=gtk_container_get_children(cont);
GList *elem;
for(elem=children;elem!=NULL;elem=elem->next){
......@@ -1497,11 +1499,10 @@ static void linphone_gtk_configure_main_window(){
static const char *home;
static const char *start_call_icon;
static const char *add_call_icon;
//static const char *stop_call_icon;
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;
......@@ -1513,11 +1514,10 @@ static void linphone_gtk_configure_main_window(){
home=linphone_gtk_get_ui_config("home","http://www.linphone.org");
start_call_icon=linphone_gtk_get_ui_config("start_call_icon","startcall-green.png");
add_call_icon=linphone_gtk_get_ui_config("add_call_icon","addcall-green.png");
//stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","stopcall-small.png");
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");
......@@ -1558,7 +1558,7 @@ static void linphone_gtk_configure_main_window(){
}
*/
}
{
/*{
GdkPixbuf *pbuf=create_pixbuf("dialer-orange.png");
if (pbuf) {
GtkImage *img=GTK_IMAGE(linphone_gtk_get_widget(w,"keypad_tab_icon"));
......@@ -1570,20 +1570,20 @@ static void linphone_gtk_configure_main_window(){
g_object_unref(G_OBJECT(scaled));
g_object_unref(G_OBJECT(pbuf));
}
}
}*/
if (linphone_gtk_can_manage_accounts()) {
gtk_widget_show(linphone_gtk_get_widget(w,"assistant_item"));
}
if (update_check_menu){
gtk_widget_show(linphone_gtk_get_widget(w,"versioncheck_item"));
}
if (!show_abcd){
/*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);
}
}*/
}
void linphone_gtk_manage_login(void){
......@@ -1647,7 +1647,16 @@ void linphone_gtk_init_dtmf_table(GtkWidget *mw){
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","*");
}
void linphone_gtk_create_keypad(LinphoneCall *call){
GtkWidget *w=(GtkWidget*)linphone_call_get_user_pointer(call);
GtkWidget *keypad=linphone_gtk_create_window("keypad");
linphone_gtk_connect_digits(keypad);
linphone_gtk_init_dtmf_table(keypad);
g_object_set_data(G_OBJECT(w),"keypad",(gpointer)keypad);
gtk_widget_show(keypad);
}
static void linphone_gtk_init_main_window(){
......@@ -1659,11 +1668,10 @@ static void linphone_gtk_init_main_window(){
linphone_gtk_load_identities();
linphone_gtk_set_my_presence(linphone_core_get_presence_info(linphone_gtk_get_core()));
linphone_gtk_show_friends();
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_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*/
......
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