mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
fix bug in gtk UI when changing provisioning uri two times.
clean network-type in login window, which is not so useful.
This commit is contained in:
parent
0f31299139
commit
03b14b5123
4 changed files with 8 additions and 29 deletions
|
|
@ -23,10 +23,6 @@ void linphone_gtk_login_frame_connect_clicked(GtkWidget *button);
|
|||
void test_button_clicked_cb(GtkWidget *button);
|
||||
void linphone_gtk_exit_login_frame(void);
|
||||
|
||||
enum {
|
||||
NetworkKindAdsl,
|
||||
NetworkKindOpticalFiber
|
||||
};
|
||||
|
||||
static void do_login(SipSetupContext *ssctx, const char *identity, const char * passwd){
|
||||
if (sip_setup_context_login_account(ssctx,identity,passwd)==0){
|
||||
|
|
@ -61,24 +57,16 @@ void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg){
|
|||
gchar *str;
|
||||
LinphoneAddress *from;
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
int nettype;
|
||||
const char *passwd=NULL;
|
||||
|
||||
|
||||
if (linphone_core_get_download_bandwidth(lc)==512 &&
|
||||
linphone_core_get_upload_bandwidth(lc)==512)
|
||||
nettype=NetworkKindOpticalFiber;
|
||||
else nettype=NetworkKindAdsl;
|
||||
gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"login_internet_kind")),nettype);
|
||||
//gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(mw,"internet_kind")),nettype);
|
||||
|
||||
if (linphone_gtk_get_ui_config_int("automatic_login",0) ){
|
||||
g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg);
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
const char *login_image=linphone_gtk_get_ui_config("login_image",NULL);
|
||||
const char *login_image=linphone_gtk_get_ui_config("login_image","linphone-banner.png");
|
||||
if (login_image){
|
||||
GdkPixbuf *pbuf=create_pixbuf (login_image);
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE(linphone_gtk_get_widget(mw,"login_image")),
|
||||
|
|
@ -166,15 +154,3 @@ void linphone_gtk_login_frame_connect_clicked(GtkWidget *button){
|
|||
/*we need to refresh the identities since the proxy config may have changed.*/
|
||||
linphone_gtk_load_identities();
|
||||
}
|
||||
|
||||
void linphone_gtk_internet_kind_changed(GtkWidget *combo){
|
||||
int netkind_id=gtk_combo_box_get_active(GTK_COMBO_BOX(combo));
|
||||
LinphoneCore *lc=linphone_gtk_get_core();
|
||||
if (netkind_id==NetworkKindAdsl){
|
||||
linphone_core_set_upload_bandwidth(lc,256);
|
||||
linphone_core_set_download_bandwidth(lc,512);
|
||||
}else if (netkind_id==NetworkKindOpticalFiber){
|
||||
linphone_core_set_upload_bandwidth(lc,512);
|
||||
linphone_core_set_download_bandwidth(lc,512);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ static gint main_window_x=0;
|
|||
static gint main_window_y=0;
|
||||
#endif
|
||||
static gboolean verbose=0;
|
||||
static gboolean quit_done=FALSE;
|
||||
static gboolean auto_answer = 0;
|
||||
static gchar * addr_to_call = NULL;
|
||||
static gboolean no_video=FALSE;
|
||||
|
|
@ -2085,11 +2086,12 @@ static void linphone_gtk_quit_core(void){
|
|||
}
|
||||
|
||||
static void linphone_gtk_quit(void){
|
||||
static gboolean quit_done=FALSE;
|
||||
if (!quit_done){
|
||||
quit_done=TRUE;
|
||||
linphone_gtk_quit_core();
|
||||
linphone_gtk_uninit_instance();
|
||||
g_object_unref(icon);
|
||||
icon=NULL;
|
||||
#ifdef HAVE_NOTIFY
|
||||
notify_uninit();
|
||||
#endif
|
||||
|
|
@ -2291,12 +2293,13 @@ core_start:
|
|||
linphone_gtk_quit();
|
||||
|
||||
if (restart){
|
||||
quit_done=FALSE;
|
||||
restart=FALSE;
|
||||
goto core_start;
|
||||
}
|
||||
#ifndef HAVE_GTK_OSX
|
||||
/*workaround a bug on win32 that makes status icon still present in the systray even after program exit.*/
|
||||
gtk_status_icon_set_visible(icon,FALSE);
|
||||
if (icon) gtk_status_icon_set_visible(icon,FALSE);
|
||||
#endif
|
||||
free(progpath);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1656,7 +1656,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label13">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Internet connection:</property>
|
||||
</object>
|
||||
|
|
@ -1700,7 +1699,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="login_internet_kind">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="model">model4</property>
|
||||
<property name="active">0</property>
|
||||
|
|
|
|||
|
|
@ -65,7 +65,9 @@ static void linphone_gtk_init_pipe(const char *name){
|
|||
server_pipe=ortp_server_pipe_create(name);
|
||||
if (server_pipe==(ortp_pipe_t)-1){
|
||||
g_warning("Fail to create server pipe for name %s: %s",name,strerror(errno));
|
||||
return;
|
||||
}
|
||||
server_pipe_running=TRUE;
|
||||
ms_thread_create(&pipe_thread,NULL,server_pipe_thread,NULL);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue