mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 23:58:17 +00:00
merge "Tabbed UI" patch from Emmanuel
This commit is contained in:
parent
fbac5e27be
commit
a2f7044f34
4 changed files with 462 additions and 536 deletions
|
|
@ -38,18 +38,36 @@ gboolean linphone_gtk_use_in_call_view(){
|
|||
|
||||
void linphone_gtk_show_in_call_view(void){
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
GtkWidget *idle_frame=linphone_gtk_get_widget(main_window,"idle_frame");
|
||||
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
|
||||
GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_frame");
|
||||
gtk_widget_hide(idle_frame);
|
||||
gint idx;
|
||||
|
||||
/* Make the in call frame visible and arrange for the notebook to
|
||||
show that page */
|
||||
gtk_widget_show(in_call_frame);
|
||||
idx = gtk_notebook_page_num(notebook, in_call_frame);
|
||||
if (idx >= 0) {
|
||||
gtk_notebook_set_current_page(notebook, idx);
|
||||
}
|
||||
}
|
||||
|
||||
void linphone_gtk_show_idle_view(void){
|
||||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
|
||||
GtkWidget *idle_frame=linphone_gtk_get_widget(main_window,"idle_frame");
|
||||
GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_frame");
|
||||
gtk_widget_show(idle_frame);
|
||||
gtk_widget_hide(in_call_frame);
|
||||
gint idx;
|
||||
|
||||
/* Switch back to the idle frame page, maybe we should have
|
||||
remembered where we were in gtk_show_in_call_view() to switch
|
||||
back to that page of the notebook, but this should do in most
|
||||
cases. */
|
||||
gtk_widget_show(idle_frame); /* Make sure it is visible... */
|
||||
idx = gtk_notebook_page_num(notebook, idle_frame);
|
||||
if (idx >= 0) {
|
||||
gtk_notebook_set_current_page(notebook, idx);
|
||||
gtk_widget_hide(in_call_frame);
|
||||
}
|
||||
}
|
||||
|
||||
void display_peer_name_in_label(GtkWidget *label, const char *uri){
|
||||
|
|
@ -91,13 +109,11 @@ void linphone_gtk_in_call_view_set_calling(const char *uri){
|
|||
GtkWidget *duration=linphone_gtk_get_widget(main_window,"in_call_duration");
|
||||
GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
|
||||
GdkPixbufAnimation *pbuf=create_pixbuf_animation("calling_anim.gif");
|
||||
GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
|
||||
|
||||
gtk_widget_set_sensitive(terminate_button,TRUE);
|
||||
gtk_label_set_markup(GTK_LABEL(status),_("<b>Calling...</b>"));
|
||||
display_peer_name_in_label(callee,uri);
|
||||
|
||||
gtk_label_set_text(GTK_LABEL(duration),"00:00:00");
|
||||
gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
|
||||
if (pbuf!=NULL){
|
||||
gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
|
||||
g_object_unref(G_OBJECT(pbuf));
|
||||
|
|
@ -112,13 +128,11 @@ void linphone_gtk_in_call_view_set_in_call(){
|
|||
GtkWidget *duration=linphone_gtk_get_widget(main_window,"in_call_duration");
|
||||
GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
|
||||
GdkPixbufAnimation *pbuf=create_pixbuf_animation("incall_anim.gif");
|
||||
GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
|
||||
const LinphoneAddress *uri=linphone_core_get_remote_uri(lc);
|
||||
char *tmp=linphone_address_as_string(uri);
|
||||
display_peer_name_in_label(callee,tmp);
|
||||
ms_free(tmp);
|
||||
|
||||
gtk_widget_set_sensitive(terminate_button,TRUE);
|
||||
gtk_label_set_markup(GTK_LABEL(status),_("<b>In call with</b>"));
|
||||
|
||||
gtk_label_set_text(GTK_LABEL(duration),_("00::00::00"));
|
||||
|
|
@ -150,10 +164,8 @@ void linphone_gtk_in_call_view_terminate(const char *error_msg){
|
|||
GtkWidget *main_window=linphone_gtk_get_main_window();
|
||||
GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
|
||||
GtkWidget *animation=linphone_gtk_get_widget(main_window,"in_call_animation");
|
||||
GtkWidget *terminate_button=linphone_gtk_get_widget(main_window,"in_call_terminate");
|
||||
GdkPixbuf *pbuf=create_pixbuf(linphone_gtk_get_ui_config("stop_call_icon","red.png"));
|
||||
|
||||
gtk_widget_set_sensitive(terminate_button,FALSE);
|
||||
if (error_msg==NULL)
|
||||
gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>"));
|
||||
else{
|
||||
|
|
@ -174,11 +186,17 @@ void linphone_gtk_draw_mute_button(GtkToggleButton *button, gboolean active){
|
|||
if (active){
|
||||
GtkWidget *image=create_pixmap("mic_muted.png");
|
||||
gtk_button_set_label(GTK_BUTTON(button),_("Unmute"));
|
||||
if (image!=NULL) gtk_button_set_image(GTK_BUTTON(button),image);
|
||||
if (image!=NULL) {
|
||||
gtk_button_set_image(GTK_BUTTON(button),image);
|
||||
gtk_widget_show(image);
|
||||
}
|
||||
}else{
|
||||
GtkWidget *image=create_pixmap("mic_active.png");
|
||||
gtk_button_set_label(GTK_BUTTON(button),_("Mute"));
|
||||
if (image!=NULL) gtk_button_set_image(GTK_BUTTON(button),image);
|
||||
if (image!=NULL) {
|
||||
gtk_button_set_image(GTK_BUTTON(button),image);
|
||||
gtk_widget_show(image);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -190,5 +208,6 @@ void linphone_gtk_mute_toggled(GtkToggleButton *button){
|
|||
|
||||
void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive){
|
||||
gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
|
||||
gtk_object_set(GTK_OBJECT(button),"gtk-button-images",TRUE,NULL);
|
||||
linphone_gtk_draw_mute_button(button,FALSE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -552,7 +552,6 @@ void linphone_gtk_call_terminated(const char *error){
|
|||
GtkWidget *icw;
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),FALSE);
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),TRUE);
|
||||
gtk_widget_hide_all(linphone_gtk_get_widget(mw,"go_to_call_view_box"));
|
||||
linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"main_mute")),FALSE);
|
||||
if (linphone_gtk_use_in_call_view())
|
||||
linphone_gtk_in_call_view_terminate(error);
|
||||
|
|
@ -576,7 +575,6 @@ static gboolean in_call_timer(){
|
|||
static void linphone_gtk_call_started(GtkWidget *mw){
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"start_call"),FALSE);
|
||||
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"terminate_call"),TRUE);
|
||||
gtk_widget_show_all(linphone_gtk_get_widget(mw,"go_to_call_view_box"));
|
||||
update_video_title();
|
||||
if (linphone_gtk_use_in_call_view())
|
||||
g_timeout_add(250,(GSourceFunc)in_call_timer,NULL);
|
||||
|
|
@ -1062,7 +1060,6 @@ static void linphone_gtk_configure_main_window(){
|
|||
if (stop_call_icon){
|
||||
GdkPixbuf *pbuf=create_pixbuf(stop_call_icon);
|
||||
gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"terminate_call_icon")),pbuf);
|
||||
gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"in_call_terminate_icon")),pbuf);
|
||||
g_object_unref(G_OBJECT(pbuf));
|
||||
}
|
||||
if (search_icon){
|
||||
|
|
@ -1096,6 +1093,8 @@ void linphone_gtk_manage_login(void){
|
|||
}
|
||||
|
||||
static void linphone_gtk_init_main_window(){
|
||||
GtkWidget *main_window;
|
||||
|
||||
linphone_gtk_configure_main_window();
|
||||
linphone_gtk_manage_login();
|
||||
load_uri_history();
|
||||
|
|
@ -1104,10 +1103,14 @@ static void linphone_gtk_init_main_window(){
|
|||
linphone_gtk_show_friends();
|
||||
linphone_gtk_connect_digits();
|
||||
linphone_gtk_check_menu_items();
|
||||
linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),
|
||||
main_window=linphone_gtk_get_main_window();
|
||||
linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,
|
||||
"main_mute")),FALSE);
|
||||
linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),
|
||||
linphone_gtk_enable_mute_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,
|
||||
"incall_mute")),FALSE);
|
||||
if (!linphone_gtk_use_in_call_view()) {
|
||||
gtk_widget_show(linphone_gtk_get_widget(main_window, "main_mute"));
|
||||
}
|
||||
if (linphone_core_in_call(linphone_gtk_get_core())) linphone_gtk_call_started(
|
||||
linphone_gtk_get_main_window());/*hide the call button, show terminate button*/
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1 +1 @@
|
|||
Subproject commit 2e18cdfe53230763907f3f9b55adeb4c16d396a7
|
||||
Subproject commit 5bcbcae29d9cf6d22b4f6880489eafa98e100008
|
||||
Loading…
Add table
Reference in a new issue