Commit f92321b0 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix gtk bugs

parent 81577a29
......@@ -47,8 +47,21 @@ static void do_login(SipSetupContext *ssctx, const char *identity, const char *
static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
LinphoneAddress *addr;
const char *username;
char *tmp;
if (ssctx==NULL) return TRUE;/*not ready ?*/
do_login(ssctx,linphone_proxy_config_get_identity(cfg),NULL);
username=linphone_gtk_get_ui_config ("login_username",NULL);
if (username==NULL) {
linphone_gtk_set_ui_config_int("automatic_login",0);
linphone_gtk_show_login_frame(cfg);
return FALSE;
}
addr=linphone_address_new(linphone_proxy_config_get_identity(cfg));
linphone_address_set_username(addr,username);
tmp=linphone_address_as_string (addr);
do_login(ssctx,tmp,NULL);
linphone_address_destroy(addr);
return FALSE;
}
......
......@@ -94,7 +94,7 @@ static GOptionEntry linphone_options[]={
.description = N_("if set automatically answer incoming calls")
},
#ifdef WIN32
{ /* zsd addition */
{
.long_name = "workdir",
.short_name = '\0',
.arg = G_OPTION_ARG_STRING,
......@@ -1234,7 +1234,7 @@ void linphone_gtk_manage_login(void){
}
void linphone_gtk_close(GtkWidget *mw){
gboolean linphone_gtk_close(GtkWidget *mw){
/*shutdown calls if any*/
LinphoneCore *lc=linphone_gtk_get_core();
if (linphone_core_in_call(lc)){
......@@ -1242,6 +1242,7 @@ void linphone_gtk_close(GtkWidget *mw){
}
linphone_core_enable_video_preview(lc,FALSE);
gtk_widget_hide(mw);
return TRUE;
}
static void linphone_gtk_init_main_window(){
......
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