Commit 55c25fac authored by François Grisez's avatar François Grisez

Describes the login frame in a separated UI file

parent aad1cc07
[Dolphin]
Timestamp=2015,8,9,21,25,40
Version=3
ViewMode=2
......@@ -39,10 +39,11 @@ set(UI_FILES
sip_account.ui
tunnel_config.ui
waiting.ui
chat_view.ui
in_call_view.ui
conf_view.ui
conf_callee_view.ui
chatroom_frame.ui
in_call_frame.ui
conf_frame.ui
callee_frame.ui
login_frame.ui
)
set(PIXMAPS stock_people.png)
......
......@@ -16,10 +16,11 @@ UI_FILES= about.ui \
config-uri.ui \
provisioning-fetch.ui \
audio_assistant.ui \
chat_view.ui \
in_call_view.ui \
conf_view.ui \
conf_callee_view.ui
chatroom_frame.ui \
in_call_frame.ui \
conf_frame.ui \
callee_frame.ui \
login_frame.ui
PIXMAPS= \
stock_people.png
......
......@@ -2,90 +2,83 @@
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="dummy_conf_window">
<object class="GtkFrame" id="callee_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkFrame" id="conf_frame">
<object class="GtkAlignment" id="alignment_conf">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="conf_box">
<object class="GtkAlignment" id="conf_alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkHButtonBox" id="button_conf">
<object class="GtkHBox" id="conf_hbox3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="terminate_conf">
<property name="label" translatable="yes">End conference</property>
<object class="GtkHBox" id="conf_hbox1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="conference_control">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="conf_record_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="conf_record_button">
<property name="label">gtk-media-record</property>
<object class="GtkLabel" id="callee_name_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Callee name&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="justify">right</property>
<property name="ellipsize">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="conf_record_status">
<object class="GtkProgressBar" id="sound_indicator">
<property name="width_request">90</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</interface>
......@@ -481,7 +481,7 @@ static gboolean copy_uri_into_clipboard_handler(GtkMenuItem *menuitem, gpointer
}
GtkWidget* linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with){
GtkWidget *chat_view=linphone_gtk_create_widget("chat_view","chatroom_frame");
GtkWidget *chat_view=linphone_gtk_create_widget("chatroom_frame");
GtkWidget *main_window=linphone_gtk_get_main_window();
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
GtkWidget *text=linphone_gtk_get_widget(chat_view,"textview");
......
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.18"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="dummy_chat_window">
<property name="can_focus">False</property>
<child>
<object class="GtkFrame" id="chatroom_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkTextView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">4</property>
<property name="editable">False</property>
<property name="wrap_mode">word-char</property>
<property name="cursor_visible">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkEntry" id="text_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="send">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImage" id="send_picture">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-ok</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Send</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">7</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<requires lib="gtk+" version="2.18"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkWindow" id="dummy_callee_frame">
<object class="GtkFrame" id="chatroom_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkFrame" id="callee_frame">
<object class="GtkVBox" id="vbox4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment_conf">
<object class="GtkScrolledWindow" id="scrolledwindow3">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkTextView" id="textview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">4</property>
<property name="editable">False</property>
<property name="wrap_mode">word-char</property>
<property name="cursor_visible">False</property>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox10">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkAlignment" id="conf_alignment1">
<object class="GtkEntry" id="text_entry">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
<property name="invisible_char_set">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="send">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<child>
<object class="GtkHBox" id="conf_hbox3">
<object class="GtkHBox" id="hbox11">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHBox" id="conf_hbox1">
<object class="GtkImage" id="send_picture">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="conference_control">
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<property name="stock">gtk-ok</property>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="callee_name_label">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Callee name&lt;/b&gt;</property>
<property name="use_markup">True</property>
<property name="justify">right</property>
<property name="ellipsize">end</property>
<property name="label" translatable="yes">Send</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">7</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkProgressBar" id="sound_indicator">
<property name="width_request">90</property>
<property name="height_request">30</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
</interface>
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkFrame" id="conf_frame">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkVBox" id="conf_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkHButtonBox" id="button_conf">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkButton" id="terminate_conf">
<property name="label" translatable="yes">End conference</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="conf_record_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToggleButton" id="conf_record_button">
<property name="label">gtk-media-record</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<signal name="toggled" handler="linphone_gtk_record_call_toggled" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="conf_record_status">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="wrap">True</property>
<property name="wrap_mode">char</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
</interface>
......@@ -81,7 +81,7 @@ static GtkWidget *find_conferencee_from_call(LinphoneCall *call){
static GtkWidget * create_conference_panel(void){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *conf_frame=linphone_gtk_create_widget("conf_view","conf_frame");
GtkWidget *conf_frame=linphone_gtk_create_widget("conf_frame");
GtkWidget *conf_box=linphone_gtk_get_widget(conf_frame,"conf_box");
GtkWidget *button_conf=linphone_gtk_get_widget(conf_frame,"terminate_conf");
GtkWidget *image=create_pixmap("stopcall-small.png");
......@@ -94,7 +94,7 @@ static GtkWidget * create_conference_panel(void){
g_object_set_data(G_OBJECT(mw),"conf_frame",(gpointer)conf_frame);
box=gtk_vbox_new(FALSE,0);
participant=linphone_gtk_create_widget("conf_callee_view","callee_frame");
participant=linphone_gtk_create_widget("callee_frame");
gtk_widget_show(participant);
gtk_box_set_homogeneous(GTK_BOX(box),TRUE);
init_local_participant(participant);
......@@ -126,7 +126,7 @@ void linphone_gtk_set_in_conference(LinphoneCall *call){
const LinphoneAddress *addr=linphone_call_get_remote_address(call);
gchar *markup;
participant=linphone_gtk_create_widget("conf_callee_view","callee_frame");
participant=linphone_gtk_create_widget("callee_frame");
gtk_widget_show(participant);
if (linphone_address_get_display_name(addr)!=NULL){
markup=g_strdup_printf("<b>%s</b>",linphone_address_get_display_name(addr));
......
......@@ -361,7 +361,7 @@ void linphone_gtk_enable_video_button(LinphoneCall *call, gboolean sensitive, gb
}
void linphone_gtk_create_in_call_view(LinphoneCall *call){
GtkWidget *call_view=linphone_gtk_create_widget("in_call_view","in_call_frame");
GtkWidget *call_view=linphone_gtk_create_widget("in_call_frame");
GtkWidget *main_window=linphone_gtk_get_main_window ();
GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
static int call_index=1;
......
......@@ -98,7 +98,7 @@ GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint
LINPHONE_PUBLIC void linphone_gtk_destroy_window(GtkWidget *window);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_window(const char *window_name, GtkWidget *parent);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name);
LINPHONE_PUBLIC GtkWidget *linphone_gtk_create_widget(const char* widget_name);
const char *linphone_gtk_message_storage_get_db_file(const char *filename);
LINPHONE_PUBLIC void linphone_gtk_show_assistant(GtkWidget* parent);
......@@ -212,7 +212,7 @@ LINPHONE_PUBLIC void linphone_gtk_in_call_show_video(LinphoneCall *call);
LINPHONE_PUBLIC char *linphone_gtk_address(const LinphoneAddress *addr);/*return human readable identifier for a LinphoneAddress */
LINPHONE_PUBLIC GtkWidget *linphone_gtk_get_camera_preview_window(void);
LINPHONE_PUBLIC void linphone_gtk_login_frame_connect_clicked(GtkWidget *button);
LINPHONE_PUBLIC void linphone_gtk_login_frame_connect_clicked(GtkWidget *button, GtkWidget *login_frame);
LINPHONE_PUBLIC gboolean linphone_gtk_call_log_reset_missed_call(GtkWidget *w, GdkEvent *event, gpointer user_data);
LINPHONE_PUBLIC void linphone_gtk_history_row_activated(GtkWidget *treeview);
......
This diff is collapsed.
......@@ -48,47 +48,35 @@ static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
return FALSE;
}
void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_auto_login){
GtkWidget *mw=linphone_gtk_get_main_window();
GtkWidget *label=linphone_gtk_get_widget(mw,"login_label");
const LinphoneAuthInfo *ai;
static void linphone_gtk_init_login_frame(GtkWidget *login_frame, LinphoneProxyConfig *cfg) {
gboolean auto_login=linphone_gtk_get_ui_config_int("automatic_login",0);
const char *login_image=linphone_gtk_get_ui_config("login_image","linphone-banner.png");
GtkWidget *label=linphone_gtk_get_widget(login_frame,"login_label");
LinphoneCore *lc=linphone_gtk_get_core();
gchar *str;
LinphoneAddress *from;
LinphoneCore *lc=linphone_gtk_get_core();
const LinphoneAuthInfo *ai;
const char *passwd=NULL;
const char *userid=NULL;
gboolean auto_login=linphone_gtk_get_ui_config_int("automatic_login",0);
if (auto_login && !disable_auto_login){
g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg);
return;
}
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")),auto_login);
{
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")),
pbuf);
g_object_unref(G_OBJECT(pbuf));
}
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(login_frame, "automatic_login")),auto_login);
if (login_image){
GdkPixbuf *pbuf=create_pixbuf (login_image);
gtk_image_set_from_pixbuf (GTK_IMAGE(linphone_gtk_get_widget(login_frame, "login_image")), pbuf);
g_object_unref(G_OBJECT(pbuf));
}
gtk_widget_hide(linphone_gtk_get_widget(mw,"disconnect_item"));
gtk_widget_hide(linphone_gtk_get_widget(mw,"main_frame"));
gtk_widget_show(linphone_gtk_get_widget(mw,"login_frame"));
if (linphone_gtk_get_ui_config_int("login_needs_userid",FALSE)){
gtk_widget_show(linphone_gtk_get_widget(mw,"userid"));
gtk_widget_show(linphone_gtk_get_widget(mw,"login_userid"));
gtk_widget_show(linphone_gtk_get_widget(login_frame,"userid"));
gtk_widget_show(linphone_gtk_get_widget(login_frame,"login_userid"));
}
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"options_menu"),FALSE);
str=g_strdup_printf(_("Please enter login information for %s"),linphone_proxy_config_get_domain(cfg));
gtk_label_set_text(GTK_LABEL(label),str);
g_object_set_data(G_OBJECT(mw),"login_proxy_config",cfg);
g_object_set_data(G_OBJECT(login_frame),"login_proxy_config",cfg);
g_free(str);
from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
if (linphone_address_get_username(from)[0]=='?'){
const char *username=linphone_gtk_get_ui_config ("login_username",NULL);
......@@ -99,24 +87,55 @@ void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_au
ai=linphone_core_find_auth_info(lc,linphone_proxy_config_get_domain(cfg),linphone_address_get_username(from),NULL);
/*display the last entered username, if not '?????'*/
if (linphone_address_get_username(from)[0]!='?')
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")),
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_username")),
linphone_address_get_username(from));
if (ai) {
passwd=linphone_auth_info_get_passwd(ai);
userid=linphone_auth_info_get_userid(ai);
}
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")),
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_password")),
passwd!=NULL ? passwd : "");
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_userid")),
gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(login_frame,"login_userid")),
userid ? userid : "");
linphone_address_destroy(from);
}
void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg, gboolean disable_auto_login){
GtkWidget *mw=linphone_gtk_get_main_window();
gboolean auto_login=linphone_gtk_get_ui_config_int("automatic_login",0);
GtkWidget *main_frame = linphone_gtk_get_widget(mw, "main_frame");
GtkWidget *main_layout = linphone_gtk_get_widget(mw, "main_layout");
GtkWidget *login_frame;
if (auto_login && !disable_auto_login){
g_timeout_add(250,(GSourceFunc)do_login_noprompt,cfg);
return;
}
login_frame = linphone_gtk_create_widget("login_frame");
linphone_gtk_init_login_frame(login_frame, cfg);
g_object_set_data_full(G_OBJECT(mw), "main_frame", g_object_ref(main_frame), g_object_unref);
g_object_set_data(G_OBJECT(mw), "login_frame", login_frame);
gtk_container_remove(GTK_CONTAINER(main_layout), main_frame);
gtk_box_pack_start(GTK_BOX(main_layout), login_frame, TRUE, TRUE, 0);
gtk_widget_show(login_frame);
gtk_widget_hide(linphone_gtk_get_widget(mw,"disconnect_item"));
gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"options_menu"),FALSE);
}
void linphone_gtk_exit_login_frame(void){
GtkWidget *mw=linphone_gtk_get_main_window();
gtk_widget_show(linphone_gtk_get_widget(mw,"main_frame"));
gtk_widget_hide(linphone_gtk_get_widget(mw,"login_frame"));
GtkWidget *main_layout = linphone_gtk_get_widget(mw, "main_layout");
GtkWidget *main_frame = GTK_WIDGET(g_object_get_data(G_OBJECT(mw), "main_frame"));
GtkWidget *login_frame = GTK_WIDGET(g_object_get_data(G_OBJECT(mw), "login_frame"));
gtk_container_remove(GTK_CONTAINER(main_layout), login_frame);
gtk_box_pack_start(GTK_BOX(main_layout), main_frame, TRUE, TRUE, 0);
g_object_set_data(G_OBJECT(mw), "login_frame", NULL);
g_object_set_data(G_OBJECT(mw), "main_frame", NULL);