]> sjero.net Git - linphone/commitdiff
strip out glade (use GtkBuilder instead)
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 6 Sep 2010 12:45:48 +0000 (14:45 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 6 Sep 2010 12:45:48 +0000 (14:45 +0200)
73 files changed:
Makefile.am
configure.in
gtk-glade/.gitignore [deleted file]
gtk-glade/Makefile.am [deleted file]
gtk-glade/about.glade [deleted file]
gtk-glade/buddylookup.c [deleted file]
gtk-glade/buddylookup.glade [deleted file]
gtk-glade/call_logs.glade [deleted file]
gtk-glade/calllogs.c [deleted file]
gtk-glade/chat.c [deleted file]
gtk-glade/chatroom.glade [deleted file]
gtk-glade/contact.glade [deleted file]
gtk-glade/fonis.c [deleted file]
gtk-glade/friendlist.c [deleted file]
gtk-glade/gtkrc [deleted file]
gtk-glade/incall_view.c [deleted file]
gtk-glade/incoming_call.glade [deleted file]
gtk-glade/linphone.h [deleted file]
gtk-glade/linphone.ico [deleted file]
gtk-glade/linphone.iss [deleted file]
gtk-glade/linphone.rc [deleted file]
gtk-glade/log.glade [deleted file]
gtk-glade/logging.c [deleted file]
gtk-glade/loginframe.c [deleted file]
gtk-glade/main.c [deleted file]
gtk-glade/main.glade [deleted file]
gtk-glade/p2pwizard.glade [deleted file]
gtk-glade/parameters.glade [deleted file]
gtk-glade/password.glade [deleted file]
gtk-glade/propertybox.c [deleted file]
gtk-glade/setupwizard.c [deleted file]
gtk-glade/sip_account.glade [deleted file]
gtk-glade/stock_people.png [deleted file]
gtk-glade/support.c [deleted file]
gtk-glade/update.c [deleted file]
gtk-glade/utils.c [deleted file]
gtk-glade/waiting.glade [deleted file]
gtk/.gitignore [new file with mode: 0644]
gtk/Makefile.am [new file with mode: 0644]
gtk/about.ui [new file with mode: 0644]
gtk/buddylookup.c [new file with mode: 0644]
gtk/buddylookup.ui [new file with mode: 0644]
gtk/call_logs.ui [new file with mode: 0644]
gtk/calllogs.c [new file with mode: 0644]
gtk/chat.c [new file with mode: 0644]
gtk/chatroom.ui [new file with mode: 0644]
gtk/contact.ui [new file with mode: 0644]
gtk/fonis.c [new file with mode: 0644]
gtk/friendlist.c [new file with mode: 0644]
gtk/gtkrc [new file with mode: 0644]
gtk/incall_view.c [new file with mode: 0644]
gtk/incoming_call.ui [new file with mode: 0644]
gtk/linphone.h [new file with mode: 0644]
gtk/linphone.ico [new file with mode: 0755]
gtk/linphone.iss [new file with mode: 0755]
gtk/linphone.rc [new file with mode: 0755]
gtk/log.ui [new file with mode: 0644]
gtk/logging.c [new file with mode: 0644]
gtk/loginframe.c [new file with mode: 0644]
gtk/main.c [new file with mode: 0644]
gtk/main.ui [new file with mode: 0644]
gtk/p2pwizard.ui [new file with mode: 0644]
gtk/parameters.ui [new file with mode: 0644]
gtk/password.ui [new file with mode: 0644]
gtk/propertybox.c [new file with mode: 0644]
gtk/setupwizard.c [new file with mode: 0644]
gtk/sip_account.ui [new file with mode: 0644]
gtk/stock_people.png [new file with mode: 0644]
gtk/support.c [new file with mode: 0644]
gtk/update.c [new file with mode: 0755]
gtk/utils.c [new file with mode: 0644]
gtk/waiting.ui [new file with mode: 0644]
po/POTFILES.in

index 37abf47a9f9abb46f0fbe48a940b2651a013e256..458ddbe80b38bd4cec5932c4436100417541f503 100644 (file)
@@ -10,7 +10,7 @@ ORTP_DIR = oRTP
 endif
 
 SUBDIRS = m4 pixmaps po $(ORTP_DIR) mediastreamer2\
-               coreapi console gtk-glade share scripts
+               coreapi console gtk share scripts
 
 
 
@@ -125,7 +125,7 @@ zip:
 #add gtk dlls and files
        make gtk-cherrypick
        make other-cherrypick
-       cp -f $(top_srcdir)/gtk-glade/gtkrc $(INSTALLDIR_WITH_PREFIX)/.
+       cp -f $(top_srcdir)/gtk/gtkrc $(INSTALLDIR_WITH_PREFIX)/.
        cp -f $(top_srcdir)/README $(INSTALLDIR_WITH_PREFIX)/.
        cp -f $(top_srcdir)/COPYING $(INSTALLDIR_WITH_PREFIX)/.
        cd $(INSTALLDIR_WITH_PREFIX) && zip -r $(ZIPFILE) *
@@ -162,7 +162,7 @@ setup.exe: filelist
        rm -f $(INSTALLDIR_WITH_PREFIX)/$(ISS_SCRIPT)
 
 newdate:
-       cd gtk-glade && $(MAKE) newdate
+       cd gtk && $(MAKE) newdate
 
 
 Portfile:      $(top_srcdir)/scripts/Portfile.tmpl dist
index cda24af910c293d9ae752986b1fe4d0a5dedaac2..c67f47ec818841db9e33f7bfa23d642bc2e04167 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 
-AC_INIT([linphone],[3.3.99.1],[linphone-developers@nongnu.org])
+AC_INIT([linphone],[3.3.99.2],[linphone-developers@nongnu.org])
 AC_CANONICAL_SYSTEM
 
 dnl Source packaging numbers
@@ -135,11 +135,8 @@ AC_ARG_ENABLE(gtk_ui,
 
 if test "$gtk_ui" = "true" ; then
        PKG_CHECK_MODULES(LIBGTK, gtk+-2.0 >= 2.4.0 gthread-2.0)
-       PKG_CHECK_MODULES(LIBGLADE, libglade-2.0 >= 2.4.0)
        AC_SUBST(LIBGTK_CFLAGS)
        AC_SUBST(LIBGTK_LIBS)
-       AC_SUBST(LIBGLADE_CFLAGS)
-       AC_SUBST(LIBGLADE_LIBS)
 else
        echo "GTK interface compilation is disabled."
 fi
@@ -329,8 +326,8 @@ dnl build console if required
 AM_CONDITIONAL(BUILD_CONSOLE, test x$console_ui = xtrue)
 dnl special things for arm-linux cross compilation toolchain
 AM_CONDITIONAL(ARMBUILD, test x$use_arm_toolchain = xyes)
-dnl compilation of gtk-glade user interface
-AM_CONDITIONAL(BUILD_GLADE_UI, [test x$gtk_ui = xtrue ] )
+dnl compilation of gtk user interface
+AM_CONDITIONAL(BUILD_GTK_UI, [test x$gtk_ui = xtrue ] )
 AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes )
 
 dnl check getenv
@@ -438,7 +435,7 @@ coreapi/Makefile
 coreapi/help/Makefile
 coreapi/help/Doxyfile
 coreapi/help/doxygen.dox
-gtk-glade/Makefile
+gtk/Makefile
 console/Makefile
 share/Makefile
 share/C/Makefile
diff --git a/gtk-glade/.gitignore b/gtk-glade/.gitignore
deleted file mode 100644 (file)
index 398d60f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-linphone-3
-.libs
-.deps
-linphone.res
-
diff --git a/gtk-glade/Makefile.am b/gtk-glade/Makefile.am
deleted file mode 100644 (file)
index f2086d8..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-GLADE_FILES=   about.glade \
-               main.glade \
-               password.glade \
-               contact.glade \
-               incoming_call.glade \
-               parameters.glade \
-               sip_account.glade \
-               chatroom.glade \
-               call_logs.glade \
-               log.glade \
-               buddylookup.glade \
-               waiting.glade
-
-PIXMAPS=       \
-               stock_people.png 
-
-LINPHONE_ICO_RC_FILE=linphone.rc
-LINPHONE_ICO_FILE=linphone.ico
-
-EXTRA_DIST=    $(PIXMAPS) \
-               $(GLADE_FILES) \
-               linphone.iss \
-               $(LINPHONE_ICO_RC_FILE) \
-               $(LINPHONE_ICO_FILE)
-
-
-if BUILD_GLADE_UI
-
-BUILT_SOURCES=version_date.h
-
-bin_PROGRAMS=linphone-3
-
-linphone_3_SOURCES=    \
-                       main.c \
-                       propertybox.c \
-                       friendlist.c \
-                       support.c \
-                       chat.c \
-                       calllogs.c \
-                       logging.c \
-                       update.c \
-                       buddylookup.c \
-                       utils.c \
-                       setupwizard.c\
-                       incall_view.c \
-                       loginframe.c \
-                       linphone.h 
-
-linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \
-               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
-               $(top_builddir)/coreapi/liblinphone.la \
-                       $(LIBGTK_LIBS) $(INTLLIBS) \
-                       $(LIBGLADE_LIBS)
-
-
-if BUILD_WIN32
-
-linphone.res:  $(LINPHONE_ICO_RC_FILE) $(LINPHONE_ICO_FILE)
-       windres $(LINPHONE_ICO_RC_FILE) -O coff -o linphone.res
-
-linphone_3_LDADD+=linphone.res -lwininet
-linphone_3_LDFLAGS=-Wl,--export-all-symbols -mwindows
-else
-linphone_3_LDFLAGS=-export-dynamic
-endif
-
-gladedir=$(datadir)/linphone
-glade_DATA=$(GLADE_FILES) $(PIXMAPS) $(top_srcdir)/COPYING
-
-#all-local:    gtk-linphone.ui 
-
-#gtk-linphone.ui:      gtk-linphone.glade
-#      gtk-builder-convert gtk-linphone.glade $@
-
-endif
-
-
-AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ \
-               -I$(top_srcdir)/mediastreamer2/include/ \
-               $(ORTP_CFLAGS) \
-               $(LIBGLADE_CFLAGS) $(STRICT_OPTIONS) $(LIBGTK_CFLAGS) $(IPV6_CFLAGS) \
-               $(OSIP_CFLAGS) 
-
-
-version_date.h: $(top_srcdir)/configure.in
-       echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
-
-newdate:
-       rm -f version_date.h
-
-CLEANFILES=version_date.h linphone.res
-
diff --git a/gtk-glade/about.glade b/gtk-glade/about.glade
deleted file mode 100644 (file)
index e4ee4d2..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.12 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkAboutDialog" id="about">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">About linphone</property>
-    <property name="resizable">False</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <property name="program_name">Linphone</property>
-    <property name="version">undef</property>
-    <property name="copyright" translatable="yes">Created by Simon Morlat
-</property>
-    <property name="comments" translatable="yes">An internet video phone using the standard SIP (rfc3261) protocol.</property>
-    <property name="website">http://www.linphone.org</property>
-    <property name="license">GPL</property>
-    <property name="authors">Simon Morlat</property>
-    <property name="documenters"></property>
-    <property name="translator_credits" translatable="yes">fr: Simon Morlat
-en: Simon Morlat and Delphine Perreau
-it: Alberto Zanoni &lt;alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it&gt;
-de: Jean-Jacques Sarton &lt;jj.sarton@-NO-SPAM-PLEASE-t-online.de&gt;
-sv: Daniel Nylander &lt;po@danielnylander.se&gt;
-es: Jesus Benitez &lt;gnelson at inMail dot sk&gt;
-ja: YAMAGUCHI YOSHIYA &lt;yushiya@anet.ne.jp&gt;
-pt_BR: Rafael Caesar Lenzi &lt;rc_lenzi@yahoo.com.br&gt;
-pl: Robert Nasiadek &lt;darkone@darkone.pl&gt;
-cs: Petr Pisar &lt;petr.pisar@atlas.cz&gt;
-hu: anonymous
-</property>
-    <property name="artists">Icons by kerosine.fr</property>
-    <signal name="response" handler="linphone_gtk_about_response"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox8">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child>
-          <placeholder/>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area7">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/buddylookup.c b/gtk-glade/buddylookup.c
deleted file mode 100644 (file)
index 55c3f33..0000000
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-#include "sipsetup.h"
-
-static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results);
-
-enum {
-       LOOKUP_RESULT_NAME,
-       LOOKUP_RESULT_SIP_URI,
-       LOOKUP_RESULT_ADDRESS,
-       LOOKUP_RESULT_ICON,
-       LOOKUP_RESULT_NCOL
-};
-
-void linphone_gtk_buddy_lookup_window_destroyed(GtkWidget *w){
-       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-       tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"buddylookup_processing"));
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-}
-
-static void enable_add_buddy_button(GtkWidget *w){
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),TRUE);
-}
-
-static void disable_add_buddy_button(GtkWidget *w){
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),FALSE);
-}
-
-static void buddy_selection_changed(GtkWidget *w){
-       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       enable_add_buddy_button(w);
-       
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(results));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               GtkTreePath *path=gtk_tree_model_get_path(model,&iter);
-               gtk_tree_view_collapse_all(GTK_TREE_VIEW(results));
-               gtk_tree_view_expand_row(GTK_TREE_VIEW(results),path,FALSE);
-               gtk_tree_path_free(path);
-       }
-}
-
-GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx){
-       GtkTreeStore *store;
-       GtkCellRenderer *renderer,*pbuf_renderer;
-       GtkTreeViewColumn *column;
-       GtkTreeSelection *select;
-       GtkWidget *w=linphone_gtk_create_window("buddylookup");
-       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
-       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
-       
-       store = gtk_tree_store_new(LOOKUP_RESULT_NCOL, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF);
-       
-       /*gtk_tree_view_set_hover_expand(GTK_TREE_VIEW(results),TRUE);*/
-       gtk_tree_view_set_model(GTK_TREE_VIEW(results),GTK_TREE_MODEL(store));
-       g_object_unref(G_OBJECT(store));
-
-       renderer = gtk_cell_renderer_text_new ();
-       column = gtk_tree_view_column_new_with_attributes (_("Firstname, Lastname"),
-                                                   renderer,
-                                                   "markup", LOOKUP_RESULT_NAME,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       
-
-       pbuf_renderer=gtk_cell_renderer_pixbuf_new();
-       g_object_set(G_OBJECT(renderer),"is-expander",TRUE,NULL);
-       gtk_tree_view_column_pack_start(column,pbuf_renderer,FALSE);
-       gtk_tree_view_column_add_attribute  (column,pbuf_renderer,
-                                                         "pixbuf",
-                                                         LOOKUP_RESULT_ICON);
-       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
-       
-/*
-       column = gtk_tree_view_column_new_with_attributes (_("SIP address"),
-                                                   renderer,
-                                                   "text", LOOKUP_RESULT_SIP_URI,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
-*/
-
-       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (results));
-       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-       g_signal_connect_swapped(G_OBJECT(select),"changed",(GCallback)buddy_selection_changed,w);
-/*
-#if GTK_CHECK_VERSION(2,12,0)
-       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(results),LOOKUP_RESULT_ADDRESS);
-#endif
-*/
-       g_object_set_data(G_OBJECT(w),"SipSetupContext",ctx);
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_buddy_lookup_window_destroyed,w);
-       //g_signal_connect_swapped(G_OBJECT(w),"destroy",(GCallback)linphone_gtk_buddy_lookup_window_destroyed,w);
-       gtk_progress_bar_set_fraction(pb,0);
-       gtk_progress_bar_set_text(pb,NULL);
-       gtk_dialog_add_button(GTK_DIALOG(w),GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE);
-       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(-1));
-
-       gtk_widget_show(w);
-       return w;
-}
-
-
-void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw){
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")),kw);
-}
-
-static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){
-       BuddyLookupStatus bls;
-       SipSetupContext *ctx;
-       int last_state;
-       gchar *tmp;
-       MSList *results=NULL;
-       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
-       BuddyLookupRequest *req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
-
-       ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext"); 
-       last_state=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"last_state"));
-
-       if (req==NULL) {
-               g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(0));
-               return FALSE;
-       }
-       bls=req->status;
-       if (last_state==bls) return TRUE;
-       
-       switch(bls){
-               case BuddyLookupNone:
-                       gtk_progress_bar_set_fraction(pb,0);
-                       gtk_progress_bar_set_text(pb,NULL);
-                       break;
-               case BuddyLookupFailure:
-                       gtk_progress_bar_set_fraction(pb,0);
-                       gtk_progress_bar_set_text(pb,_("Error communicating with server."));
-                       break;
-               case BuddyLookupConnecting:
-                       gtk_progress_bar_set_fraction(pb,0.2);
-                       gtk_progress_bar_set_text(pb,_("Connecting..."));
-                       break;
-               case BuddyLookupConnected:
-                       gtk_progress_bar_set_fraction(pb,0.4);
-                       gtk_progress_bar_set_text(pb,_("Connected"));
-                       break;
-               case BuddyLookupReceivingResponse:
-                       gtk_progress_bar_set_fraction(pb,0.8);
-                       gtk_progress_bar_set_text(pb,_("Receiving data..."));
-                       break;
-               case BuddyLookupDone:
-                       results=req->results;
-                       linphone_gtk_display_lookup_results(
-                                       linphone_gtk_get_widget(w,"search_results"),
-                                       results);
-                       gtk_progress_bar_set_fraction(pb,1);
-                       tmp=g_strdup_printf(ngettext("Found %i contact",
-                        "Found %i contacts", ms_list_size(results)),
-                    ms_list_size(results));
-                       gtk_progress_bar_set_text(pb,tmp);
-                       g_free(tmp);
-                       sip_setup_context_buddy_lookup_free(ctx,req);
-                       g_object_set_data(G_OBJECT(w),"buddylookup_request",NULL);
-                       break;
-       }
-       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(bls));
-       return TRUE;
-}
-
-static gboolean keyword_typing_finished(GtkWidget *w){
-       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
-       const char *keyword;
-       SipSetupContext *ctx;
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-       keyword=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")));
-       if (strlen(keyword)>=1){
-               BuddyLookupRequest *req;
-               guint tid2;
-               ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext");
-               req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
-               if (req!=NULL){
-                       sip_setup_context_buddy_lookup_free(ctx,req);
-               }
-               req=sip_setup_context_create_buddy_lookup_request(ctx);
-               buddy_lookup_request_set_key(req,keyword);
-               sip_setup_context_buddy_lookup_submit(ctx,req);
-               g_object_set_data(G_OBJECT(w),"buddylookup_request",req);
-               if (g_object_get_data(G_OBJECT(w),"buddylookup_processing")==NULL){
-                       tid2=g_timeout_add(20,(GSourceFunc)linphone_gtk_process_buddy_lookup,w);
-                       g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(tid2));
-               }
-       }
-       return FALSE;
-}
-
-void linphone_gtk_keyword_changed(GtkEditable *e){
-       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(e));
-       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
-       if (tid!=0){
-               g_source_remove(tid);
-       }
-       tid=g_timeout_add(2000,(GSourceFunc)keyword_typing_finished,w);
-       g_object_set_data(G_OBJECT(w),"typing_timeout",GINT_TO_POINTER(tid));
-}
-
-static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results){
-       GtkTreeStore *store;
-       GtkTreeIter iter;
-       gchar *tmp;
-       const MSList *elem;
-       store=GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w)));
-       gtk_tree_store_clear(store);
-       disable_add_buddy_button(gtk_widget_get_toplevel(w));
-       for(elem=results;elem!=NULL;elem=elem->next){
-               BuddyInfo *bi=(BuddyInfo*)elem->data;
-               GdkPixbuf *pbuf;
-               GtkTreeIter depth1;
-               gtk_tree_store_append(store,&iter,NULL);
-               tmp=g_strdup_printf("%s, %s (%s)",bi->firstname,bi->lastname,bi->displayname);
-               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_NAME, tmp,-1);
-               g_free(tmp);
-               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_SIP_URI, bi->sip_uri,-1);
-               tmp=g_strdup_printf("%s, %s %s\n%s",bi->address.street, bi->address.zip, bi->address.town, bi->address.country);
-               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ADDRESS, tmp,-1);
-               g_free(tmp);
-               if (bi->image_data!=NULL){
-                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
-                       if (pbuf) {
-                               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ICON,pbuf,-1);
-                               g_object_unref(G_OBJECT(pbuf));
-                       }
-               }
-               gtk_tree_store_append(store,&depth1,&iter);
-               tmp=g_strdup_printf("<big>%s, %s (%s)</big>\n<i>%s</i>, <b>%s</b> %s\n%s\n%s",
-                       bi->firstname,bi->lastname,bi->displayname,bi->address.street,
-                       bi->address.zip, bi->address.town, bi->address.country,bi->sip_uri);
-               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_NAME,tmp,-1);
-               g_free(tmp);
-               if (bi->image_data!=NULL){
-                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,-1,TRUE);
-                       if (pbuf) {
-                               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_ICON,pbuf,-1);
-                               g_object_unref(G_OBJECT(pbuf));
-                       }
-               }
-       }
-}
-
-void linphone_gtk_add_buddy_from_database(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"search_results")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               char *uri;
-               char *name;
-               char *addr;
-               LinphoneFriend *lf;
-               int presence=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
-               gtk_tree_model_get (model, &iter,LOOKUP_RESULT_SIP_URI , &uri,LOOKUP_RESULT_NAME, &name, -1);
-               addr=g_strdup_printf("%s <%s>",name,uri);
-
-               lf=linphone_friend_new_with_addr(addr);
-               linphone_friend_set_inc_subscribe_policy(lf,presence ? LinphoneSPAccept : LinphoneSPDeny);
-               linphone_friend_send_subscribe(lf,presence);
-               linphone_core_add_friend(linphone_gtk_get_core(),lf);
-               linphone_gtk_show_friends();
-               g_free(addr);
-               g_free(uri);
-               g_free(name);
-       }
-}
-
-/*called when double clicking on a contact */
-void linphone_gtk_buddy_lookup_contact_activated(GtkWidget *treeview){
-       linphone_gtk_add_buddy_from_database(treeview);
-       gtk_widget_destroy(gtk_widget_get_toplevel(treeview));
-}
diff --git a/gtk-glade/buddylookup.glade b/gtk-glade/buddylookup.glade
deleted file mode 100644 (file)
index 2e6eb96..0000000
+++ /dev/null
@@ -1,163 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="buddylookup">
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Search contacts in directory</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <signal name="response" handler="gtk_widget_destroy"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame1">
-            <property name="visible">True</property>
-            <property name="border_width">5</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment1">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkEntry" id="keyword">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="has_focus">True</property>
-                        <signal name="changed" handler="linphone_gtk_keyword_changed"/>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="hscrollbar_policy">automatic</property>
-                        <property name="vscrollbar_policy">automatic</property>
-                        <property name="shadow_type">etched-in</property>
-                        <child>
-                          <widget class="GtkTreeView" id="search_results">
-                            <property name="width_request">512</property>
-                            <property name="height_request">140</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <signal name="row_activated" handler="linphone_gtk_buddy_lookup_contact_activated"/>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="padding">6</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkProgressBar" id="progressbar">
-                        <property name="visible">True</property>
-                        <property name="activity_mode">True</property>
-                        <property name="show_text">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHButtonBox" id="hbuttonbox1">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkButton" id="add_buddy">
-                            <property name="visible">True</property>
-                            <property name="sensitive">False</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <signal name="clicked" handler="linphone_gtk_add_buddy_from_database"/>
-                            <child>
-                              <widget class="GtkHBox" id="hbox1">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkImage" id="image1">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-add</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkLabel" id="label2">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Add to my list</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="padding">5</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="position">3</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label1">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">&lt;b&gt;Search somebody&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/call_logs.glade b/gtk-glade/call_logs.glade
deleted file mode 100644 (file)
index d2ac682..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Wed Jul 30 17:55:28 2008 -->
-<glade-interface>
-  <widget class="GtkDialog" id="call_logs">
-    <property name="width_request">500</property>
-    <property name="height_request">370</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Call history</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
-            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
-            <child>
-              <widget class="GtkTextView" id="logtextview">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="wrap_mode">GTK_WRAP_WORD</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-close</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/calllogs.c b/gtk-glade/calllogs.c
deleted file mode 100644 (file)
index 0695419..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-
-void linphone_gtk_call_log_update(GtkWidget *w){
-       GtkTextView *v=GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview"));
-       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
-       GtkTextIter iter,begin;
-       int off;
-       char *logmsg;
-       const MSList *logs;
-       for (logs=linphone_core_get_call_logs(linphone_gtk_get_core());logs!=NULL;logs=logs->next){
-               LinphoneCallLog *cl=(LinphoneCallLog*)logs->data;
-               logmsg=linphone_call_log_to_str(cl);
-               gtk_text_buffer_get_end_iter(b,&iter);
-               off=gtk_text_iter_get_offset(&iter);
-               gtk_text_buffer_insert(b,&iter,logmsg,-1);
-               gtk_text_buffer_get_end_iter(b,&iter);
-               gtk_text_buffer_insert(b,&iter,"\n",-1);
-               gtk_text_buffer_get_end_iter(b,&iter);
-               gtk_text_buffer_get_iter_at_offset(b,&begin,off);
-               gtk_text_buffer_apply_tag_by_name(b,cl->dir==LinphoneCallOutgoing ? "green" : "blue" ,&begin,&iter);
-               ms_free(logmsg);        
-       }
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
-}
-
-void linphone_gtk_call_log_response(GtkWidget *w){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       g_object_set_data(G_OBJECT(mw),"call_logs",NULL);
-       gtk_widget_destroy(w);
-}
-
-GtkWidget * linphone_gtk_show_call_logs(void){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkTextBuffer *b;
-       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
-       if (w==NULL){
-               w=linphone_gtk_create_window("call_logs");
-               g_object_set_data(G_OBJECT(mw),"call_logs",w);
-               g_signal_connect(G_OBJECT(w),"response",(GCallback)linphone_gtk_call_log_response,NULL);
-               gtk_widget_show(w);
-               b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview")));
-               gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
-               gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
-               linphone_gtk_call_log_update(w);
-       }else gtk_window_present(GTK_WINDOW(w));
-       return w;
-}
-
diff --git a/gtk-glade/chat.c b/gtk-glade/chat.c
deleted file mode 100644 (file)
index bc61850..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const char *with){
-       GtkWidget *w;
-       GtkTextBuffer *b;
-       gchar *tmp;
-       w=linphone_gtk_create_window("chatroom");
-       tmp=g_strdup_printf(_("Chat with %s"),with);
-       gtk_window_set_title(GTK_WINDOW(w),tmp);
-       g_free(tmp);
-       g_object_set_data(G_OBJECT(w),"cr",cr);
-       gtk_widget_show(w);
-       linphone_chat_room_set_user_data(cr,w);
-       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")));
-       gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
-       gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
-       return w;
-}
-
-void linphone_gtk_create_chatroom(const char *with){
-       LinphoneChatRoom *cr=linphone_core_create_chat_room(linphone_gtk_get_core(),with);
-       if (!cr) return;
-       linphone_gtk_init_chatroom(cr,with);
-}
-
-void linphone_gtk_chat_destroyed(GtkWidget *w){
-       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
-       linphone_chat_room_destroy(cr);
-}
-
-void linphone_gtk_chat_close(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       gtk_widget_destroy(w);
-}
-
-void linphone_gtk_push_text(GtkTextView *v, const char *from, const char *message, gboolean me){
-       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
-       GtkTextIter iter,begin;
-       int off;
-       gtk_text_buffer_get_end_iter(b,&iter);
-       off=gtk_text_iter_get_offset(&iter);
-       gtk_text_buffer_insert(b,&iter,from,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,":\t",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
-       gtk_text_buffer_apply_tag_by_name(b,me ? "green" : "blue" ,&begin,&iter);
-       gtk_text_buffer_insert(b,&iter,message,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,"\n",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
-}
-
-const char* linphone_gtk_get_used_identity(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg) return linphone_proxy_config_get_identity(cfg);
-       else return linphone_core_get_primary_contact(lc);
-}
-
-void linphone_gtk_send_text(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkWidget *entry=linphone_gtk_get_widget(w,"text_entry");
-       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
-       const gchar *entered;
-       entered=gtk_entry_get_text(GTK_ENTRY(entry));
-       if (strlen(entered)>0) {
-               linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
-                               linphone_gtk_get_used_identity(),
-                               entered,TRUE);
-               linphone_chat_room_send_message(cr,entered);
-               gtk_entry_set_text(GTK_ENTRY(entry),"");
-       }
-}
-
-void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message){
-       GtkWidget *w=(GtkWidget*)linphone_chat_room_get_user_data(room);
-       if (w==NULL){
-               w=linphone_gtk_init_chatroom(room,from);
-       }
-       linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
-                               from,
-                               message,FALSE);
-       gtk_window_present(GTK_WINDOW(w));
-       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
-}
-
diff --git a/gtk-glade/chatroom.glade b/gtk-glade/chatroom.glade
deleted file mode 100644 (file)
index 870ae53..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Wed Jul 30 15:51:13 2008 -->
-<glade-interface>
-  <widget class="GtkWindow" id="chatroom">
-    <signal name="destroy" handler="linphone_gtk_chat_destroyed"/>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkTextView" id="textlog">
-            <property name="width_request">200</property>
-            <property name="height_request">200</property>
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="editable">False</property>
-            <property name="wrap_mode">GTK_WRAP_WORD</property>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkEntry" id="text_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="has_focus">True</property>
-                <signal name="activate" handler="linphone_gtk_send_text"/>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="send">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="linphone_gtk_send_text"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImage" id="image1">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-ok</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Send</property>
-                      </widget>
-                      <packing>
-                        <property name="padding">7</property>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHButtonBox" id="hbuttonbox1">
-            <property name="visible">True</property>
-            <property name="layout_style">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-close</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-                <signal name="clicked" handler="linphone_gtk_chat_close"/>
-              </widget>
-              <packing>
-                <property name="pack_type">GTK_PACK_END</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/contact.glade b/gtk-glade/contact.glade
deleted file mode 100644 (file)
index d16543b..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="contact">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox7">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame17">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment17">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox13">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkTable" id="table7">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="n_rows">2</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkLabel" id="label45">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Name</property>
-                          </widget>
-                          <packing>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label46">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">SIP Address</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="name">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="sip_address">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                            <property name="y_options">GTK_FILL</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="fill">False</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="show_presence">
-                        <property name="label" translatable="yes">Show this contact presence status</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="allow_presence">
-                        <property name="label" translatable="yes">Allow this contact to see my presence status</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label47">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">&lt;b&gt;Contact information&lt;/b&gt;</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area7">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="cancel_button">
-                <property name="label" translatable="yes">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_contact_cancel"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="ok_button">
-                <property name="label" translatable="yes">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_contact_ok"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/fonis.c b/gtk-glade/fonis.c
deleted file mode 100644 (file)
index dbcbf68..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-
-#include "linphone.h"
-
diff --git a/gtk-glade/friendlist.c b/gtk-glade/friendlist.c
deleted file mode 100644 (file)
index 3805057..0000000
+++ /dev/null
@@ -1,585 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include <gtk/gtk.h>
-#include "linphone.h"
-
-static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list);
-
-enum{
-       FRIEND_PRESENCE_IMG,
-       FRIEND_NAME,
-       FRIEND_PRESENCE_STATUS,
-       FRIEND_ID,
-       FRIEND_SIP_ADDRESS,
-       FRIEND_ICON,
-       FRIEND_LIST_NCOL
-};
-
-
-typedef struct _status_picture_tab_t{
-       LinphoneOnlineStatus status;
-       const char *img;
-} status_picture_tab_t;
-
-status_picture_tab_t status_picture_tab[]={
-       {       LinphoneStatusOnline,           "status-green.png"      },
-       {       LinphoneStatusBusy,             "status-orange.png"             },
-       {       LinphoneStatusBeRightBack,      "status-orange.png"             },
-       {       LinphoneStatusAway,             "status-orange.png"             },
-       {       LinphoneStatusOnThePhone,       "status-orange.png"             },
-       {       LinphoneStatusOutToLunch,       "status-orange.png"             },
-       {       LinphoneStatusDoNotDisturb,     "status-red.png"        },
-       {       LinphoneStatusMoved,            "status-orange.png"     },
-       {       LinphoneStatusAltService,       "status-orange.png"     },
-       {       LinphoneStatusOffline,  "status-offline.png"            },
-       {       LinphoneStatusPending,  "status-offline.png"            },
-       {       LinphoneStatusEnd,              NULL                    },
-};
-
-static GdkPixbuf *create_status_picture(LinphoneOnlineStatus ss){
-       status_picture_tab_t *t=status_picture_tab;
-       while(t->img!=NULL){
-               if (ss==t->status){
-                       GdkPixbuf *pixbuf;
-                       pixbuf = create_pixbuf(t->img);
-                       return pixbuf;
-               }
-               ++t;
-       }
-       g_error("No pixmap defined for status %i",ss);
-       return NULL;
-}
-
-void linphone_gtk_set_friend_status(GtkWidget *friendlist , LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img){
-       GtkTreeIter iter;
-       LinphoneFriend *tmp=0;
-       gboolean found=FALSE;
-       GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
-       if (gtk_tree_model_get_iter_first(model,&iter)) {
-               do{
-                       gtk_tree_model_get(model,&iter,FRIEND_ID,&tmp,-1);
-                       //printf("tmp=%i, fid=%i",tmp,fid);
-                       if (fid==tmp) {
-                               GdkPixbuf *pixbuf;
-                               gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_STATUS,status,-1);
-                               pixbuf = create_pixbuf(img);
-                               if (pixbuf)
-                                 {
-                                   gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_IMG, pixbuf,-1);
-                                 }
-                                 found=TRUE;
-                       }
-               }while(gtk_tree_model_iter_next(model,&iter));
-       }
-       
-}
-
-
-static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       gchar* friend;
-       select = gtk_tree_view_get_selection (treeview);
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               friend=linphone_address_as_string(linphone_friend_get_address(lf));
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),friend);
-               ms_free(friend);
-       }
-}
-
-static void linphone_gtk_call_selected(GtkTreeView *treeview){
-       linphone_gtk_set_selection_to_uri_bar(treeview);
-       linphone_gtk_start_call(linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(treeview)),
-                                       "start_call"));
-}
-
-void linphone_gtk_contact_activated(GtkTreeView     *treeview,
-                                    GtkTreePath     *path,
-                                    GtkTreeViewColumn *column,
-                                        gpointer         user_data)
-{
-       linphone_gtk_call_selected(treeview);
-}
-
-void linphone_gtk_contact_clicked(GtkTreeView     *treeview){
-       linphone_gtk_set_selection_to_uri_bar(treeview);
-}
-
-static GtkWidget * create_presence_menu(){
-       GtkWidget *menu=gtk_menu_new();
-       GtkWidget *menu_item;
-       GdkPixbuf *pbuf;
-       status_picture_tab_t *t;
-       for(t=status_picture_tab;t->img!=NULL;++t){
-               if (t->status==LinphoneStatusPending){
-                       continue;
-               }
-               menu_item=gtk_image_menu_item_new_with_label(linphone_online_status_to_string(t->status));
-               pbuf=create_status_picture(t->status);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
-                                               gtk_image_new_from_pixbuf(pbuf));
-               g_object_unref(G_OBJECT(pbuf));
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_set_my_presence,GINT_TO_POINTER(t->status));
-       }
-       return menu;
-}
-
-void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss){
-       GtkWidget *button=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"presence_button");
-       GdkPixbuf *pbuf=create_status_picture(ss);
-       GtkWidget *image=gtk_image_new_from_pixbuf(pbuf);
-       GtkWidget *menu;
-       g_object_unref(G_OBJECT(pbuf));
-       gtk_widget_set_tooltip_text(button,linphone_online_status_to_string(ss));
-       gtk_button_set_image(GTK_BUTTON(button),image);
-       /*prepare menu*/
-       menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
-       if (menu==NULL){
-               menu=create_presence_menu();
-               /*the menu is destroyed when the button is destroyed*/
-               g_object_weak_ref(G_OBJECT(button),(GWeakNotify)gtk_widget_destroy,menu);
-               g_object_set_data(G_OBJECT(button),"presence_menu",menu);
-       }
-       linphone_core_set_presence_info(linphone_gtk_get_core(),0,NULL,ss);
-}
-
-void linphone_gtk_my_presence_clicked(GtkWidget *button){
-       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
-       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,NULL,NULL,0,
-                       gtk_get_current_event_time());
-       gtk_widget_show(menu);
-}
-
-
-static void linphone_gtk_friend_list_init(GtkWidget *friendlist)
-{
-       GtkListStore *store;
-       GtkCellRenderer *renderer;
-       GtkTreeViewColumn *column;
-       GtkTreeSelection *select;
-       
-       
-       store = gtk_list_store_new(FRIEND_LIST_NCOL, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING,  G_TYPE_POINTER,
-                                       G_TYPE_STRING, GDK_TYPE_PIXBUF);
-
-       gtk_tree_view_set_model(GTK_TREE_VIEW(friendlist),GTK_TREE_MODEL(store));
-       g_object_unref(G_OBJECT(store));
-
-       renderer = gtk_cell_renderer_pixbuf_new ();
-       column = gtk_tree_view_column_new_with_attributes (_("Name"),
-                                                   renderer,
-                                                   "pixbuf", FRIEND_ICON,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       renderer = gtk_cell_renderer_text_new ();
-       gtk_tree_view_column_pack_start(column,renderer,FALSE);
-       gtk_tree_view_column_add_attribute  (column,renderer,
-                                                         "text",
-                                                         FRIEND_NAME);
-       
-       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
-
-       column = gtk_tree_view_column_new_with_attributes (_("Presence status"),
-                                                   renderer,
-                                                   "text", FRIEND_PRESENCE_STATUS,
-                                                   NULL);
-       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
-       gtk_tree_view_column_set_visible(column,linphone_gtk_get_ui_config_int("friendlist_status",1));
-       
-       renderer = gtk_cell_renderer_pixbuf_new();
-       gtk_tree_view_column_pack_start(column,renderer,FALSE);
-       gtk_tree_view_column_add_attribute  (column,renderer,
-                                                         "pixbuf",
-                                                         FRIEND_PRESENCE_IMG);
-       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
-
-       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (friendlist));
-       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-#if GTK_CHECK_VERSION(2,12,0)
-       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(friendlist),FRIEND_SIP_ADDRESS);
-#endif
-       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(
-                                       gtk_widget_get_toplevel(friendlist),"show_category")),0);
-}
-
-void linphone_gtk_show_directory_search(void){
-       LinphoneProxyConfig *cfg=NULL;
-       SipSetupContext * ssc=NULL;
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *search_box=linphone_gtk_get_widget(mw,"directory_search_box");
-
-       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
-       if (cfg){
-               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
-               if (ssc!=NULL && sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP){
-                       GtkWidget *entry=linphone_gtk_get_widget(mw,"directory_search_entry");
-                       gchar  *tooltip;
-                       GdkColor grey={0,40000,40000,40000};
-                       gtk_widget_show(search_box);
-                       tooltip=g_strdup_printf(_("Search in %s directory"),linphone_proxy_config_get_domain(cfg));
-                       gtk_widget_modify_text(entry,GTK_STATE_NORMAL,&grey);
-                       gtk_entry_set_text(GTK_ENTRY(entry),tooltip);
-                       g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(0));
-                       g_free(tooltip);
-                       return;
-               }
-       }
-       gtk_widget_hide(search_box);
-}
-
-gboolean linphone_gtk_directory_search_focus_out(GtkWidget *entry){
-       if (gtk_entry_get_text_length(GTK_ENTRY(entry))==0)
-               linphone_gtk_show_directory_search();
-       return FALSE;
-}
-
-gboolean linphone_gtk_directory_search_focus_in(GtkWidget *entry){
-       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==0){
-               gtk_entry_set_text(GTK_ENTRY(entry),"");
-               gtk_widget_modify_text(entry,GTK_STATE_NORMAL,NULL);
-               g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(1));
-       }
-       return FALSE;
-}
-
-void linphone_gtk_directory_search_activate(GtkWidget *entry){
-       LinphoneProxyConfig *cfg;
-       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
-       GtkWidget *w=linphone_gtk_show_buddy_lookup_window(linphone_proxy_config_get_sip_setup_context(cfg));
-       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==1)
-               linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry)));
-}
-
-void linphone_gtk_directory_search_button_clicked(GtkWidget *button){
-       linphone_gtk_directory_search_activate(
-               linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"directory_search_entry"));
-}
-
-void linphone_gtk_show_friends(void){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *friendlist=linphone_gtk_get_widget(mw,"contact_list");
-       GtkListStore *store=NULL;
-       GtkTreeIter iter;
-       const MSList *itf;
-       GtkWidget *category=linphone_gtk_get_widget(mw,"show_category");
-       GtkWidget *filter=linphone_gtk_get_widget(mw,"search_bar");
-       LinphoneCore *core=linphone_gtk_get_core();
-       const gchar *search=NULL;
-       gboolean online_only=FALSE,lookup=FALSE;
-       
-       linphone_gtk_show_directory_search();
-
-       if (gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist))==NULL){
-               linphone_gtk_friend_list_init(friendlist);
-       }
-       store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
-       gtk_list_store_clear(store);
-
-       online_only=(gtk_combo_box_get_active(GTK_COMBO_BOX(category))==1);
-       search=gtk_entry_get_text(GTK_ENTRY(filter));
-       if (search==NULL || search[0]=='\0')
-               lookup=FALSE;
-       else lookup=TRUE;
-
-       for(itf=linphone_core_get_friend_list(core);itf!=NULL;itf=ms_list_next(itf)){
-               LinphoneFriend *lf=(LinphoneFriend*)itf->data;
-               const LinphoneAddress *f_uri=linphone_friend_get_address(lf);
-               char *uri=linphone_address_as_string(f_uri);
-               const char *name=linphone_address_get_display_name(f_uri);
-               const char *display=name;
-               char *escaped=NULL;
-               if (lookup){
-                       if (strstr(uri,search)==NULL){
-                               ms_free(uri);
-                               continue;
-                       }
-               }
-               if (!online_only || (linphone_friend_get_status(lf)!=LinphoneStatusOffline)){
-                       BuddyInfo *bi;
-                       if (name==NULL || name[0]=='\0') display=uri;
-                       gtk_list_store_append(store,&iter);
-                       gtk_list_store_set(store,&iter,FRIEND_NAME, display,
-                                       FRIEND_PRESENCE_STATUS, linphone_online_status_to_string(linphone_friend_get_status(lf)),
-                                       FRIEND_ID,lf,-1);
-                       gtk_list_store_set(store,&iter,
-                               FRIEND_PRESENCE_IMG, create_status_picture(linphone_friend_get_status(lf)),
-                               -1);
-                       escaped=g_markup_escape_text(uri,-1);
-                       gtk_list_store_set(store,&iter,FRIEND_SIP_ADDRESS,escaped,-1);
-                       g_free(escaped);
-                       bi=linphone_friend_get_info(lf);
-                       if (bi!=NULL && bi->image_data!=NULL){
-                               GdkPixbuf *pbuf=
-                                       _gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
-                               if (pbuf) {
-                                       gtk_list_store_set(store,&iter,FRIEND_ICON,pbuf,-1);
-                                       g_object_unref(G_OBJECT(pbuf));
-                               }
-                       }
-               }
-               ms_free(uri);
-       }
-}
-
-void linphone_gtk_add_contact(void){
-       GtkWidget *w=linphone_gtk_create_window("contact");
-       int presence_enabled=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
-       
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),presence_enabled);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
-                                       presence_enabled);
-       gtk_widget_show(w);
-}
-
-void linphone_gtk_remove_contact(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               linphone_core_remove_friend(linphone_gtk_get_core(),lf);
-               linphone_gtk_show_friends();
-       }
-}
-
-void linphone_gtk_show_contact(LinphoneFriend *lf){
-       GtkWidget *w=linphone_gtk_create_window("contact");
-       char *uri;
-       const char *name;
-       const LinphoneAddress *f_uri=linphone_friend_get_address(lf);
-       uri=linphone_address_as_string_uri_only(f_uri);
-       name=linphone_address_get_display_name(f_uri);
-       if (uri) {
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")),uri);
-               ms_free(uri);
-       }
-       if (name){
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")),name);
-       }
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),
-                                       linphone_friend_get_send_subscribe(lf));
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
-                                       linphone_friend_get_inc_subscribe_policy(lf)==LinphoneSPAccept);
-       g_object_set_data(G_OBJECT(w),"friend_ref",(gpointer)lf);
-       gtk_widget_show(w);
-}
-
-void linphone_gtk_edit_contact(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               linphone_gtk_show_contact(lf);
-       }
-}
-
-void linphone_gtk_chat_selected(GtkWidget *item){
-       GtkWidget *w=gtk_widget_get_toplevel(item);
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       LinphoneFriend *lf=NULL;
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
-       if (gtk_tree_selection_get_selected (select, &model, &iter))
-       {
-               char *uri;
-               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
-               uri=linphone_address_as_string(linphone_friend_get_address(lf));
-               linphone_gtk_create_chatroom(uri);
-               ms_free(uri);
-       }
-}
-
-void linphone_gtk_contact_cancel(GtkWidget *button){
-       gtk_widget_destroy(gtk_widget_get_toplevel(button));
-}
-
-void linphone_gtk_contact_ok(GtkWidget *button){
-       GtkWidget *w=gtk_widget_get_toplevel(button);
-       LinphoneFriend *lf=(LinphoneFriend*)g_object_get_data(G_OBJECT(w),"friend_ref");
-       char *fixed_uri=NULL;
-       gboolean show_presence=FALSE,allow_presence=FALSE;
-       const gchar *name,*uri;
-       if (lf==NULL){
-               lf=linphone_friend_new();
-               if (linphone_gtk_get_ui_config_int("use_subscribe_notify",1)==1){
-                       show_presence=FALSE;
-                       allow_presence=FALSE;
-               }
-               linphone_friend_set_inc_subscribe_policy(lf,allow_presence ? LinphoneSPAccept : LinphoneSPDeny);
-               linphone_friend_send_subscribe(lf,show_presence);
-       }
-       name=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")));
-       uri=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")));
-       show_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")));
-       allow_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")));
-       linphone_core_interpret_friend_uri(linphone_gtk_get_core(),uri,&fixed_uri);
-       if (fixed_uri==NULL){
-               linphone_gtk_display_something(GTK_MESSAGE_WARNING,_("Invalid sip contact !"));
-               return ;
-       }
-       linphone_friend_set_sip_addr(lf,fixed_uri);
-       ms_free(fixed_uri);
-       linphone_friend_set_name(lf,name);
-       linphone_friend_send_subscribe(lf,show_presence);
-       linphone_friend_set_inc_subscribe_policy(lf,allow_presence==TRUE ? LinphoneSPAccept : LinphoneSPDeny);
-       if (linphone_friend_in_list(lf)) {
-               linphone_friend_done(lf);
-       }else{
-               linphone_core_add_friend(linphone_gtk_get_core(),lf);
-       }
-       linphone_gtk_show_friends();
-       gtk_widget_destroy(w);
-}
-
-static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
-       GtkWidget *menu=gtk_menu_new();
-       GtkWidget *menu_item;
-       gchar *call_label=NULL;
-       gchar *text_label=NULL;
-       gchar *edit_label=NULL;
-       gchar *delete_label=NULL;
-       gchar *name=NULL;
-       GtkTreeSelection *select;
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       GtkWidget *image;
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg=NULL;
-       SipSetupContext * ssc=NULL;
-
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg){
-               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
-       }
-
-       g_signal_connect(G_OBJECT(menu), "selection-done", G_CALLBACK (gtk_widget_destroy), NULL);
-       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(contact_list));
-       if (gtk_tree_selection_get_selected (select, &model, &iter)){
-               gtk_tree_model_get(model, &iter,FRIEND_NAME , &name, -1);
-               call_label=g_strdup_printf(_("Call %s"),name);
-               text_label=g_strdup_printf(_("Send text to %s"),name);
-               edit_label=g_strdup_printf(_("Edit contact '%s'"),name);
-               delete_label=g_strdup_printf(_("Delete contact '%s'"),name);
-               g_free(name);
-       }
-       if (call_label){
-               menu_item=gtk_image_menu_item_new_with_label(call_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_selected,contact_list);
-       }
-       if (text_label){
-               menu_item=gtk_image_menu_item_new_with_label(text_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_chat_selected,contact_list);
-       }
-       if (edit_label){
-               menu_item=gtk_image_menu_item_new_with_label(edit_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_EDIT,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_edit_contact,contact_list);
-       }
-       if (delete_label){
-               menu_item=gtk_image_menu_item_new_with_label(delete_label);
-               image=gtk_image_new_from_stock(GTK_STOCK_DELETE,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_remove_contact,contact_list);
-       }
-       
-
-       if (ssc && (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP)) {
-               gchar *tmp=g_strdup_printf(_("Add new contact from %s directory"),linphone_proxy_config_get_domain(cfg));
-               menu_item=gtk_image_menu_item_new_with_label(tmp);
-               g_free(tmp);
-               image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
-               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-               gtk_widget_show(image);
-               gtk_widget_show(menu_item);
-               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_buddy_lookup_window,ssc);
-               gtk_widget_show(menu);
-       }
-       
-       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_add_contact,contact_list);
-       gtk_widget_show(menu);
-       gtk_menu_attach_to_widget (GTK_MENU (menu), contact_list, NULL);
-
-       if (call_label) g_free(call_label);
-       if (text_label) g_free(text_label);
-       if (edit_label) g_free(edit_label);
-       if (delete_label) g_free(delete_label);
-       return menu;
-}
-
-
-gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event){
-       GtkWidget *m=linphone_gtk_create_contact_menu(list);
-       gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL, 
-                  event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
-       return TRUE;
-}
-
-gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event){
-       /* Ignore double-clicks and triple-clicks */
-       if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
-       {
-               return linphone_gtk_popup_contact_menu(widget, event);
-       }
-       return FALSE;
-}
-
-void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf){
-       /*refresh the entire list*/
-       linphone_gtk_show_friends();
-}
-
-
diff --git a/gtk-glade/gtkrc b/gtk-glade/gtkrc
deleted file mode 100644 (file)
index 73d2174..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "share/themes/XLiquid_GTK-1.0.3/gtk-2.0/gtkrc"
-#include "share/themes/Aero-ion3.1/gtk-2.0/gtkrc"
-include "share/themes/Outcrop/gtk-2.0/gtkrc"
-
diff --git a/gtk-glade/incall_view.c b/gtk-glade/incall_view.c
deleted file mode 100644 (file)
index 4d60d63..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-/*
-*  C Implementation: incall_frame
-*
-* Description: 
-*
-*
-* Author: Simon Morlat <simon.morlat@linphone.org>, (C) 2009
-*
-*
-*/
-
-#include "linphone.h"
-
-
-gboolean linphone_gtk_use_in_call_view(){
-       static int val=-1;
-       if (val==-1) val=linphone_gtk_get_ui_config_int("use_incall_view",1);
-       return val;
-}
-
-void linphone_gtk_show_in_call_view(void){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
-       GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_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");
-       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){
-       LinphoneAddress *from;
-       const char *displayname=NULL;
-       char *id=NULL;
-       char *uri_label;
-
-       if (uri==NULL) {
-               ms_error("Strange: in call with nobody ?");
-               return;
-       }
-
-       from=linphone_address_new(uri);
-       if (from!=NULL){
-               displayname=linphone_address_get_display_name(from);
-               id=linphone_address_as_string_uri_only(from);
-       }else id=ms_strdup(uri);
-
-       if (displayname!=NULL){
-               uri_label=g_markup_printf_escaped("<span size=\"large\">%s</span>\n<i>%s</i>", 
-                       displayname,id);
-       }else
-               uri_label=g_markup_printf_escaped("<span size=\"large\"><i>%s</i></span>\n",id);
-       gtk_label_set_markup(GTK_LABEL(label),uri_label);
-       ms_free(id);
-       g_free(uri_label);
-       if (from!=NULL) linphone_address_destroy(from);
-}
-
-void linphone_gtk_in_call_view_set_calling(const char *uri){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
-       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_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");
-
-       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"));
-       if (pbuf!=NULL){
-               gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
-}
-
-void linphone_gtk_in_call_view_set_in_call(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
-       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_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("incall_anim.gif");
-       const LinphoneAddress *uri=linphone_core_get_current_call_remote_address(lc);
-       char *tmp=linphone_address_as_string(uri);
-       display_peer_name_in_label(callee,tmp);
-       ms_free(tmp);
-
-       gtk_label_set_markup(GTK_LABEL(status),_("<b>In call with</b>"));
-
-       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));
-       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
-       linphone_gtk_enable_mute_button(
-                                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),TRUE);
-       linphone_gtk_enable_hold_button(
-               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"hold_call")),TRUE);
-}
-
-void linphone_gtk_in_call_view_update_duration(int duration){
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       GtkWidget *duration_label=linphone_gtk_get_widget(main_window,"in_call_duration");
-       char tmp[256]={0};
-       int seconds=duration%60;
-       int minutes=(duration/60)%60;
-       int hours=duration/3600;
-       snprintf(tmp,sizeof(tmp)-1,_("%02i::%02i::%02i"),hours,minutes,seconds);
-       gtk_label_set_text(GTK_LABEL(duration_label),tmp);
-}
-
-static gboolean in_call_view_terminated(){
-       linphone_gtk_show_idle_view();
-       return FALSE;
-}
-
-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");
-       GdkPixbuf *pbuf=create_pixbuf(linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png"));
-
-       if (error_msg==NULL)
-               gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>"));
-       else{
-               char *msg=g_markup_printf_escaped("<span color=\"red\"><b>%s</b></span>",error_msg);
-               gtk_label_set_markup(GTK_LABEL(status),msg);
-               g_free(msg);
-       }
-       if (pbuf!=NULL){
-               gtk_image_set_from_pixbuf(GTK_IMAGE(animation),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-       linphone_gtk_enable_mute_button(
-               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),FALSE);
-       linphone_gtk_enable_hold_button(
-               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"hold_call")),FALSE);
-       g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,NULL);
-}
-
-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);
-                       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);
-                       gtk_widget_show(image);
-               }
-       }
-}
-
-void linphone_gtk_mute_toggled(GtkToggleButton *button){
-       gboolean active=gtk_toggle_button_get_active(button);
-       linphone_core_mute_mic(linphone_gtk_get_core(),active);
-       linphone_gtk_draw_mute_button(button,active);
-}
-
-void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive)
-{
-       gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
-       linphone_gtk_draw_mute_button(button,FALSE);
-}
-
-void linphone_gtk_draw_hold_button(GtkToggleButton *button, gboolean active){
-       if (active){
-               GtkWidget *image=create_pixmap("hold_off.png");
-               gtk_button_set_label(GTK_BUTTON(button),_("HoldOff"));
-               if (image!=NULL) {
-                       gtk_button_set_image(GTK_BUTTON(button),image);
-                       gtk_widget_show(image);
-               }
-       }else{
-               GtkWidget *image=create_pixmap("hold_on.png");
-               gtk_button_set_label(GTK_BUTTON(button),_("HoldOn"));
-               if (image!=NULL) {
-                       gtk_button_set_image(GTK_BUTTON(button),image);
-                       gtk_widget_show(image);
-               }
-       }
-}
-
-void linphone_gtk_hold_toggled(GtkToggleButton *button){
-       gboolean active=gtk_toggle_button_get_active(button);
-       
-       if(active)
-       {
-               LinphoneCall *call=linphone_core_get_current_call (linphone_gtk_get_core());
-               if (call==NULL) return;
-               linphone_core_pause_call(linphone_gtk_get_core(),call);
-       }
-       else
-       {
-               const MSList *calls=linphone_core_get_calls(linphone_gtk_get_core());
-               if (calls==NULL) return;
-               if (ms_list_size(calls)>1){
-                       g_warning("Simultaneously calls not yet implemented in gtk ui.");
-                       return;
-               }
-               /*we are supposed to have only one */
-               linphone_core_resume_call(linphone_gtk_get_core(),(LinphoneCall*)calls->data);
-       }
-       linphone_gtk_draw_hold_button(button,active);
-}
-
-void linphone_gtk_enable_hold_button(GtkToggleButton *button, gboolean sensitive){
-       gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
-       linphone_gtk_draw_hold_button(button,FALSE);
-}
diff --git a/gtk-glade/incoming_call.glade b/gtk-glade/incoming_call.glade
deleted file mode 100644 (file)
index 14c8948..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="incoming_call">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="type">popup</property>
-    <property name="title" translatable="yes">Linphone - Incoming call</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">notification</property>
-    <property name="urgency_hint">True</property>
-    <property name="deletable">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox8">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame16">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment16">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkLabel" id="message">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Incoming call from</property>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label43">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Incoming call</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area7">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">spread</property>
-            <child>
-              <widget class="GtkButton" id="accept_call">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal name="clicked" handler="linphone_gtk_accept_call"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox17">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImage" id="image12">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="stock">gtk-yes</property>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label44">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Accept</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="decline_cal">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal name="clicked" handler="linphone_gtk_decline_call"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox20">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImage" id="image13">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="stock">gtk-no</property>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="decline_call">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Decline</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/linphone.h b/gtk-glade/linphone.h
deleted file mode 100644 (file)
index 8502771..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gtk/gtk.h>
-#ifdef WIN32
-// alloca is already defined by gtk
-#undef alloca
-#endif
-#include "linphonecore.h"
-
-#include <libintl.h>
-#ifndef _
-#define _(String) gettext (String)
-#endif
-
-#ifdef USE_BUILDDATE_VERSION
-#include "version_date.h"
-#undef LINPHONE_VERSION
-#define LINPHONE_VERSION LINPHONE_VERSION_DATE
-#endif
-
-GdkPixbuf * create_pixbuf(const gchar *filename);
-GdkPixbufAnimation *create_pixbuf_animation(const gchar *filename);
-void add_pixmap_directory(const gchar *directory);
-GtkWidget*create_pixmap(const gchar     *filename);
-GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
-GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
-
-GtkWidget *linphone_gtk_create_window(const char *window_name);
-GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
-LinphoneCore *linphone_gtk_get_core(void);
-GtkWidget *linphone_gtk_get_main_window();
-void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
-void linphone_gtk_start_call(GtkWidget *button);
-void linphone_gtk_call_terminated();
-void linphone_gtk_show_friends(void);
-void linphone_gtk_show_contact(LinphoneFriend *lf);
-void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
-void linphone_gtk_show_parameters(void);
-void linphone_gtk_load_identities(void);
-void linphone_gtk_create_chatroom(const char *with);
-void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message);
-void linphone_gtk_call_log_update(GtkWidget *w);
-void linphone_gtk_create_log_window(void);
-void linphone_gtk_log_show(void);
-void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
-void linphone_gtk_destroy_log_window(void);
-gboolean linphone_gtk_check_logs();
-void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
-const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
-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_open_browser(const char *url);
-void linphone_gtk_check_for_new_version(void);
-const char *linphone_gtk_get_lang(const char *config_file);
-void linphone_gtk_set_lang(const char *code);
-SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
-GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
-void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
-void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
-
-void linphone_gtk_show_directory_search(void);
-
-/*functions controlling the different views*/
-gboolean linphone_gtk_use_in_call_view();
-void linphone_gtk_show_in_call_view(void);
-void linphone_gtk_show_idle_view(void);
-void linphone_gtk_in_call_view_set_calling(const char *uri);
-void linphone_gtk_in_call_view_set_in_call(void);
-void linphone_gtk_in_call_view_update_duration(int duration);
-void linphone_gtk_in_call_view_terminate(const char *error_msg);
-void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive);
-void linphone_gtk_enable_hold_button(GtkToggleButton *button, gboolean sensitive);
-
-void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
-
diff --git a/gtk-glade/linphone.ico b/gtk-glade/linphone.ico
deleted file mode 100755 (executable)
index 2633d58..0000000
Binary files a/gtk-glade/linphone.ico and /dev/null differ
diff --git a/gtk-glade/linphone.iss b/gtk-glade/linphone.iss
deleted file mode 100755 (executable)
index f691046..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.\r
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!\r
-\r
-[Setup]\r
-AppName=Linphone\r
-AppVerName=Linphone version 3.1.2\r
-AppPublisher=linphone.org\r
-AppPublisherURL=http://www.linphone.org\r
-AppSupportURL=http://www.linphone.org\r
-AppUpdatesURL=http://www.linphone.org\r
-DefaultDirName={pf}\Linphone\r
-DefaultGroupName=Linphone\r
-LicenseFile=..\COPYING\r
-;InfoBeforeFile=..\README\r
-OutputBaseFilename=setup\r
-Compression=lzma\r
-SolidCompression=yes\r
-\r
-[Languages]\r
-Name: "english"; MessagesFile: "compiler:Default.isl"\r
-\r
-[Tasks]\r
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked\r
-\r
-[Files]\r
-Source: "linphone.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\mediastreamer2\build\win32native\mediastream.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\console\linphonec.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\console\linphonecsh.exe"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "*.glade"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
-Source: "..\pixmaps\*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
-Source: "*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
-Source: "..\mediastreamer2\src\nowebcamCIF.jpg"; DestDir: "{app}\images"; Flags: ignoreversion\r
-;;internal linphone dlls:\r
-Source: "..\..\linphone-deps\bin\osipparser2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\osip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\exosip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\libogg.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Source: "..\..\linphone-deps\bin\speex.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\avcodec.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\avutil-49.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\swscale.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Source: "..\..\linphone-deps\bin\libspeex-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Source: "..\..\linphone-deps\bin\libspeexdsp-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\coreapi\linphone.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\mediastreamer2\build\win32native\mediastreamer2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\oRTP\build\win32native\ortp.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Sound files:\r
-Source: "..\COPYING"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\share\ringback.wav"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\share\rings\orig.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\bigben.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\toy.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\tapping.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-Source: "..\share\rings\oldphone.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
-;;Default my preferred gtk theme on windows:\r
-Source: "..\gtk-glade\gtkrc"; DestDir: "{app}"; Flags: ignoreversion\r
-;;Locales for linphone:\r
-Source: "..\po\fr.gmo"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
-Source: "..\po\sv.gmo"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
-\r
-;;GTK stuff:\r
-Source: "..\..\gtk+-2.14.7\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\libglade-2.6.3\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\etc\gtk-2.0\*"; DestDir: "{app}\etc\gtk-2.0\"; Flags: ignoreversion\r
-Source: "..\..\linphone-deps\bin\libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\iconv-1.9.2.win32\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\engines\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\loaders\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"; Flags: ignoreversion\r
-;;Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\immodules\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\immodules"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\share\locale\fr\LC_MESSAGES\*"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; Flags: ignoreversion\r
-Source: "..\..\gtk+-2.14.7\share\locale\sv\LC_MESSAGES\*"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; Flags: ignoreversion\r
-Source: "..\..\XLiquid_GTK-1.0.3\gtk-2.0\*"; DestDir: "{app}\share\themes\XLiquid_GTK-1.0.3\gtk-2.0"; Flags: ignoreversion\r
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files\r
-\r
-;; BuddyLookup plugin\r
-Source: "..\coreapi\plugins\buddylookup\libbuddylookup.dll"; DestDir: "{app}\liblinphone\plugins"; Flags: ignoreversion\r
-Source: "..\..\libsoup\bin\libsoup-2.4-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-Source: "..\..\gnutls-2.6.4\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
-\r
-;;Directshow capture plugin\r
-Source: "..\mediastreamer2\plugins\msdscap\libmsdscap.dll"; DestDir: "{app}\plugins" ; Flags: ignoreversion\r
-\r
-[Icons]\r
-Name: "{group}\Linphone"; Filename: "{app}\linphone.exe" ; WorkingDir: "{app}"\r
-Name: "{userdesktop}\Linphone"; Filename: "{app}\linphone.exe"; WorkingDir: "{app}" ; Tasks: desktopicon\r
-\r
-[Run]\r
-Filename: "{app}\linphone.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent\r
-\r
diff --git a/gtk-glade/linphone.rc b/gtk-glade/linphone.rc
deleted file mode 100755 (executable)
index 9455ab6..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-// This file is automatically generated by wxDev-C++.\r
-// All changes to this file will be lost when the project is recompiled.\r
-\r
-A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "linphone.ico"\r
-\r
diff --git a/gtk-glade/log.glade b/gtk-glade/log.glade
deleted file mode 100644 (file)
index fc72064..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="log">
-    <property name="width_request">540</property>
-    <property name="height_request">290</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Linphone debug window</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="deletable">False</property>
-    <property name="has_separator">False</property>
-    <signal name="response" handler="gtk_widget_hide"/>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkScrolledWindow" id="scrolledwindow1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="hscrollbar_policy">never</property>
-            <property name="vscrollbar_policy">automatic</property>
-            <property name="window_placement">bottom-left</property>
-            <property name="window_placement_set">True</property>
-            <property name="shadow_type">in</property>
-            <child>
-              <widget class="GtkTextView" id="textview">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="editable">False</property>
-                <property name="wrap_mode">word</property>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area1">
-            <property name="visible">True</property>
-            <property name="layout_style">end</property>
-            <child>
-              <placeholder/>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="label" translatable="yes">gtk-close</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="clicked" handler="linphone_gtk_log_hide"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/logging.c b/gtk-glade/logging.c
deleted file mode 100644 (file)
index 9bdf1dc..0000000
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-#ifndef WIN32
-#include <sys/stat.h>
-#include <sys/types.h>
-#endif
-
-
-static GtkWidget *log_window=NULL;
-static GStaticMutex log_mutex=G_STATIC_MUTEX_INIT;
-static GList *log_queue=NULL;
-
-typedef struct _LinphoneGtkLog{
-       OrtpLogLevel lev;
-       gchar *msg;
-}LinphoneGtkLog;
-
-
-/******
- * Module to log to a file
- ******/
-
-/* Marker to insert as a line at the start of every log file */
-#define LOGFILE_MARKER_START  "----<start>----"
-/* Marker to insert as a line at the end of every log file */
-#define LOGFILE_MARKER_STOP  "----<end>----"
-/* Number of files to keep in history, log file rotation will be
-   performed. */
-#define LOGFILE_ROTATION 4
-/* Pointer to opened log file */
-static FILE *_logfile = NULL;
-
-
-/* Called on exit, print out the marker, close the file and avoid to
-   continue logging. */
-static void linphone_gtk_log_uninit()
-{
-       if (_logfile != NULL) {
-               fprintf(_logfile, "%s\n", LOGFILE_MARKER_STOP);
-               fclose(_logfile);
-               _logfile = NULL;
-       }
-}
-
-/* Called when we start logging, find a good place for the log files,
-   perform rotation, insert the start marker and return the pointer to
-   the file that should be used for logging, or NULL on errors or if
-   disabled. */
-static FILE *linphone_gtk_log_init()
-{
-       static char _logdir[1024];
-       static char _logfname[1024];
-       static gboolean _log_init = FALSE;
-       const char *dst_fname;
-
-       if (!_log_init) {
-               dst_fname = linphone_gtk_get_ui_config("logfile",NULL);
-               /* For anything to happen, we need a logfile configuration variable,
-                this is our trigger */
-               if (dst_fname) {
-                       /* arrange for _logdir to contain a
-                        directory that has been created and _logfname to contain the
-                        path to a file to which we will log */
-#ifdef WIN32
-                       const char *appdata=getenv("LOCALAPPDATA");
-                       if (appdata) {
-                               snprintf(_logdir, sizeof(_logdir),"%s\\Linphone", appdata);
-                               mkdir(_logdir);
-                       } else {
-                               _logdir[0] = '\0';
-                       }
-#define PATH_SEPARATOR '\\'
-#else
-                       const char *home=getenv("HOME");
-                       if (home) {
-                               snprintf(_logdir, sizeof(_logdir),"%s/.linphone", home);
-                               mkdir(_logdir,S_IRUSR | S_IWUSR | S_IRGRP);
-                       } else {
-                               _logdir[0] = '\0';
-                       }
-#define PATH_SEPARATOR '/'
-#endif
-                       /* We have a directory, fix the path to the log file in it and
-                        open the file so that we will be appending to it. */
-                       if (_logdir[0] != '\0') {
-                               snprintf(_logfname, sizeof(_logfname), "%s%c%s",
-                                       _logdir, PATH_SEPARATOR, dst_fname);
-                               /* If the constant LOGFILE_ROTATION is greater than zero, then
-                                we kick away a simple rotation that will ensure that there
-                                are never more than LOGFILE_ROTATION+1 old copies of the
-                                log file on the disk.  The oldest file is always rotated
-                                "away" as expected.  Rotated files have the same name as
-                                the main log file, though with a number 0..LOGFILE_ROTATION
-                                at the end, where the greater the number is, the older the
-                                file is. */
-                               if (ortp_file_exist(_logfname)==0 && LOGFILE_ROTATION > 0) {
-                                       int i;
-                                       char old_fname[1024];
-                                       char new_fname[1024];
-
-                                       /* Rotate away existing files.  We make sure to remove the
-                                        old files otherwise rename() would not work properly.  We
-                                        have to loop in reverse here. */
-                                       for (i=LOGFILE_ROTATION-1;i>=0;i--) {
-                                               snprintf(old_fname, sizeof(old_fname), "%s%c%s.%d",
-                                                       _logdir, PATH_SEPARATOR, dst_fname, i);
-                                               snprintf(new_fname, sizeof(new_fname), "%s%c%s.%d",
-                                                       _logdir, PATH_SEPARATOR, dst_fname, i+1);
-                                               if (ortp_file_exist(old_fname)==0) {
-                                                       if (ortp_file_exist(new_fname)==0)
-                                                               unlink(new_fname);
-                                                       rename(old_fname, new_fname);
-                                               }
-                                       }
-                                       /* Move current log file as the first of the rotation.  Make
-                                        sure to remove the old .0 also, since otherwise rename()
-                                        would not work as expected. */
-                                       snprintf(new_fname, sizeof(new_fname), "%s%c%s.%d",
-                                               _logdir, PATH_SEPARATOR, dst_fname, 0);
-                                       if (ortp_file_exist(new_fname)==0)
-                                               unlink(new_fname);
-                                       rename(_logfname, new_fname);
-                               }
-                               /* Start a new log file and mark that we have now initialised */
-                               _logfile = fopen(_logfname, "w");
-                               fprintf(_logfile, "%s\n", LOGFILE_MARKER_START);
-                       }
-               }
-               _log_init = TRUE;
-       }
-       return _logfile;
-}
-
-static void linphone_gtk_log_file(OrtpLogLevel lev, const char *msg)
-{
-       LinphoneCore *lc;
-       time_t now;
-       FILE *outlog;
-
-       lc = linphone_gtk_get_core();
-       /* Nothing to do until the core has initialised */
-       if (lc == NULL)
-               return;
-
-       /* lc->config will turn NULL at exit, close the file to flush and
-        return to stop logging */
-       if (linphone_core_get_config(lc) == NULL) {
-               linphone_gtk_log_uninit();
-               return;
-       }
-
-       outlog = linphone_gtk_log_init();
-       if (outlog != NULL) {
-               /* We have an opened file and we have initialised properly, it's
-                time to write all these log messages. We convert the log level
-                from oRTP into something readable and timestamp each log
-                message.  The format of the timestamp can be controlled by
-                logfile_date_format in the GtkUi section of the config file,
-                but it defaults to something compact, but yet readable. */
-               const char *lname="undef";
-               const char *dateformat=linphone_gtk_get_ui_config("logfile_date_format",
-                   "%Y%m%d-%H:%M:%S");
-               char date[256];
-
-               /* Convert level constant to text */
-               switch(lev){
-                       case ORTP_DEBUG:
-                               lname="debug";
-                               break;
-                       case ORTP_MESSAGE:
-                               lname="message";
-                               break;
-                       case ORTP_WARNING:
-                               lname="warning";
-                               break;
-                       case ORTP_ERROR:
-                               lname="error";
-                               break;
-                       case ORTP_FATAL:
-                               lname="fatal";
-                               break;
-                       default:
-                               lname="undef";
-                               break;
-               }
-               /* Get current time and format it properly */
-               now = time(NULL);
-               strftime(date, sizeof(date), dateformat, localtime(&now));
-               /* Now print out the message to the logfile.  We don't flush,
-                maybe we should do to ensure that we have all the messages in
-                case of a crash (which is one of the main reasons we have a
-                    log facility in the first place). */
-               fprintf(outlog, "[%s] [%s] %s\n", date, lname, msg);
-       }
-}
-
-
-
-static gboolean delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
-{
-       gtk_widget_hide (widget);
-       return TRUE;
-}
-
-void linphone_gtk_log_hide(){
-       if (log_window)
-               gtk_widget_hide(log_window);
-}
-
-void linphone_gtk_create_log_window(void){
-       GtkTextBuffer *b;
-       log_window=linphone_gtk_create_window("log");
-       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview")));
-       gtk_text_buffer_create_tag(b,"red","foreground","red",NULL);
-       gtk_text_buffer_create_tag(b,"orange","foreground","orange",NULL);
-       /*prevent the log window from being destroyed*/
-       g_signal_connect (G_OBJECT (log_window), "delete-event",
-               G_CALLBACK (delete_event_cb), NULL);
-
-}
-
-void linphone_gtk_destroy_log_window(void){
-       GtkWidget *w=log_window;
-       g_static_mutex_lock(&log_mutex);
-       log_window=NULL;
-       gtk_widget_destroy(w);
-       g_static_mutex_unlock(&log_mutex);
-}
-
-void linphone_gtk_log_show(void){
-       gtk_widget_show(log_window);
-       gtk_window_present(GTK_WINDOW(log_window));
-}
-
-static void linphone_gtk_display_log(OrtpLogLevel lev, const char *msg){
-       GtkTextIter iter,begin;
-       int off;
-       static GtkTextView *v=NULL;
-       GtkTextBuffer *b;
-       const char *lname="undef";
-
-       if (log_window==NULL) {
-               return;
-       }
-
-       if (v==NULL) v=GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview"));
-       b=gtk_text_view_get_buffer(v);
-       switch(lev){
-               case ORTP_DEBUG:
-                       lname="debug";
-                       break;
-               case ORTP_MESSAGE:
-                       lname="message";
-                       break;
-               case ORTP_WARNING:
-                       lname="warning";
-                       break;
-               case ORTP_ERROR:
-                       lname="error";
-                       break;
-               case ORTP_FATAL:
-                       lname="fatal";
-                       break;
-               default:
-                       g_error("Bad level !");
-       }
-       gtk_text_buffer_get_end_iter(b,&iter);
-       off=gtk_text_iter_get_offset(&iter);
-       gtk_text_buffer_insert(b,&iter,lname,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,": ",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,msg,-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_insert(b,&iter,"\n",-1);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
-       if (lev==ORTP_ERROR || lev==ORTP_FATAL) gtk_text_buffer_apply_tag_by_name(b,"red",&begin,&iter);
-       else if (lev==ORTP_WARNING) gtk_text_buffer_apply_tag_by_name(b,"orange",&begin,&iter);
-       gtk_text_buffer_get_end_iter(b,&iter);
-       //gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
-}
-
-gboolean linphone_gtk_check_logs(){
-       GList *elem;
-       g_static_mutex_lock(&log_mutex);
-       for(elem=log_queue;elem!=NULL;elem=elem->next){
-               LinphoneGtkLog *lgl=(LinphoneGtkLog*)elem->data;
-               linphone_gtk_display_log(lgl->lev,lgl->msg);
-               g_free(lgl->msg);
-               g_free(lgl);
-       }
-       if (log_queue) g_list_free(log_queue);
-       log_queue=NULL;
-       g_static_mutex_unlock(&log_mutex);
-       return TRUE;
-}
-
-void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args){
-       gchar *msg=g_strdup_vprintf(fmt,args);
-       LinphoneGtkLog *lgl=g_new(LinphoneGtkLog,1);
-       lgl->lev=lev;
-       lgl->msg=msg;
-       g_static_mutex_lock(&log_mutex);
-       log_queue=g_list_append(log_queue,lgl);
-       linphone_gtk_log_file(lev, msg);
-       g_static_mutex_unlock(&log_mutex);
-}
-
diff --git a/gtk-glade/loginframe.c b/gtk-glade/loginframe.c
deleted file mode 100644 (file)
index 5b9d7f5..0000000
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-void linphone_gtk_login_frame_connect_clicked(GtkWidget *button);
-void linphone_gtk_exit_login_frame(void);
-
-enum {
-       NetworkKindAdsl,
-       NetworkKindOpticalFiber
-};
-
-static gboolean check_login_ok(LinphoneProxyConfig *cfg){
-       if (linphone_proxy_config_is_registered(cfg)){
-               linphone_gtk_exit_login_frame();
-               return FALSE;   
-       }
-       return TRUE;
-}
-
-static void do_login(SipSetupContext *ssctx, const char *identity, const char * passwd){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       if (sip_setup_context_login_account(ssctx,identity,passwd)==0){
-               guint t=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(mw),"login_tout"));
-               if (t!=0) g_source_remove(t);
-               t=g_timeout_add(50,(GSourceFunc)check_login_ok,sip_setup_context_get_proxy_config(ssctx));
-               g_object_set_data(G_OBJECT(mw),"login_tout",GINT_TO_POINTER(t));
-       }
-}
-
-static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
-       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
-       if (ssctx==NULL) return TRUE;/*not ready ?*/
-       do_login(ssctx,linphone_proxy_config_get_identity(cfg),NULL);
-       return FALSE;
-}
-
-void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *label=linphone_gtk_get_widget(mw,"login_label");
-       const LinphoneAuthInfo *ai;
-       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;
-       }
-
-       gtk_widget_hide(linphone_gtk_get_widget(mw,"logout"));
-       gtk_widget_hide(linphone_gtk_get_widget(mw,"idle_frame"));
-       gtk_widget_show(linphone_gtk_get_widget(mw,"login_frame"));
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),FALSE);
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),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_free(str);
-
-       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
-       
-       ai=linphone_core_find_auth_info(lc,linphone_proxy_config_get_domain(cfg),linphone_address_get_username(from));
-       /*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")),
-                       linphone_address_get_username(from));
-       if (ai) passwd=linphone_auth_info_get_passwd(ai);
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")),
-               passwd!=NULL ? passwd : "");
-       
-       linphone_address_destroy(from);
-}
-
-void linphone_gtk_exit_login_frame(void){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       gtk_widget_show(linphone_gtk_get_widget(mw,"idle_frame"));
-       gtk_widget_hide(linphone_gtk_get_widget(mw,"login_frame"));
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),TRUE);
-       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),TRUE);
-       gtk_widget_show(linphone_gtk_get_widget(mw,"logout"));
-}
-
-void linphone_gtk_logout_clicked(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg=NULL;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg){
-               SipSetupContext *ss=linphone_proxy_config_get_sip_setup_context(cfg);
-               if (ss){
-                       sip_setup_context_logout(ss);
-                       linphone_gtk_set_ui_config_int("automatic_login",FALSE);
-                       linphone_gtk_show_login_frame(cfg);
-               }
-       }
-}
-
-
-
-void linphone_gtk_login_frame_connect_clicked(GtkWidget *button){
-       GtkWidget *mw=gtk_widget_get_toplevel(button);
-       const char *username;
-       const char *password;
-       char *identity;
-       gboolean autologin;
-       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(mw),"login_proxy_config");
-       LinphoneAddress *from;
-       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
-
-       username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")));
-       password=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")));
-
-       if (username==NULL || username[0]=='\0')
-               return;
-
-       autologin=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")));
-       linphone_gtk_set_ui_config_int("automatic_login",autologin);
-
-       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
-       linphone_address_set_username(from,username);
-       identity=linphone_address_as_string(from);
-       do_login(ssctx,identity,password);
-       /*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);
-       }
-}
diff --git a/gtk-glade/main.c b/gtk-glade/main.c
deleted file mode 100644 (file)
index ddae9ff..0000000
+++ /dev/null
@@ -1,1337 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#define USE_LIBGLADE 1
-
-#define VIDEOSELFVIEW_DEFAULT 1
-
-#include "linphone.h"
-#include "lpconfig.h"
-
-
-
-#ifdef USE_LIBGLADE
-#include <glade/glade.h>
-#endif
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#define LINPHONE_ICON "linphone.png"
-
-const char *this_program_ident_string="linphone_ident_string=" LINPHONE_VERSION;
-
-static LinphoneCore *the_core=NULL;
-static GtkWidget *the_ui=NULL;
-
-static void linphone_gtk_show(LinphoneCore *lc);
-static void linphone_gtk_inv_recv(LinphoneCore *lc, LinphoneCall *call);
-static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid);
-static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url);
-static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username);
-static void linphone_gtk_display_status(LinphoneCore *lc, const char *status);
-static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg);
-static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning);
-static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url);
-static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl);
-static void linphone_gtk_refer_received(LinphoneCore *lc, const char  *refer_to);
-static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cs, const char *msg);
-static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window);
-
-
-static gboolean verbose=0;
-static gboolean auto_answer = 0;
-static gchar * addr_to_call = NULL;
-static gboolean iconified=FALSE;
-#ifdef WIN32
-static gchar *workingdir=NULL;
-#endif
-static char *progpath=NULL;
-
-static GOptionEntry linphone_options[]={
-       {
-               .long_name="verbose",
-               .short_name= '\0',
-               .arg=G_OPTION_ARG_NONE,
-               .arg_data= (gpointer)&verbose,
-               .description=N_("log to stdout some debug information while running.")
-       },
-       {
-               .long_name="iconified",
-               .short_name= '\0',
-               .arg=G_OPTION_ARG_NONE,
-               .arg_data= (gpointer)&iconified,
-               .description=N_("Start only in the system tray, do not show the main interface.")
-       },
-       {
-           .long_name = "call",
-           .short_name = 'c',
-           .arg = G_OPTION_ARG_STRING,
-           .arg_data = &addr_to_call,
-           .description = N_("address to call right now")
-       },
-       {
-           .long_name = "auto-answer",
-           .short_name = 'a',
-           .arg = G_OPTION_ARG_NONE,
-           .arg_data = (gpointer) & auto_answer,
-           .description = N_("if set automatically answer incoming calls")
-       },
-#ifdef WIN32
-       {                               /* zsd addition */
-           .long_name = "workdir",
-           .short_name = '\0',
-           .arg = G_OPTION_ARG_STRING,
-           .arg_data = (gpointer) & workingdir,
-           .description = N_("Specifiy a working directory (should be the base of the installation, eg: c:\\Program Files\\Linphone)")
-       },
-#endif
-       {0}
-};
-
-#define INSTALLED_XML_DIR PACKAGE_DATA_DIR "/linphone"
-#define BUILD_TREE_XML_DIR "gtk-glade"
-
-#ifndef WIN32
-#define CONFIG_FILE ".linphonerc"
-#else
-#define CONFIG_FILE "linphonerc"
-#endif
-
-
-
-static char _config_file[1024];
-
-
-const char *linphone_gtk_get_config_file(){
-       /*try accessing a local file first if exists*/
-       if (access(CONFIG_FILE,F_OK)==0){
-               snprintf(_config_file,sizeof(_config_file),"%s",CONFIG_FILE);
-       }else{
-#ifdef WIN32
-               const char *appdata=getenv("APPDATA");
-               if (appdata){
-                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
-                       CreateDirectory(_config_file,NULL);
-                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR "\\" CONFIG_FILE);
-               }
-#else
-               const char *home=getenv("HOME");
-               if (home==NULL) home=".";
-               snprintf(_config_file,sizeof(_config_file),"%s/%s",home,CONFIG_FILE);
-#endif
-       }
-       return _config_file;
-}
-
-
-#define FACTORY_CONFIG_FILE "linphonerc.factory"
-static char _factory_config_file[1024];
-static const char *linphone_gtk_get_factory_config_file(){
-       /*try accessing a local file first if exists*/
-       if (access(FACTORY_CONFIG_FILE,F_OK)==0){
-               snprintf(_factory_config_file,sizeof(_factory_config_file),
-                                                "%s",FACTORY_CONFIG_FILE);
-       } else {
-               char *progdir;
-               
-               if (progpath != NULL) {
-                       char *basename;
-                       progdir = strdup(progpath);
-#ifdef WIN32
-                       basename = strrchr(progdir, '\\');
-                       if (basename != NULL) {
-                               basename ++;
-                               *basename = '\0';
-                               snprintf(_factory_config_file, sizeof(_factory_config_file),
-                                                                "%s\\..\\%s", progdir, FACTORY_CONFIG_FILE);
-                       } else {
-                               if (workingdir!=NULL) {
-                                       snprintf(_factory_config_file, sizeof(_factory_config_file),
-                                                                        "%s\\%s", workingdir, FACTORY_CONFIG_FILE);
-                               } else {
-                                       free(progdir);
-                                       return NULL;
-                               }
-                       }
-#else
-                       basename = strrchr(progdir, '/');
-                       if (basename != NULL) {
-                               basename ++;
-                               *basename = '\0';
-                               snprintf(_factory_config_file, sizeof(_factory_config_file),
-                                                                "%s/../share/Linphone/%s", progdir, FACTORY_CONFIG_FILE);
-                       } else {
-                               free(progdir);
-                               return NULL;
-                       }
-#endif
-                       free(progdir);
-               }
-       }
-       return _factory_config_file;
-}
-
-static void linphone_gtk_init_liblinphone(const char *config_file,
-               const char *factory_config_file) {
-       LinphoneCoreVTable vtable={0};
-
-       vtable.call_state_changed=linphone_gtk_call_state_changed;
-       vtable.show=linphone_gtk_show;
-       vtable.notify_presence_recv=linphone_gtk_notify_recv;
-       vtable.new_unknown_subscriber=linphone_gtk_new_unknown_subscriber;
-       vtable.auth_info_requested=linphone_gtk_auth_info_requested;
-       vtable.display_status=linphone_gtk_display_status;
-       vtable.display_message=linphone_gtk_display_message;
-       vtable.display_warning=linphone_gtk_display_warning;
-       vtable.display_url=linphone_gtk_display_url;
-       vtable.call_log_updated=linphone_gtk_call_log_updated;
-       vtable.text_received=linphone_gtk_text_received;
-       vtable.refer_received=linphone_gtk_refer_received;
-       vtable.buddy_info_updated=linphone_gtk_buddy_info_updated;
-
-       linphone_core_set_user_agent("Linphone", LINPHONE_VERSION);
-       the_core=linphone_core_new(&vtable,config_file,factory_config_file,NULL);
-       linphone_core_set_waiting_callback(the_core,linphone_gtk_wait,NULL);
-}
-
-
-
-LinphoneCore *linphone_gtk_get_core(void){
-       return the_core;
-}
-
-GtkWidget *linphone_gtk_get_main_window(){
-       return the_ui;
-}
-
-static void linphone_gtk_configure_window(GtkWidget *w, const char *window_name){
-       static const char *icon_path=NULL;
-       static const char *hiddens=NULL;
-       static const char *shown=NULL;
-       static bool_t config_loaded=FALSE;
-       if (linphone_gtk_get_core()==NULL) return;
-       if (config_loaded==FALSE){
-               hiddens=linphone_gtk_get_ui_config("hidden_widgets",NULL);
-               shown=linphone_gtk_get_ui_config("shown_widgets",NULL);
-               icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
-               config_loaded=TRUE;
-       }
-       if (hiddens)
-               linphone_gtk_visibility_set(hiddens,window_name,w,FALSE);
-       if (shown)
-               linphone_gtk_visibility_set(shown,window_name,w,TRUE);
-       if (icon_path) {
-               GdkPixbuf *pbuf=create_pixbuf(icon_path);
-               gtk_window_set_icon(GTK_WINDOW(w),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-}
-
-#ifdef USE_LIBGLADE
-
-GtkWidget *linphone_gtk_create_window(const char *window_name){
-       GtkWidget *w;
-       GladeXML *gxml;
-       char path[2048];
-       snprintf(path,sizeof(path),"%s/%s.glade",BUILD_TREE_XML_DIR,window_name);
-       if (access(path,F_OK)!=0){
-               snprintf(path,sizeof(path),"%s/%s.glade",INSTALLED_XML_DIR,window_name);
-               if (access(path,F_OK)!=0){
-                       g_error("Could not locate neither %s/%s.glade and %s/%s.glade .",BUILD_TREE_XML_DIR,window_name,
-                               INSTALLED_XML_DIR,window_name);
-                       return NULL;
-               }
-       }
-       gxml=glade_xml_new(path,NULL,NULL);
-       glade_xml_signal_autoconnect(gxml);
-       w=glade_xml_get_widget(gxml,window_name);
-       if (w==NULL) g_error("Could not retrieve '%s' window from xml file",window_name);
-       linphone_gtk_configure_window(w,window_name);
-       return w;
-}
-
-GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
-       GtkWidget *w;
-       GladeXML *gxml=glade_get_widget_tree(window);
-       if (gxml==NULL) g_error("Could not retrieve XML tree of window %s",name);
-       w=glade_xml_get_widget(gxml,name);
-       if (w==NULL) g_error("Could not retrieve widget %s",name);
-       return GTK_WIDGET(w);
-}
-
-#else
-
-GtkWidget *linphone_gtk_create_window(const char *window_name){
-       
-}
-
-GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
-       GObject *w=gtk_builder_get_object(the_ui,name);
-       if (w==NULL){
-               g_error("No widget named %s found in xml interface.",name);
-       }
-       return GTK_WIDGET(w);
-}
-
-#endif
-
-void linphone_gtk_display_something(GtkMessageType type,const gchar *message){
-       GtkWidget *dialog;
-       GtkWidget *main_window=linphone_gtk_get_main_window();
-       
-       gtk_widget_show(main_window);
-       if (type==GTK_MESSAGE_QUESTION)
-       {
-               /* draw a question box. link to dialog_click callback */
-               dialog = gtk_message_dialog_new (
-                               GTK_WINDOW(main_window),
-                                GTK_DIALOG_DESTROY_WITH_PARENT,
-                               GTK_MESSAGE_QUESTION,
-                                GTK_BUTTONS_YES_NO,
-                                "%s",
-                               (const gchar*)message);
-               /* connect to some callback : REVISIT */
-               /*
-               g_signal_connect_swapped (G_OBJECT (dialog), "response",
-                           G_CALLBACK (dialog_click),
-                           G_OBJECT (dialog));
-               */
-               /* actually show the box */
-               gtk_widget_show(dialog);
-       }
-       else
-       {
-               dialog = gtk_message_dialog_new (GTK_WINDOW(main_window),
-                                  GTK_DIALOG_DESTROY_WITH_PARENT,
-                                  type,
-                                  GTK_BUTTONS_CLOSE,
-                                  "%s",
-                                  (const gchar*)message);
-               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
-               g_signal_connect_swapped (G_OBJECT (dialog), "response",
-                           G_CALLBACK (gtk_widget_destroy),
-                           G_OBJECT (dialog));
-               gtk_widget_show(dialog);
-       }
-}
-
-void linphone_gtk_about_response(GtkDialog *dialog, gint id){
-       if (id==GTK_RESPONSE_CANCEL){
-               gtk_widget_destroy(GTK_WIDGET(dialog));
-       }
-}
-
-static void about_url_clicked(GtkAboutDialog *dialog, const char *url, gpointer data){
-       g_message("About url clicked");
-       linphone_gtk_open_browser(url);
-}
-
-void linphone_gtk_show_about(){
-       struct stat filestat;
-       const char *license_file=PACKAGE_DATA_DIR "/linphone/COPYING";
-       GtkWidget *about;
-       GdkPixbuf *logo=create_pixbuf(
-           linphone_gtk_get_ui_config("logo","linphone-banner.png"));
-       
-       about=linphone_gtk_create_window("about");
-       gtk_about_dialog_set_url_hook(about_url_clicked,NULL,NULL);
-       memset(&filestat,0,sizeof(filestat));
-       if (stat(license_file,&filestat)!=0){
-               license_file="COPYING";
-               stat(license_file,&filestat);
-       }
-       if (filestat.st_size>0){
-               char *license=g_malloc(filestat.st_size+1);
-               FILE *f=fopen(license_file,"r");
-               if (f && fread(license,filestat.st_size,1,f)==1){
-                       license[filestat.st_size]='\0';
-                       gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about),license);
-               }
-               g_free(license);
-       }
-       gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about),LINPHONE_VERSION);
-       gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("title","Linphone"));
-       gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("home","http://www.linphone.org"));
-       if (logo)       gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about),logo);
-           
-       gtk_widget_show(about);
-}
-
-static void set_video_window_decorations(GdkWindow *w){
-       const char *title=linphone_gtk_get_ui_config("title","Linphone");
-       const char *icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
-       char video_title[256];
-       GdkPixbuf *pbuf=create_pixbuf(icon_path);
-       if (!linphone_core_in_call(linphone_gtk_get_core())){
-               snprintf(video_title,sizeof(video_title),"%s video",title);
-               /* When not in call, treat the video as a normal window */
-               gdk_window_set_keep_above(w, FALSE);
-       }else{
-               LinphoneAddress *uri =
-                       linphone_address_clone(linphone_core_get_current_call_remote_address(linphone_gtk_get_core()));
-               char *display_name;
-
-               linphone_address_clean(uri);
-               if (linphone_address_get_display_name(uri)!=NULL){
-                       display_name=ms_strdup(linphone_address_get_display_name(uri));
-               }else{
-                       display_name=linphone_address_as_string(uri);
-               }
-               snprintf(video_title,sizeof(video_title),_("Call with %s"),display_name);
-               linphone_address_destroy(uri);
-               ms_free(display_name);
-
-               /* During calls, bring up the video window, arrange so that
-               it is above all the other windows */
-               gdk_window_deiconify(w);
-               gdk_window_set_keep_above(w,TRUE);
-               /* Maybe we should have the following, but then we want to
-               have a timer that turns it off after a little while. */
-               /* gdk_window_set_urgency_hint(w,TRUE); */
-       }
-       gdk_window_set_title(w,video_title);
-       /* Refrain the video window to be closed at all times. */
-       gdk_window_set_functions(w,
-                                GDK_FUNC_RESIZE|GDK_FUNC_MOVE|
-                                GDK_FUNC_MINIMIZE|GDK_FUNC_MAXIMIZE);
-       if (pbuf){
-               GList *l=NULL;
-               l=g_list_append(l,pbuf);
-               gdk_window_set_icon_list(w,l);
-               g_list_free(l);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-}
-
-static gboolean video_needs_update=FALSE;
-
-static void update_video_title(){
-       video_needs_update=TRUE;
-}
-
-static gboolean linphone_gtk_iterate(LinphoneCore *lc){
-       static gboolean first_time=TRUE;
-       unsigned long id;
-       static unsigned long previd=0;
-       static gboolean in_iterate=FALSE;
-       
-       /*avoid reentrancy*/
-       if (in_iterate) return TRUE;
-       in_iterate=TRUE;
-       linphone_core_iterate(lc);
-       if (first_time){
-               /*after the first call to iterate, SipSetupContexts should be ready, so take actions:*/
-               linphone_gtk_show_directory_search();
-               first_time=FALSE;
-       }
-
-       id=linphone_core_get_native_video_window_id(lc);
-       if (id!=previd || video_needs_update){
-               GdkWindow *w;
-               previd=id;
-               if (id!=0){
-                       ms_message("Updating window decorations");
-#ifndef WIN32
-                       w=gdk_window_foreign_new(id);
-#else
-                       w=gdk_window_foreign_new((HANDLE)id);
-#endif
-                       if (w) {
-                               set_video_window_decorations(w);
-                               g_object_unref(G_OBJECT(w));
-                       }
-                       else ms_error("gdk_window_foreign_new() failed");
-                       if (video_needs_update) video_needs_update=FALSE;
-               }
-       }
-       if (addr_to_call!=NULL){
-               /*make sure we are not showing the login screen*/
-               GtkWidget *mw=linphone_gtk_get_main_window();
-               GtkWidget *login_frame=linphone_gtk_get_widget(mw,"login_frame");
-               if (!GTK_WIDGET_VISIBLE(login_frame)){
-                       GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
-                       gtk_entry_set_text(GTK_ENTRY(uri_bar),addr_to_call);
-                       addr_to_call=NULL;
-                       linphone_gtk_start_call(uri_bar);
-               }
-       }
-       in_iterate=FALSE;
-       return TRUE;
-}
-
-static void load_uri_history(){
-       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
-       char key[20];
-       int i;
-       GtkEntryCompletion *gep=gtk_entry_completion_new();
-       GtkListStore *model=gtk_list_store_new(1,G_TYPE_STRING);
-       for (i=0;;i++){
-               const char *uri;
-               snprintf(key,sizeof(key),"uri%i",i);
-               uri=linphone_gtk_get_ui_config(key,NULL);
-               if (uri!=NULL) {
-                       GtkTreeIter iter;
-                       gtk_list_store_append(model,&iter);
-                       gtk_list_store_set(model,&iter,0,uri,-1);
-                       if (i==0) gtk_entry_set_text(uribar,uri);
-               }
-               else break;
-       }
-       gtk_entry_completion_set_model(gep,GTK_TREE_MODEL(model));
-       gtk_entry_completion_set_text_column(gep,0);
-       gtk_entry_set_completion(uribar,gep);
-}
-
-static void save_uri_history(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LpConfig *cfg=linphone_core_get_config(lc);
-       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
-       char key[20];
-       int i=0;
-       char *uri=NULL;
-       GtkTreeIter iter;
-       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(uribar));
-
-       if (!gtk_tree_model_get_iter_first(model,&iter)) return;
-       do {
-               gtk_tree_model_get(model,&iter,0,&uri,-1);
-               if (uri) {
-                       snprintf(key,sizeof(key),"uri%i",i);
-                       lp_config_set_string(cfg,"GtkUi",key,uri);
-                       g_free(uri);
-               }else break;
-               i++;
-               if (i>5) break;
-       }while(gtk_tree_model_iter_next(model,&iter));
-       lp_config_sync(cfg);
-}
-
-static void completion_add_text(GtkEntry *entry, const char *text){
-       GtkTreeIter iter;
-       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(entry));
-       
-       if (gtk_tree_model_get_iter_first(model,&iter)){ 
-               do {
-                       gchar *uri=NULL;
-                       gtk_tree_model_get(model,&iter,0,&uri,-1);
-                       if (uri!=NULL){
-                               if (strcmp(uri,text)==0) {
-                                       /*remove text */
-                                       gtk_list_store_remove(GTK_LIST_STORE(model),&iter);
-                                       g_free(uri);
-                                       break;
-                               }
-                               g_free(uri);
-                       }
-               }while (gtk_tree_model_iter_next(model,&iter));
-       }
-       /* and prepend it on top of the list */
-       gtk_list_store_prepend(GTK_LIST_STORE(model),&iter);
-       gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,text,-1);
-       save_uri_history();
-}
-
-void linphone_gtk_call_terminated(const char *error){
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       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);
-       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);
-       update_video_title();
-       icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
-       if (icw!=NULL){
-               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
-               gtk_widget_destroy(icw);
-       }
-}
-
-static gboolean in_call_timer(){
-       if (linphone_core_in_call(linphone_gtk_get_core())){
-               linphone_gtk_in_call_view_update_duration(
-                       linphone_core_get_current_call_duration(linphone_gtk_get_core()));
-               return TRUE;
-       }
-       return FALSE;
-}
-
-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);
-       update_video_title();
-       if (linphone_gtk_use_in_call_view())
-               g_timeout_add(250,(GSourceFunc)in_call_timer,NULL);
-}
-
-static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
-       const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
-       if (linphone_core_invite(linphone_gtk_get_core(),entered)!=NULL) {
-               completion_add_text(GTK_ENTRY(uri_bar),entered);
-       }else{
-               linphone_gtk_call_terminated(NULL);
-       }
-       return FALSE;
-}
-
-static void _linphone_gtk_accept_call(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       GtkWidget *icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
-       if (icw!=NULL){
-               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
-               gtk_widget_destroy(icw);
-       }
-
-       linphone_core_accept_call(lc,NULL);
-       linphone_gtk_call_started(linphone_gtk_get_main_window());
-       if (linphone_gtk_use_in_call_view()){
-               linphone_gtk_in_call_view_set_in_call();
-               linphone_gtk_show_in_call_view();
-       }
-       linphone_gtk_enable_mute_button(
-               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute"))
-               ,TRUE);
-}
-
-void linphone_gtk_start_call(GtkWidget *w){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (linphone_core_inc_invite_pending(lc)){
-               /*accept the call*/
-               _linphone_gtk_accept_call();
-       }else if (linphone_core_in_call(lc)) {
-               /*already in call */
-       }else{
-               /*change into in-call mode, then do the work later as it might block a bit */
-               GtkWidget *mw=gtk_widget_get_toplevel(w);
-               GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
-               const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
-               linphone_gtk_call_started(mw);
-               if (linphone_gtk_use_in_call_view()){
-                       linphone_gtk_in_call_view_set_calling(entered);
-                       linphone_gtk_show_in_call_view();
-               }
-               g_timeout_add(100,(GSourceFunc)linphone_gtk_start_call_do,uri_bar);
-       }
-}
-
-void linphone_gtk_uri_bar_activate(GtkWidget *w){
-       linphone_gtk_start_call(w);
-}
-
-
-void linphone_gtk_terminate_call(GtkWidget *button){
-       const MSList *elem=linphone_core_get_calls(linphone_gtk_get_core());
-       if (elem==NULL) return;
-       linphone_core_terminate_call(linphone_gtk_get_core(),(LinphoneCall*)elem->data);
-}
-
-void linphone_gtk_decline_call(GtkWidget *button){
-       linphone_core_terminate_call(linphone_gtk_get_core(),NULL);
-       gtk_widget_destroy(gtk_widget_get_toplevel(button));
-}
-
-void linphone_gtk_accept_call(GtkWidget *button){
-       _linphone_gtk_accept_call();
-}
-
-static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window){
-       linphone_gtk_accept_call(linphone_gtk_get_widget(incall_window,"accept_call"));
-       return FALSE;
-}
-
-void linphone_gtk_set_audio_video(){
-       linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE);
-       linphone_core_enable_video_preview(linphone_gtk_get_core(),
-           linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT));
-}
-
-void linphone_gtk_set_audio_only(){
-       linphone_core_enable_video(linphone_gtk_get_core(),FALSE,FALSE);
-       linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
-}
-
-void linphone_gtk_enable_self_view(GtkWidget *w){
-       gboolean val=gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w));
-       LinphoneCore *lc=linphone_gtk_get_core();
-       linphone_core_enable_video_preview(lc,val);
-       linphone_core_enable_self_view(lc,val);
-       linphone_gtk_set_ui_config_int("videoselfview",val);
-}
-
-void linphone_gtk_used_identity_changed(GtkWidget *w){
-       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
-       char *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       if (sel && strlen(sel)>0){ //avoid a dummy "changed" at gui startup
-               linphone_core_set_default_proxy_index(linphone_gtk_get_core(),(active==0) ? -1 : (active-1));
-               linphone_gtk_show_directory_search();
-       }
-       if (sel) g_free(sel);
-}
-
-static void linphone_gtk_show_main_window(){
-       GtkWidget *w=linphone_gtk_get_main_window();
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (linphone_core_video_enabled(lc)){
-               linphone_core_enable_video_preview(lc,linphone_gtk_get_ui_config_int("videoselfview",
-               VIDEOSELFVIEW_DEFAULT));
-       }
-       gtk_widget_show(w);
-       gtk_window_present(GTK_WINDOW(w));
-}
-
-static void linphone_gtk_show(LinphoneCore *lc){
-       linphone_gtk_show_main_window();
-}
-
-static void linphone_gtk_inv_recv(LinphoneCore *lc, LinphoneCall *call){
-       GtkWidget *w=linphone_gtk_create_window("incoming_call");
-       GtkWidget *label;
-       gchar *msg;
-       char *from=linphone_call_get_remote_address_as_string(call);
-
-       if (auto_answer){
-               g_timeout_add(2000,(GSourceFunc)linphone_gtk_auto_answer,w);
-       }
-
-       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
-       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
-
-       label=linphone_gtk_get_widget(w,"message");
-       msg=g_strdup_printf(_("Incoming call from %s"),from);
-       gtk_label_set_text(GTK_LABEL(label),msg);
-       gtk_window_set_title(GTK_WINDOW(w),msg);
-       gtk_widget_show(w);
-       gtk_window_present(GTK_WINDOW(w));
-       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
-       g_free(msg);
-       g_object_set_data(G_OBJECT(linphone_gtk_get_main_window()),"incoming_call",w);
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),
-                       from);
-       ms_free(from);
-}
-
-static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid){
-       linphone_gtk_show_friends();
-}
-
-static void linphone_gtk_new_subscriber_response(GtkWidget *dialog, guint response_id, LinphoneFriend *lf){
-       switch(response_id){
-               case GTK_RESPONSE_YES:
-                       linphone_gtk_show_contact(lf);
-               break;
-               default:
-                       linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
-       }
-       gtk_widget_destroy(dialog);
-}
-
-static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
-       GtkWidget *dialog;
-
-       if (linphone_gtk_get_ui_config_int("subscribe_deny_all",0)){
-               linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
-               return;
-       }
-
-       gchar *message=g_strdup_printf(_("%s would like to add you to his contact list.\nWould you allow him to see your presence status or add him to your contact list ?\nIf you answer no, this person will be temporarily blacklisted."),url);
-       dialog = gtk_message_dialog_new (
-                               GTK_WINDOW(linphone_gtk_get_main_window()),
-                                GTK_DIALOG_DESTROY_WITH_PARENT,
-                               GTK_MESSAGE_QUESTION,
-                                GTK_BUTTONS_YES_NO,
-                                "%s",
-                               message);
-       g_free(message);
-       g_signal_connect(G_OBJECT (dialog), "response",
-               G_CALLBACK (linphone_gtk_new_subscriber_response),lf);
-       /* actually show the box */
-       gtk_widget_show(dialog);
-}
-
-typedef struct _AuthTimeout{
-       GtkWidget *w;
-} AuthTimeout;
-
-
-static void auth_timeout_clean(AuthTimeout *tout){
-       tout->w=NULL;
-}
-
-static gboolean auth_timeout_destroy(AuthTimeout *tout){
-       if (tout->w)  {
-               g_object_weak_unref(G_OBJECT(tout->w),(GWeakNotify)auth_timeout_clean,tout);
-               gtk_widget_destroy(tout->w);
-       }
-       g_free(tout);
-       return FALSE;
-}
-
-static AuthTimeout * auth_timeout_new(GtkWidget *w){
-       AuthTimeout *tout=g_new(AuthTimeout,1);
-       tout->w=w;
-       /*so that the timeout no more references the widget when it is destroyed:*/
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)auth_timeout_clean,tout);
-       /*so that the widget is automatically destroyed after some time */
-       g_timeout_add(30000,(GtkFunction)auth_timeout_destroy,tout);
-       return tout;
-}
-
-void linphone_gtk_password_cancel(GtkWidget *w){
-       LinphoneAuthInfo *info;
-       GtkWidget *window=gtk_widget_get_toplevel(w);
-       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
-       linphone_core_abort_authentication(linphone_gtk_get_core(),info);
-       gtk_widget_destroy(window);
-}
-
-void linphone_gtk_password_ok(GtkWidget *w){
-       GtkWidget *entry;
-       GtkWidget *window=gtk_widget_get_toplevel(w);
-       LinphoneAuthInfo *info;
-       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
-       g_object_weak_unref(G_OBJECT(window),(GWeakNotify)linphone_auth_info_destroy,info);
-       entry=linphone_gtk_get_widget(window,"password_entry");
-       linphone_auth_info_set_passwd(info,gtk_entry_get_text(GTK_ENTRY(entry)));
-       linphone_auth_info_set_userid(info,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"userid_entry"))));
-       linphone_core_add_auth_info(linphone_gtk_get_core(),info);
-       gtk_widget_destroy(window);
-}
-
-static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username){
-       GtkWidget *w=linphone_gtk_create_window("password");
-       GtkWidget *label=linphone_gtk_get_widget(w,"message");
-       LinphoneAuthInfo *info;
-       gchar *msg;
-       GtkWidget *mw=linphone_gtk_get_main_window();
-       
-       if (mw && GTK_WIDGET_VISIBLE(linphone_gtk_get_widget(mw,"login_frame"))){
-               /*don't prompt for authentication when login frame is visible*/
-               linphone_core_abort_authentication(lc,NULL);
-               return;
-       }
-
-       msg=g_strdup_printf(_("Please enter your password for username <i>%s</i>\n at domain <i>%s</i>:"),
-               username,realm);
-       gtk_label_set_markup(GTK_LABEL(label),msg);
-       g_free(msg);
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"userid_entry")),username);
-       info=linphone_auth_info_new(username, NULL, NULL, NULL,realm);
-       g_object_set_data(G_OBJECT(w),"auth_info",info);
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_auth_info_destroy,info);
-       gtk_widget_show(w);
-       auth_timeout_new(w);
-}
-
-static void linphone_gtk_display_status(LinphoneCore *lc, const char *status){
-       GtkWidget *w=linphone_gtk_get_main_window();
-       GtkWidget *status_bar=linphone_gtk_get_widget(w,"status_bar");
-       gtk_statusbar_push(GTK_STATUSBAR(status_bar),
-                       gtk_statusbar_get_context_id(GTK_STATUSBAR(status_bar),""),
-                       status);
-}
-
-static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg){
-       linphone_gtk_display_something(GTK_MESSAGE_INFO,msg);
-}
-
-static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning){
-       linphone_gtk_display_something(GTK_MESSAGE_WARNING,warning);
-}
-
-static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url){
-       char richtext[4096];
-       snprintf(richtext,sizeof(richtext),"%s %s",msg,url);
-       linphone_gtk_display_something(GTK_MESSAGE_INFO,richtext);
-}
-
-static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl){
-       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
-       if (w) linphone_gtk_call_log_update(w);
-}
-
-static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cs, const char *msg){
-       switch(cs){
-               case LinphoneCallConnected:
-                       if (linphone_gtk_use_in_call_view())
-                               linphone_gtk_in_call_view_set_in_call();
-                       linphone_gtk_enable_mute_button(
-                               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute")),
-                       TRUE);
-               break;
-               case LinphoneCallError:
-                       linphone_gtk_call_terminated(msg);
-               break;
-               case LinphoneCallEnd:
-                       linphone_gtk_call_terminated(NULL);
-               break;
-               case LinphoneCallIncomingReceived:
-                       linphone_gtk_inv_recv (lc,call);
-               break;
-               default:
-               break;
-       }
-}
-
-static void icon_popup_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){
-       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(status_icon),"menu");
-       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,gtk_status_icon_position_menu,status_icon,button,activate_time);
-}
-
-void linphone_gtk_open_browser(const char *url){
-       /*in gtk 2.16, gtk_show_uri does not work...*/
-#ifndef WIN32
-#if GTK_CHECK_VERSION(2,18,3)
-       gtk_show_uri(NULL,url,GDK_CURRENT_TIME,NULL);
-#else
-       char cl[255];
-       snprintf(cl,sizeof(cl),"/usr/bin/x-www-browser %s",url);
-       g_spawn_command_line_async(cl,NULL);
-#endif
-#else /*WIN32*/
-       ShellExecute(0,"open",url,NULL,NULL,1);
-#endif
-}
-
-void linphone_gtk_link_to_website(GtkWidget *item){
-       const gchar *home=(const gchar*)g_object_get_data(G_OBJECT(item),"home");
-       linphone_gtk_open_browser(home);
-}
-
-static GtkWidget *create_icon_menu(){
-       GtkWidget *menu=gtk_menu_new();
-       GtkWidget *menu_item;
-       GtkWidget *image;
-       gchar *tmp;
-       const gchar *homesite;
-       
-       homesite=linphone_gtk_get_ui_config("home","http://www.linphone.org");
-       menu_item=gtk_image_menu_item_new_with_label(_("Website link"));
-       tmp=g_strdup(homesite);
-       g_object_set_data(G_OBJECT(menu_item),"home",tmp);
-       g_object_weak_ref(G_OBJECT(menu_item),(GWeakNotify)g_free,tmp);
-       
-       image=gtk_image_new_from_stock(GTK_STOCK_HELP,GTK_ICON_SIZE_MENU);
-       gtk_widget_show(image);
-       gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
-       //g_object_unref(G_OBJECT(image));
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_link_to_website,NULL);
-       
-       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT,NULL);
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_about,NULL);
-       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT,NULL);
-       gtk_widget_show(menu_item);
-       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
-       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)gtk_main_quit,NULL);
-       gtk_widget_show(menu);
-       return menu;
-}
-
-static GtkStatusIcon *icon=NULL;
-
-static void linphone_gtk_init_status_icon(){
-       const char *icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
-       GdkPixbuf *pbuf=create_pixbuf(icon_path);
-       GtkWidget *menu=create_icon_menu();
-       const char *title;
-       icon=gtk_status_icon_new_from_pixbuf(pbuf);
-       g_object_unref(G_OBJECT(pbuf));
-       g_signal_connect_swapped(G_OBJECT(icon),"activate",(GCallback)linphone_gtk_show_main_window,linphone_gtk_get_main_window());
-       g_signal_connect(G_OBJECT(icon),"popup-menu",(GCallback)icon_popup_menu,NULL);
-       title=linphone_gtk_get_ui_config("title",_("Linphone - a video internet phone"));
-       gtk_status_icon_set_tooltip(icon,title);
-       gtk_status_icon_set_visible(icon,TRUE);
-       g_object_set_data(G_OBJECT(icon),"menu",menu);
-       g_object_weak_ref(G_OBJECT(icon),(GWeakNotify)gtk_widget_destroy,menu);
-}
-
-void linphone_gtk_load_identities(void){
-       const MSList *elem;
-       GtkComboBox *box=GTK_COMBO_BOX(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"identities"));
-       char *def_identity;
-       LinphoneProxyConfig *def=NULL;
-       int def_index=0,i;
-       GtkListStore *store;
-
-       store=GTK_LIST_STORE(gtk_combo_box_get_model(box));
-       gtk_list_store_clear(store);
-
-       linphone_core_get_default_proxy(linphone_gtk_get_core(),&def);
-       def_identity=g_strdup_printf(_("%s (Default)"),linphone_core_get_primary_contact(linphone_gtk_get_core()));
-       gtk_combo_box_append_text(box,def_identity);
-       g_free(def_identity);
-       for(i=1,elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());
-                       elem!=NULL;
-                       elem=ms_list_next(elem),i++){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               gtk_combo_box_append_text(box,linphone_proxy_config_get_identity(cfg));
-               if (cfg==def) {
-                       def_index=i;
-               }
-       }
-       gtk_combo_box_set_active(box,def_index);
-}
-
-static void linphone_gtk_dtmf_clicked(GtkButton *button){
-       const char *label=gtk_button_get_label(button);
-       GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"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],100);
-       if (linphone_core_in_call(linphone_gtk_get_core())){
-               linphone_core_send_dtmf(linphone_gtk_get_core(),label[0]);
-       }
-}
-
-static void linphone_gtk_connect_digits(void){
-       GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"dtmf_table"));
-       GList *children=gtk_container_get_children(cont);
-       GList *elem;
-       for(elem=children;elem!=NULL;elem=elem->next){
-               GtkButton *button=GTK_BUTTON(elem->data);
-               g_signal_connect(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_dtmf_clicked,NULL);
-       }
-}
-
-static void linphone_gtk_check_menu_items(void){
-       bool_t audio_only=!linphone_core_video_enabled(linphone_gtk_get_core());
-       bool_t selfview=linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT);
-       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
-                                       linphone_gtk_get_main_window(),
-                                       audio_only ? "audio_only_item" : "video_item")), TRUE);
-       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
-                                       linphone_gtk_get_main_window(),"selfview_item")),selfview);
-}
-
-static gboolean linphone_gtk_can_manage_accounts(){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       const MSList *elem;
-       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
-               SipSetup *ss=(SipSetup*)elem->data;
-               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
-                       return TRUE;
-               }
-       }
-       return FALSE;
-}
-
-static void linphone_gtk_configure_main_window(){
-       static gboolean config_loaded=FALSE;
-       static const char *title;
-       static const char *home;
-       static const char *start_call_icon;
-       static const char *stop_call_icon;
-       static const char *search_icon;
-       static gboolean update_check_menu;
-       static gboolean buttons_have_borders;
-       GtkWidget *w=linphone_gtk_get_main_window();
-       if (!config_loaded){
-               title=linphone_gtk_get_ui_config("title","Linphone");
-               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");
-               stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.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);
-               config_loaded=TRUE;
-       }
-       linphone_gtk_configure_window(w,"main_window");
-       if (title) {
-               gtk_window_set_title(GTK_WINDOW(w),title);
-#if GTK_CHECK_VERSION(2,16,0)
-               gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),title);
-#endif
-       }
-       if (start_call_icon){
-               GdkPixbuf *pbuf=create_pixbuf(start_call_icon);
-               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"start_call_icon")),pbuf);
-               if (buttons_have_borders)
-                       gtk_button_set_relief(GTK_BUTTON(linphone_gtk_get_widget(w,"start_call")),GTK_RELIEF_NORMAL);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-       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);
-               if (buttons_have_borders)
-                       gtk_button_set_relief(GTK_BUTTON(linphone_gtk_get_widget(w,"terminate_call")),GTK_RELIEF_NORMAL);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-       if (search_icon){
-               GdkPixbuf *pbuf=create_pixbuf(search_icon);
-               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"directory_search_button_icon")),pbuf);
-               g_object_unref(G_OBJECT(pbuf));
-       }
-       if (home){
-               gchar *tmp;
-               GtkWidget *menu_item=linphone_gtk_get_widget(w,"home_item");
-               tmp=g_strdup(home);
-               g_object_set_data(G_OBJECT(menu_item),"home",tmp);
-       }
-       {
-               GdkPixbuf *pbuf=create_pixbuf("contact-orange.png");
-               if (pbuf) {
-                       gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"contact_tab_icon")),pbuf);
-                       g_object_unref(G_OBJECT(pbuf));
-               }
-       }
-       {
-               GdkPixbuf *pbuf=create_pixbuf("dialer-orange.png");
-               if (pbuf) {
-                       gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"keypad_tab_icon")),pbuf);
-                       g_object_unref(G_OBJECT(pbuf));
-               }
-       }
-       if (!linphone_gtk_can_manage_accounts())
-               gtk_widget_hide(linphone_gtk_get_widget(w,"run_assistant"));
-       if (update_check_menu){
-               gtk_widget_show(linphone_gtk_get_widget(w,"versioncheck"));
-       }
-}
-
-void linphone_gtk_manage_login(void){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       LinphoneProxyConfig *cfg=NULL;
-       linphone_core_get_default_proxy(lc,&cfg);
-       if (cfg){
-               SipSetup *ss=linphone_proxy_config_get_sip_setup(cfg);
-               if (ss && (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_LOGIN)){
-                       linphone_gtk_show_login_frame(cfg);
-               }
-       }
-}
-
-static void linphone_gtk_init_main_window(){
-       GtkWidget *main_window;
-
-       linphone_gtk_configure_main_window();
-       linphone_gtk_manage_login();
-       load_uri_history();
-       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();
-       linphone_gtk_check_menu_items();
-       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(main_window,
-                                       "incall_mute")),FALSE);
-       linphone_gtk_enable_hold_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,
-                                       "hold_call")),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*/
-}
-
-void linphone_gtk_close(){
-       /* couldn't find a way to prevent closing to destroy the main window*/
-       LinphoneCore *lc=linphone_gtk_get_core();
-       the_ui=NULL;
-       the_ui=linphone_gtk_create_window("main");
-       linphone_gtk_init_main_window();
-       /*shutdown call if any*/
-       if (linphone_core_in_call(lc)){
-               linphone_core_terminate_call(lc,NULL);
-               linphone_gtk_call_terminated(NULL);
-       }
-       linphone_core_enable_video_preview(lc,FALSE);
-}
-
-void linphone_gtk_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
-       if (verbose){
-               const char *lname="undef";
-               char *msg;
-               #ifdef __linux
-               va_list cap;/*copy of our argument list: a va_list cannot be re-used (SIGSEGV on linux 64 bits)*/
-               #endif
-               switch(lev){
-                       case ORTP_DEBUG:
-                               lname="debug";
-                               break;
-                       case ORTP_MESSAGE:
-                               lname="message";
-                               break;
-                       case ORTP_WARNING:
-                               lname="warning";
-                               break;
-                       case ORTP_ERROR:
-                               lname="error";
-                               break;
-                       case ORTP_FATAL:
-                               lname="fatal";
-                               break;
-                       default:
-                               g_error("Bad level !");
-               }
-#ifdef __linux
-               va_copy(cap,args);
-               msg=g_strdup_vprintf(fmt,cap);
-               va_end(cap);
-#else
-               msg=g_strdup_vprintf(fmt,args);
-#endif
-               fprintf(stdout,"linphone-%s : %s\n",lname,msg);
-               ortp_free(msg);
-       }
-       linphone_gtk_log_push(lev,fmt,args);
-}
-
-
-static void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){
-    GtkEntry * uri_bar =GTK_ENTRY(linphone_gtk_get_widget(
-               linphone_gtk_get_main_window(), "uribar"));
-       linphone_gtk_show_main_window();
-       gtk_entry_set_text(uri_bar, refer_to);
-       linphone_gtk_start_call(linphone_gtk_get_main_window());
-}
-
-static void linphone_gtk_check_soundcards(){
-       const char **devices=linphone_core_get_sound_devices(linphone_gtk_get_core());
-       if (devices==NULL || devices[0]==NULL){
-               linphone_gtk_display_something(GTK_MESSAGE_WARNING,
-                   _("No sound cards have been detected on this computer.\n"
-                           "You won't be able to send or receive audio calls."));
-       }
-}
-
-int main(int argc, char *argv[]){
-#ifdef ENABLE_NLS
-       void *p;
-#endif
-       const char *config_file;
-       const char *factory_config_file;
-       const char *lang;
-       GtkSettings *settings;
-       GdkPixbuf *pbuf;
-
-       g_thread_init(NULL);
-       gdk_threads_init();
-       
-       progpath = strdup(argv[0]);
-       
-       config_file=linphone_gtk_get_config_file();
-
-#ifdef WIN32
-       /*workaround for windows: sometimes LANG is defined to an integer value, not understood by gtk */
-       if ((lang=getenv("LANG"))!=NULL){
-               if (atoi(lang)!=0){
-                       char tmp[128];
-                       snprintf(tmp,sizeof(tmp),"LANG=",lang);
-                       _putenv(tmp);
-               }
-       }
-#else
-       /*for pulseaudio:*/
-       g_setenv("PULSE_PROP_media.role", "phone", TRUE);
-#endif
-
-       if ((lang=linphone_gtk_get_lang(config_file))!=NULL && lang[0]!='\0'){
-#ifdef WIN32
-               char tmp[128];
-               snprintf(tmp,sizeof(tmp),"LANG=%s",lang);
-               _putenv(tmp);
-#else
-               setenv("LANG",lang,1);
-#endif
-       }
-
-#ifdef ENABLE_NLS
-       p=bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
-       if (p==NULL) perror("bindtextdomain failed");
-       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-       textdomain (GETTEXT_PACKAGE);
-#else
-       g_message("NLS disabled.\n");
-#endif
-#ifdef WIN32
-       gtk_rc_add_default_file("./gtkrc");
-#endif
-       gdk_threads_enter();
-       
-       if (!gtk_init_with_args(&argc,&argv,_("A free SIP video-phone"),
-                               linphone_options,NULL,NULL)){
-               gdk_threads_leave();
-               return -1;
-       }
-       
-       settings=gtk_settings_get_default();
-       g_object_set(settings, "gtk-menu-images", TRUE, NULL);
-       g_object_set(settings, "gtk-button-images", TRUE, NULL);
-#ifdef WIN32
-       if (workingdir!=NULL)
-               _chdir(workingdir);
-#endif
-       /* Now, look for the factory configuration file, we do it this late
-                since we want to have had time to change directory and to parse
-                the options, in case we needed to access the working directory */
-       factory_config_file = linphone_gtk_get_factory_config_file();
-
-       if (linphone_core_wake_up_possible_already_running_instance(
-               config_file, addr_to_call) == 0){
-               g_message("addr_to_call=%s",addr_to_call);
-               g_warning("Another running instance of linphone has been detected. It has been woken-up.");
-               g_warning("This instance is going to exit now.");
-               gdk_threads_leave();
-               return 0;
-       }
-
-       add_pixmap_directory("pixmaps");
-       add_pixmap_directory(PACKAGE_DATA_DIR "/pixmaps/linphone");
-
-       
-       g_set_application_name("Linphone");
-       pbuf=create_pixbuf(linphone_gtk_get_ui_config("icon",LINPHONE_ICON));
-       if (pbuf!=NULL) gtk_window_set_default_icon(pbuf);
-       
-       the_ui=linphone_gtk_create_window("main");
-       
-       linphone_gtk_create_log_window();
-       linphone_core_enable_logs_with_cb(linphone_gtk_log_handler);
-
-       linphone_gtk_init_liblinphone(config_file, factory_config_file);
-       /* do not lower timeouts under 30 ms because it exhibits a bug on gtk+/win32, with cpu running 20% all the time...*/
-       gtk_timeout_add(30,(GtkFunction)linphone_gtk_iterate,(gpointer)linphone_gtk_get_core());
-       gtk_timeout_add(30,(GtkFunction)linphone_gtk_check_logs,(gpointer)NULL);
-       linphone_gtk_init_main_window();
-       linphone_gtk_init_status_icon();
-       if (!iconified){
-               linphone_gtk_show_main_window();
-               linphone_gtk_check_soundcards();
-       }
-       if (linphone_gtk_get_ui_config_int("update_check_menu",0)==0)
-               linphone_gtk_check_for_new_version();
-
-       gtk_main();
-       gdk_threads_leave();
-       linphone_gtk_destroy_log_window();
-       linphone_core_destroy(the_core);
-       /*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);
-       free(progpath);
-       return 0;
-}
diff --git a/gtk-glade/main.glade b/gtk-glade/main.glade
deleted file mode 100644 (file)
index 67701fb..0000000
+++ /dev/null
@@ -1,1462 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="main">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="icon">linphone2.png</property>
-    <signal name="destroy" handler="linphone_gtk_close"/>
-    <child>
-      <widget class="GtkVBox" id="vbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkMenuBar" id="main_menubar">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkMenuItem" id="main_menu">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Linphone</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="run_assistant">
-                        <property name="label" translatable="yes">Assistant</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_create_assistant"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image1">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-preferences</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem5">
-                        <property name="label">gtk-preferences</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="linphone_gtk_show_parameters"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem1">
-                        <property name="label" translatable="yes">Call history</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_show_call_logs"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image2">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-justify-fill</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="logout">
-                        <property name="label">gtk-disconnect</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="linphone_gtk_logout_clicked"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="quit">
-                        <property name="label">gtk-quit</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="gtk_main_quit"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkMenuItem" id="modes">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">_Modes</property>
-                <property name="use_underline">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu_mode">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkRadioMenuItem" id="audio_only_item">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Audio only</property>
-                        <property name="use_underline">True</property>
-                        <property name="draw_as_radio">True</property>
-                        <property name="group">video_item</property>
-                        <signal name="activate" handler="linphone_gtk_set_audio_only"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkRadioMenuItem" id="video_item">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">Audio &amp; Video</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <property name="draw_as_radio">True</property>
-                        <property name="group">audio_only_item</property>
-                        <signal name="activate" handler="linphone_gtk_set_audio_video"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                        <property name="visible">True</property>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckMenuItem" id="selfview_item">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Enable self-view</property>
-                        <property name="use_underline">True</property>
-                        <property name="active">True</property>
-                        <signal name="toggled" handler="linphone_gtk_enable_self_view"/>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkImageMenuItem" id="menuitem4">
-                <property name="label">gtk-help</property>
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_underline">True</property>
-                <property name="use_stock">True</property>
-                <child>
-                  <widget class="GtkMenu" id="menu3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="show_logs">
-                        <property name="label" translatable="yes">Show debug messages</property>
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_log_show"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image3">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-info</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="menuitem6">
-                        <property name="label">gtk-about</property>
-                        <property name="visible">True</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="linphone_gtk_show_about"/>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="home_item">
-                        <property name="label" translatable="yes">Homepage</property>
-                        <property name="visible">True</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_link_to_website"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image4">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-home</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkImageMenuItem" id="versioncheck">
-                        <property name="label" translatable="yes">Check for updates</property>
-                        <property name="use_stock">False</property>
-                        <signal name="activate" handler="linphone_gtk_check_for_updates"/>
-                        <child internal-child="image">
-                          <widget class="GtkImage" id="image5">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-info</property>
-                            <property name="icon-size">1</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHBox" id="hbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkVBox" id="main_frame">
-                <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkHBox" id="address_bar">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkButton" id="start_call">
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="tooltip" translatable="yes">Start call</property>
-                        <property name="relief">none</property>
-                        <signal name="clicked" handler="linphone_gtk_start_call"/>
-                        <child>
-                          <widget class="GtkHBox" id="hbox4">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkImage" id="start_call_icon">
-                                <property name="visible">True</property>
-                                <property name="stock">gtk-apply</property>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="start_call_label">
-                                <property name="label" translatable="yes">Start call</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">10</property>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkFrame" id="frame4">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label_xalign">0</property>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment4">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="left_padding">5</property>
-                            <property name="right_padding">5</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox3">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkEntry" id="uribar">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="has_focus">True</property>
-                                    <property name="tooltip" translatable="yes">Enter username, phone number, or full sip address</property>
-                                    <property name="invisible_char">&#x25CF;</property>
-                                    <signal name="activate" handler="linphone_gtk_uri_bar_activate"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label9">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">SIP address or phone number:</property>
-                            <property name="use_markup">True</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkButton" id="terminate_call">
-                        <property name="visible">True</property>
-                        <property name="sensitive">False</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="has_tooltip">True</property>
-                        <property name="tooltip" translatable="yes">Terminate call</property>
-                        <property name="relief">none</property>
-                        <signal name="clicked" handler="linphone_gtk_terminate_call"/>
-                        <child>
-                          <widget class="GtkHBox" id="hbox21">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkImage" id="terminate_call_icon">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="stock">gtk-close</property>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="terminate_call_label">
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Terminate call</property>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="fill">False</property>
-                        <property name="padding">10</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="padding">8</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkNotebook" id="viewswitch">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <child>
-                      <widget class="GtkVBox" id="idle_frame">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox5">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkVBox" id="vbox5">
-                                <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <widget class="GtkFrame" id="contact_list_frame">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label_xalign">0</property>
-                                    <child>
-                                      <widget class="GtkAlignment" id="alignment6">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="left_padding">12</property>
-                                        <property name="right_padding">12</property>
-                                        <child>
-                                          <widget class="GtkVBox" id="vbox7">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="orientation">vertical</property>
-                                            <child>
-                                              <widget class="GtkHBox" id="filtering_box">
-                                                <property name="visible">True</property>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label2">
-                                                    <property name="visible">True</property>
-                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                    <property name="label" translatable="yes">Lookup:</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="padding">12</property>
-                                                    <property name="position">0</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkEntry" id="search_bar">
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                    <property name="invisible_char">&#x25CF;</property>
-                                                    <signal name="changed" handler="linphone_gtk_show_friends"/>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="padding">4</property>
-                                                    <property name="position">1</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label_in">
-                                                    <property name="visible">True</property>
-                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                    <property name="label" translatable="yes">in</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="padding">8</property>
-                                                    <property name="position">2</property>
-                                                  </packing>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkComboBox" id="show_category">
-                                                    <property name="visible">True</property>
-                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                    <property name="active">0</property>
-                                                    <property name="items" translatable="yes">All users
-Online users</property>
-                                                    <signal name="changed" handler="linphone_gtk_show_friends"/>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="padding">4</property>
-                                                    <property name="position">3</property>
-                                                  </packing>
-                                                </child>
-                                              </widget>
-                                              <packing>
-                                                <property name="expand">False</property>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                                                <property name="visible">True</property>
-                                                <property name="can_focus">True</property>
-                                                <property name="hscrollbar_policy">automatic</property>
-                                                <property name="vscrollbar_policy">automatic</property>
-                                                <child>
-                                                  <widget class="GtkTreeView" id="contact_list">
-                                                    <property name="height_request">120</property>
-                                                    <property name="visible">True</property>
-                                                    <property name="can_focus">True</property>
-                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                    <signal name="button_press_event" handler="linphone_gtk_contact_list_button_pressed"/>
-                                                    <signal name="cursor_changed" handler="linphone_gtk_contact_clicked"/>
-                                                    <signal name="row_activated" handler="linphone_gtk_contact_activated"/>
-                                                    <signal name="popup_menu" handler="linphone_gtk_popup_contact_menu"/>
-                                                  </widget>
-                                                </child>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">1</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkFrame" id="directory_search_box">
-                                                <property name="visible">True</property>
-                                                <property name="label_xalign">0</property>
-                                                <property name="shadow_type">none</property>
-                                                <child>
-                                                  <widget class="GtkHBox" id="directory_search_vbox">
-                                                    <property name="visible">True</property>
-                                                    <child>
-                                                      <widget class="GtkEntry" id="directory_search_entry">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
-                                                        <property name="invisible_char">&#x25CF;</property>
-                                                        <signal name="focus_in_event" handler="linphone_gtk_directory_search_focus_in"/>
-                                                        <signal name="activate" handler="linphone_gtk_directory_search_activate"/>
-                                                        <signal name="icon_press" handler="linphone_gtk_directory_search_activate"/>
-                                                        <signal name="focus_out_event" handler="linphone_gtk_directory_search_focus_out"/>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="position">0</property>
-                                                      </packing>
-                                                    </child>
-                                                    <child>
-                                                      <widget class="GtkButton" id="directory_search_button">
-                                                        <property name="visible">True</property>
-                                                        <property name="can_focus">True</property>
-                                                        <property name="receives_default">True</property>
-                                                        <property name="relief">none</property>
-                                                        <signal name="clicked" handler="linphone_gtk_directory_search_button_clicked"/>
-                                                        <child>
-                                                          <widget class="GtkHBox" id="hbox12">
-                                                            <property name="visible">True</property>
-                                                            <child>
-                                                            <widget class="GtkImage" id="directory_search_button_icon">
-                                                            <property name="visible">True</property>
-                                                            <property name="stock">gtk-find</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="position">0</property>
-                                                            </packing>
-                                                            </child>
-                                                            <child>
-                                                            <widget class="GtkLabel" id="directory_search_button_label">
-                                                            <property name="visible">True</property>
-                                                            <property name="label" translatable="yes">Search</property>
-                                                            </widget>
-                                                            <packing>
-                                                            <property name="position">1</property>
-                                                            </packing>
-                                                            </child>
-                                                          </widget>
-                                                        </child>
-                                                      </widget>
-                                                      <packing>
-                                                        <property name="expand">False</property>
-                                                        <property name="position">1</property>
-                                                      </packing>
-                                                    </child>
-                                                  </widget>
-                                                </child>
-                                                <child>
-                                                  <widget class="GtkLabel" id="label14">
-                                                    <property name="visible">True</property>
-                                                    <property name="label" translatable="yes">&lt;b&gt;Add contacts from directory&lt;/b&gt;</property>
-                                                    <property name="use_markup">True</property>
-                                                  </widget>
-                                                  <packing>
-                                                    <property name="type">label_item</property>
-                                                  </packing>
-                                                </child>
-                                              </widget>
-                                              <packing>
-                                                <property name="expand">False</property>
-                                                <property name="fill">False</property>
-                                                <property name="padding">5</property>
-                                                <property name="position">2</property>
-                                              </packing>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label12">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="label" translatable="yes">&lt;b&gt;Contact list&lt;/b&gt;</property>
-                                        <property name="use_markup">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="type">label_item</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="padding">8</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox7">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkToggleButton" id="main_mute">
-                                        <property name="label" translatable="yes">Mute</property>
-                                        <property name="sensitive">False</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkHBox" id="internet_kind_controls">
-                                    <child>
-                                      <widget class="GtkLabel" id="label7">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Internet connection:</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkComboBox" id="internet_kind">
-                                        <property name="visible">True</property>
-                                        <property name="active">0</property>
-                                        <property name="items" translatable="yes">ADSL
-Fiber Channel</property>
-                                        <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="padding">8</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHBox" id="hbox6">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkFrame" id="identity_frame">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label_xalign">0</property>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox9">
-                                    <property name="visible">True</property>
-                                    <child>
-                                      <widget class="GtkAlignment" id="alignment8">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="left_padding">12</property>
-                                        <child>
-                                          <widget class="GtkComboBox" id="identities">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="active">0</property>
-                                            <property name="items" translatable="yes">Default</property>
-                                            <signal name="changed" handler="linphone_gtk_used_identity_changed"/>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="presence_button">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <signal name="clicked" handler="linphone_gtk_my_presence_clicked"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkLabel" id="label17">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">My current identity:</property>
-                                    <property name="use_markup">True</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="type">label_item</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox2">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkImage" id="contact_tab_icon">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-missing-image</property>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label15">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Contacts</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="tab_fill">False</property>
-                        <property name="type">tab</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkVBox" id="keypad_frame">
-                        <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkFrame" id="frame3">
-                            <property name="visible">True</property>
-                            <property name="label_xalign">0.5</property>
-                            <property name="shadow_type">none</property>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment5">
-                                <property name="visible">True</property>
-                                <property name="xscale">0</property>
-                                <property name="yscale">0</property>
-                                <child>
-                                  <widget class="GtkAspectFrame" id="aspectframe1">
-                                    <property name="visible">True</property>
-                                    <property name="label_xalign">0</property>
-                                    <child>
-                                      <widget class="GtkTable" id="dtmf_table">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="border_width">4</property>
-                                        <property name="n_rows">4</property>
-                                        <property name="n_columns">4</property>
-                                        <property name="homogeneous">True</property>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_D">
-                                            <property name="label" translatable="yes">D</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">3</property>
-                                            <property name="right_attach">4</property>
-                                            <property name="top_attach">3</property>
-                                            <property name="bottom_attach">4</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_hash">
-                                            <property name="label" translatable="yes">#</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">2</property>
-                                            <property name="right_attach">3</property>
-                                            <property name="top_attach">3</property>
-                                            <property name="bottom_attach">4</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_0">
-                                            <property name="label" translatable="yes">0</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="top_attach">3</property>
-                                            <property name="bottom_attach">4</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_star">
-                                            <property name="label" translatable="yes">*</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="top_attach">3</property>
-                                            <property name="bottom_attach">4</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_C">
-                                            <property name="label" translatable="yes">C</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">3</property>
-                                            <property name="right_attach">4</property>
-                                            <property name="top_attach">2</property>
-                                            <property name="bottom_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_9">
-                                            <property name="label" translatable="yes">9</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">2</property>
-                                            <property name="right_attach">3</property>
-                                            <property name="top_attach">2</property>
-                                            <property name="bottom_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_8">
-                                            <property name="label" translatable="yes">8</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="top_attach">2</property>
-                                            <property name="bottom_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_7">
-                                            <property name="label" translatable="yes">7</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="top_attach">2</property>
-                                            <property name="bottom_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_B">
-                                            <property name="label" translatable="yes">B</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">3</property>
-                                            <property name="right_attach">4</property>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_6">
-                                            <property name="label" translatable="yes">6</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">2</property>
-                                            <property name="right_attach">3</property>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_5">
-                                            <property name="label" translatable="yes">5</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_4">
-                                            <property name="label" translatable="yes">4</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="top_attach">1</property>
-                                            <property name="bottom_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_A">
-                                            <property name="label" translatable="yes">A</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">3</property>
-                                            <property name="right_attach">4</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_3">
-                                            <property name="label" translatable="yes">3</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">2</property>
-                                            <property name="right_attach">3</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_2">
-                                            <property name="label" translatable="yes">2</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="left_attach">1</property>
-                                            <property name="right_attach">2</property>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkButton" id="dtmf_1">
-                                            <property name="label" translatable="yes">1</property>
-                                            <property name="width_request">50</property>
-                                            <property name="height_request">50</property>
-                                            <property name="visible">True</property>
-                                            <property name="can_focus">True</property>
-                                            <property name="receives_default">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="x_options">GTK_FILL</property>
-                                            <property name="y_options"></property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <placeholder/>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkHBox" id="hbox8">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkImage" id="keypad_tab_icon">
-                            <property name="visible">True</property>
-                            <property name="stock">gtk-missing-image</property>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label16">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">Keypad</property>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                        <property name="tab_fill">False</property>
-                        <property name="type">tab</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkFrame" id="in_call_frame">
-                        <property name="label_xalign">0.5</property>
-                        <property name="shadow_type">none</property>
-                        <child>
-                          <widget class="GtkAlignment" id="alignment1">
-                            <property name="visible">True</property>
-                            <property name="left_padding">12</property>
-                            <property name="right_padding">12</property>
-                            <child>
-                              <widget class="GtkVBox" id="vbox3">
-                                <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <widget class="GtkImage" id="in_call_animation">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-info</property>
-                                    <property name="icon-size">5</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkFrame" id="frame2">
-                                    <property name="visible">True</property>
-                                    <property name="label_xalign">0</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="in_call_uri">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">label</property>
-                                        <property name="justify">center</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label3">
-                                        <property name="visible">True</property>
-                                        <property name="use_markup">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="type">label_item</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkFrame" id="frame1">
-                                    <property name="visible">True</property>
-                                    <property name="label_xalign">0</property>
-                                    <child>
-                                      <widget class="GtkVBox" id="vbox4">
-                                        <property name="visible">True</property>
-                                        <property name="orientation">vertical</property>
-                                        <child>
-                                          <widget class="GtkLabel" id="in_call_duration">
-                                            <property name="visible">True</property>
-                                            <property name="label" translatable="yes">Duration</property>
-                                            <property name="justify">center</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="call_label">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Duration:</property>
-                                        <property name="use_markup">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="type">label_item</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkHButtonBox" id="hbuttonbox4">
-                                    <property name="visible">True</property>
-                                    <property name="layout_style">spread</property>
-                                    <child>
-                                      <widget class="GtkToggleButton" id="incall_mute">
-                                        <property name="label" translatable="yes">Mute</property>
-                                        <property name="visible">True</property>
-                                        <property name="sensitive">False</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkToggleButton" id="hold_call">
-                                        <property name="label" translatable="yes">HoldOn</property>
-                                        <property name="visible">True</property>
-                                        <property name="sensitive">False</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <signal name="toggled" handler="linphone_gtk_hold_toggled"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">3</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="in_call_status">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">In call</property>
-                            <property name="use_markup">True</property>
-                            <property name="justify">center</property>
-                          </widget>
-                          <packing>
-                            <property name="type">label_item</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label18">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Call Details</property>
-                      </widget>
-                      <packing>
-                        <property name="position">2</property>
-                        <property name="tab_fill">False</property>
-                        <property name="type">tab</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkFrame" id="login_frame">
-                <property name="label_xalign">0</property>
-                <child>
-                  <widget class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <widget class="GtkVBox" id="vbox1">
-                        <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkFrame" id="frame5">
-                            <property name="visible">True</property>
-                            <property name="label_xalign">0</property>
-                            <child>
-                              <widget class="GtkAlignment" id="alignment3">
-                                <property name="visible">True</property>
-                                <property name="left_padding">12</property>
-                                <property name="right_padding">12</property>
-                                <child>
-                                  <widget class="GtkTable" id="table1">
-                                    <property name="visible">True</property>
-                                    <property name="n_rows">4</property>
-                                    <property name="n_columns">2</property>
-                                    <child>
-                                      <widget class="GtkLabel" id="label8">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Username</property>
-                                      </widget>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label10">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Password</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label13">
-                                        <property name="visible">True</property>
-                                        <property name="label" translatable="yes">Internet connection:</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkEntry" id="login_username">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="invisible_char">&#x25CF;</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkEntry" id="login_password">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="visibility">False</property>
-                                        <property name="invisible_char">&#x25CF;</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">1</property>
-                                        <property name="bottom_attach">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkComboBox" id="login_internet_kind">
-                                        <property name="visible">True</property>
-                                        <property name="active">0</property>
-                                        <property name="items" translatable="yes">ADSL
-Fiber Channel</property>
-                                        <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">2</property>
-                                        <property name="bottom_attach">3</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkCheckButton" id="automatic_login">
-                                        <property name="label" translatable="yes">Automatically log me in</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">False</property>
-                                        <property name="draw_indicator">True</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="left_attach">1</property>
-                                        <property name="right_attach">2</property>
-                                        <property name="top_attach">3</property>
-                                        <property name="bottom_attach">4</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <placeholder/>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="login_label">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Login information</property>
-                                <property name="use_markup">True</property>
-                              </widget>
-                              <packing>
-                                <property name="type">label_item</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox3">
-                            <property name="visible">True</property>
-                            <child>
-                              <widget class="GtkButton" id="login_connect">
-                                <property name="label">gtk-connect</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="clicked" handler="linphone_gtk_login_frame_connect_clicked"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label6">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">&lt;b&gt;Welcome !&lt;/b&gt;</property>
-                    <property name="use_markup">True</property>
-                  </widget>
-                  <packing>
-                    <property name="type">label_item</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkStatusbar" id="status_bar">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="spacing">2</property>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">False</property>
-            <property name="position">2</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/p2pwizard.glade b/gtk-glade/p2pwizard.glade
deleted file mode 100644 (file)
index 79007a6..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Mar 29 21:17:24 2009 -->
-<glade-interface>
-  <widget class="GtkAssistant" id="p2pwizard">
-    <property name="title" translatable="yes">Creating a FONICS account</property>
-    <signal name="apply" handler="linphone_gtk_fonis_wizard_apply"/>
-    <signal name="prepare" handler="linphone_gtk_fonis_wizard_prepare"/>
-    <child>
-      <widget class="GtkLabel" id="label1">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">Welcome !
-This wizard will help you to setup a SIP account. 
-</property>
-        <property name="use_markup">True</property>
-        <property name="justify">GTK_JUSTIFY_CENTER</property>
-        <property name="wrap">True</property>
-        <property name="selectable">True</property>
-      </widget>
-      <packing>
-        <property name="page_type">GTK_ASSISTANT_PAGE_INTRO</property>
-        <property name="title">Introduction</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <child>
-          <widget class="GtkLabel" id="label2">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Please choose a username:</property>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkFrame" id="frame1">
-            <property name="visible">True</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment1">
-                <property name="visible">True</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox2">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkHBox" id="hbox1">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkEntry" id="username">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkButton" id="button1">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="response_id">0</property>
-                            <signal name="clicked" handler="linphone_gtk_fonis_wizard_check_username_clicked"/>
-                            <child>
-                              <widget class="GtkHBox" id="hbox2">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkImage" id="image1">
-                                    <property name="visible">True</property>
-                                    <property name="stock">gtk-apply</property>
-                                  </widget>
-                                </child>
-                                <child>
-                                  <widget class="GtkLabel" id="label5">
-                                    <property name="visible">True</property>
-                                    <property name="label" translatable="yes">Check availability</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="check_result">
-                        <property name="visible">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label4">
-                <property name="visible">True</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-      <packing>
-        <property name="title">Create your account !</property>
-      </packing>
-    </child>
-    <child>
-      <widget class="GtkLabel" id="label3">
-        <property name="visible">True</property>
-        <property name="label" translatable="yes">Done ! Your account is now created and ready to use.</property>
-      </widget>
-      <packing>
-        <property name="page_type">GTK_ASSISTANT_PAGE_CONFIRM</property>
-        <property name="title">Finished !</property>
-      </packing>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/parameters.glade b/gtk-glade/parameters.glade
deleted file mode 100644 (file)
index 3f36713..0000000
+++ /dev/null
@@ -1,1690 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkWindow" id="parameters">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="title" translatable="yes">Settings</property>
-    <property name="icon">linphone2.png</property>
-    <child>
-      <widget class="GtkVBox" id="vbox1">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <widget class="GtkNotebook" id="notebook1">
-            <property name="visible">True</property>
-            <property name="can_focus">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkVBox" id="network_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkFrame" id="transport_frame">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox3">
-                            <property name="visible">True</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <widget class="GtkHBox" id="hbox2">
-                                <property name="visible">True</property>
-                                <child>
-                                  <widget class="GtkCheckButton" id="mtu_set">
-                                    <property name="label" translatable="yes">Set Maximum Transmission Unit:</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">False</property>
-                                    <property name="draw_indicator">True</property>
-                                    <signal name="toggled" handler="linphone_gtk_mtu_set"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkSpinButton" id="mtu">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="adjustment">500 500 3001 1 10 10</property>
-                                    <signal name="value_changed" handler="linphone_gtk_mtu_changed"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="dtmf_sipinfo">
-                                <property name="label" translatable="yes">Send DTMFs as SIP info</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="linphone_gtk_use_sip_info_dtmf_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="ipv6_enabled">
-                                <property name="label" translatable="yes">Use IPv6 instead of IPv4</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="linphone_gtk_ipv6_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">2</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label1">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Transport&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="ports_frame">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table1">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">3</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkSpinButton" id="video_rtp_port">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">1 1 65535 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_video_port_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="audio_rtp_port">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">1 1 65535 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_audio_port_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="sip_port">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="adjustment">1 1 65535 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_sip_port_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label7">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Video RTP/UDP:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label6">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Audio RTP/UDP:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label5">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">SIP (UDP):</property>
-                                <property name="justify">right</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label4">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Ports&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="nat_frame">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkVButtonBox" id="vbuttonbox3">
-                        <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
-                        <child>
-                          <widget class="GtkRadioButton" id="no_nat">
-                            <property name="label" translatable="yes">Direct connection to the Internet</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="active">True</property>
-                            <property name="draw_indicator">True</property>
-                            <signal name="toggled" handler="linphone_gtk_no_firewall_toggled"/>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox4">
-                            <property name="visible">True</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="use_nat_address">
-                                <property name="label" translatable="yes">Behind NAT / Firewall (specify gateway IP below)</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">no_nat</property>
-                                <signal name="toggled" handler="linphone_gtk_use_nat_address_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox21">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label39">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">Public IP address:</property>
-                                    <property name="justify">right</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="nat_address">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="changed" handler="linphone_gtk_nat_address_changed"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkVBox" id="vbox5">
-                            <property name="visible">True</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <widget class="GtkRadioButton" id="use_stun">
-                                <property name="label" translatable="yes">Behind NAT / Firewall (use STUN to resolve)</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="active">True</property>
-                                <property name="draw_indicator">True</property>
-                                <property name="group">no_nat</property>
-                                <signal name="toggled" handler="linphone_gtk_use_stun_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox24">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkLabel" id="label42">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="label" translatable="yes">Stun server:</property>
-                                    <property name="justify">right</property>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkEntry" id="stun_server">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="changed" handler="linphone_gtk_stun_server_changed"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">2</property>
-                          </packing>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label38">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;NAT and Firewall&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox12">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image6">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="stock">gtk-network</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="network">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Network settings</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="multimedia_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkFrame" id="frame14">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment14">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table5">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">6</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkHBox" id="ring_sound_box">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkFileChooserButton" id="ring_chooser">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="file_set" handler="linphone_gtk_ring_file_set"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="play_ring">
-                                    <property name="label">gtk-media-play</property>
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="use_stock">True</property>
-                                    <signal name="clicked" handler="linphone_gtk_play_ring_file"/>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="ring_sound_label">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Ring sound:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">4</property>
-                                <property name="bottom_attach">5</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="alsa_dev">
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="editing_done" handler="linphone_gtk_alsa_special_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="capture_device">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="items" translatable="yes">default soundcard
-</property>
-                                <signal name="changed" handler="linphone_gtk_capture_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="ring_device">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="items" translatable="yes">default soundcard</property>
-                                <signal name="changed" handler="linphone_gtk_ring_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label36">
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">ALSA special device (optional):</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">3</property>
-                                <property name="bottom_attach">4</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label35">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Capture device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label34">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Ring device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label32">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Playback device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="playback_device">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="items" translatable="yes">a sound card
-</property>
-                                <signal name="changed" handler="linphone_gtk_playback_device_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="x_options">GTK_FILL</property>
-                                <property name="y_options">GTK_FILL</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkCheckButton" id="echo_cancelation">
-                                <property name="label" translatable="yes">Enable echo cancellation</property>
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">False</property>
-                                <property name="draw_indicator">True</property>
-                                <signal name="toggled" handler="linphone_gtk_echo_cancelation_toggled"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">5</property>
-                                <property name="bottom_attach">6</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <placeholder/>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label31">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Audio&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame4">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment4">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table2">
-                            <property name="visible">True</property>
-                            <property name="n_rows">2</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkLabel" id="label9">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Video input device:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="y_options">GTK_EXPAND</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="webcams">
-                                <property name="visible">True</property>
-                                <property name="items" translatable="yes">default camera</property>
-                                <signal name="changed" handler="linphone_gtk_cam_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="y_options">GTK_EXPAND</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="video_size_label">
-                                <property name="visible">True</property>
-                                <property name="label" translatable="yes">Prefered video resolution:</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkComboBox" id="video_size">
-                                <property name="visible">True</property>
-                                <property name="active">0</property>
-                                <property name="items" translatable="yes">CIF</property>
-                                <signal name="changed" handler="linphone_gtk_video_size_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="video_frame">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Video&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="fill">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox11">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image5">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="stock">gtk-media-play</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label2">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Multimedia settings</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="sip_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkFrame" id="frame11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="tooltip" translatable="yes">This section defines your SIP address when not using a SIP account</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment11">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table4">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">3</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkLabel" id="label25">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Your display name (eg: John Doe):</property>
-                              </widget>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="displayname">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="changed" handler="linphone_gtk_update_my_contact"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label26">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Your username:</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label27">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Your resulting SIP address:</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="username">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="changed" handler="linphone_gtk_update_my_contact"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkEntry" id="sip_address">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="editable">False</property>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">2</property>
-                                <property name="bottom_attach">3</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label24">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Default identity&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame12">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment12">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkHBox" id="hbox13">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkScrolledWindow" id="scrolledwindow2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="hscrollbar_policy">automatic</property>
-                                <property name="vscrollbar_policy">automatic</property>
-                                <child>
-                                  <widget class="GtkTreeView" id="proxy_list">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkVButtonBox" id="vbuttonbox2">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="orientation">vertical</property>
-                                <child>
-                                  <widget class="GtkButton" id="add_proxy">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="clicked" handler="linphone_gtk_add_proxy"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox14">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image7">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="stock">gtk-add</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="add_proxy_label">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Add</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="edit_proxy">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="clicked" handler="linphone_gtk_edit_proxy"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox16">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image9">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="stock">gtk-edit</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label_proxy2">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Edit</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="remove_proxy">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <signal name="clicked" handler="linphone_gtk_remove_proxy"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox7">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image2">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="stock">gtk-delete</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label_proxy1">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <property name="label" translatable="yes">Remove</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">2</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkButton" id="create_phonics">
-                                    <property name="can_focus">True</property>
-                                    <property name="receives_default">True</property>
-                                    <signal name="clicked" handler="linphone_gtk_create_fonics_account"/>
-                                    <child>
-                                      <widget class="GtkHBox" id="hbox1">
-                                        <property name="visible">True</property>
-                                        <child>
-                                          <widget class="GtkImage" id="image1">
-                                            <property name="visible">True</property>
-                                            <property name="stock">gtk-network</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">0</property>
-                                          </packing>
-                                        </child>
-                                        <child>
-                                          <widget class="GtkLabel" id="label11">
-                                            <property name="visible">True</property>
-                                            <property name="label" translatable="yes">Register to FONICS
-virtual network !</property>
-                                          </widget>
-                                          <packing>
-                                            <property name="position">1</property>
-                                          </packing>
-                                        </child>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="fill">False</property>
-                                    <property name="position">3</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label28">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Proxy accounts&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame13">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment13">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkHButtonBox" id="hbuttonbox3">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <child>
-                              <widget class="GtkButton" id="erase_passwords">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="receives_default">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <signal name="clicked" handler="linphone_gtk_clear_passwords"/>
-                                <child>
-                                  <widget class="GtkHBox" id="hbox18">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <child>
-                                      <widget class="GtkImage" id="image11">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="stock">gtk-delete</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkLabel" id="label30">
-                                        <property name="visible">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="label" translatable="yes">Erase all passwords</property>
-                                      </widget>
-                                      <packing>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="fill">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label29">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Privacy&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox10">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image4">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="pixbuf">stock_people.png</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label3">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Manage SIP Accounts</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="codec_tab">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkFrame" id="frame9">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment9">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkVBox" id="vbox8">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="orientation">vertical</property>
-                            <child>
-                              <widget class="GtkComboBox" id="codec_view">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="active">0</property>
-                                <property name="items" translatable="yes">Audio codecs
-Video codecs</property>
-                                <signal name="changed" handler="linphone_gtk_codec_view_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="expand">False</property>
-                                <property name="position">0</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkHBox" id="hbox_codec">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <child>
-                                  <widget class="GtkScrolledWindow" id="scrolledwindow1">
-                                    <property name="visible">True</property>
-                                    <property name="can_focus">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="hscrollbar_policy">automatic</property>
-                                    <property name="vscrollbar_policy">automatic</property>
-                                    <property name="shadow_type">out</property>
-                                    <child>
-                                      <widget class="GtkTreeView" id="codec_list">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="has_tooltip">True</property>
-                                      </widget>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="position">0</property>
-                                  </packing>
-                                </child>
-                                <child>
-                                  <widget class="GtkVButtonBox" id="vbuttonbox1">
-                                    <property name="visible">True</property>
-                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                    <property name="orientation">vertical</property>
-                                    <child>
-                                      <widget class="GtkButton" id="button4">
-                                        <property name="label">gtk-go-up</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="use_stock">True</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_up"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">0</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="up_codec">
-                                        <property name="label">gtk-go-down</property>
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="use_stock">True</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_down"/>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">1</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="enable_codec">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_enable"/>
-                                        <child>
-                                          <widget class="GtkHBox" id="hbox8">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image3">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="stock">gtk-yes</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkLabel" id="label19">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="label" translatable="yes">Enable</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">1</property>
-                                              </packing>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">2</property>
-                                      </packing>
-                                    </child>
-                                    <child>
-                                      <widget class="GtkButton" id="disable_codec">
-                                        <property name="visible">True</property>
-                                        <property name="can_focus">True</property>
-                                        <property name="receives_default">True</property>
-                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <signal name="clicked" handler="linphone_gtk_codec_disable"/>
-                                        <child>
-                                          <widget class="GtkHBox" id="hbox9">
-                                            <property name="visible">True</property>
-                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                            <child>
-                                              <widget class="GtkImage" id="image8">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="stock">gtk-no</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">0</property>
-                                              </packing>
-                                            </child>
-                                            <child>
-                                              <widget class="GtkLabel" id="label20">
-                                                <property name="visible">True</property>
-                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                                <property name="label" translatable="yes">Disable</property>
-                                              </widget>
-                                              <packing>
-                                                <property name="position">1</property>
-                                              </packing>
-                                            </child>
-                                          </widget>
-                                        </child>
-                                      </widget>
-                                      <packing>
-                                        <property name="expand">False</property>
-                                        <property name="fill">False</property>
-                                        <property name="position">3</property>
-                                      </packing>
-                                    </child>
-                                  </widget>
-                                  <packing>
-                                    <property name="expand">False</property>
-                                    <property name="position">1</property>
-                                  </packing>
-                                </child>
-                              </widget>
-                              <packing>
-                                <property name="position">1</property>
-                              </packing>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label18">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Codecs&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="frame10">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment10">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkTable" id="table3">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="n_rows">2</property>
-                            <property name="n_columns">2</property>
-                            <child>
-                              <widget class="GtkSpinButton" id="upload_bw">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="tooltip" translatable="yes">0 stands for "unlimited"</property>
-                                <property name="adjustment">0 -1 100000 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_upload_bw_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkSpinButton" id="download_bw">
-                                <property name="visible">True</property>
-                                <property name="can_focus">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="tooltip" translatable="yes">0 stands for "unlimited"</property>
-                                <property name="adjustment">0 -1 100000 1 10 10</property>
-                                <signal name="value_changed" handler="linphone_gtk_download_bw_changed"/>
-                              </widget>
-                              <packing>
-                                <property name="left_attach">1</property>
-                                <property name="right_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label23">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Upload speed limit in Kbit/sec:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                              <packing>
-                                <property name="top_attach">1</property>
-                                <property name="bottom_attach">2</property>
-                              </packing>
-                            </child>
-                            <child>
-                              <widget class="GtkLabel" id="label22">
-                                <property name="visible">True</property>
-                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="label" translatable="yes">Download speed limit in Kbit/sec:</property>
-                                <property name="justify">right</property>
-                              </widget>
-                            </child>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label21">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Bandwidth control&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox15">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <child>
-                  <widget class="GtkImage" id="image10">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="stock">gtk-execute</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label33">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="label" translatable="yes">Codecs</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">3</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkVBox" id="vbox2">
-                <property name="visible">True</property>
-                <property name="orientation">vertical</property>
-                <child>
-                  <widget class="GtkFrame" id="lang_frame">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment3">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkComboBox" id="lang_combo">
-                            <property name="visible">True</property>
-                            <property name="items" translatable="yes">C</property>
-                            <signal name="changed" handler="linphone_gtk_lang_changed"/>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="lang_label">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Language&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkFrame" id="ui_level_frame">
-                    <property name="visible">True</property>
-                    <property name="label_xalign">0</property>
-                    <child>
-                      <widget class="GtkAlignment" id="alignment5">
-                        <property name="visible">True</property>
-                        <property name="left_padding">12</property>
-                        <child>
-                          <widget class="GtkCheckButton" id="ui_level">
-                            <property name="label" translatable="yes">Show advanced settings</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="draw_indicator">True</property>
-                            <signal name="toggled" handler="linphone_gtk_ui_level_toggled"/>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label12">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">&lt;b&gt;Level&lt;/b&gt;</property>
-                        <property name="use_markup">True</property>
-                      </widget>
-                      <packing>
-                        <property name="type">label_item</property>
-                      </packing>
-                    </child>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox4">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkImage" id="image13">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-properties</property>
-                    <property name="icon-size">3</property>
-                  </widget>
-                  <packing>
-                    <property name="position">0</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label10">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">User interface</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">4</property>
-                <property name="tab_fill">False</property>
-                <property name="type">tab</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <widget class="GtkHButtonBox" id="hbuttonbox2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="button5">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <signal name="clicked" handler="linphone_gtk_parameters_closed"/>
-                <child>
-                  <widget class="GtkHBox" id="hbox3">
-                    <property name="visible">True</property>
-                    <child>
-                      <widget class="GtkImage" id="image12">
-                        <property name="visible">True</property>
-                        <property name="stock">gtk-apply</property>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkLabel" id="label8">
-                        <property name="visible">True</property>
-                        <property name="label" translatable="yes">Done</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="padding">10</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="padding">5</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/password.glade b/gtk-glade/password.glade
deleted file mode 100644 (file)
index 6617f48..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.16 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="password">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Linphone - Authentication required</property>
-    <property name="modal">True</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox9">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox12">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <child>
-              <widget class="GtkLabel" id="message">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Please enter the domain password</property>
-                <property name="justify">center</property>
-                <property name="wrap">True</property>
-              </widget>
-              <packing>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkTable" id="table1">
-                <property name="visible">True</property>
-                <property name="n_rows">2</property>
-                <property name="n_columns">2</property>
-                <child>
-                  <widget class="GtkLabel" id="userid_label">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">UserID</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="userid_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkLabel" id="label1">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Password:</property>
-                    <property name="justify">right</property>
-                  </widget>
-                  <packing>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkEntry" id="password_entry">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="visibility">False</property>
-                    <property name="invisible_char">&#x25CF;</property>
-                    <signal name="activate" handler="linphone_gtk_password_ok"/>
-                  </widget>
-                  <packing>
-                    <property name="left_attach">1</property>
-                    <property name="right_attach">2</property>
-                    <property name="top_attach">1</property>
-                    <property name="bottom_attach">2</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area8">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="button8">
-                <property name="label" translatable="yes">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_password_ok"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button9">
-                <property name="label" translatable="yes">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_password_cancel"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/propertybox.c b/gtk-glade/propertybox.c
deleted file mode 100644 (file)
index be4073f..0000000
+++ /dev/null
@@ -1,831 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008-2009  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-typedef enum {
-       CAP_IGNORE,
-       CAP_PLAYBACK,
-       CAP_CAPTURE
-}DeviceCap;
-
-static void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, const char *selected, DeviceCap cap){
-       const char **p=devices;
-       int i=0,active=0;
-       /* glade creates a combo box without list model and text renderer,
-       unless we fill it with a dummy text.
-       This dummy text needs to be removed first*/
-       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
-       for(;*p!=NULL;++p){
-               if ( cap==CAP_IGNORE 
-                       || (cap==CAP_CAPTURE && linphone_core_sound_device_can_capture(linphone_gtk_get_core(),*p))
-                       || (cap==CAP_PLAYBACK && linphone_core_sound_device_can_playback(linphone_gtk_get_core(),*p)) ){
-                       gtk_combo_box_append_text(GTK_COMBO_BOX(combo),*p);
-                       if (strcmp(selected,*p)==0) active=i;
-                       i++;
-               }
-       }
-       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
-}
-
-void linphone_gtk_fill_video_sizes(GtkWidget *combo){
-       const MSVideoSizeDef *def=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());;
-       int i,active=0;
-       char vsize_def[256];
-       MSVideoSize cur=linphone_core_get_preferred_video_size(linphone_gtk_get_core());
-       /* glade creates a combo box without list model and text renderer,
-       unless we fill it with a dummy text.
-       This dummy text needs to be removed first*/
-       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
-       for(i=0;def->name!=NULL;++def,++i){
-               snprintf(vsize_def,sizeof(vsize_def),"%s (%ix%i)",def->name,def->vsize.width,def->vsize.height);
-               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),vsize_def);
-               if (cur.width==def->vsize.width && cur.height==def->vsize.height) active=i;
-       }
-       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
-}
-
-void linphone_gtk_parameters_closed(GtkWidget *button){
-       GtkWidget *pb=gtk_widget_get_toplevel(button);
-       gtk_widget_destroy(pb);
-}
-
-void linphone_gtk_update_my_contact(GtkWidget *w){
-       GtkWidget *pb=gtk_widget_get_toplevel(w);
-       const char *username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")));
-       const char *displayname=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")));
-       int port=linphone_core_get_sip_port(linphone_gtk_get_core());
-       LinphoneAddress *parsed=linphone_core_get_primary_contact_parsed(linphone_gtk_get_core());
-       char *contact;
-       g_return_if_fail(parsed!=NULL);
-       if (username[0]=='\0') return;
-
-       linphone_address_set_display_name(parsed,displayname);
-       linphone_address_set_username(parsed,username);
-       linphone_address_set_port_int(parsed,port);
-       contact=linphone_address_as_string(parsed);
-       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"sip_address")),contact);
-       linphone_core_set_primary_contact(linphone_gtk_get_core(),contact);
-       ms_free(contact);
-       linphone_address_destroy(parsed);
-       linphone_gtk_load_identities();
-}
-
-void linphone_gtk_stun_server_changed(GtkWidget *w){
-       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
-       linphone_core_set_stun_server(linphone_gtk_get_core(),addr);
-}
-
-void linphone_gtk_nat_address_changed(GtkWidget *w){
-       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
-       linphone_core_set_nat_address(linphone_gtk_get_core(),addr);
-}
-
-void linphone_gtk_ipv6_toggled(GtkWidget *w){
-       linphone_core_enable_ipv6(linphone_gtk_get_core(),
-                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
-}
-
-void linphone_gtk_sip_port_changed(GtkWidget *w){
-       linphone_core_set_sip_port(linphone_gtk_get_core(),
-                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_audio_port_changed(GtkWidget *w){
-       linphone_core_set_audio_port(linphone_gtk_get_core(),
-                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_video_port_changed(GtkWidget *w){
-       linphone_core_set_video_port(linphone_gtk_get_core(),
-                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_no_firewall_toggled(GtkWidget *w){
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
-               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyNoFirewall);
-}
-
-void linphone_gtk_use_nat_address_toggled(GtkWidget *w){
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
-               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyUseNatAddress);
-}
-
-void linphone_gtk_use_stun_toggled(GtkWidget *w){
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
-               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyUseStun);
-}
-
-void linphone_gtk_mtu_changed(GtkWidget *w){
-       if (GTK_WIDGET_SENSITIVE(w))
-               linphone_core_set_mtu(linphone_gtk_get_core(),gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-}
-
-void linphone_gtk_use_sip_info_dtmf_toggled(GtkWidget *w){
-       linphone_core_set_use_info_for_dtmf(linphone_gtk_get_core(),
-               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
-}
-
-void linphone_gtk_mtu_set(GtkWidget *w){
-       GtkWidget *mtu=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"mtu");
-       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))){
-               gtk_widget_set_sensitive(mtu,TRUE);
-               linphone_gtk_mtu_changed(mtu);
-       }else{
-               gtk_widget_set_sensitive(mtu,FALSE);
-               linphone_core_set_mtu(linphone_gtk_get_core(),0);
-       }
-}
-
-void linphone_gtk_playback_device_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_playback_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_capture_device_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_capture_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_ring_device_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_ringer_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_alsa_special_device_changed(GtkWidget *w){
-       /*
-       const gchar *dev=gtk_entry_get_text(GTK_ENTRY(w));
-       ...*/
-}
-
-void linphone_gtk_cam_changed(GtkWidget *w){
-       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
-       linphone_core_set_video_device(linphone_gtk_get_core(),sel);
-       g_free(sel);
-}
-
-void linphone_gtk_video_size_changed(GtkWidget *w){
-       int sel=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
-       const MSVideoSizeDef *defs=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());
-       if (sel<0) return;
-       linphone_core_set_preferred_video_size(linphone_gtk_get_core(),
-                                       defs[sel].vsize);
-}
-
-void linphone_gtk_ring_file_set(GtkWidget *w){
-       gchar *file=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(w));
-       linphone_core_set_ring(linphone_gtk_get_core(),file);
-       g_free(file);
-}
-
-static void linphone_gtk_end_of_ring(LinphoneCore *lc, void *user_data){
-       gtk_widget_set_sensitive((GtkWidget*)user_data,TRUE);
-}
-
-void linphone_gtk_play_ring_file(GtkWidget *w){
-       if (linphone_core_preview_ring(linphone_gtk_get_core(),
-                               linphone_core_get_ring(linphone_gtk_get_core()),
-                               linphone_gtk_end_of_ring,
-                               w)==0){
-               gtk_widget_set_sensitive(w,FALSE);
-       }
-}
-
-void linphone_gtk_echo_cancelation_toggled(GtkWidget *w){
-       linphone_core_enable_echo_cancellation(linphone_gtk_get_core(),
-               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
-}
-
-enum {
-       CODEC_NAME,
-       CODEC_RATE,
-       CODEC_BITRATE,
-       CODEC_STATUS,
-       CODEC_PARAMS,
-       CODEC_PRIVDATA,
-       CODEC_COLOR,
-       CODEC_INFO,
-       CODEC_NCOLUMNS
-};
-
-static void fmtp_edited(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer userdata){
-       GtkListStore *store=(GtkListStore*)userdata;
-       GtkTreeIter iter;
-       if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(store),&iter,path)){
-               PayloadType *pt;
-               gtk_list_store_set(store,&iter,CODEC_PARAMS,new_text,-1);
-               gtk_tree_model_get(GTK_TREE_MODEL(store),&iter,CODEC_PRIVDATA,&pt,-1);
-               payload_type_set_recv_fmtp(pt,new_text);
-       }
-}
-
-static void linphone_gtk_init_codec_list(GtkTreeView *listview){
-       GtkCellRenderer *renderer;
-       GtkTreeViewColumn *column;
-       GtkTreeSelection *select;
-
-       GtkListStore *store = gtk_list_store_new (CODEC_NCOLUMNS, G_TYPE_STRING,G_TYPE_INT,
-                                                       G_TYPE_FLOAT,
-                                                       G_TYPE_STRING,
-                                                       G_TYPE_STRING,
-                                                       G_TYPE_POINTER,
-                                                       G_TYPE_STRING,
-                                                       G_TYPE_STRING);
-
-       gtk_tree_view_set_model(listview,GTK_TREE_MODEL(store));
-       g_object_unref(G_OBJECT(store));
-
-       renderer = gtk_cell_renderer_text_new ();
-       column = gtk_tree_view_column_new_with_attributes (_("Name"),
-                                                   renderer,
-                                                   "text", CODEC_NAME,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       column = gtk_tree_view_column_new_with_attributes (_("Rate (Hz)"),
-                                                   renderer,
-                                                   "text", CODEC_RATE,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       column = gtk_tree_view_column_new_with_attributes (_("Status"),
-                                                   renderer,
-                                                   "text", CODEC_STATUS,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       column = gtk_tree_view_column_new_with_attributes (_("Min bitrate (kbit/s)"),
-                                                   renderer,
-                                                   "text", CODEC_BITRATE,
-                                               "foreground",CODEC_COLOR,
-                                                   NULL);
-       gtk_tree_view_append_column (listview, column);
-       renderer = gtk_cell_renderer_text_new ();
-       column = gtk_tree_view_column_new_with_attributes (_("Parameters"),
-                                                   renderer,
-                                                   "text", CODEC_PARAMS,
-                                               "foreground",CODEC_COLOR,
-                                       "editable",TRUE,
-                                                   NULL);
-       g_signal_connect(G_OBJECT(renderer),"edited",G_CALLBACK(fmtp_edited),store);
-       gtk_tree_view_append_column (listview, column);
-       /* Setup the selection handler */
-       select = gtk_tree_view_get_selection (listview);
-       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-}
-
-static void linphone_gtk_show_codecs(GtkTreeView *listview, const MSList *codeclist)
-{
-       const MSList *elem;
-       GtkTreeIter iter;
-       GtkListStore *store=GTK_LIST_STORE(gtk_tree_view_get_model(listview));
-       GtkTreeSelection *selection;
-
-       gtk_list_store_clear(store);
-
-       for(elem=codeclist; elem!=NULL; elem=elem->next){
-               gchar *status;
-               gint rate;
-               gfloat bitrate; 
-               gchar *color;
-               const char *params="";
-               struct _PayloadType *pt=(struct _PayloadType *)elem->data;
-               if (linphone_core_payload_type_enabled(linphone_gtk_get_core(),pt)) status=_("Enabled");
-               else status=_("Disabled");
-               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
-               else color="red";
-               /* get an iterator */
-               gtk_list_store_append(store,&iter);
-               bitrate=payload_type_get_bitrate(pt)/1000.0;
-               rate=payload_type_get_rate(pt);
-               if (pt->recv_fmtp!=NULL) params=pt->recv_fmtp;
-               gtk_list_store_set(store,&iter, CODEC_NAME,payload_type_get_mime(pt),
-                                       CODEC_RATE,rate,
-                                       CODEC_BITRATE,bitrate,
-                                       CODEC_STATUS,status,
-                                       CODEC_PARAMS,params,
-                                       CODEC_PRIVDATA,(gpointer)pt,
-                                       CODEC_COLOR,(gpointer)color,
-                                       CODEC_INFO,(gpointer)linphone_core_get_payload_type_description(linphone_gtk_get_core(),pt),
-                                       -1);
-       }
-       
-       
-       
-       /* Setup the selection handler */
-       selection = gtk_tree_view_get_selection (listview);
-       gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-       //gtk_tree_view_columns_autosize(GTK_TREE_VIEW (sec->interfaces));
-#if GTK_CHECK_VERSION(2,12,0)
-       gtk_tree_view_set_tooltip_column(listview,CODEC_INFO);
-#endif
-}
-
-static void linphone_gtk_check_codec_bandwidth(GtkTreeView *v){
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       model=gtk_tree_view_get_model(v);
-       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
-       do{
-               PayloadType *pt=NULL;
-               const gchar *color;
-               gfloat bitrate;
-               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
-               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
-               else color="red";
-               bitrate=payload_type_get_bitrate(pt)/1000.0;
-               gtk_list_store_set(GTK_LIST_STORE(model),&iter,CODEC_COLOR, (gpointer)color,
-                                       CODEC_BITRATE, bitrate,-1);
-       }while(gtk_tree_model_iter_next(model,&iter));
-}
-
-static void linphone_gtk_select_codec(GtkTreeView *v, PayloadType *ref){
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       GtkTreeSelection *selection;
-       selection=gtk_tree_view_get_selection(v);
-       model=gtk_tree_view_get_model(v);
-       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
-       do{
-               PayloadType *pt=NULL;
-               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
-               if (pt==ref){
-                       gtk_tree_selection_select_iter(selection,&iter);
-               }
-               
-       }while(gtk_tree_model_iter_next(model,&iter));
-}
-
-static void linphone_gtk_draw_codec_list(GtkTreeView *v, int type){ /* 0=audio, 1=video*/
-       const MSList *list;
-       if (type==0) list=linphone_core_get_audio_codecs(linphone_gtk_get_core());
-       else list=linphone_core_get_video_codecs(linphone_gtk_get_core());
-       linphone_gtk_show_codecs(v,list);
-}
-
-void linphone_gtk_codec_view_changed(GtkWidget *w){
-       GtkWidget *listview=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list");
-       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
-       linphone_gtk_draw_codec_list(GTK_TREE_VIEW(listview),active);
-}
-
-void linphone_gtk_download_bw_changed(GtkWidget *w){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
-       linphone_core_set_download_bandwidth(linphone_gtk_get_core(),
-                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-       linphone_gtk_check_codec_bandwidth(v);
-}
-
-void linphone_gtk_upload_bw_changed(GtkWidget *w){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
-       linphone_core_set_upload_bandwidth(linphone_gtk_get_core(),
-                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
-       linphone_gtk_check_codec_bandwidth(v);
-}
-
-static void linphone_gtk_codec_move(GtkWidget *button, int dir){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
-       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
-       GtkTreeModel *mod;
-       GtkTreeIter iter;
-       PayloadType *pt=NULL;
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
-               MSList *sel_elem,*before;
-               MSList *codec_list;
-               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
-               if (pt->type==PAYLOAD_VIDEO)
-                       codec_list=ms_list_copy(linphone_core_get_video_codecs(lc));
-               else codec_list=ms_list_copy(linphone_core_get_audio_codecs(lc));
-               sel_elem=ms_list_find(codec_list,pt);
-               if (dir>0) {
-                       if (sel_elem->prev) before=sel_elem->prev;
-                       else before=sel_elem;
-                       codec_list=ms_list_insert(codec_list,before,pt);
-               }
-               else{
-                       if (sel_elem->next) before=sel_elem->next->next;
-                       else before=sel_elem;
-                       codec_list=ms_list_insert(codec_list,before,pt);
-               }
-               codec_list=ms_list_remove_link(codec_list,sel_elem);
-               if (pt->type==PAYLOAD_VIDEO)
-                       linphone_core_set_video_codecs(lc,codec_list);
-               else linphone_core_set_audio_codecs(lc,codec_list);
-               linphone_gtk_show_codecs(v,codec_list);
-               linphone_gtk_select_codec(v,pt);
-       }
-}
-
-static void linphone_gtk_codec_set_enable(GtkWidget *button, gboolean enabled){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
-       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
-       GtkTreeModel *mod;
-       GtkListStore *store;
-       GtkTreeIter iter;
-       PayloadType *pt=NULL;
-
-       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
-               store=GTK_LIST_STORE(mod);
-               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
-               linphone_core_enable_payload_type(linphone_gtk_get_core(),pt,enabled);
-               gtk_list_store_set(store,&iter,CODEC_STATUS, enabled ? _("Enabled") : _("Disabled"), -1);
-       }
-}
-
-void linphone_gtk_codec_up(GtkWidget *button){
-       linphone_gtk_codec_move(button,+1);
-}
-
-void linphone_gtk_codec_down(GtkWidget *button){
-       linphone_gtk_codec_move(button,-1);
-}
-
-void linphone_gtk_codec_enable(GtkWidget *button){
-       linphone_gtk_codec_set_enable(button,TRUE);
-}
-
-void linphone_gtk_codec_disable(GtkWidget *button){
-       linphone_gtk_codec_set_enable(button,FALSE);
-}
-
-void linphone_gtk_clear_passwords(GtkWidget *button){
-       linphone_core_clear_all_auth_info(linphone_gtk_get_core());
-}
-
-enum{
-       PROXY_CONFIG_IDENTITY,
-       PROXY_CONFIG_REF,
-       PROXY_CONFIG_NCOL
-};
-
-void linphone_gtk_show_sip_accounts(GtkWidget *w){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(w,"proxy_list"));
-       GtkTreeModel *model=gtk_tree_view_get_model(v);
-       GtkListStore *store;
-       GtkTreeSelection *select;
-       const MSList *elem;
-       if (!model){
-               GtkCellRenderer *renderer;
-               GtkTreeViewColumn *column;
-               /* create the proxy list */
-               store = gtk_list_store_new (PROXY_CONFIG_NCOL, G_TYPE_STRING, G_TYPE_POINTER);
-               
-               gtk_tree_view_set_model(v,GTK_TREE_MODEL(store));
-               g_object_unref(G_OBJECT(store));
-               renderer = gtk_cell_renderer_text_new ();
-               column = gtk_tree_view_column_new_with_attributes (_("Account"),
-                                                       renderer,
-                                                       "text", PROXY_CONFIG_IDENTITY,
-                                                       NULL);
-               gtk_tree_view_append_column (v, column);
-               
-               select = gtk_tree_view_get_selection (v);
-               gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
-               model=GTK_TREE_MODEL(store);
-       }else {
-               store=GTK_LIST_STORE(model);
-       }
-       gtk_list_store_clear(store);
-       for(elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());elem!=NULL;elem=ms_list_next(elem)){
-               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
-               GtkTreeIter iter;
-               gtk_list_store_append(store,&iter);
-               gtk_list_store_set(store,&iter,PROXY_CONFIG_IDENTITY,linphone_proxy_config_get_identity(cfg),
-                                       PROXY_CONFIG_REF,cfg,-1);
-       }
-}
-
-static void linphone_gtk_proxy_closed(GtkWidget *w){
-       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
-       if (cfg){
-               linphone_proxy_config_done(cfg);
-       }
-}
-
-void linphone_gtk_show_proxy_config(GtkWidget *pb, LinphoneProxyConfig *cfg){
-       GtkWidget *w=linphone_gtk_create_window("sip_account");
-       const char *tmp;
-       if (cfg){
-               linphone_proxy_config_edit(cfg);
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity")),
-                       linphone_proxy_config_get_identity(cfg));
-               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy")),
-                       linphone_proxy_config_get_addr(cfg));
-               tmp=linphone_proxy_config_get_route(cfg);
-               if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route")),tmp);
-               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod")),
-                       linphone_proxy_config_get_expires(cfg));
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register")),
-                       linphone_proxy_config_register_enabled(cfg));
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish")),
-                       linphone_proxy_config_publish_enabled(cfg));
-       }
-       g_object_set_data(G_OBJECT(w),"config",(gpointer)cfg);
-       g_object_set_data(G_OBJECT(w),"parameters",(gpointer)pb);
-       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_proxy_closed,w);
-       gtk_widget_show(w);
-}
-
-void linphone_gtk_proxy_cancel(GtkButton *button){
-       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
-       gtk_widget_destroy(w);
-}
-
-void linphone_gtk_proxy_ok(GtkButton *button){
-       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
-       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
-       gboolean was_editing=TRUE;
-       if (!cfg){
-               was_editing=FALSE;
-               cfg=linphone_proxy_config_new();
-       }
-       linphone_proxy_config_set_identity(cfg,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity"))));
-       linphone_proxy_config_set_server_addr(cfg,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy"))));
-       linphone_proxy_config_set_route(cfg,
-               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route"))));
-       linphone_proxy_config_expires(cfg,
-               (int)gtk_spin_button_get_value(
-                       GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod"))));
-       linphone_proxy_config_enable_publish(cfg,
-               gtk_toggle_button_get_active(
-                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish"))));
-       linphone_proxy_config_enable_register(cfg,
-               gtk_toggle_button_get_active(
-                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register"))));
-       if (was_editing){
-               if (linphone_proxy_config_done(cfg)==-1)
-                       return;
-       }
-       else {
-               if (linphone_core_add_proxy_config(linphone_gtk_get_core(),cfg)==-1) return;
-               linphone_core_set_default_proxy(linphone_gtk_get_core(),cfg);
-       }
-       g_object_set_data(G_OBJECT(w),"config",NULL);
-       linphone_gtk_show_sip_accounts(GTK_WIDGET(g_object_get_data(G_OBJECT(w),"parameters")));
-       gtk_widget_destroy(w);
-       /* also update the main window's list of identities*/
-       linphone_gtk_load_identities();
-}
-
-static LinphoneProxyConfig *linphone_gtk_get_selected_proxy_config(GtkWidget* pb){
-       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(pb,"proxy_list"));
-       GtkTreeSelection *selection=gtk_tree_view_get_selection(v);
-       GtkTreeIter iter;
-       GtkTreeModel *model;
-       if (gtk_tree_selection_get_selected(selection,&model,&iter)){
-               LinphoneProxyConfig *cfg=NULL;
-               gtk_tree_model_get(model,&iter,PROXY_CONFIG_REF,&cfg,-1);
-               return cfg;
-       }
-       return NULL;
-}
-
-void linphone_gtk_add_proxy(GtkButton *button){
-       linphone_gtk_show_proxy_config(gtk_widget_get_toplevel(GTK_WIDGET(button)),NULL);
-}
-
-void linphone_gtk_remove_proxy(GtkButton *button){
-       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(
-                       gtk_widget_get_toplevel(GTK_WIDGET(button)));
-       if (cfg){
-               linphone_core_remove_proxy_config(linphone_gtk_get_core(),cfg);
-               linphone_gtk_show_sip_accounts(gtk_widget_get_toplevel(GTK_WIDGET(button)));
-               /* also update the main window's list of identities*/
-               linphone_gtk_load_identities();
-       }
-}
-
-void linphone_gtk_edit_proxy(GtkButton *button){
-       GtkWidget *pb=gtk_widget_get_toplevel(GTK_WIDGET(button));
-       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(pb);
-       if (cfg){
-               linphone_gtk_show_proxy_config(pb,cfg);
-               /* also update the main window's list of identities*/
-               linphone_gtk_load_identities();
-       }
-}
-
-typedef struct _LangCodes{
-       const char *code;
-       const char *name;
-}LangCodes;
-
-static LangCodes supported_langs[]={
-       {       "C"     ,       N_("English")   },
-       {       "fr"    ,       N_("French")    },
-       {       "sv"    ,       N_("Swedish")   },
-       {       "it"    ,       N_("Italian")   },
-       {       "es"    ,       N_("Spanish")   },
-       {       "pt_BR" ,       N_("Brazilian Portugese")       },
-       {       "pl"    ,       N_("Polish")    },
-       {       "de"    ,       N_("German")    },
-       {       "ru"    ,       N_("Russian")   },
-       {       "ja"    ,       N_("Japanese")  },
-       {       "nl"    ,       N_("Dutch")     },
-       {       "hu"    ,       N_("Hungarian") },
-       {       "cs"    ,       N_("Czech")     },
-       {       "zh_CN" ,       N_("Chinese")   },
-       {       NULL    ,       NULL            }
-};
-
-static const char *lang_get_name(const char *code){
-       LangCodes *p=supported_langs;
-       while(p->code!=NULL){
-               if (strcmp(p->code,code)==0) return p->name;
-               p++;
-       }
-       return NULL;
-}
-
-static gboolean lang_equals(const char *l1, const char *l2){
-       return ((strncmp(l1,l2,5)==0 || strncmp(l1,l2,2)==0));
-}
-
-static void linphone_gtk_fill_langs(GtkWidget *pb){
-       GtkWidget *combo=linphone_gtk_get_widget(pb,"lang_combo");
-       char code[10];
-       const char *all_langs="C " LINPHONE_ALL_LANGS;
-       const char *name;
-       int i=0,index=0;
-       const char *cur_lang=getenv("LANG");
-       int cur_lang_index=-1;
-       char text[256]={0};
-       if (cur_lang==NULL) cur_lang="C";
-       /* glade creates a combo box without list model and text renderer,
-       unless we fill it with a dummy text.
-       This dummy text needs to be removed first*/
-       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
-       while(sscanf(all_langs+i,"%s",code)==1){
-               i+=strlen(code);
-               while(all_langs[i]==' ') ++i;
-               name=lang_get_name(code);
-               snprintf(text,sizeof(text)-1,"%s : %s",code,name!=NULL ? _(name) : code);
-               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),text);
-               if (cur_lang_index==-1 && lang_equals(cur_lang,code)) 
-                       cur_lang_index=index;
-               index++;
-       }
-       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),cur_lang_index);
-}
-
-void linphone_gtk_lang_changed(GtkComboBox *combo){
-       const char *selected=gtk_combo_box_get_active_text(combo);
-       char code[10];
-       const char *cur_lang=getenv("LANG");
-       if (selected!=NULL){
-               sscanf(selected,"%s",code);
-               if (cur_lang==NULL) cur_lang="C";
-               if (!lang_equals(cur_lang,code)){
-                       GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(combo))),
-                               GTK_DIALOG_DESTROY_WITH_PARENT,
-                               GTK_MESSAGE_INFO,
-                               GTK_BUTTONS_CLOSE,
-                               "%s",
-                               (const gchar*)_("You need to restart linphone for the new language selection to take effect."));
-                               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
-                       g_signal_connect_swapped (G_OBJECT (dialog), "response",
-                                       G_CALLBACK (gtk_widget_destroy),
-                                       G_OBJECT (dialog));
-                       gtk_widget_show(dialog);
-                       linphone_gtk_set_lang(code);
-               }
-       }
-}
-
-static void linphone_gtk_ui_level_adapt(GtkWidget *top) {
-       gboolean ui_advanced;
-       const char *simple_ui = linphone_gtk_get_ui_config("simple_ui", "parameters.codec_tab parameters.transport_frame parameters.ports_frame");
-
-       ui_advanced = linphone_gtk_get_ui_config_int("advanced_ui", TRUE);
-       if (ui_advanced) {
-               linphone_gtk_visibility_set(simple_ui, "parameters", top, TRUE);
-       } else {
-               linphone_gtk_visibility_set(simple_ui, "parameters", top, FALSE);
-       }
-}
-
-void linphone_gtk_ui_level_toggled(GtkWidget *w) {
-       gint ui_advanced;
-       GtkWidget *top;
-
-       top = gtk_widget_get_toplevel(w);
-       ui_advanced = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w));
-       linphone_gtk_set_ui_config_int("advanced_ui", ui_advanced);
-       linphone_gtk_ui_level_adapt(top);
-}
-
-void linphone_gtk_show_parameters(void){
-       GtkWidget *pb=linphone_gtk_create_window("parameters");
-       LinphoneCore *lc=linphone_gtk_get_core();
-       const char **sound_devices=linphone_core_get_sound_devices(lc);
-       const char *tmp;
-       LinphoneAddress *contact;
-       LinphoneFirewallPolicy pol;
-       GtkWidget *codec_list=linphone_gtk_get_widget(pb,"codec_list");
-       int mtu;
-       int ui_advanced;
-
-       /* NETWORK CONFIG */
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ipv6_enabled")),
-                               linphone_core_ipv6_enabled(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"sip_port")),
-                               linphone_core_get_sip_port(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"audio_rtp_port")),
-                               linphone_core_get_audio_port(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"video_rtp_port")),
-                               linphone_core_get_video_port(lc));
-       tmp=linphone_core_get_nat_address(lc);
-       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"nat_address")),tmp);
-       tmp=linphone_core_get_stun_server(lc);
-       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"stun_server")),tmp);
-       pol=linphone_core_get_firewall_policy(lc);
-       switch(pol){
-               case LinphonePolicyNoFirewall:
-                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"no_nat")),TRUE);
-               break;
-               case LinphonePolicyUseNatAddress:
-                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_nat_address")),TRUE);
-               break;
-               case LinphonePolicyUseStun:
-                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_stun")),TRUE);
-               break;
-       }
-       mtu=linphone_core_get_mtu(lc);
-       if (mtu<=0){
-               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),FALSE);
-               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),1500);
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),FALSE);
-       }else{
-               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),TRUE);
-               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),mtu);
-               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),TRUE);
-       }
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"dtmf_sipinfo")),
-                                       linphone_core_get_use_info_for_dtmf(lc));
-       /* MUTIMEDIA CONFIG */
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"playback_device"), sound_devices,
-                                       linphone_core_get_playback_device(lc),CAP_PLAYBACK);
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"ring_device"), sound_devices,
-                                       linphone_core_get_ringer_device(lc),CAP_PLAYBACK);
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"capture_device"), sound_devices,
-                                       linphone_core_get_capture_device(lc), CAP_CAPTURE);
-       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"webcams"),linphone_core_get_video_devices(lc),
-                                       linphone_core_get_video_device(lc),CAP_IGNORE);
-       linphone_gtk_fill_video_sizes(linphone_gtk_get_widget(pb,"video_size"));
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"echo_cancelation")),
-                                       linphone_core_echo_cancellation_enabled(lc));
-
-       gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(linphone_gtk_get_widget(pb,"ring_chooser")),
-                                       linphone_core_get_ring(lc));
-       /* SIP CONFIG */
-       contact=linphone_core_get_primary_contact_parsed(lc);
-       if (contact){
-               if (linphone_address_get_display_name(contact)) {
-                       const char *dn=linphone_address_get_display_name(contact);
-                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")),dn);
-               }
-               if (linphone_address_get_username(contact))
-                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")),linphone_address_get_username(contact));
-       }
-       linphone_address_destroy(contact);
-       linphone_gtk_show_sip_accounts(pb);
-       /* CODECS CONFIG */
-       linphone_gtk_init_codec_list(GTK_TREE_VIEW(codec_list));
-       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(pb,"codec_view")),0);
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"download_bw")),
-                               linphone_core_get_download_bandwidth(lc));
-       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"upload_bw")),
-                               linphone_core_get_upload_bandwidth(lc));
-
-       /* UI CONFIG */
-       linphone_gtk_fill_langs(pb);
-       ui_advanced = linphone_gtk_get_ui_config_int("advanced_ui", 1);
-       linphone_gtk_set_ui_config_int("advanced_ui", ui_advanced);
-       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ui_level")),
-                               ui_advanced);
-       linphone_gtk_ui_level_adapt(pb);
-
-       gtk_widget_show(pb);
-}
diff --git a/gtk-glade/setupwizard.c b/gtk-glade/setupwizard.c
deleted file mode 100644 (file)
index e5f8702..0000000
+++ /dev/null
@@ -1,264 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w);
-
-static GtkWidget *create_intro(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(_("Welcome !\nThis assistant will help you to use a SIP account for your calls."));
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static GtkWidget *create_setup_signin_choice(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *t1=gtk_radio_button_new_with_label(NULL,_("Create an account by choosing a username"));
-       GtkWidget *t2=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(t1),_("I have already an account and just want to use it"));
-       gtk_box_pack_start (GTK_BOX (vbox), t1, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), t2, TRUE, TRUE, 2);
-       gtk_widget_show_all(vbox);
-       g_object_set_data(G_OBJECT(vbox),"create_account",t1);
-       g_object_set_data(G_OBJECT(vbox),"setup_account",t2);
-       return vbox;
-}
-
-static void create_username_changed(GtkEntry *entry, GtkWidget *w){
-       GtkWidget *assistant=gtk_widget_get_toplevel(w);
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(assistant),w,
-               gtk_entry_get_text_length(entry)>=3);
-}
-
-static GtkWidget *create_username_chooser(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *hbox=gtk_hbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(_("Please choose a username:"));
-       GtkWidget *label2=gtk_label_new(_("Username:"));
-       GtkWidget *label3=gtk_label_new(NULL);
-       GtkWidget *entry=gtk_entry_new();
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (hbox), label2, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), label3, TRUE, TRUE, 2);
-       gtk_widget_show_all(vbox);
-       g_object_set_data(G_OBJECT(vbox),"username",entry);
-       g_object_set_data(G_OBJECT(vbox),"errorstring",label3);
-       g_signal_connect(G_OBJECT(entry),"changed",(GCallback)create_username_changed,vbox);
-       return vbox;
-}
-
-static GtkWidget *create_username_checking_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(NULL);
-       GtkWidget *progress=gtk_progress_bar_new();
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       g_object_set_data(G_OBJECT(vbox),"progress",progress);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static void *progress_bar_update(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
-       GtkWidget *pb=(GtkWidget*)ctx;
-       if (ws==LinphoneWaitingProgress) gtk_progress_bar_pulse(GTK_PROGRESS_BAR(pb));
-       else if (ws==LinphoneWaitingFinished) gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pb),1);
-       return ctx;
-}
-
-static void check_username(GtkWidget *page){
-       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
-       GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
-       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
-       gchar *text=g_strdup_printf(_("Checking if '%s' is available..."),linphone_account_creator_get_username(creator));
-       LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
-       int res;
-       gtk_label_set_text(GTK_LABEL(label),text);
-       g_free(text);
-       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
-       res=linphone_account_creator_test_existence(c);
-       if (res==1){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Sorry this username already exists. Please try a new one."));
-       }else if (res==0){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
-               gtk_assistant_set_page_complete(GTK_ASSISTANT(gtk_widget_get_toplevel(page)),page,TRUE);
-       }else if (res==-1){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
-       }
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
-}
-
-static GtkWidget *create_confirmation_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(NULL);
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static GtkWidget *create_creation_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(NULL);
-       GtkWidget *progress=gtk_progress_bar_new();
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
-       g_object_set_data(G_OBJECT(vbox),"label",label);
-       g_object_set_data(G_OBJECT(vbox),"progress",progress);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static GtkWidget *create_finish_page(){
-       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
-       GtkWidget *label=gtk_label_new(_("Thank you. Your account is now configured and ready for use."));
-       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
-       gtk_widget_show_all(vbox);
-       return vbox;
-}
-
-static void linphone_gtk_assistant_closed(GtkWidget *w){
-       gtk_widget_destroy(w);
-}
-
-static int linphone_gtk_assistant_forward(int curpage, gpointer data){
-       GtkWidget *w=(GtkWidget*)data;
-       GtkWidget *box=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),curpage);
-       if (curpage==1){
-               GtkWidget *create_button=(GtkWidget*)g_object_get_data(G_OBJECT(box),"create_account");
-               if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(create_button))){
-                       g_error("Not implemented yet...");
-               }
-       }else if (curpage==2){
-               LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(w);
-               linphone_account_creator_set_username(c,gtk_entry_get_text(GTK_ENTRY(g_object_get_data(G_OBJECT(box),"username"))));
-       }
-       return curpage+1;
-}
-
-static void linphone_gtk_assistant_apply(GtkWidget *w){
-       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(w);
-       GtkWidget *page=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),gtk_assistant_get_current_page(GTK_ASSISTANT(w)));
-       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
-       LinphoneProxyConfig *res;
-       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
-       res=linphone_account_creator_validate(creator);
-       if (res){
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
-               gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
-       }else{
-               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
-       }
-       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
-       if (res) linphone_core_add_proxy_config(linphone_gtk_get_core(),res);
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
-}
-
-static void linphone_gtk_assistant_prepare(GtkWidget *assistant, GtkWidget *page){
-       int pagenum=gtk_assistant_get_current_page(GTK_ASSISTANT(assistant));
-       if (pagenum==3){
-               check_username(page);
-       }else if (pagenum==4){
-               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
-               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
-               gchar *text=g_strdup_printf("You have choosen '%s' as username.\nDo you confirm the creation of the account ?",linphone_account_creator_get_username(creator));
-               gtk_label_set_text(GTK_LABEL(label),text);
-               g_free(text);
-       }else if (pagenum==5){
-               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
-               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
-               gchar *text=g_strdup_printf("Account creation in progress for '%s'",linphone_account_creator_get_username(creator));
-               gtk_label_set_text(GTK_LABEL(label),text);
-               g_free(text);
-       }
-}
-
-static LinphoneAccountCreator * linphone_gtk_assistant_init(GtkWidget *w){
-       const MSList *elem;
-       LinphoneCore *lc=linphone_gtk_get_core();
-       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
-               SipSetup *ss=(SipSetup*)elem->data;
-               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
-                       LinphoneAccountCreator *creator=linphone_account_creator_new(lc,ss->name);
-                       g_object_set_data(G_OBJECT(w),"creator",creator);
-                       return creator;
-               }
-       }
-       return NULL;
-}
-
-LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w){
-       return (LinphoneAccountCreator*)g_object_get_data(G_OBJECT(w),"creator");
-}
-
-GtkWidget * linphone_gtk_create_assistant(void){
-       GtkWidget *w=gtk_assistant_new();
-       GtkWidget *p1=create_intro();
-       GtkWidget *p2=create_setup_signin_choice();
-       GtkWidget *p3=create_username_chooser();
-       GtkWidget *checking=create_username_checking_page();
-       GtkWidget *confirm=create_confirmation_page();
-       GtkWidget *creation=create_creation_page();
-       GtkWidget *end=create_finish_page();
-       
-       linphone_gtk_assistant_init(w);
-       gtk_assistant_append_page(GTK_ASSISTANT(w),p1);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p1,GTK_ASSISTANT_PAGE_INTRO);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p1,_("Welcome to the account setup assistant"));
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p1,TRUE);
-       gtk_assistant_append_page(GTK_ASSISTANT(w),p2);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p2,GTK_ASSISTANT_PAGE_CONTENT);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p2,_("Account setup assistant"));
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p2,TRUE);
-       gtk_assistant_append_page(GTK_ASSISTANT(w),p3);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p3,GTK_ASSISTANT_PAGE_CONTENT);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p3,_("Choosing a username"));
-       
-       gtk_assistant_append_page(GTK_ASSISTANT(w),checking);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),checking,GTK_ASSISTANT_PAGE_PROGRESS);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),checking,_("Verifying"));
-       
-       gtk_assistant_append_page(GTK_ASSISTANT(w),confirm);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),confirm,GTK_ASSISTANT_PAGE_CONFIRM);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),confirm,_("Confirmation"));
-       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),confirm,TRUE);
-
-       gtk_assistant_append_page(GTK_ASSISTANT(w),creation);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),creation,GTK_ASSISTANT_PAGE_PROGRESS);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),creation,_("Creating your account"));
-
-       gtk_assistant_append_page(GTK_ASSISTANT(w),end);
-       gtk_assistant_set_page_type(GTK_ASSISTANT(w),end,GTK_ASSISTANT_PAGE_SUMMARY);
-       gtk_assistant_set_page_title(GTK_ASSISTANT(w),end,_("Now ready !"));
-       
-       gtk_assistant_set_forward_page_func(GTK_ASSISTANT(w),linphone_gtk_assistant_forward,w,NULL);
-       g_signal_connect(G_OBJECT(w),"close",(GCallback)linphone_gtk_assistant_closed,NULL);
-       g_signal_connect(G_OBJECT(w),"cancel",(GCallback)linphone_gtk_assistant_closed,NULL);
-       g_signal_connect(G_OBJECT(w),"apply",(GCallback)linphone_gtk_assistant_apply,NULL);
-       g_signal_connect(G_OBJECT(w),"prepare",(GCallback)linphone_gtk_assistant_prepare,NULL);
-       gtk_widget_show(w);
-       
-       return w;
-}
-
diff --git a/gtk-glade/sip_account.glade b/gtk-glade/sip_account.glade
deleted file mode 100644 (file)
index bb88626..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-<?xml version="1.0"?>
-<glade-interface>
-  <!-- interface-requires gtk+ 2.6 -->
-  <!-- interface-naming-policy toplevel-contextual -->
-  <widget class="GtkDialog" id="sip_account">
-    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-    <property name="border_width">5</property>
-    <property name="title" translatable="yes">Linphone - Configure a SIP account</property>
-    <property name="window_position">center-on-parent</property>
-    <property name="icon">linphone2.png</property>
-    <property name="type_hint">dialog</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox2">
-        <property name="visible">True</property>
-        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-        <property name="orientation">vertical</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkFrame" id="frame15">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="label_xalign">0</property>
-            <child>
-              <widget class="GtkAlignment" id="alignment15">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="left_padding">12</property>
-                <child>
-                  <widget class="GtkVBox" id="vbox11">
-                    <property name="visible">True</property>
-                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                    <property name="orientation">vertical</property>
-                    <child>
-                      <widget class="GtkTable" id="table6">
-                        <property name="visible">True</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="n_rows">4</property>
-                        <property name="n_columns">2</property>
-                        <child>
-                          <widget class="GtkLabel" id="label38">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Your SIP identity:</property>
-                            <property name="justify">right</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="identity">
-                            <property name="width_request">275</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="tooltip" translatable="yes">Looks like sip:&lt;username&gt;@&lt;domain&gt;</property>
-                            <property name="text" translatable="yes">sip:</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label39">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">SIP Proxy address:</property>
-                            <property name="justify">right</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="proxy">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="tooltip" translatable="yes">Looks like sip:&lt;proxy hostname&gt;</property>
-                            <property name="text" translatable="yes">sip:</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">1</property>
-                            <property name="bottom_attach">2</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label40">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Route (optional):</property>
-                            <property name="justify">right</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkEntry" id="route">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">2</property>
-                            <property name="bottom_attach">3</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label41">
-                            <property name="visible">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="label" translatable="yes">Registration duration (sec):</property>
-                            <property name="justify">right</property>
-                          </widget>
-                          <packing>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkSpinButton" id="regperiod">
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                            <property name="adjustment">3600 0 100000 1 10 10</property>
-                          </widget>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="right_attach">2</property>
-                            <property name="top_attach">3</property>
-                            <property name="bottom_attach">4</property>
-                          </packing>
-                        </child>
-                      </widget>
-                      <packing>
-                        <property name="position">0</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="register">
-                        <property name="label" translatable="yes">Register at startup</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="active">True</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="position">1</property>
-                      </packing>
-                    </child>
-                    <child>
-                      <widget class="GtkCheckButton" id="publish">
-                        <property name="label" translatable="yes">Publish presence information</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">False</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                        <property name="draw_indicator">True</property>
-                      </widget>
-                      <packing>
-                        <property name="expand">False</property>
-                        <property name="position">2</property>
-                      </packing>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkLabel" id="label42">
-                <property name="visible">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="label" translatable="yes">Configure a SIP account</property>
-                <property name="use_markup">True</property>
-              </widget>
-              <packing>
-                <property name="type">label_item</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child internal-child="action_area">
-          <widget class="GtkHButtonBox" id="dialog-action_area2">
-            <property name="visible">True</property>
-            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-            <property name="layout_style">end</property>
-            <child>
-              <widget class="GtkButton" id="button6">
-                <property name="label">gtk-ok</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_proxy_ok"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">0</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button7">
-                <property name="label">gtk-cancel</property>
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                <property name="use_stock">True</property>
-                <signal name="clicked" handler="linphone_gtk_proxy_cancel"/>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-                <property name="fill">False</property>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">end</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk-glade/stock_people.png b/gtk-glade/stock_people.png
deleted file mode 100644 (file)
index ed2d33b..0000000
Binary files a/gtk-glade/stock_people.png and /dev/null differ
diff --git a/gtk-glade/support.c b/gtk-glade/support.c
deleted file mode 100644 (file)
index 3e3320c..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-#include "linphone.h"
-
-#include "lpconfig.h"
-
-static GList *pixmaps_directories = NULL;
-
-/* Use this function to set the directory containing installed pixmaps. */
-void
-add_pixmap_directory                   (const gchar     *directory)
-{
-  pixmaps_directories = g_list_prepend (pixmaps_directories,
-                                        g_strdup (directory));
-}
-
-/* This is an internally used function to find pixmap files. */
-static gchar*
-find_pixmap_file                       (const gchar     *filename)
-{
-  GList *elem;
-
-  /* We step through each of the pixmaps directory to find it. */
-  elem = pixmaps_directories;
-  while (elem)
-    {
-      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
-                                         G_DIR_SEPARATOR_S, filename);
-      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
-        return pathname;
-      g_free (pathname);
-      elem = elem->next;
-    }
-  return NULL;
-}
-
-/* This is an internally used function to create pixmaps. */
-GtkWidget*
-create_pixmap                          (const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GtkWidget *pixmap;
-
-  if (!filename || !filename[0])
-      return gtk_image_new ();
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning (_("Couldn't find pixmap file: %s"), filename);
-      return gtk_image_new ();
-    }
-
-  pixmap = gtk_image_new_from_file (pathname);
-  g_free (pathname);
-  return pixmap;
-}
-
-/* This is an internally used function to create pixmaps. */
-GdkPixbuf*
-create_pixbuf                          (const gchar     *filename)
-{
-  gchar *pathname = NULL;
-  GdkPixbuf *pixbuf;
-  GError *error = NULL;
-
-  if (!filename || !filename[0])
-      return NULL;
-
-  pathname = find_pixmap_file (filename);
-
-  if (!pathname)
-    {
-      g_warning (_("Couldn't find pixmap file: %s"), filename);
-      return NULL;
-    }
-
-  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
-  if (!pixbuf)
-    {
-      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
-               pathname, error->message);
-      g_error_free (error);
-    }
-  g_free (pathname);
-  return pixbuf;
-}
-
-/* This is an internally used function to create animations */
-GdkPixbufAnimation *
-create_pixbuf_animation(const gchar     *filename)
-{
-       gchar *pathname = NULL;
-       GdkPixbufAnimation *pixbuf;
-       GError *error = NULL;
-       
-       if (!filename || !filename[0])
-               return NULL;
-       
-       pathname = find_pixmap_file (filename);
-       
-       if (!pathname){
-               g_warning (_("Couldn't find pixmap file: %s"), filename);
-               return NULL;
-       }
-       
-       pixbuf = gdk_pixbuf_animation_new_from_file (pathname, &error);
-       if (!pixbuf){
-               fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
-                       pathname, error->message);
-               g_error_free (error);
-       }
-       g_free (pathname);
-       return pixbuf;
-}
-
-
-
-/* This is used to set ATK action descriptions. */
-void
-glade_set_atk_action_description       (AtkAction       *action,
-                                        const gchar     *action_name,
-                                        const gchar     *description)
-{
-  gint n_actions, i;
-
-  n_actions = atk_action_get_n_actions (action);
-  for (i = 0; i < n_actions; i++)
-    {
-      if (!strcmp (atk_action_get_name (action, i), action_name))
-        atk_action_set_description (action, i, description);
-    }
-}
-
-
-static char linphone_lang[256]={0};
-
-/*lang has to be read before the config file is parsed...*/
-const char *linphone_gtk_get_lang(const char *config_file){
-       FILE *f=fopen(config_file,"r");
-       if (f){
-               char tmp[256];
-               while(fgets(tmp,sizeof(tmp),f)!=NULL){
-                       char *p;
-                       if ((p=strstr(tmp,"lang="))!=NULL){
-                               p+=5;
-                               sscanf(p,"%s",linphone_lang);
-                               g_message("Found lang %s",linphone_lang);
-                               break;
-                       }
-               }
-               fclose(f);
-       }
-       return linphone_lang;
-}
-
-void linphone_gtk_set_lang(const char *code){
-       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-       const char *curlang;
-       curlang=getenv("LANG");
-       if (curlang!=NULL && strncmp(curlang,code,2)==0) {
-               /* do not loose the _territory@encoding part*/
-               return;
-       }
-       lp_config_set_string(cfg,"GtkUi","lang",code);
-#ifdef WIN32
-       char tmp[128];
-       snprintf(tmp,sizeof(tmp),"LANG=%s",code);
-       _putenv(tmp);
-#else
-       setenv("LANG",code,1);
-#endif
-}
-
-const gchar *linphone_gtk_get_ui_config(const char *key, const char *def){
-       LinphoneCore *lc=linphone_gtk_get_core();
-       if (lc){
-               LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-               return lp_config_get_string(cfg,"GtkUi",key,def);
-       }else{
-               ms_warning ("Cannot read config, no core created yet.");
-               return NULL;
-       }
-}
-
-int linphone_gtk_get_ui_config_int(const char *key, int def){
-       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-       return lp_config_get_int(cfg,"GtkUi",key,def);
-}
-
-void linphone_gtk_set_ui_config_int(const char *key , int val){
-       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
-       lp_config_set_int(cfg,"GtkUi",key,val);
-}
-
-
-static void parse_item(const char *item, const char *window_name, GtkWidget *w,  gboolean show){
-       char tmp[64];
-       char *dot;
-       strcpy(tmp,item);
-       dot=strchr(tmp,'.');
-       if (dot){
-               *dot='\0';
-               dot++;
-               if (strcmp(window_name,tmp)==0){
-                       GtkWidget *wd=linphone_gtk_get_widget(w,dot);
-                       if (wd) {
-                               if (!show) gtk_widget_hide(wd);
-                               else gtk_widget_show(wd);
-                       }
-               }
-       }
-}
-
-void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show){
-       char item[64];
-       const char *i;
-       const char *b;
-       int len;
-       for(b=i=hiddens;*i!='\0';++i){
-               if (*i==' '){
-                       len=MIN(i-b,sizeof(item)-1);
-                       strncpy(item,b,len);
-                       item[len]='\0';
-                       b=i+1;
-                       parse_item(item,window_name,w,show);
-               }
-       }
-       len=MIN(i-b,sizeof(item)-1);
-       if (len>0){
-               strncpy(item,b,len);
-               item[len]='\0';
-               parse_item(item,window_name,w,show);
-       }
-}
-
diff --git a/gtk-glade/update.c b/gtk-glade/update.c
deleted file mode 100755 (executable)
index 6fac1b8..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*\r
-linphone, gtk-glade interface.\r
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)\r
-\r
-This program is free software; you can redistribute it and/or\r
-modify it under the terms of the GNU General Public License\r
-as published by the Free Software Foundation; either version 2\r
-of the License, or (at your option) any later version.\r
-\r
-This program is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with this program; if not, write to the Free Software\r
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
-*/\r
-\r
-#include "linphone.h"\r
-\r
-#ifdef WIN32\r
-\r
-#include <wininet.h>\r
-\r
-static int linphone_gtk_get_new_version(const char *version_url, char *version, size_t size){\r
-       DWORD dwDownloaded = 0;\r
-       HINTERNET  hSession = NULL, hConnect = NULL;\r
-       int ret=-1;\r
-       \r
-       hSession=InternetOpen("Linphone",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);\r
-       \r
-       if (hSession==NULL) return -1;\r
-       \r
-       hConnect=InternetOpenUrl(hSession,version_url,NULL,0,0,0);\r
-       \r
-       if (hConnect==NULL) {\r
-               InternetCloseHandle(hSession);\r
-               return -1;\r
-       }\r
-       dwDownloaded=0;\r
-       if (InternetReadFile(hConnect,version,size,&dwDownloaded) && dwDownloaded>0){\r
-               version[dwDownloaded]='\0';\r
-               ms_message("Got response: %s", version);\r
-               /*check this not just html containing 404 not found*/\r
-               if (strstr(version,"html")==0)\r
-                       ret=0;\r
-       }\r
-       \r
-       // Close any open handles.\r
-       if (hConnect) InternetCloseHandle(hConnect);\r
-       if (hSession) InternetCloseHandle(hSession);\r
-       return ret;\r
-}\r
-\r
-#else\r
-\r
-static int linphone_gtk_get_new_version(const char *url, char *version, size_t size){\r
-       \r
-       return -1;\r
-}\r
-\r
-#endif\r
-\r
-static void new_version_response(GtkWidget *dialog, int response_id, gpointer download_site){\r
-       if (response_id==GTK_RESPONSE_YES){\r
-               linphone_gtk_open_browser((const char*)download_site);\r
-       }\r
-       gtk_widget_destroy(dialog);\r
-}\r
-\r
-static gboolean popup_new_version(const char *download_site){\r
-       GtkWidget *dialog;\r
-       /* draw a question box. link to dialog_click callback */\r
-       dialog = gtk_message_dialog_new (\r
-                               GTK_WINDOW(linphone_gtk_get_main_window()),\r
-                GTK_DIALOG_DESTROY_WITH_PARENT,\r
-                               GTK_MESSAGE_QUESTION,\r
-                GTK_BUTTONS_YES_NO,\r
-                _("A more recent version is availalble from %s.\nWould you like to open a browser to download it ?"),\r
-                               download_site);\r
-       g_signal_connect(G_OBJECT (dialog), "response",\r
-            G_CALLBACK (new_version_response),\r
-               (gpointer)download_site);\r
-       /* actually show the box */\r
-       gtk_widget_show(dialog);\r
-       return FALSE;\r
-}\r
-\r
-static gboolean popup_version_ok(){\r
-       linphone_gtk_display_something(GTK_MESSAGE_INFO,_("You are running the lastest version."));\r
-       return FALSE;\r
-}\r
-\r
-static int copytilldot(char *n, const char *v){\r
-       int ret=0;\r
-       while(*v!='\0' && *v!='.' && *v!='-' && *v!='\n' && *v!='\r' && *v!='\t'){\r
-               *n=*v;\r
-               ret++;\r
-               v++;\r
-               n++;\r
-       }\r
-       *n='\0';\r
-       if (*v!='\0') ret=ret+1;\r
-       return ret;\r
-}\r
-\r
-static int version_compare(const char *v1, const char *v2){\r
-       char n1[16];\r
-       char n2[16];\r
-       int ret;\r
-       if (*v1=='\0' && *v2=='\0') return 0;\r
-       v1+=copytilldot(n1,v1);\r
-       v2+=copytilldot(n2,v2);\r
-       ms_message("Comparing %s <> %s",n1,n2);\r
-       ret=strcmp(n1,n2);\r
-       if (ret==0) return version_compare(v1,v2);\r
-       else return ret;\r
-}\r
-\r
-static void *check_for_new_version(void *d){\r
-       const char *version_url=(const char *)d;\r
-       char version[256];\r
-       if (linphone_gtk_get_new_version(version_url,version,sizeof(version))==0){\r
-               if (version_compare(version,LINPHONE_VERSION)>0){\r
-                       const char *download_site=linphone_gtk_get_ui_config("download_site",NULL);\r
-                       if (download_site)   {\r
-                               gdk_threads_enter();\r
-                               g_idle_add((GSourceFunc)popup_new_version,(gpointer)download_site);\r
-                               gdk_threads_leave();\r
-                       }\r
-               }else{\r
-                       if (linphone_gtk_get_ui_config_int("update_check_menu",0)){\r
-                               gdk_threads_enter();\r
-                               g_idle_add((GSourceFunc)popup_version_ok,NULL);\r
-                               gdk_threads_leave();\r
-                       }\r
-               }\r
-       }\r
-       return NULL;\r
-}\r
-\r
-void linphone_gtk_check_for_new_version(void){\r
-       ortp_thread_t thread;\r
-       static gboolean done=FALSE;\r
-       const char *version_url;\r
-       if (done) return;\r
-       done=TRUE;\r
-       version_url=linphone_gtk_get_ui_config("last_version_url",NULL);\r
-       if (version_url==NULL) return ;\r
-       ortp_thread_create(&thread,NULL,check_for_new_version,(void*)version_url);\r
-}\r
-\r
-/*called when the user clicks on the "Check for updates" menu item */\r
-void linphone_gtk_check_for_updates(void){\r
-       linphone_gtk_check_for_new_version();\r
-}\r
diff --git a/gtk-glade/utils.c b/gtk-glade/utils.c
deleted file mode 100644 (file)
index 69ae435..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-linphone, gtk-glade interface.
-Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
-
-This program is free software; you can redistribute it and/or
-modify it under the terms of the GNU General Public License
-as published by the Free Software Foundation; either version 2
-of the License, or (at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-*/
-
-#include "linphone.h"
-
-static void run_gtk(){
-       while (gtk_events_pending ())
-               gtk_main_iteration ();
-
-}
-
-void *linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
-       GtkWidget *w;
-       switch(ws){
-               case LinphoneWaitingStart:
-                       gdk_threads_enter();
-                       w=linphone_gtk_create_window("waiting");
-                       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
-                       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
-                       if (purpose) {
-                               gtk_progress_bar_set_text(
-                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
-                                       purpose);
-                       }
-                       gtk_widget_show(w);
-                       /*g_message("Creating waiting window");*/
-                       run_gtk();
-                       gdk_threads_leave();
-                       return w;
-               break;
-               case LinphoneWaitingProgress:
-                       w=(GtkWidget*)ctx;
-                       gdk_threads_enter();
-                       if (progress>=0){
-                               gtk_progress_bar_set_fraction(
-                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
-                                       progress);
-                               
-                               
-                       }else {
-                               gtk_progress_bar_pulse(
-                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"))
-                               );
-                       }
-                       /*g_message("Updating progress");*/
-                       run_gtk();
-                       gdk_threads_leave();
-                       g_usleep(50000);
-                       return w;
-               break;
-               case LinphoneWaitingFinished:
-                       w=(GtkWidget*)ctx;
-                       gdk_threads_enter();
-                       gtk_widget_destroy(w);
-                       run_gtk();
-                       gdk_threads_leave();
-                       return NULL;
-               break;
-       }
-       return NULL;
-}
-
-GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
-       GInputStream *stream=g_memory_input_stream_new_from_data (data,len,NULL);
-       GError *error=NULL;
-       
-       GdkPixbuf *pbuf=gdk_pixbuf_new_from_stream_at_scale (stream,w,h,preserve_ratio,NULL,&error);
-       g_input_stream_close(stream,NULL,NULL);
-       g_object_unref(G_OBJECT(stream));
-       if (pbuf==NULL){
-               g_warning("Could not open image from memory");
-       }
-       return pbuf;
-}
-
-GtkWidget * _gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
-       GtkWidget *image;
-       GdkPixbuf *pbuf=_gdk_pixbuf_new_from_memory_at_scale(data,len,w,h,preserve_ratio);
-       if (pbuf==NULL) return NULL;
-       image=gtk_image_new_from_pixbuf(pbuf);
-       g_object_unref(G_OBJECT(pbuf));
-       return image;
-}
diff --git a/gtk-glade/waiting.glade b/gtk-glade/waiting.glade
deleted file mode 100644 (file)
index 294f44e..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Sun Mar 29 15:33:09 2009 -->
-<glade-interface>
-  <widget class="GtkWindow" id="waiting">
-    <property name="title" translatable="yes">Linphone</property>
-    <property name="resizable">False</property>
-    <property name="modal">True</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="icon">linphone2.png</property>
-    <property name="deletable">False</property>
-    <child>
-      <widget class="GtkFrame" id="frame1">
-        <property name="visible">True</property>
-        <property name="label_xalign">0</property>
-        <child>
-          <widget class="GtkAlignment" id="alignment1">
-            <property name="visible">True</property>
-            <property name="left_padding">12</property>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <property name="spacing">5</property>
-                <child>
-                  <widget class="GtkImage" id="image1">
-                    <property name="visible">True</property>
-                    <property name="stock">gtk-dialog-info</property>
-                  </widget>
-                  <packing>
-                    <property name="expand">False</property>
-                    <property name="fill">False</property>
-                  </packing>
-                </child>
-                <child>
-                  <widget class="GtkProgressBar" id="progressbar">
-                    <property name="visible">True</property>
-                  </widget>
-                  <packing>
-                    <property name="padding">5</property>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-            </child>
-          </widget>
-        </child>
-        <child>
-          <widget class="GtkLabel" id="label1">
-            <property name="visible">True</property>
-            <property name="label" translatable="yes">Please wait</property>
-            <property name="use_markup">True</property>
-            <property name="justify">GTK_JUSTIFY_CENTER</property>
-          </widget>
-          <packing>
-            <property name="type">label_item</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>
diff --git a/gtk/.gitignore b/gtk/.gitignore
new file mode 100644 (file)
index 0000000..398d60f
--- /dev/null
@@ -0,0 +1,5 @@
+linphone-3
+.libs
+.deps
+linphone.res
+
diff --git a/gtk/Makefile.am b/gtk/Makefile.am
new file mode 100644 (file)
index 0000000..7bcba95
--- /dev/null
@@ -0,0 +1,86 @@
+UI_FILES=      about.ui \
+               main.ui \
+               password.ui \
+               contact.ui \
+               incoming_call.ui \
+               parameters.ui \
+               sip_account.ui \
+               chatroom.ui \
+               call_logs.ui \
+               log.ui \
+               buddylookup.ui \
+               waiting.ui
+
+PIXMAPS=       \
+               stock_people.png 
+
+LINPHONE_ICO_RC_FILE=linphone.rc
+LINPHONE_ICO_FILE=linphone.ico
+
+EXTRA_DIST=    $(PIXMAPS) \
+               $(UI_FILES) \
+               linphone.iss \
+               $(LINPHONE_ICO_RC_FILE) \
+               $(LINPHONE_ICO_FILE)
+
+
+if BUILD_GTK_UI
+
+BUILT_SOURCES=version_date.h
+
+bin_PROGRAMS=linphone-3
+
+linphone_3_SOURCES=    \
+                       main.c \
+                       propertybox.c \
+                       friendlist.c \
+                       support.c \
+                       chat.c \
+                       calllogs.c \
+                       logging.c \
+                       update.c \
+                       buddylookup.c \
+                       utils.c \
+                       setupwizard.c\
+                       incall_view.c \
+                       loginframe.c \
+                       linphone.h 
+
+linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \
+               $(top_builddir)/mediastreamer2/src/libmediastreamer.la \
+               $(top_builddir)/coreapi/liblinphone.la \
+                       $(LIBGTK_LIBS) $(INTLLIBS) 
+
+
+if BUILD_WIN32
+
+linphone.res:  $(LINPHONE_ICO_RC_FILE) $(LINPHONE_ICO_FILE)
+       windres $(LINPHONE_ICO_RC_FILE) -O coff -o linphone.res
+
+linphone_3_LDADD+=linphone.res -lwininet
+linphone_3_LDFLAGS=-Wl,--export-all-symbols -mwindows
+else
+linphone_3_LDFLAGS=-export-dynamic
+endif
+
+uidir=$(datadir)/linphone
+ui_DATA=$(UI_FILES) $(PIXMAPS) $(top_srcdir)/COPYING
+
+endif
+
+
+AM_CFLAGS= -DIN_LINPHONE -I$(top_srcdir)/coreapi/ \
+               -I$(top_srcdir)/mediastreamer2/include/ \
+               $(ORTP_CFLAGS) \
+               $(STRICT_OPTIONS) $(LIBGTK_CFLAGS) $(IPV6_CFLAGS) \
+               $(OSIP_CFLAGS) 
+
+
+version_date.h: $(top_srcdir)/configure.in
+       echo "#define LINPHONE_VERSION_DATE \"$(VERSION)-`date +%y%m%d`\"" > $@
+
+newdate:
+       rm -f version_date.h
+
+CLEANFILES=version_date.h linphone.res
+
diff --git a/gtk/about.ui b/gtk/about.ui
new file mode 100644 (file)
index 0000000..3fc7d35
--- /dev/null
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.12 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkAboutDialog" id="about">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">About linphone</property>
+    <property name="resizable">False</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <property name="program_name">Linphone</property>
+    <property name="version">undef</property>
+    <property name="copyright" translatable="yes">Created by Simon Morlat
+</property>
+    <property name="comments" translatable="yes">An internet video phone using the standard SIP (rfc3261) protocol.</property>
+    <property name="website">http://www.linphone.org</property>
+    <property name="license">GPL</property>
+    <property name="authors">Simon Morlat</property>
+    <property name="documenters"></property>
+    <property name="translator_credits" translatable="yes">fr: Simon Morlat
+en: Simon Morlat and Delphine Perreau
+it: Alberto Zanoni &lt;alberto.zanoni@-NO-SPAM-PLEASE!-tiscalinet.it&gt;
+de: Jean-Jacques Sarton &lt;jj.sarton@-NO-SPAM-PLEASE-t-online.de&gt;
+sv: Daniel Nylander &lt;po@danielnylander.se&gt;
+es: Jesus Benitez &lt;gnelson at inMail dot sk&gt;
+ja: YAMAGUCHI YOSHIYA &lt;yushiya@anet.ne.jp&gt;
+pt_BR: Rafael Caesar Lenzi &lt;rc_lenzi@yahoo.com.br&gt;
+pl: Robert Nasiadek &lt;darkone@darkone.pl&gt;
+cs: Petr Pisar &lt;petr.pisar@atlas.cz&gt;
+hu: anonymous
+</property>
+    <property name="artists">Icons by kerosine.fr</property>
+    <signal name="response" handler="linphone_gtk_about_response"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox8">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <placeholder/>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area7">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/buddylookup.c b/gtk/buddylookup.c
new file mode 100644 (file)
index 0000000..55c3f33
--- /dev/null
@@ -0,0 +1,305 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+#include "sipsetup.h"
+
+static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results);
+
+enum {
+       LOOKUP_RESULT_NAME,
+       LOOKUP_RESULT_SIP_URI,
+       LOOKUP_RESULT_ADDRESS,
+       LOOKUP_RESULT_ICON,
+       LOOKUP_RESULT_NCOL
+};
+
+void linphone_gtk_buddy_lookup_window_destroyed(GtkWidget *w){
+       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+       tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"buddylookup_processing"));
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+}
+
+static void enable_add_buddy_button(GtkWidget *w){
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),TRUE);
+}
+
+static void disable_add_buddy_button(GtkWidget *w){
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(w,"add_buddy"),FALSE);
+}
+
+static void buddy_selection_changed(GtkWidget *w){
+       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       enable_add_buddy_button(w);
+       
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(results));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               GtkTreePath *path=gtk_tree_model_get_path(model,&iter);
+               gtk_tree_view_collapse_all(GTK_TREE_VIEW(results));
+               gtk_tree_view_expand_row(GTK_TREE_VIEW(results),path,FALSE);
+               gtk_tree_path_free(path);
+       }
+}
+
+GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx){
+       GtkTreeStore *store;
+       GtkCellRenderer *renderer,*pbuf_renderer;
+       GtkTreeViewColumn *column;
+       GtkTreeSelection *select;
+       GtkWidget *w=linphone_gtk_create_window("buddylookup");
+       GtkWidget *results=linphone_gtk_get_widget(w,"search_results");
+       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
+       
+       store = gtk_tree_store_new(LOOKUP_RESULT_NCOL, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, GDK_TYPE_PIXBUF);
+       
+       /*gtk_tree_view_set_hover_expand(GTK_TREE_VIEW(results),TRUE);*/
+       gtk_tree_view_set_model(GTK_TREE_VIEW(results),GTK_TREE_MODEL(store));
+       g_object_unref(G_OBJECT(store));
+
+       renderer = gtk_cell_renderer_text_new ();
+       column = gtk_tree_view_column_new_with_attributes (_("Firstname, Lastname"),
+                                                   renderer,
+                                                   "markup", LOOKUP_RESULT_NAME,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       
+
+       pbuf_renderer=gtk_cell_renderer_pixbuf_new();
+       g_object_set(G_OBJECT(renderer),"is-expander",TRUE,NULL);
+       gtk_tree_view_column_pack_start(column,pbuf_renderer,FALSE);
+       gtk_tree_view_column_add_attribute  (column,pbuf_renderer,
+                                                         "pixbuf",
+                                                         LOOKUP_RESULT_ICON);
+       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
+       
+/*
+       column = gtk_tree_view_column_new_with_attributes (_("SIP address"),
+                                                   renderer,
+                                                   "text", LOOKUP_RESULT_SIP_URI,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       gtk_tree_view_append_column (GTK_TREE_VIEW (results), column);
+*/
+
+       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (results));
+       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+       g_signal_connect_swapped(G_OBJECT(select),"changed",(GCallback)buddy_selection_changed,w);
+/*
+#if GTK_CHECK_VERSION(2,12,0)
+       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(results),LOOKUP_RESULT_ADDRESS);
+#endif
+*/
+       g_object_set_data(G_OBJECT(w),"SipSetupContext",ctx);
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_buddy_lookup_window_destroyed,w);
+       //g_signal_connect_swapped(G_OBJECT(w),"destroy",(GCallback)linphone_gtk_buddy_lookup_window_destroyed,w);
+       gtk_progress_bar_set_fraction(pb,0);
+       gtk_progress_bar_set_text(pb,NULL);
+       gtk_dialog_add_button(GTK_DIALOG(w),GTK_STOCK_CLOSE,GTK_RESPONSE_CLOSE);
+       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(-1));
+
+       gtk_widget_show(w);
+       return w;
+}
+
+
+void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw){
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")),kw);
+}
+
+static gboolean linphone_gtk_process_buddy_lookup(GtkWidget *w){
+       BuddyLookupStatus bls;
+       SipSetupContext *ctx;
+       int last_state;
+       gchar *tmp;
+       MSList *results=NULL;
+       GtkProgressBar *pb=GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"));
+       BuddyLookupRequest *req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
+
+       ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext"); 
+       last_state=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"last_state"));
+
+       if (req==NULL) {
+               g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(0));
+               return FALSE;
+       }
+       bls=req->status;
+       if (last_state==bls) return TRUE;
+       
+       switch(bls){
+               case BuddyLookupNone:
+                       gtk_progress_bar_set_fraction(pb,0);
+                       gtk_progress_bar_set_text(pb,NULL);
+                       break;
+               case BuddyLookupFailure:
+                       gtk_progress_bar_set_fraction(pb,0);
+                       gtk_progress_bar_set_text(pb,_("Error communicating with server."));
+                       break;
+               case BuddyLookupConnecting:
+                       gtk_progress_bar_set_fraction(pb,0.2);
+                       gtk_progress_bar_set_text(pb,_("Connecting..."));
+                       break;
+               case BuddyLookupConnected:
+                       gtk_progress_bar_set_fraction(pb,0.4);
+                       gtk_progress_bar_set_text(pb,_("Connected"));
+                       break;
+               case BuddyLookupReceivingResponse:
+                       gtk_progress_bar_set_fraction(pb,0.8);
+                       gtk_progress_bar_set_text(pb,_("Receiving data..."));
+                       break;
+               case BuddyLookupDone:
+                       results=req->results;
+                       linphone_gtk_display_lookup_results(
+                                       linphone_gtk_get_widget(w,"search_results"),
+                                       results);
+                       gtk_progress_bar_set_fraction(pb,1);
+                       tmp=g_strdup_printf(ngettext("Found %i contact",
+                        "Found %i contacts", ms_list_size(results)),
+                    ms_list_size(results));
+                       gtk_progress_bar_set_text(pb,tmp);
+                       g_free(tmp);
+                       sip_setup_context_buddy_lookup_free(ctx,req);
+                       g_object_set_data(G_OBJECT(w),"buddylookup_request",NULL);
+                       break;
+       }
+       g_object_set_data(G_OBJECT(w),"last_state",GINT_TO_POINTER(bls));
+       return TRUE;
+}
+
+static gboolean keyword_typing_finished(GtkWidget *w){
+       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
+       const char *keyword;
+       SipSetupContext *ctx;
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+       keyword=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"keyword")));
+       if (strlen(keyword)>=1){
+               BuddyLookupRequest *req;
+               guint tid2;
+               ctx=(SipSetupContext*)g_object_get_data(G_OBJECT(w),"SipSetupContext");
+               req=(BuddyLookupRequest*)g_object_get_data(G_OBJECT(w),"buddylookup_request");
+               if (req!=NULL){
+                       sip_setup_context_buddy_lookup_free(ctx,req);
+               }
+               req=sip_setup_context_create_buddy_lookup_request(ctx);
+               buddy_lookup_request_set_key(req,keyword);
+               sip_setup_context_buddy_lookup_submit(ctx,req);
+               g_object_set_data(G_OBJECT(w),"buddylookup_request",req);
+               if (g_object_get_data(G_OBJECT(w),"buddylookup_processing")==NULL){
+                       tid2=g_timeout_add(20,(GSourceFunc)linphone_gtk_process_buddy_lookup,w);
+                       g_object_set_data(G_OBJECT(w),"buddylookup_processing",GINT_TO_POINTER(tid2));
+               }
+       }
+       return FALSE;
+}
+
+void linphone_gtk_keyword_changed(GtkEditable *e){
+       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(e));
+       guint tid=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(w),"typing_timeout"));
+       if (tid!=0){
+               g_source_remove(tid);
+       }
+       tid=g_timeout_add(2000,(GSourceFunc)keyword_typing_finished,w);
+       g_object_set_data(G_OBJECT(w),"typing_timeout",GINT_TO_POINTER(tid));
+}
+
+static void linphone_gtk_display_lookup_results(GtkWidget *w, const MSList *results){
+       GtkTreeStore *store;
+       GtkTreeIter iter;
+       gchar *tmp;
+       const MSList *elem;
+       store=GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(w)));
+       gtk_tree_store_clear(store);
+       disable_add_buddy_button(gtk_widget_get_toplevel(w));
+       for(elem=results;elem!=NULL;elem=elem->next){
+               BuddyInfo *bi=(BuddyInfo*)elem->data;
+               GdkPixbuf *pbuf;
+               GtkTreeIter depth1;
+               gtk_tree_store_append(store,&iter,NULL);
+               tmp=g_strdup_printf("%s, %s (%s)",bi->firstname,bi->lastname,bi->displayname);
+               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_NAME, tmp,-1);
+               g_free(tmp);
+               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_SIP_URI, bi->sip_uri,-1);
+               tmp=g_strdup_printf("%s, %s %s\n%s",bi->address.street, bi->address.zip, bi->address.town, bi->address.country);
+               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ADDRESS, tmp,-1);
+               g_free(tmp);
+               if (bi->image_data!=NULL){
+                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
+                       if (pbuf) {
+                               gtk_tree_store_set(store,&iter,LOOKUP_RESULT_ICON,pbuf,-1);
+                               g_object_unref(G_OBJECT(pbuf));
+                       }
+               }
+               gtk_tree_store_append(store,&depth1,&iter);
+               tmp=g_strdup_printf("<big>%s, %s (%s)</big>\n<i>%s</i>, <b>%s</b> %s\n%s\n%s",
+                       bi->firstname,bi->lastname,bi->displayname,bi->address.street,
+                       bi->address.zip, bi->address.town, bi->address.country,bi->sip_uri);
+               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_NAME,tmp,-1);
+               g_free(tmp);
+               if (bi->image_data!=NULL){
+                       pbuf=_gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,-1,TRUE);
+                       if (pbuf) {
+                               gtk_tree_store_set(store,&depth1,LOOKUP_RESULT_ICON,pbuf,-1);
+                               g_object_unref(G_OBJECT(pbuf));
+                       }
+               }
+       }
+}
+
+void linphone_gtk_add_buddy_from_database(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"search_results")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               char *uri;
+               char *name;
+               char *addr;
+               LinphoneFriend *lf;
+               int presence=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
+               gtk_tree_model_get (model, &iter,LOOKUP_RESULT_SIP_URI , &uri,LOOKUP_RESULT_NAME, &name, -1);
+               addr=g_strdup_printf("%s <%s>",name,uri);
+
+               lf=linphone_friend_new_with_addr(addr);
+               linphone_friend_set_inc_subscribe_policy(lf,presence ? LinphoneSPAccept : LinphoneSPDeny);
+               linphone_friend_send_subscribe(lf,presence);
+               linphone_core_add_friend(linphone_gtk_get_core(),lf);
+               linphone_gtk_show_friends();
+               g_free(addr);
+               g_free(uri);
+               g_free(name);
+       }
+}
+
+/*called when double clicking on a contact */
+void linphone_gtk_buddy_lookup_contact_activated(GtkWidget *treeview){
+       linphone_gtk_add_buddy_from_database(treeview);
+       gtk_widget_destroy(gtk_widget_get_toplevel(treeview));
+}
diff --git a/gtk/buddylookup.ui b/gtk/buddylookup.ui
new file mode 100644 (file)
index 0000000..34b45ed
--- /dev/null
@@ -0,0 +1,160 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="buddylookup">
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Search contacts in directory</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <signal handler="gtk_widget_destroy" name="response"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="border_width">5</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkEntry" id="keyword">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="has_focus">True</property>
+                        <signal handler="linphone_gtk_keyword_changed" name="changed"/>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="scrolledwindow1">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="hscrollbar_policy">automatic</property>
+                        <property name="vscrollbar_policy">automatic</property>
+                        <property name="shadow_type">etched-in</property>
+                        <child>
+                          <object class="GtkTreeView" id="search_results">
+                            <property name="width_request">512</property>
+                            <property name="height_request">140</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <signal handler="linphone_gtk_buddy_lookup_contact_activated" name="row_activated"/>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="padding">6</property>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkProgressBar" id="progressbar">
+                        <property name="visible">True</property>
+                        <property name="activity_mode">True</property>
+                        <property name="show_text">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkHButtonBox" id="hbuttonbox1">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkButton" id="add_buddy">
+                            <property name="visible">True</property>
+                            <property name="sensitive">False</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <signal handler="linphone_gtk_add_buddy_from_database" name="clicked"/>
+                            <child>
+                              <object class="GtkHBox" id="hbox1">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkImage" id="image1">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-add</property>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label2">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Add to my list</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="padding">5</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="position">3</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">&lt;b&gt;Search somebody&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/call_logs.ui b/gtk/call_logs.ui
new file mode 100644 (file)
index 0000000..566f525
--- /dev/null
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<!--Generated with glade3 3.4.5 on Wed Jul 30 17:55:28 2008 -->
+<interface>
+  <object class="GtkDialog" id="call_logs">
+    <property name="width_request">500</property>
+    <property name="height_request">370</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Call history</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+            <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+            <child>
+              <object class="GtkTextView" id="logtextview">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="editable">False</property>
+                <property name="wrap_mode">GTK_WRAP_WORD</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">GTK_PACK_END</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">button1</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/gtk/calllogs.c b/gtk/calllogs.c
new file mode 100644 (file)
index 0000000..0695419
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+
+void linphone_gtk_call_log_update(GtkWidget *w){
+       GtkTextView *v=GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview"));
+       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
+       GtkTextIter iter,begin;
+       int off;
+       char *logmsg;
+       const MSList *logs;
+       for (logs=linphone_core_get_call_logs(linphone_gtk_get_core());logs!=NULL;logs=logs->next){
+               LinphoneCallLog *cl=(LinphoneCallLog*)logs->data;
+               logmsg=linphone_call_log_to_str(cl);
+               gtk_text_buffer_get_end_iter(b,&iter);
+               off=gtk_text_iter_get_offset(&iter);
+               gtk_text_buffer_insert(b,&iter,logmsg,-1);
+               gtk_text_buffer_get_end_iter(b,&iter);
+               gtk_text_buffer_insert(b,&iter,"\n",-1);
+               gtk_text_buffer_get_end_iter(b,&iter);
+               gtk_text_buffer_get_iter_at_offset(b,&begin,off);
+               gtk_text_buffer_apply_tag_by_name(b,cl->dir==LinphoneCallOutgoing ? "green" : "blue" ,&begin,&iter);
+               ms_free(logmsg);        
+       }
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
+}
+
+void linphone_gtk_call_log_response(GtkWidget *w){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       g_object_set_data(G_OBJECT(mw),"call_logs",NULL);
+       gtk_widget_destroy(w);
+}
+
+GtkWidget * linphone_gtk_show_call_logs(void){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkTextBuffer *b;
+       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
+       if (w==NULL){
+               w=linphone_gtk_create_window("call_logs");
+               g_object_set_data(G_OBJECT(mw),"call_logs",w);
+               g_signal_connect(G_OBJECT(w),"response",(GCallback)linphone_gtk_call_log_response,NULL);
+               gtk_widget_show(w);
+               b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"logtextview")));
+               gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
+               gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
+               linphone_gtk_call_log_update(w);
+       }else gtk_window_present(GTK_WINDOW(w));
+       return w;
+}
+
diff --git a/gtk/chat.c b/gtk/chat.c
new file mode 100644 (file)
index 0000000..bc61850
--- /dev/null
@@ -0,0 +1,108 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const char *with){
+       GtkWidget *w;
+       GtkTextBuffer *b;
+       gchar *tmp;
+       w=linphone_gtk_create_window("chatroom");
+       tmp=g_strdup_printf(_("Chat with %s"),with);
+       gtk_window_set_title(GTK_WINDOW(w),tmp);
+       g_free(tmp);
+       g_object_set_data(G_OBJECT(w),"cr",cr);
+       gtk_widget_show(w);
+       linphone_chat_room_set_user_data(cr,w);
+       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")));
+       gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL);
+       gtk_text_buffer_create_tag(b,"green","foreground","green",NULL);
+       return w;
+}
+
+void linphone_gtk_create_chatroom(const char *with){
+       LinphoneChatRoom *cr=linphone_core_create_chat_room(linphone_gtk_get_core(),with);
+       if (!cr) return;
+       linphone_gtk_init_chatroom(cr,with);
+}
+
+void linphone_gtk_chat_destroyed(GtkWidget *w){
+       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
+       linphone_chat_room_destroy(cr);
+}
+
+void linphone_gtk_chat_close(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       gtk_widget_destroy(w);
+}
+
+void linphone_gtk_push_text(GtkTextView *v, const char *from, const char *message, gboolean me){
+       GtkTextBuffer *b=gtk_text_view_get_buffer(v);
+       GtkTextIter iter,begin;
+       int off;
+       gtk_text_buffer_get_end_iter(b,&iter);
+       off=gtk_text_iter_get_offset(&iter);
+       gtk_text_buffer_insert(b,&iter,from,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,":\t",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
+       gtk_text_buffer_apply_tag_by_name(b,me ? "green" : "blue" ,&begin,&iter);
+       gtk_text_buffer_insert(b,&iter,message,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,"\n",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
+}
+
+const char* linphone_gtk_get_used_identity(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg) return linphone_proxy_config_get_identity(cfg);
+       else return linphone_core_get_primary_contact(lc);
+}
+
+void linphone_gtk_send_text(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkWidget *entry=linphone_gtk_get_widget(w,"text_entry");
+       LinphoneChatRoom *cr=(LinphoneChatRoom*)g_object_get_data(G_OBJECT(w),"cr");
+       const gchar *entered;
+       entered=gtk_entry_get_text(GTK_ENTRY(entry));
+       if (strlen(entered)>0) {
+               linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
+                               linphone_gtk_get_used_identity(),
+                               entered,TRUE);
+               linphone_chat_room_send_message(cr,entered);
+               gtk_entry_set_text(GTK_ENTRY(entry),"");
+       }
+}
+
+void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message){
+       GtkWidget *w=(GtkWidget*)linphone_chat_room_get_user_data(room);
+       if (w==NULL){
+               w=linphone_gtk_init_chatroom(room,from);
+       }
+       linphone_gtk_push_text(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog")),
+                               from,
+                               message,FALSE);
+       gtk_window_present(GTK_WINDOW(w));
+       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
+}
+
diff --git a/gtk/chatroom.ui b/gtk/chatroom.ui
new file mode 100644 (file)
index 0000000..6322d09
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0"?>
+<!--Generated with glade3 3.4.5 on Wed Jul 30 15:51:13 2008 -->
+<interface>
+  <object class="GtkWindow" id="chatroom">
+    <signal handler="linphone_gtk_chat_destroyed" name="destroy"/>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <object class="GtkTextView" id="textlog">
+            <property name="width_request">200</property>
+            <property name="height_request">200</property>
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="editable">False</property>
+            <property name="wrap_mode">GTK_WRAP_WORD</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkEntry" id="text_entry">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="has_focus">True</property>
+                <signal handler="linphone_gtk_send_text" name="activate"/>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton" id="send">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <signal handler="linphone_gtk_send_text" name="clicked"/>
+                <child>
+                  <object class="GtkHBox" id="hbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkImage" id="image1">
+                        <property name="visible">True</property>
+                        <property name="stock">gtk-ok</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Send</property>
+                      </object>
+                      <packing>
+                        <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>
+        <child>
+          <object class="GtkHButtonBox" id="hbuttonbox1">
+            <property name="visible">True</property>
+            <property name="layout_style">GTK_BUTTONBOX_END</property>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="label" translatable="yes">gtk-close</property>
+                <property name="use_stock">True</property>
+                <signal handler="linphone_gtk_chat_close" name="clicked"/>
+              </object>
+              <packing>
+                <property name="pack_type">GTK_PACK_END</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/contact.ui b/gtk/contact.ui
new file mode 100644 (file)
index 0000000..516f427
--- /dev/null
@@ -0,0 +1,183 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="contact">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox7">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame17">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment17">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkVBox" id="vbox13">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkTable" id="table7">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">2</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <object class="GtkLabel" id="label45">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Name</property>
+                          </object>
+                          <packing>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label46">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">SIP Address</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="name">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="sip_address">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="y_options">GTK_FILL</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="fill">False</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="show_presence">
+                        <property name="label" translatable="yes">Show this contact presence status</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="allow_presence">
+                        <property name="label" translatable="yes">Allow this contact to see my presence status</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label47">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">&lt;b&gt;Contact information&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area7">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="cancel_button">
+                <property name="label" translatable="yes">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal handler="linphone_gtk_contact_cancel" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="ok_button">
+                <property name="label" translatable="yes">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal handler="linphone_gtk_contact_ok" name="clicked"/>
+              </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="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/fonis.c b/gtk/fonis.c
new file mode 100644 (file)
index 0000000..dbcbf68
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+
+#include "linphone.h"
+
diff --git a/gtk/friendlist.c b/gtk/friendlist.c
new file mode 100644 (file)
index 0000000..3805057
--- /dev/null
@@ -0,0 +1,585 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include <gtk/gtk.h>
+#include "linphone.h"
+
+static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list);
+
+enum{
+       FRIEND_PRESENCE_IMG,
+       FRIEND_NAME,
+       FRIEND_PRESENCE_STATUS,
+       FRIEND_ID,
+       FRIEND_SIP_ADDRESS,
+       FRIEND_ICON,
+       FRIEND_LIST_NCOL
+};
+
+
+typedef struct _status_picture_tab_t{
+       LinphoneOnlineStatus status;
+       const char *img;
+} status_picture_tab_t;
+
+status_picture_tab_t status_picture_tab[]={
+       {       LinphoneStatusOnline,           "status-green.png"      },
+       {       LinphoneStatusBusy,             "status-orange.png"             },
+       {       LinphoneStatusBeRightBack,      "status-orange.png"             },
+       {       LinphoneStatusAway,             "status-orange.png"             },
+       {       LinphoneStatusOnThePhone,       "status-orange.png"             },
+       {       LinphoneStatusOutToLunch,       "status-orange.png"             },
+       {       LinphoneStatusDoNotDisturb,     "status-red.png"        },
+       {       LinphoneStatusMoved,            "status-orange.png"     },
+       {       LinphoneStatusAltService,       "status-orange.png"     },
+       {       LinphoneStatusOffline,  "status-offline.png"            },
+       {       LinphoneStatusPending,  "status-offline.png"            },
+       {       LinphoneStatusEnd,              NULL                    },
+};
+
+static GdkPixbuf *create_status_picture(LinphoneOnlineStatus ss){
+       status_picture_tab_t *t=status_picture_tab;
+       while(t->img!=NULL){
+               if (ss==t->status){
+                       GdkPixbuf *pixbuf;
+                       pixbuf = create_pixbuf(t->img);
+                       return pixbuf;
+               }
+               ++t;
+       }
+       g_error("No pixmap defined for status %i",ss);
+       return NULL;
+}
+
+void linphone_gtk_set_friend_status(GtkWidget *friendlist , LinphoneFriend * fid, const gchar *url, const gchar *status, const gchar *img){
+       GtkTreeIter iter;
+       LinphoneFriend *tmp=0;
+       gboolean found=FALSE;
+       GtkTreeModel *model=gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist));
+       if (gtk_tree_model_get_iter_first(model,&iter)) {
+               do{
+                       gtk_tree_model_get(model,&iter,FRIEND_ID,&tmp,-1);
+                       //printf("tmp=%i, fid=%i",tmp,fid);
+                       if (fid==tmp) {
+                               GdkPixbuf *pixbuf;
+                               gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_STATUS,status,-1);
+                               pixbuf = create_pixbuf(img);
+                               if (pixbuf)
+                                 {
+                                   gtk_list_store_set(GTK_LIST_STORE(model),&iter,FRIEND_PRESENCE_IMG, pixbuf,-1);
+                                 }
+                                 found=TRUE;
+                       }
+               }while(gtk_tree_model_iter_next(model,&iter));
+       }
+       
+}
+
+
+static void linphone_gtk_set_selection_to_uri_bar(GtkTreeView *treeview){
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       gchar* friend;
+       select = gtk_tree_view_get_selection (treeview);
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               friend=linphone_address_as_string(linphone_friend_get_address(lf));
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),friend);
+               ms_free(friend);
+       }
+}
+
+static void linphone_gtk_call_selected(GtkTreeView *treeview){
+       linphone_gtk_set_selection_to_uri_bar(treeview);
+       linphone_gtk_start_call(linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(treeview)),
+                                       "start_call"));
+}
+
+void linphone_gtk_contact_activated(GtkTreeView     *treeview,
+                                    GtkTreePath     *path,
+                                    GtkTreeViewColumn *column,
+                                        gpointer         user_data)
+{
+       linphone_gtk_call_selected(treeview);
+}
+
+void linphone_gtk_contact_clicked(GtkTreeView     *treeview){
+       linphone_gtk_set_selection_to_uri_bar(treeview);
+}
+
+static GtkWidget * create_presence_menu(){
+       GtkWidget *menu=gtk_menu_new();
+       GtkWidget *menu_item;
+       GdkPixbuf *pbuf;
+       status_picture_tab_t *t;
+       for(t=status_picture_tab;t->img!=NULL;++t){
+               if (t->status==LinphoneStatusPending){
+                       continue;
+               }
+               menu_item=gtk_image_menu_item_new_with_label(linphone_online_status_to_string(t->status));
+               pbuf=create_status_picture(t->status);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),
+                                               gtk_image_new_from_pixbuf(pbuf));
+               g_object_unref(G_OBJECT(pbuf));
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_set_my_presence,GINT_TO_POINTER(t->status));
+       }
+       return menu;
+}
+
+void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss){
+       GtkWidget *button=linphone_gtk_get_widget(linphone_gtk_get_main_window(),"presence_button");
+       GdkPixbuf *pbuf=create_status_picture(ss);
+       GtkWidget *image=gtk_image_new_from_pixbuf(pbuf);
+       GtkWidget *menu;
+       g_object_unref(G_OBJECT(pbuf));
+       gtk_widget_set_tooltip_text(button,linphone_online_status_to_string(ss));
+       gtk_button_set_image(GTK_BUTTON(button),image);
+       /*prepare menu*/
+       menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
+       if (menu==NULL){
+               menu=create_presence_menu();
+               /*the menu is destroyed when the button is destroyed*/
+               g_object_weak_ref(G_OBJECT(button),(GWeakNotify)gtk_widget_destroy,menu);
+               g_object_set_data(G_OBJECT(button),"presence_menu",menu);
+       }
+       linphone_core_set_presence_info(linphone_gtk_get_core(),0,NULL,ss);
+}
+
+void linphone_gtk_my_presence_clicked(GtkWidget *button){
+       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(button),"presence_menu");
+       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,NULL,NULL,0,
+                       gtk_get_current_event_time());
+       gtk_widget_show(menu);
+}
+
+
+static void linphone_gtk_friend_list_init(GtkWidget *friendlist)
+{
+       GtkListStore *store;
+       GtkCellRenderer *renderer;
+       GtkTreeViewColumn *column;
+       GtkTreeSelection *select;
+       
+       
+       store = gtk_list_store_new(FRIEND_LIST_NCOL, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING,  G_TYPE_POINTER,
+                                       G_TYPE_STRING, GDK_TYPE_PIXBUF);
+
+       gtk_tree_view_set_model(GTK_TREE_VIEW(friendlist),GTK_TREE_MODEL(store));
+       g_object_unref(G_OBJECT(store));
+
+       renderer = gtk_cell_renderer_pixbuf_new ();
+       column = gtk_tree_view_column_new_with_attributes (_("Name"),
+                                                   renderer,
+                                                   "pixbuf", FRIEND_ICON,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       renderer = gtk_cell_renderer_text_new ();
+       gtk_tree_view_column_pack_start(column,renderer,FALSE);
+       gtk_tree_view_column_add_attribute  (column,renderer,
+                                                         "text",
+                                                         FRIEND_NAME);
+       
+       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
+
+       column = gtk_tree_view_column_new_with_attributes (_("Presence status"),
+                                                   renderer,
+                                                   "text", FRIEND_PRESENCE_STATUS,
+                                                   NULL);
+       g_object_set (G_OBJECT(column), "resizable", TRUE, NULL);
+       gtk_tree_view_column_set_visible(column,linphone_gtk_get_ui_config_int("friendlist_status",1));
+       
+       renderer = gtk_cell_renderer_pixbuf_new();
+       gtk_tree_view_column_pack_start(column,renderer,FALSE);
+       gtk_tree_view_column_add_attribute  (column,renderer,
+                                                         "pixbuf",
+                                                         FRIEND_PRESENCE_IMG);
+       gtk_tree_view_append_column (GTK_TREE_VIEW (friendlist), column);
+
+       select = gtk_tree_view_get_selection (GTK_TREE_VIEW (friendlist));
+       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+#if GTK_CHECK_VERSION(2,12,0)
+       gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(friendlist),FRIEND_SIP_ADDRESS);
+#endif
+       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(
+                                       gtk_widget_get_toplevel(friendlist),"show_category")),0);
+}
+
+void linphone_gtk_show_directory_search(void){
+       LinphoneProxyConfig *cfg=NULL;
+       SipSetupContext * ssc=NULL;
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *search_box=linphone_gtk_get_widget(mw,"directory_search_box");
+
+       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
+       if (cfg){
+               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
+               if (ssc!=NULL && sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP){
+                       GtkWidget *entry=linphone_gtk_get_widget(mw,"directory_search_entry");
+                       gchar  *tooltip;
+                       GdkColor grey={0,40000,40000,40000};
+                       gtk_widget_show(search_box);
+                       tooltip=g_strdup_printf(_("Search in %s directory"),linphone_proxy_config_get_domain(cfg));
+                       gtk_widget_modify_text(entry,GTK_STATE_NORMAL,&grey);
+                       gtk_entry_set_text(GTK_ENTRY(entry),tooltip);
+                       g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(0));
+                       g_free(tooltip);
+                       return;
+               }
+       }
+       gtk_widget_hide(search_box);
+}
+
+gboolean linphone_gtk_directory_search_focus_out(GtkWidget *entry){
+       if (gtk_entry_get_text_length(GTK_ENTRY(entry))==0)
+               linphone_gtk_show_directory_search();
+       return FALSE;
+}
+
+gboolean linphone_gtk_directory_search_focus_in(GtkWidget *entry){
+       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==0){
+               gtk_entry_set_text(GTK_ENTRY(entry),"");
+               gtk_widget_modify_text(entry,GTK_STATE_NORMAL,NULL);
+               g_object_set_data(G_OBJECT(entry),"active",GINT_TO_POINTER(1));
+       }
+       return FALSE;
+}
+
+void linphone_gtk_directory_search_activate(GtkWidget *entry){
+       LinphoneProxyConfig *cfg;
+       linphone_core_get_default_proxy(linphone_gtk_get_core(),&cfg);
+       GtkWidget *w=linphone_gtk_show_buddy_lookup_window(linphone_proxy_config_get_sip_setup_context(cfg));
+       if (GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry),"active"))==1)
+               linphone_gtk_buddy_lookup_set_keyword(w,gtk_entry_get_text(GTK_ENTRY(entry)));
+}
+
+void linphone_gtk_directory_search_button_clicked(GtkWidget *button){
+       linphone_gtk_directory_search_activate(
+               linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"directory_search_entry"));
+}
+
+void linphone_gtk_show_friends(void){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *friendlist=linphone_gtk_get_widget(mw,"contact_list");
+       GtkListStore *store=NULL;
+       GtkTreeIter iter;
+       const MSList *itf;
+       GtkWidget *category=linphone_gtk_get_widget(mw,"show_category");
+       GtkWidget *filter=linphone_gtk_get_widget(mw,"search_bar");
+       LinphoneCore *core=linphone_gtk_get_core();
+       const gchar *search=NULL;
+       gboolean online_only=FALSE,lookup=FALSE;
+       
+       linphone_gtk_show_directory_search();
+
+       if (gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist))==NULL){
+               linphone_gtk_friend_list_init(friendlist);
+       }
+       store=GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(friendlist)));
+       gtk_list_store_clear(store);
+
+       online_only=(gtk_combo_box_get_active(GTK_COMBO_BOX(category))==1);
+       search=gtk_entry_get_text(GTK_ENTRY(filter));
+       if (search==NULL || search[0]=='\0')
+               lookup=FALSE;
+       else lookup=TRUE;
+
+       for(itf=linphone_core_get_friend_list(core);itf!=NULL;itf=ms_list_next(itf)){
+               LinphoneFriend *lf=(LinphoneFriend*)itf->data;
+               const LinphoneAddress *f_uri=linphone_friend_get_address(lf);
+               char *uri=linphone_address_as_string(f_uri);
+               const char *name=linphone_address_get_display_name(f_uri);
+               const char *display=name;
+               char *escaped=NULL;
+               if (lookup){
+                       if (strstr(uri,search)==NULL){
+                               ms_free(uri);
+                               continue;
+                       }
+               }
+               if (!online_only || (linphone_friend_get_status(lf)!=LinphoneStatusOffline)){
+                       BuddyInfo *bi;
+                       if (name==NULL || name[0]=='\0') display=uri;
+                       gtk_list_store_append(store,&iter);
+                       gtk_list_store_set(store,&iter,FRIEND_NAME, display,
+                                       FRIEND_PRESENCE_STATUS, linphone_online_status_to_string(linphone_friend_get_status(lf)),
+                                       FRIEND_ID,lf,-1);
+                       gtk_list_store_set(store,&iter,
+                               FRIEND_PRESENCE_IMG, create_status_picture(linphone_friend_get_status(lf)),
+                               -1);
+                       escaped=g_markup_escape_text(uri,-1);
+                       gtk_list_store_set(store,&iter,FRIEND_SIP_ADDRESS,escaped,-1);
+                       g_free(escaped);
+                       bi=linphone_friend_get_info(lf);
+                       if (bi!=NULL && bi->image_data!=NULL){
+                               GdkPixbuf *pbuf=
+                                       _gdk_pixbuf_new_from_memory_at_scale(bi->image_data,bi->image_length,-1,40,TRUE);
+                               if (pbuf) {
+                                       gtk_list_store_set(store,&iter,FRIEND_ICON,pbuf,-1);
+                                       g_object_unref(G_OBJECT(pbuf));
+                               }
+                       }
+               }
+               ms_free(uri);
+       }
+}
+
+void linphone_gtk_add_contact(void){
+       GtkWidget *w=linphone_gtk_create_window("contact");
+       int presence_enabled=linphone_gtk_get_ui_config_int("use_subscribe_notify",1);
+       
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),presence_enabled);
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
+                                       presence_enabled);
+       gtk_widget_show(w);
+}
+
+void linphone_gtk_remove_contact(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               linphone_core_remove_friend(linphone_gtk_get_core(),lf);
+               linphone_gtk_show_friends();
+       }
+}
+
+void linphone_gtk_show_contact(LinphoneFriend *lf){
+       GtkWidget *w=linphone_gtk_create_window("contact");
+       char *uri;
+       const char *name;
+       const LinphoneAddress *f_uri=linphone_friend_get_address(lf);
+       uri=linphone_address_as_string_uri_only(f_uri);
+       name=linphone_address_get_display_name(f_uri);
+       if (uri) {
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")),uri);
+               ms_free(uri);
+       }
+       if (name){
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")),name);
+       }
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")),
+                                       linphone_friend_get_send_subscribe(lf));
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")),
+                                       linphone_friend_get_inc_subscribe_policy(lf)==LinphoneSPAccept);
+       g_object_set_data(G_OBJECT(w),"friend_ref",(gpointer)lf);
+       gtk_widget_show(w);
+}
+
+void linphone_gtk_edit_contact(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               linphone_gtk_show_contact(lf);
+       }
+}
+
+void linphone_gtk_chat_selected(GtkWidget *item){
+       GtkWidget *w=gtk_widget_get_toplevel(item);
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       LinphoneFriend *lf=NULL;
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(linphone_gtk_get_widget(w,"contact_list")));
+       if (gtk_tree_selection_get_selected (select, &model, &iter))
+       {
+               char *uri;
+               gtk_tree_model_get (model, &iter,FRIEND_ID , &lf, -1);
+               uri=linphone_address_as_string(linphone_friend_get_address(lf));
+               linphone_gtk_create_chatroom(uri);
+               ms_free(uri);
+       }
+}
+
+void linphone_gtk_contact_cancel(GtkWidget *button){
+       gtk_widget_destroy(gtk_widget_get_toplevel(button));
+}
+
+void linphone_gtk_contact_ok(GtkWidget *button){
+       GtkWidget *w=gtk_widget_get_toplevel(button);
+       LinphoneFriend *lf=(LinphoneFriend*)g_object_get_data(G_OBJECT(w),"friend_ref");
+       char *fixed_uri=NULL;
+       gboolean show_presence=FALSE,allow_presence=FALSE;
+       const gchar *name,*uri;
+       if (lf==NULL){
+               lf=linphone_friend_new();
+               if (linphone_gtk_get_ui_config_int("use_subscribe_notify",1)==1){
+                       show_presence=FALSE;
+                       allow_presence=FALSE;
+               }
+               linphone_friend_set_inc_subscribe_policy(lf,allow_presence ? LinphoneSPAccept : LinphoneSPDeny);
+               linphone_friend_send_subscribe(lf,show_presence);
+       }
+       name=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"name")));
+       uri=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"sip_address")));
+       show_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"show_presence")));
+       allow_presence=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"allow_presence")));
+       linphone_core_interpret_friend_uri(linphone_gtk_get_core(),uri,&fixed_uri);
+       if (fixed_uri==NULL){
+               linphone_gtk_display_something(GTK_MESSAGE_WARNING,_("Invalid sip contact !"));
+               return ;
+       }
+       linphone_friend_set_sip_addr(lf,fixed_uri);
+       ms_free(fixed_uri);
+       linphone_friend_set_name(lf,name);
+       linphone_friend_send_subscribe(lf,show_presence);
+       linphone_friend_set_inc_subscribe_policy(lf,allow_presence==TRUE ? LinphoneSPAccept : LinphoneSPDeny);
+       if (linphone_friend_in_list(lf)) {
+               linphone_friend_done(lf);
+       }else{
+               linphone_core_add_friend(linphone_gtk_get_core(),lf);
+       }
+       linphone_gtk_show_friends();
+       gtk_widget_destroy(w);
+}
+
+static GtkWidget *linphone_gtk_create_contact_menu(GtkWidget *contact_list){
+       GtkWidget *menu=gtk_menu_new();
+       GtkWidget *menu_item;
+       gchar *call_label=NULL;
+       gchar *text_label=NULL;
+       gchar *edit_label=NULL;
+       gchar *delete_label=NULL;
+       gchar *name=NULL;
+       GtkTreeSelection *select;
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       GtkWidget *image;
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg=NULL;
+       SipSetupContext * ssc=NULL;
+
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg){
+               ssc=linphone_proxy_config_get_sip_setup_context(cfg);
+       }
+
+       g_signal_connect(G_OBJECT(menu), "selection-done", G_CALLBACK (gtk_widget_destroy), NULL);
+       select = gtk_tree_view_get_selection(GTK_TREE_VIEW(contact_list));
+       if (gtk_tree_selection_get_selected (select, &model, &iter)){
+               gtk_tree_model_get(model, &iter,FRIEND_NAME , &name, -1);
+               call_label=g_strdup_printf(_("Call %s"),name);
+               text_label=g_strdup_printf(_("Send text to %s"),name);
+               edit_label=g_strdup_printf(_("Edit contact '%s'"),name);
+               delete_label=g_strdup_printf(_("Delete contact '%s'"),name);
+               g_free(name);
+       }
+       if (call_label){
+               menu_item=gtk_image_menu_item_new_with_label(call_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_call_selected,contact_list);
+       }
+       if (text_label){
+               menu_item=gtk_image_menu_item_new_with_label(text_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_NETWORK,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_chat_selected,contact_list);
+       }
+       if (edit_label){
+               menu_item=gtk_image_menu_item_new_with_label(edit_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_EDIT,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_edit_contact,contact_list);
+       }
+       if (delete_label){
+               menu_item=gtk_image_menu_item_new_with_label(delete_label);
+               image=gtk_image_new_from_stock(GTK_STOCK_DELETE,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_remove_contact,contact_list);
+       }
+       
+
+       if (ssc && (sip_setup_context_get_capabilities(ssc) & SIP_SETUP_CAP_BUDDY_LOOKUP)) {
+               gchar *tmp=g_strdup_printf(_("Add new contact from %s directory"),linphone_proxy_config_get_domain(cfg));
+               menu_item=gtk_image_menu_item_new_with_label(tmp);
+               g_free(tmp);
+               image=gtk_image_new_from_stock(GTK_STOCK_ADD,GTK_ICON_SIZE_MENU);
+               gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+               gtk_widget_show(image);
+               gtk_widget_show(menu_item);
+               gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+               g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_buddy_lookup_window,ssc);
+               gtk_widget_show(menu);
+       }
+       
+       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ADD,NULL);
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_add_contact,contact_list);
+       gtk_widget_show(menu);
+       gtk_menu_attach_to_widget (GTK_MENU (menu), contact_list, NULL);
+
+       if (call_label) g_free(call_label);
+       if (text_label) g_free(text_label);
+       if (edit_label) g_free(edit_label);
+       if (delete_label) g_free(delete_label);
+       return menu;
+}
+
+
+gboolean linphone_gtk_popup_contact_menu(GtkWidget *list, GdkEventButton *event){
+       GtkWidget *m=linphone_gtk_create_contact_menu(list);
+       gtk_menu_popup (GTK_MENU (m), NULL, NULL, NULL, NULL, 
+                  event ? event->button : 0, event ? event->time : gtk_get_current_event_time());
+       return TRUE;
+}
+
+gboolean linphone_gtk_contact_list_button_pressed(GtkWidget *widget, GdkEventButton *event){
+       /* Ignore double-clicks and triple-clicks */
+       if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
+       {
+               return linphone_gtk_popup_contact_menu(widget, event);
+       }
+       return FALSE;
+}
+
+void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf){
+       /*refresh the entire list*/
+       linphone_gtk_show_friends();
+}
+
+
diff --git a/gtk/gtkrc b/gtk/gtkrc
new file mode 100644 (file)
index 0000000..73d2174
--- /dev/null
+++ b/gtk/gtkrc
@@ -0,0 +1,4 @@
+#include "share/themes/XLiquid_GTK-1.0.3/gtk-2.0/gtkrc"
+#include "share/themes/Aero-ion3.1/gtk-2.0/gtkrc"
+include "share/themes/Outcrop/gtk-2.0/gtkrc"
+
diff --git a/gtk/incall_view.c b/gtk/incall_view.c
new file mode 100644 (file)
index 0000000..4d60d63
--- /dev/null
@@ -0,0 +1,259 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+/*
+*  C Implementation: incall_frame
+*
+* Description: 
+*
+*
+* Author: Simon Morlat <simon.morlat@linphone.org>, (C) 2009
+*
+*
+*/
+
+#include "linphone.h"
+
+
+gboolean linphone_gtk_use_in_call_view(){
+       static int val=-1;
+       if (val==-1) val=linphone_gtk_get_ui_config_int("use_incall_view",1);
+       return val;
+}
+
+void linphone_gtk_show_in_call_view(void){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkNotebook *notebook=(GtkNotebook *)linphone_gtk_get_widget(main_window,"viewswitch");
+       GtkWidget *in_call_frame=linphone_gtk_get_widget(main_window,"in_call_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");
+       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){
+       LinphoneAddress *from;
+       const char *displayname=NULL;
+       char *id=NULL;
+       char *uri_label;
+
+       if (uri==NULL) {
+               ms_error("Strange: in call with nobody ?");
+               return;
+       }
+
+       from=linphone_address_new(uri);
+       if (from!=NULL){
+               displayname=linphone_address_get_display_name(from);
+               id=linphone_address_as_string_uri_only(from);
+       }else id=ms_strdup(uri);
+
+       if (displayname!=NULL){
+               uri_label=g_markup_printf_escaped("<span size=\"large\">%s</span>\n<i>%s</i>", 
+                       displayname,id);
+       }else
+               uri_label=g_markup_printf_escaped("<span size=\"large\"><i>%s</i></span>\n",id);
+       gtk_label_set_markup(GTK_LABEL(label),uri_label);
+       ms_free(id);
+       g_free(uri_label);
+       if (from!=NULL) linphone_address_destroy(from);
+}
+
+void linphone_gtk_in_call_view_set_calling(const char *uri){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
+       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_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");
+
+       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"));
+       if (pbuf!=NULL){
+               gtk_image_set_from_animation(GTK_IMAGE(animation),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
+}
+
+void linphone_gtk_in_call_view_set_in_call(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *status=linphone_gtk_get_widget(main_window,"in_call_status");
+       GtkWidget *callee=linphone_gtk_get_widget(main_window,"in_call_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("incall_anim.gif");
+       const LinphoneAddress *uri=linphone_core_get_current_call_remote_address(lc);
+       char *tmp=linphone_address_as_string(uri);
+       display_peer_name_in_label(callee,tmp);
+       ms_free(tmp);
+
+       gtk_label_set_markup(GTK_LABEL(status),_("<b>In call with</b>"));
+
+       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));
+       }else gtk_image_set_from_stock(GTK_IMAGE(animation),GTK_STOCK_INFO,GTK_ICON_SIZE_DIALOG);
+       linphone_gtk_enable_mute_button(
+                                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),TRUE);
+       linphone_gtk_enable_hold_button(
+               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"hold_call")),TRUE);
+}
+
+void linphone_gtk_in_call_view_update_duration(int duration){
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       GtkWidget *duration_label=linphone_gtk_get_widget(main_window,"in_call_duration");
+       char tmp[256]={0};
+       int seconds=duration%60;
+       int minutes=(duration/60)%60;
+       int hours=duration/3600;
+       snprintf(tmp,sizeof(tmp)-1,_("%02i::%02i::%02i"),hours,minutes,seconds);
+       gtk_label_set_text(GTK_LABEL(duration_label),tmp);
+}
+
+static gboolean in_call_view_terminated(){
+       linphone_gtk_show_idle_view();
+       return FALSE;
+}
+
+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");
+       GdkPixbuf *pbuf=create_pixbuf(linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.png"));
+
+       if (error_msg==NULL)
+               gtk_label_set_markup(GTK_LABEL(status),_("<b>Call ended.</b>"));
+       else{
+               char *msg=g_markup_printf_escaped("<span color=\"red\"><b>%s</b></span>",error_msg);
+               gtk_label_set_markup(GTK_LABEL(status),msg);
+               g_free(msg);
+       }
+       if (pbuf!=NULL){
+               gtk_image_set_from_pixbuf(GTK_IMAGE(animation),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+       linphone_gtk_enable_mute_button(
+               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"incall_mute")),FALSE);
+       linphone_gtk_enable_hold_button(
+               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,"hold_call")),FALSE);
+       g_timeout_add_seconds(2,(GSourceFunc)in_call_view_terminated,NULL);
+}
+
+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);
+                       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);
+                       gtk_widget_show(image);
+               }
+       }
+}
+
+void linphone_gtk_mute_toggled(GtkToggleButton *button){
+       gboolean active=gtk_toggle_button_get_active(button);
+       linphone_core_mute_mic(linphone_gtk_get_core(),active);
+       linphone_gtk_draw_mute_button(button,active);
+}
+
+void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive)
+{
+       gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
+       linphone_gtk_draw_mute_button(button,FALSE);
+}
+
+void linphone_gtk_draw_hold_button(GtkToggleButton *button, gboolean active){
+       if (active){
+               GtkWidget *image=create_pixmap("hold_off.png");
+               gtk_button_set_label(GTK_BUTTON(button),_("HoldOff"));
+               if (image!=NULL) {
+                       gtk_button_set_image(GTK_BUTTON(button),image);
+                       gtk_widget_show(image);
+               }
+       }else{
+               GtkWidget *image=create_pixmap("hold_on.png");
+               gtk_button_set_label(GTK_BUTTON(button),_("HoldOn"));
+               if (image!=NULL) {
+                       gtk_button_set_image(GTK_BUTTON(button),image);
+                       gtk_widget_show(image);
+               }
+       }
+}
+
+void linphone_gtk_hold_toggled(GtkToggleButton *button){
+       gboolean active=gtk_toggle_button_get_active(button);
+       
+       if(active)
+       {
+               LinphoneCall *call=linphone_core_get_current_call (linphone_gtk_get_core());
+               if (call==NULL) return;
+               linphone_core_pause_call(linphone_gtk_get_core(),call);
+       }
+       else
+       {
+               const MSList *calls=linphone_core_get_calls(linphone_gtk_get_core());
+               if (calls==NULL) return;
+               if (ms_list_size(calls)>1){
+                       g_warning("Simultaneously calls not yet implemented in gtk ui.");
+                       return;
+               }
+               /*we are supposed to have only one */
+               linphone_core_resume_call(linphone_gtk_get_core(),(LinphoneCall*)calls->data);
+       }
+       linphone_gtk_draw_hold_button(button,active);
+}
+
+void linphone_gtk_enable_hold_button(GtkToggleButton *button, gboolean sensitive){
+       gtk_widget_set_sensitive(GTK_WIDGET(button),sensitive);
+       linphone_gtk_draw_hold_button(button,FALSE);
+}
diff --git a/gtk/incoming_call.ui b/gtk/incoming_call.ui
new file mode 100644 (file)
index 0000000..00a6e0e
--- /dev/null
@@ -0,0 +1,147 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="incoming_call">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="type">popup</property>
+    <property name="title" translatable="yes">Linphone - Incoming call</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">notification</property>
+    <property name="urgency_hint">True</property>
+    <property name="deletable">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox8">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame16">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment16">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkLabel" id="message">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Incoming call from</property>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label43">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Incoming call</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area7">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">spread</property>
+            <child>
+              <object class="GtkButton" id="accept_call">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <signal handler="linphone_gtk_accept_call" name="clicked"/>
+                <child>
+                  <object class="GtkHBox" id="hbox17">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkImage" id="image12">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="stock">gtk-yes</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label44">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Accept</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="decline_cal">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <signal handler="linphone_gtk_decline_call" name="clicked"/>
+                <child>
+                  <object class="GtkHBox" id="hbox20">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <child>
+                      <object class="GtkImage" id="image13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="stock">gtk-no</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="decline_call">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">Decline</property>
+                      </object>
+                      <packing>
+                        <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="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/linphone.h b/gtk/linphone.h
new file mode 100644 (file)
index 0000000..8502771
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gtk/gtk.h>
+#ifdef WIN32
+// alloca is already defined by gtk
+#undef alloca
+#endif
+#include "linphonecore.h"
+
+#include <libintl.h>
+#ifndef _
+#define _(String) gettext (String)
+#endif
+
+#ifdef USE_BUILDDATE_VERSION
+#include "version_date.h"
+#undef LINPHONE_VERSION
+#define LINPHONE_VERSION LINPHONE_VERSION_DATE
+#endif
+
+GdkPixbuf * create_pixbuf(const gchar *filename);
+GdkPixbufAnimation *create_pixbuf_animation(const gchar *filename);
+void add_pixmap_directory(const gchar *directory);
+GtkWidget*create_pixmap(const gchar     *filename);
+GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
+GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
+
+GtkWidget *linphone_gtk_create_window(const char *window_name);
+GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
+LinphoneCore *linphone_gtk_get_core(void);
+GtkWidget *linphone_gtk_get_main_window();
+void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
+void linphone_gtk_start_call(GtkWidget *button);
+void linphone_gtk_call_terminated();
+void linphone_gtk_show_friends(void);
+void linphone_gtk_show_contact(LinphoneFriend *lf);
+void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
+void linphone_gtk_show_parameters(void);
+void linphone_gtk_load_identities(void);
+void linphone_gtk_create_chatroom(const char *with);
+void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const char *from, const char *message);
+void linphone_gtk_call_log_update(GtkWidget *w);
+void linphone_gtk_create_log_window(void);
+void linphone_gtk_log_show(void);
+void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
+void linphone_gtk_destroy_log_window(void);
+gboolean linphone_gtk_check_logs();
+void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
+const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
+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_open_browser(const char *url);
+void linphone_gtk_check_for_new_version(void);
+const char *linphone_gtk_get_lang(const char *config_file);
+void linphone_gtk_set_lang(const char *code);
+SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
+GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
+void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
+void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
+
+void linphone_gtk_show_directory_search(void);
+
+/*functions controlling the different views*/
+gboolean linphone_gtk_use_in_call_view();
+void linphone_gtk_show_in_call_view(void);
+void linphone_gtk_show_idle_view(void);
+void linphone_gtk_in_call_view_set_calling(const char *uri);
+void linphone_gtk_in_call_view_set_in_call(void);
+void linphone_gtk_in_call_view_update_duration(int duration);
+void linphone_gtk_in_call_view_terminate(const char *error_msg);
+void linphone_gtk_enable_mute_button(GtkToggleButton *button, gboolean sensitive);
+void linphone_gtk_enable_hold_button(GtkToggleButton *button, gboolean sensitive);
+
+void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
+
diff --git a/gtk/linphone.ico b/gtk/linphone.ico
new file mode 100755 (executable)
index 0000000..2633d58
Binary files /dev/null and b/gtk/linphone.ico differ
diff --git a/gtk/linphone.iss b/gtk/linphone.iss
new file mode 100755 (executable)
index 0000000..f691046
--- /dev/null
@@ -0,0 +1,90 @@
+; Script generated by the Inno Setup Script Wizard.\r
+; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!\r
+\r
+[Setup]\r
+AppName=Linphone\r
+AppVerName=Linphone version 3.1.2\r
+AppPublisher=linphone.org\r
+AppPublisherURL=http://www.linphone.org\r
+AppSupportURL=http://www.linphone.org\r
+AppUpdatesURL=http://www.linphone.org\r
+DefaultDirName={pf}\Linphone\r
+DefaultGroupName=Linphone\r
+LicenseFile=..\COPYING\r
+;InfoBeforeFile=..\README\r
+OutputBaseFilename=setup\r
+Compression=lzma\r
+SolidCompression=yes\r
+\r
+[Languages]\r
+Name: "english"; MessagesFile: "compiler:Default.isl"\r
+\r
+[Tasks]\r
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked\r
+\r
+[Files]\r
+Source: "linphone.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\mediastreamer2\build\win32native\mediastream.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\console\linphonec.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\console\linphonecsh.exe"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "*.glade"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
+Source: "..\pixmaps\*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
+Source: "*.png"; DestDir: "{app}/linphone"; Flags: ignoreversion\r
+Source: "..\mediastreamer2\src\nowebcamCIF.jpg"; DestDir: "{app}\images"; Flags: ignoreversion\r
+;;internal linphone dlls:\r
+Source: "..\..\linphone-deps\bin\osipparser2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\osip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\exosip2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\libogg.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Source: "..\..\linphone-deps\bin\speex.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\avcodec.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\avutil-49.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\swscale.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Source: "..\..\linphone-deps\bin\libspeex-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Source: "..\..\linphone-deps\bin\libspeexdsp-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\coreapi\linphone.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\mediastreamer2\build\win32native\mediastreamer2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\oRTP\build\win32native\ortp.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Sound files:\r
+Source: "..\COPYING"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\share\ringback.wav"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\share\rings\orig.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\bigben.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\toy.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\tapping.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+Source: "..\share\rings\oldphone.wav"; DestDir: "{app}\rings"; Flags: ignoreversion\r
+;;Default my preferred gtk theme on windows:\r
+Source: "..\gtk-glade\gtkrc"; DestDir: "{app}"; Flags: ignoreversion\r
+;;Locales for linphone:\r
+Source: "..\po\fr.gmo"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
+Source: "..\po\sv.gmo"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; DestName: "linphone.mo"; Flags: ignoreversion\r
+\r
+;;GTK stuff:\r
+Source: "..\..\gtk+-2.14.7\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\libglade-2.6.3\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\etc\gtk-2.0\*"; DestDir: "{app}\etc\gtk-2.0\"; Flags: ignoreversion\r
+Source: "..\..\linphone-deps\bin\libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\iconv-1.9.2.win32\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\engines\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\loaders\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\loaders"; Flags: ignoreversion\r
+;;Source: "..\..\gtk+-2.14.7\lib\gtk-2.0\2.10.0\immodules\*"; DestDir: "{app}\lib\gtk-2.0\2.10.0\immodules"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\share\locale\fr\LC_MESSAGES\*"; DestDir: "{app}\share\locale\fr\LC_MESSAGES"; Flags: ignoreversion\r
+Source: "..\..\gtk+-2.14.7\share\locale\sv\LC_MESSAGES\*"; DestDir: "{app}\share\locale\sv\LC_MESSAGES"; Flags: ignoreversion\r
+Source: "..\..\XLiquid_GTK-1.0.3\gtk-2.0\*"; DestDir: "{app}\share\themes\XLiquid_GTK-1.0.3\gtk-2.0"; Flags: ignoreversion\r
+; NOTE: Don't use "Flags: ignoreversion" on any shared system files\r
+\r
+;; BuddyLookup plugin\r
+Source: "..\coreapi\plugins\buddylookup\libbuddylookup.dll"; DestDir: "{app}\liblinphone\plugins"; Flags: ignoreversion\r
+Source: "..\..\libsoup\bin\libsoup-2.4-1.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+Source: "..\..\gnutls-2.6.4\bin\*.dll"; DestDir: "{app}"; Flags: ignoreversion\r
+\r
+;;Directshow capture plugin\r
+Source: "..\mediastreamer2\plugins\msdscap\libmsdscap.dll"; DestDir: "{app}\plugins" ; Flags: ignoreversion\r
+\r
+[Icons]\r
+Name: "{group}\Linphone"; Filename: "{app}\linphone.exe" ; WorkingDir: "{app}"\r
+Name: "{userdesktop}\Linphone"; Filename: "{app}\linphone.exe"; WorkingDir: "{app}" ; Tasks: desktopicon\r
+\r
+[Run]\r
+Filename: "{app}\linphone.exe"; Description: "{cm:LaunchProgram,Linphone}"; WorkingDir: "{app}" ; Flags: nowait postinstall skipifsilent\r
+\r
diff --git a/gtk/linphone.rc b/gtk/linphone.rc
new file mode 100755 (executable)
index 0000000..9455ab6
--- /dev/null
@@ -0,0 +1,5 @@
+// This file is automatically generated by wxDev-C++.\r
+// All changes to this file will be lost when the project is recompiled.\r
+\r
+A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "linphone.ico"\r
+\r
diff --git a/gtk/log.ui b/gtk/log.ui
new file mode 100644 (file)
index 0000000..4f5603e
--- /dev/null
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="log">
+    <property name="width_request">540</property>
+    <property name="height_request">290</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Linphone debug window</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="type_hint">dialog</property>
+    <property name="deletable">False</property>
+    <property name="has_separator">False</property>
+    <signal name="response" handler="gtk_widget_hide"/>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkScrolledWindow" id="scrolledwindow1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="hscrollbar_policy">never</property>
+            <property name="vscrollbar_policy">automatic</property>
+            <property name="window_placement">bottom-left</property>
+            <property name="window_placement_set">True</property>
+            <property name="shadow_type">in</property>
+            <child>
+              <object class="GtkTextView" id="textview">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="editable">False</property>
+                <property name="wrap_mode">word</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <placeholder/>
+            </child>
+            <child>
+              <object class="GtkButton" id="button1">
+                <property name="label">gtk-close</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="clicked" handler="linphone_gtk_log_hide"/>
+              </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="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+    <action-widgets>
+      <action-widget response="0">button1</action-widget>
+    </action-widgets>
+  </object>
+</interface>
diff --git a/gtk/logging.c b/gtk/logging.c
new file mode 100644 (file)
index 0000000..9bdf1dc
--- /dev/null
@@ -0,0 +1,328 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+#ifndef WIN32
+#include <sys/stat.h>
+#include <sys/types.h>
+#endif
+
+
+static GtkWidget *log_window=NULL;
+static GStaticMutex log_mutex=G_STATIC_MUTEX_INIT;
+static GList *log_queue=NULL;
+
+typedef struct _LinphoneGtkLog{
+       OrtpLogLevel lev;
+       gchar *msg;
+}LinphoneGtkLog;
+
+
+/******
+ * Module to log to a file
+ ******/
+
+/* Marker to insert as a line at the start of every log file */
+#define LOGFILE_MARKER_START  "----<start>----"
+/* Marker to insert as a line at the end of every log file */
+#define LOGFILE_MARKER_STOP  "----<end>----"
+/* Number of files to keep in history, log file rotation will be
+   performed. */
+#define LOGFILE_ROTATION 4
+/* Pointer to opened log file */
+static FILE *_logfile = NULL;
+
+
+/* Called on exit, print out the marker, close the file and avoid to
+   continue logging. */
+static void linphone_gtk_log_uninit()
+{
+       if (_logfile != NULL) {
+               fprintf(_logfile, "%s\n", LOGFILE_MARKER_STOP);
+               fclose(_logfile);
+               _logfile = NULL;
+       }
+}
+
+/* Called when we start logging, find a good place for the log files,
+   perform rotation, insert the start marker and return the pointer to
+   the file that should be used for logging, or NULL on errors or if
+   disabled. */
+static FILE *linphone_gtk_log_init()
+{
+       static char _logdir[1024];
+       static char _logfname[1024];
+       static gboolean _log_init = FALSE;
+       const char *dst_fname;
+
+       if (!_log_init) {
+               dst_fname = linphone_gtk_get_ui_config("logfile",NULL);
+               /* For anything to happen, we need a logfile configuration variable,
+                this is our trigger */
+               if (dst_fname) {
+                       /* arrange for _logdir to contain a
+                        directory that has been created and _logfname to contain the
+                        path to a file to which we will log */
+#ifdef WIN32
+                       const char *appdata=getenv("LOCALAPPDATA");
+                       if (appdata) {
+                               snprintf(_logdir, sizeof(_logdir),"%s\\Linphone", appdata);
+                               mkdir(_logdir);
+                       } else {
+                               _logdir[0] = '\0';
+                       }
+#define PATH_SEPARATOR '\\'
+#else
+                       const char *home=getenv("HOME");
+                       if (home) {
+                               snprintf(_logdir, sizeof(_logdir),"%s/.linphone", home);
+                               mkdir(_logdir,S_IRUSR | S_IWUSR | S_IRGRP);
+                       } else {
+                               _logdir[0] = '\0';
+                       }
+#define PATH_SEPARATOR '/'
+#endif
+                       /* We have a directory, fix the path to the log file in it and
+                        open the file so that we will be appending to it. */
+                       if (_logdir[0] != '\0') {
+                               snprintf(_logfname, sizeof(_logfname), "%s%c%s",
+                                       _logdir, PATH_SEPARATOR, dst_fname);
+                               /* If the constant LOGFILE_ROTATION is greater than zero, then
+                                we kick away a simple rotation that will ensure that there
+                                are never more than LOGFILE_ROTATION+1 old copies of the
+                                log file on the disk.  The oldest file is always rotated
+                                "away" as expected.  Rotated files have the same name as
+                                the main log file, though with a number 0..LOGFILE_ROTATION
+                                at the end, where the greater the number is, the older the
+                                file is. */
+                               if (ortp_file_exist(_logfname)==0 && LOGFILE_ROTATION > 0) {
+                                       int i;
+                                       char old_fname[1024];
+                                       char new_fname[1024];
+
+                                       /* Rotate away existing files.  We make sure to remove the
+                                        old files otherwise rename() would not work properly.  We
+                                        have to loop in reverse here. */
+                                       for (i=LOGFILE_ROTATION-1;i>=0;i--) {
+                                               snprintf(old_fname, sizeof(old_fname), "%s%c%s.%d",
+                                                       _logdir, PATH_SEPARATOR, dst_fname, i);
+                                               snprintf(new_fname, sizeof(new_fname), "%s%c%s.%d",
+                                                       _logdir, PATH_SEPARATOR, dst_fname, i+1);
+                                               if (ortp_file_exist(old_fname)==0) {
+                                                       if (ortp_file_exist(new_fname)==0)
+                                                               unlink(new_fname);
+                                                       rename(old_fname, new_fname);
+                                               }
+                                       }
+                                       /* Move current log file as the first of the rotation.  Make
+                                        sure to remove the old .0 also, since otherwise rename()
+                                        would not work as expected. */
+                                       snprintf(new_fname, sizeof(new_fname), "%s%c%s.%d",
+                                               _logdir, PATH_SEPARATOR, dst_fname, 0);
+                                       if (ortp_file_exist(new_fname)==0)
+                                               unlink(new_fname);
+                                       rename(_logfname, new_fname);
+                               }
+                               /* Start a new log file and mark that we have now initialised */
+                               _logfile = fopen(_logfname, "w");
+                               fprintf(_logfile, "%s\n", LOGFILE_MARKER_START);
+                       }
+               }
+               _log_init = TRUE;
+       }
+       return _logfile;
+}
+
+static void linphone_gtk_log_file(OrtpLogLevel lev, const char *msg)
+{
+       LinphoneCore *lc;
+       time_t now;
+       FILE *outlog;
+
+       lc = linphone_gtk_get_core();
+       /* Nothing to do until the core has initialised */
+       if (lc == NULL)
+               return;
+
+       /* lc->config will turn NULL at exit, close the file to flush and
+        return to stop logging */
+       if (linphone_core_get_config(lc) == NULL) {
+               linphone_gtk_log_uninit();
+               return;
+       }
+
+       outlog = linphone_gtk_log_init();
+       if (outlog != NULL) {
+               /* We have an opened file and we have initialised properly, it's
+                time to write all these log messages. We convert the log level
+                from oRTP into something readable and timestamp each log
+                message.  The format of the timestamp can be controlled by
+                logfile_date_format in the GtkUi section of the config file,
+                but it defaults to something compact, but yet readable. */
+               const char *lname="undef";
+               const char *dateformat=linphone_gtk_get_ui_config("logfile_date_format",
+                   "%Y%m%d-%H:%M:%S");
+               char date[256];
+
+               /* Convert level constant to text */
+               switch(lev){
+                       case ORTP_DEBUG:
+                               lname="debug";
+                               break;
+                       case ORTP_MESSAGE:
+                               lname="message";
+                               break;
+                       case ORTP_WARNING:
+                               lname="warning";
+                               break;
+                       case ORTP_ERROR:
+                               lname="error";
+                               break;
+                       case ORTP_FATAL:
+                               lname="fatal";
+                               break;
+                       default:
+                               lname="undef";
+                               break;
+               }
+               /* Get current time and format it properly */
+               now = time(NULL);
+               strftime(date, sizeof(date), dateformat, localtime(&now));
+               /* Now print out the message to the logfile.  We don't flush,
+                maybe we should do to ensure that we have all the messages in
+                case of a crash (which is one of the main reasons we have a
+                    log facility in the first place). */
+               fprintf(outlog, "[%s] [%s] %s\n", date, lname, msg);
+       }
+}
+
+
+
+static gboolean delete_event_cb (GtkWidget *widget, GdkEvent *event, gpointer data)
+{
+       gtk_widget_hide (widget);
+       return TRUE;
+}
+
+void linphone_gtk_log_hide(){
+       if (log_window)
+               gtk_widget_hide(log_window);
+}
+
+void linphone_gtk_create_log_window(void){
+       GtkTextBuffer *b;
+       log_window=linphone_gtk_create_window("log");
+       b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview")));
+       gtk_text_buffer_create_tag(b,"red","foreground","red",NULL);
+       gtk_text_buffer_create_tag(b,"orange","foreground","orange",NULL);
+       /*prevent the log window from being destroyed*/
+       g_signal_connect (G_OBJECT (log_window), "delete-event",
+               G_CALLBACK (delete_event_cb), NULL);
+
+}
+
+void linphone_gtk_destroy_log_window(void){
+       GtkWidget *w=log_window;
+       g_static_mutex_lock(&log_mutex);
+       log_window=NULL;
+       gtk_widget_destroy(w);
+       g_static_mutex_unlock(&log_mutex);
+}
+
+void linphone_gtk_log_show(void){
+       gtk_widget_show(log_window);
+       gtk_window_present(GTK_WINDOW(log_window));
+}
+
+static void linphone_gtk_display_log(OrtpLogLevel lev, const char *msg){
+       GtkTextIter iter,begin;
+       int off;
+       static GtkTextView *v=NULL;
+       GtkTextBuffer *b;
+       const char *lname="undef";
+
+       if (log_window==NULL) {
+               return;
+       }
+
+       if (v==NULL) v=GTK_TEXT_VIEW(linphone_gtk_get_widget(log_window,"textview"));
+       b=gtk_text_view_get_buffer(v);
+       switch(lev){
+               case ORTP_DEBUG:
+                       lname="debug";
+                       break;
+               case ORTP_MESSAGE:
+                       lname="message";
+                       break;
+               case ORTP_WARNING:
+                       lname="warning";
+                       break;
+               case ORTP_ERROR:
+                       lname="error";
+                       break;
+               case ORTP_FATAL:
+                       lname="fatal";
+                       break;
+               default:
+                       g_error("Bad level !");
+       }
+       gtk_text_buffer_get_end_iter(b,&iter);
+       off=gtk_text_iter_get_offset(&iter);
+       gtk_text_buffer_insert(b,&iter,lname,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,": ",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,msg,-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_insert(b,&iter,"\n",-1);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       gtk_text_buffer_get_iter_at_offset(b,&begin,off);
+       if (lev==ORTP_ERROR || lev==ORTP_FATAL) gtk_text_buffer_apply_tag_by_name(b,"red",&begin,&iter);
+       else if (lev==ORTP_WARNING) gtk_text_buffer_apply_tag_by_name(b,"orange",&begin,&iter);
+       gtk_text_buffer_get_end_iter(b,&iter);
+       //gtk_text_view_scroll_to_iter(v,&iter,0,FALSE,0,0);
+}
+
+gboolean linphone_gtk_check_logs(){
+       GList *elem;
+       g_static_mutex_lock(&log_mutex);
+       for(elem=log_queue;elem!=NULL;elem=elem->next){
+               LinphoneGtkLog *lgl=(LinphoneGtkLog*)elem->data;
+               linphone_gtk_display_log(lgl->lev,lgl->msg);
+               g_free(lgl->msg);
+               g_free(lgl);
+       }
+       if (log_queue) g_list_free(log_queue);
+       log_queue=NULL;
+       g_static_mutex_unlock(&log_mutex);
+       return TRUE;
+}
+
+void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args){
+       gchar *msg=g_strdup_vprintf(fmt,args);
+       LinphoneGtkLog *lgl=g_new(LinphoneGtkLog,1);
+       lgl->lev=lev;
+       lgl->msg=msg;
+       g_static_mutex_lock(&log_mutex);
+       log_queue=g_list_append(log_queue,lgl);
+       linphone_gtk_log_file(lev, msg);
+       g_static_mutex_unlock(&log_mutex);
+}
+
diff --git a/gtk/loginframe.c b/gtk/loginframe.c
new file mode 100644 (file)
index 0000000..5b9d7f5
--- /dev/null
@@ -0,0 +1,164 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+void linphone_gtk_login_frame_connect_clicked(GtkWidget *button);
+void linphone_gtk_exit_login_frame(void);
+
+enum {
+       NetworkKindAdsl,
+       NetworkKindOpticalFiber
+};
+
+static gboolean check_login_ok(LinphoneProxyConfig *cfg){
+       if (linphone_proxy_config_is_registered(cfg)){
+               linphone_gtk_exit_login_frame();
+               return FALSE;   
+       }
+       return TRUE;
+}
+
+static void do_login(SipSetupContext *ssctx, const char *identity, const char * passwd){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       if (sip_setup_context_login_account(ssctx,identity,passwd)==0){
+               guint t=GPOINTER_TO_INT(g_object_get_data(G_OBJECT(mw),"login_tout"));
+               if (t!=0) g_source_remove(t);
+               t=g_timeout_add(50,(GSourceFunc)check_login_ok,sip_setup_context_get_proxy_config(ssctx));
+               g_object_set_data(G_OBJECT(mw),"login_tout",GINT_TO_POINTER(t));
+       }
+}
+
+static gboolean do_login_noprompt(LinphoneProxyConfig *cfg){
+       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
+       if (ssctx==NULL) return TRUE;/*not ready ?*/
+       do_login(ssctx,linphone_proxy_config_get_identity(cfg),NULL);
+       return FALSE;
+}
+
+void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *label=linphone_gtk_get_widget(mw,"login_label");
+       const LinphoneAuthInfo *ai;
+       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;
+       }
+
+       gtk_widget_hide(linphone_gtk_get_widget(mw,"logout"));
+       gtk_widget_hide(linphone_gtk_get_widget(mw,"idle_frame"));
+       gtk_widget_show(linphone_gtk_get_widget(mw,"login_frame"));
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),FALSE);
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),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_free(str);
+
+       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
+       
+       ai=linphone_core_find_auth_info(lc,linphone_proxy_config_get_domain(cfg),linphone_address_get_username(from));
+       /*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")),
+                       linphone_address_get_username(from));
+       if (ai) passwd=linphone_auth_info_get_passwd(ai);
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")),
+               passwd!=NULL ? passwd : "");
+       
+       linphone_address_destroy(from);
+}
+
+void linphone_gtk_exit_login_frame(void){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       gtk_widget_show(linphone_gtk_get_widget(mw,"idle_frame"));
+       gtk_widget_hide(linphone_gtk_get_widget(mw,"login_frame"));
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"main_menu"),TRUE);
+       gtk_widget_set_sensitive(linphone_gtk_get_widget(mw,"modes"),TRUE);
+       gtk_widget_show(linphone_gtk_get_widget(mw,"logout"));
+}
+
+void linphone_gtk_logout_clicked(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg=NULL;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg){
+               SipSetupContext *ss=linphone_proxy_config_get_sip_setup_context(cfg);
+               if (ss){
+                       sip_setup_context_logout(ss);
+                       linphone_gtk_set_ui_config_int("automatic_login",FALSE);
+                       linphone_gtk_show_login_frame(cfg);
+               }
+       }
+}
+
+
+
+void linphone_gtk_login_frame_connect_clicked(GtkWidget *button){
+       GtkWidget *mw=gtk_widget_get_toplevel(button);
+       const char *username;
+       const char *password;
+       char *identity;
+       gboolean autologin;
+       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(mw),"login_proxy_config");
+       LinphoneAddress *from;
+       SipSetupContext *ssctx=linphone_proxy_config_get_sip_setup_context(cfg);
+
+       username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_username")));
+       password=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(mw,"login_password")));
+
+       if (username==NULL || username[0]=='\0')
+               return;
+
+       autologin=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(mw,"automatic_login")));
+       linphone_gtk_set_ui_config_int("automatic_login",autologin);
+
+       from=linphone_address_new(linphone_proxy_config_get_identity(cfg));
+       linphone_address_set_username(from,username);
+       identity=linphone_address_as_string(from);
+       do_login(ssctx,identity,password);
+       /*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);
+       }
+}
diff --git a/gtk/main.c b/gtk/main.c
new file mode 100644 (file)
index 0000000..ea176e6
--- /dev/null
@@ -0,0 +1,1372 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+//#define USE_LIBGLADE 1
+
+#define VIDEOSELFVIEW_DEFAULT 1
+
+#include "linphone.h"
+#include "lpconfig.h"
+
+
+
+#ifdef USE_LIBGLADE
+#include <glade/glade.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#define LINPHONE_ICON "linphone.png"
+
+const char *this_program_ident_string="linphone_ident_string=" LINPHONE_VERSION;
+
+static LinphoneCore *the_core=NULL;
+static GtkWidget *the_ui=NULL;
+
+static void linphone_gtk_show(LinphoneCore *lc);
+static void linphone_gtk_inv_recv(LinphoneCore *lc, LinphoneCall *call);
+static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid);
+static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url);
+static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username);
+static void linphone_gtk_display_status(LinphoneCore *lc, const char *status);
+static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg);
+static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning);
+static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url);
+static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl);
+static void linphone_gtk_refer_received(LinphoneCore *lc, const char  *refer_to);
+static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cs, const char *msg);
+static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window);
+
+
+static gboolean verbose=0;
+static gboolean auto_answer = 0;
+static gchar * addr_to_call = NULL;
+static gboolean iconified=FALSE;
+#ifdef WIN32
+static gchar *workingdir=NULL;
+#endif
+static char *progpath=NULL;
+
+static GOptionEntry linphone_options[]={
+       {
+               .long_name="verbose",
+               .short_name= '\0',
+               .arg=G_OPTION_ARG_NONE,
+               .arg_data= (gpointer)&verbose,
+               .description=N_("log to stdout some debug information while running.")
+       },
+       {
+               .long_name="iconified",
+               .short_name= '\0',
+               .arg=G_OPTION_ARG_NONE,
+               .arg_data= (gpointer)&iconified,
+               .description=N_("Start only in the system tray, do not show the main interface.")
+       },
+       {
+           .long_name = "call",
+           .short_name = 'c',
+           .arg = G_OPTION_ARG_STRING,
+           .arg_data = &addr_to_call,
+           .description = N_("address to call right now")
+       },
+       {
+           .long_name = "auto-answer",
+           .short_name = 'a',
+           .arg = G_OPTION_ARG_NONE,
+           .arg_data = (gpointer) & auto_answer,
+           .description = N_("if set automatically answer incoming calls")
+       },
+#ifdef WIN32
+       {                               /* zsd addition */
+           .long_name = "workdir",
+           .short_name = '\0',
+           .arg = G_OPTION_ARG_STRING,
+           .arg_data = (gpointer) & workingdir,
+           .description = N_("Specifiy a working directory (should be the base of the installation, eg: c:\\Program Files\\Linphone)")
+       },
+#endif
+       {0}
+};
+
+#define INSTALLED_XML_DIR PACKAGE_DATA_DIR "/linphone"
+#define BUILD_TREE_XML_DIR "gtk-glade"
+
+#ifndef WIN32
+#define CONFIG_FILE ".linphonerc"
+#else
+#define CONFIG_FILE "linphonerc"
+#endif
+
+
+
+static char _config_file[1024];
+
+
+const char *linphone_gtk_get_config_file(){
+       /*try accessing a local file first if exists*/
+       if (access(CONFIG_FILE,F_OK)==0){
+               snprintf(_config_file,sizeof(_config_file),"%s",CONFIG_FILE);
+       }else{
+#ifdef WIN32
+               const char *appdata=getenv("APPDATA");
+               if (appdata){
+                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR);
+                       CreateDirectory(_config_file,NULL);
+                       snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,LINPHONE_CONFIG_DIR "\\" CONFIG_FILE);
+               }
+#else
+               const char *home=getenv("HOME");
+               if (home==NULL) home=".";
+               snprintf(_config_file,sizeof(_config_file),"%s/%s",home,CONFIG_FILE);
+#endif
+       }
+       return _config_file;
+}
+
+
+#define FACTORY_CONFIG_FILE "linphonerc.factory"
+static char _factory_config_file[1024];
+static const char *linphone_gtk_get_factory_config_file(){
+       /*try accessing a local file first if exists*/
+       if (access(FACTORY_CONFIG_FILE,F_OK)==0){
+               snprintf(_factory_config_file,sizeof(_factory_config_file),
+                                                "%s",FACTORY_CONFIG_FILE);
+       } else {
+               char *progdir;
+               
+               if (progpath != NULL) {
+                       char *basename;
+                       progdir = strdup(progpath);
+#ifdef WIN32
+                       basename = strrchr(progdir, '\\');
+                       if (basename != NULL) {
+                               basename ++;
+                               *basename = '\0';
+                               snprintf(_factory_config_file, sizeof(_factory_config_file),
+                                                                "%s\\..\\%s", progdir, FACTORY_CONFIG_FILE);
+                       } else {
+                               if (workingdir!=NULL) {
+                                       snprintf(_factory_config_file, sizeof(_factory_config_file),
+                                                                        "%s\\%s", workingdir, FACTORY_CONFIG_FILE);
+                               } else {
+                                       free(progdir);
+                                       return NULL;
+                               }
+                       }
+#else
+                       basename = strrchr(progdir, '/');
+                       if (basename != NULL) {
+                               basename ++;
+                               *basename = '\0';
+                               snprintf(_factory_config_file, sizeof(_factory_config_file),
+                                                                "%s/../share/Linphone/%s", progdir, FACTORY_CONFIG_FILE);
+                       } else {
+                               free(progdir);
+                               return NULL;
+                       }
+#endif
+                       free(progdir);
+               }
+       }
+       return _factory_config_file;
+}
+
+static void linphone_gtk_init_liblinphone(const char *config_file,
+               const char *factory_config_file) {
+       LinphoneCoreVTable vtable={0};
+
+       vtable.call_state_changed=linphone_gtk_call_state_changed;
+       vtable.show=linphone_gtk_show;
+       vtable.notify_presence_recv=linphone_gtk_notify_recv;
+       vtable.new_unknown_subscriber=linphone_gtk_new_unknown_subscriber;
+       vtable.auth_info_requested=linphone_gtk_auth_info_requested;
+       vtable.display_status=linphone_gtk_display_status;
+       vtable.display_message=linphone_gtk_display_message;
+       vtable.display_warning=linphone_gtk_display_warning;
+       vtable.display_url=linphone_gtk_display_url;
+       vtable.call_log_updated=linphone_gtk_call_log_updated;
+       vtable.text_received=linphone_gtk_text_received;
+       vtable.refer_received=linphone_gtk_refer_received;
+       vtable.buddy_info_updated=linphone_gtk_buddy_info_updated;
+
+       linphone_core_set_user_agent("Linphone", LINPHONE_VERSION);
+       the_core=linphone_core_new(&vtable,config_file,factory_config_file,NULL);
+       linphone_core_set_waiting_callback(the_core,linphone_gtk_wait,NULL);
+}
+
+
+
+LinphoneCore *linphone_gtk_get_core(void){
+       return the_core;
+}
+
+GtkWidget *linphone_gtk_get_main_window(){
+       return the_ui;
+}
+
+static void linphone_gtk_configure_window(GtkWidget *w, const char *window_name){
+       static const char *icon_path=NULL;
+       static const char *hiddens=NULL;
+       static const char *shown=NULL;
+       static bool_t config_loaded=FALSE;
+       if (linphone_gtk_get_core()==NULL) return;
+       if (config_loaded==FALSE){
+               hiddens=linphone_gtk_get_ui_config("hidden_widgets",NULL);
+               shown=linphone_gtk_get_ui_config("shown_widgets",NULL);
+               icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
+               config_loaded=TRUE;
+       }
+       if (hiddens)
+               linphone_gtk_visibility_set(hiddens,window_name,w,FALSE);
+       if (shown)
+               linphone_gtk_visibility_set(shown,window_name,w,TRUE);
+       if (icon_path) {
+               GdkPixbuf *pbuf=create_pixbuf(icon_path);
+               gtk_window_set_icon(GTK_WINDOW(w),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+}
+
+#ifdef USE_LIBGLADE
+
+GtkWidget *linphone_gtk_create_window(const char *window_name){
+       GtkWidget *w;
+       GladeXML *gxml;
+       char path[2048];
+       snprintf(path,sizeof(path),"%s/%s.glade",BUILD_TREE_XML_DIR,window_name);
+       if (access(path,F_OK)!=0){
+               snprintf(path,sizeof(path),"%s/%s.glade",INSTALLED_XML_DIR,window_name);
+               if (access(path,F_OK)!=0){
+                       g_error("Could not locate neither %s/%s.glade and %s/%s.glade .",BUILD_TREE_XML_DIR,window_name,
+                               INSTALLED_XML_DIR,window_name);
+                       return NULL;
+               }
+       }
+       gxml=glade_xml_new(path,NULL,NULL);
+       glade_xml_signal_autoconnect(gxml);
+       w=glade_xml_get_widget(gxml,window_name);
+       if (w==NULL) g_error("Could not retrieve '%s' window from xml file",window_name);
+       linphone_gtk_configure_window(w,window_name);
+       return w;
+}
+
+GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
+       GtkWidget *w;
+       GladeXML *gxml=glade_get_widget_tree(window);
+       if (gxml==NULL) g_error("Could not retrieve XML tree of window %s",name);
+       w=glade_xml_get_widget(gxml,name);
+       if (w==NULL) g_error("Could not retrieve widget %s",name);
+       return GTK_WIDGET(w);
+}
+
+#else
+
+GtkWidget *linphone_gtk_create_window(const char *window_name){
+       GError* error = NULL;
+       GtkBuilder* builder = gtk_builder_new ();
+       char path[2048];
+       GtkWidget *w;
+       snprintf(path,sizeof(path),"%s/%s.ui",BUILD_TREE_XML_DIR,window_name);
+       if (access(path,F_OK)!=0){
+               snprintf(path,sizeof(path),"%s/%s.ui",INSTALLED_XML_DIR,window_name);
+               if (access(path,F_OK)!=0){
+                       g_error("Could not locate neither %s/%s.ui and %s/%s.ui .",BUILD_TREE_XML_DIR,window_name,
+                               INSTALLED_XML_DIR,window_name);
+                       return NULL;
+               }
+       }
+       if (!gtk_builder_add_from_file (builder, path, &error)){
+               g_error("Couldn't load builder file: %s", error->message);
+               g_error_free (error);
+       }
+       w=GTK_WIDGET(gtk_builder_get_object (builder,window_name));
+       if (w==NULL){
+               g_error("Could not retrieve '%s' window from xml file",window_name);
+               return NULL;
+       }
+       g_object_set_data(G_OBJECT(w),"builder",builder);
+       gtk_builder_connect_signals(builder,w);
+       linphone_gtk_configure_window(w,window_name);
+       return w;
+}
+
+GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name){
+       GtkBuilder *builder=(GtkBuilder*)g_object_get_data(G_OBJECT(window),"builder");
+       GObject *w;
+       if (builder==NULL){
+               g_error("Fail to retrieve builder from window !");
+               return NULL;
+       }
+       w=gtk_builder_get_object(builder,name);
+       if (w==NULL){
+               g_error("No widget named %s found in xml interface.",name);
+       }
+       return GTK_WIDGET(w);
+}
+
+#endif
+
+void linphone_gtk_display_something(GtkMessageType type,const gchar *message){
+       GtkWidget *dialog;
+       GtkWidget *main_window=linphone_gtk_get_main_window();
+       
+       gtk_widget_show(main_window);
+       if (type==GTK_MESSAGE_QUESTION)
+       {
+               /* draw a question box. link to dialog_click callback */
+               dialog = gtk_message_dialog_new (
+                               GTK_WINDOW(main_window),
+                                GTK_DIALOG_DESTROY_WITH_PARENT,
+                               GTK_MESSAGE_QUESTION,
+                                GTK_BUTTONS_YES_NO,
+                                "%s",
+                               (const gchar*)message);
+               /* connect to some callback : REVISIT */
+               /*
+               g_signal_connect_swapped (G_OBJECT (dialog), "response",
+                           G_CALLBACK (dialog_click),
+                           G_OBJECT (dialog));
+               */
+               /* actually show the box */
+               gtk_widget_show(dialog);
+       }
+       else
+       {
+               dialog = gtk_message_dialog_new (GTK_WINDOW(main_window),
+                                  GTK_DIALOG_DESTROY_WITH_PARENT,
+                                  type,
+                                  GTK_BUTTONS_CLOSE,
+                                  "%s",
+                                  (const gchar*)message);
+               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
+               g_signal_connect_swapped (G_OBJECT (dialog), "response",
+                           G_CALLBACK (gtk_widget_destroy),
+                           G_OBJECT (dialog));
+               gtk_widget_show(dialog);
+       }
+}
+
+void linphone_gtk_about_response(GtkDialog *dialog, gint id){
+       if (id==GTK_RESPONSE_CANCEL){
+               gtk_widget_destroy(GTK_WIDGET(dialog));
+       }
+}
+
+static void about_url_clicked(GtkAboutDialog *dialog, const char *url, gpointer data){
+       g_message("About url clicked");
+       linphone_gtk_open_browser(url);
+}
+
+void linphone_gtk_show_about(){
+       struct stat filestat;
+       const char *license_file=PACKAGE_DATA_DIR "/linphone/COPYING";
+       GtkWidget *about;
+       GdkPixbuf *logo=create_pixbuf(
+           linphone_gtk_get_ui_config("logo","linphone-banner.png"));
+       
+       about=linphone_gtk_create_window("about");
+       gtk_about_dialog_set_url_hook(about_url_clicked,NULL,NULL);
+       memset(&filestat,0,sizeof(filestat));
+       if (stat(license_file,&filestat)!=0){
+               license_file="COPYING";
+               stat(license_file,&filestat);
+       }
+       if (filestat.st_size>0){
+               char *license=g_malloc(filestat.st_size+1);
+               FILE *f=fopen(license_file,"r");
+               if (f && fread(license,filestat.st_size,1,f)==1){
+                       license[filestat.st_size]='\0';
+                       gtk_about_dialog_set_license(GTK_ABOUT_DIALOG(about),license);
+               }
+               g_free(license);
+       }
+       gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about),LINPHONE_VERSION);
+       gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("title","Linphone"));
+       gtk_about_dialog_set_website(GTK_ABOUT_DIALOG(about),linphone_gtk_get_ui_config("home","http://www.linphone.org"));
+       if (logo)       gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about),logo);
+           
+       gtk_widget_show(about);
+}
+
+static void set_video_window_decorations(GdkWindow *w){
+       const char *title=linphone_gtk_get_ui_config("title","Linphone");
+       const char *icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
+       char video_title[256];
+       GdkPixbuf *pbuf=create_pixbuf(icon_path);
+       if (!linphone_core_in_call(linphone_gtk_get_core())){
+               snprintf(video_title,sizeof(video_title),"%s video",title);
+               /* When not in call, treat the video as a normal window */
+               gdk_window_set_keep_above(w, FALSE);
+       }else{
+               LinphoneAddress *uri =
+                       linphone_address_clone(linphone_core_get_current_call_remote_address(linphone_gtk_get_core()));
+               char *display_name;
+
+               linphone_address_clean(uri);
+               if (linphone_address_get_display_name(uri)!=NULL){
+                       display_name=ms_strdup(linphone_address_get_display_name(uri));
+               }else{
+                       display_name=linphone_address_as_string(uri);
+               }
+               snprintf(video_title,sizeof(video_title),_("Call with %s"),display_name);
+               linphone_address_destroy(uri);
+               ms_free(display_name);
+
+               /* During calls, bring up the video window, arrange so that
+               it is above all the other windows */
+               gdk_window_deiconify(w);
+               gdk_window_set_keep_above(w,TRUE);
+               /* Maybe we should have the following, but then we want to
+               have a timer that turns it off after a little while. */
+               /* gdk_window_set_urgency_hint(w,TRUE); */
+       }
+       gdk_window_set_title(w,video_title);
+       /* Refrain the video window to be closed at all times. */
+       gdk_window_set_functions(w,
+                                GDK_FUNC_RESIZE|GDK_FUNC_MOVE|
+                                GDK_FUNC_MINIMIZE|GDK_FUNC_MAXIMIZE);
+       if (pbuf){
+               GList *l=NULL;
+               l=g_list_append(l,pbuf);
+               gdk_window_set_icon_list(w,l);
+               g_list_free(l);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+}
+
+static gboolean video_needs_update=FALSE;
+
+static void update_video_title(){
+       video_needs_update=TRUE;
+}
+
+static gboolean linphone_gtk_iterate(LinphoneCore *lc){
+       static gboolean first_time=TRUE;
+       unsigned long id;
+       static unsigned long previd=0;
+       static gboolean in_iterate=FALSE;
+       
+       /*avoid reentrancy*/
+       if (in_iterate) return TRUE;
+       in_iterate=TRUE;
+       linphone_core_iterate(lc);
+       if (first_time){
+               /*after the first call to iterate, SipSetupContexts should be ready, so take actions:*/
+               linphone_gtk_show_directory_search();
+               first_time=FALSE;
+       }
+
+       id=linphone_core_get_native_video_window_id(lc);
+       if (id!=previd || video_needs_update){
+               GdkWindow *w;
+               previd=id;
+               if (id!=0){
+                       ms_message("Updating window decorations");
+#ifndef WIN32
+                       w=gdk_window_foreign_new(id);
+#else
+                       w=gdk_window_foreign_new((HANDLE)id);
+#endif
+                       if (w) {
+                               set_video_window_decorations(w);
+                               g_object_unref(G_OBJECT(w));
+                       }
+                       else ms_error("gdk_window_foreign_new() failed");
+                       if (video_needs_update) video_needs_update=FALSE;
+               }
+       }
+       if (addr_to_call!=NULL){
+               /*make sure we are not showing the login screen*/
+               GtkWidget *mw=linphone_gtk_get_main_window();
+               GtkWidget *login_frame=linphone_gtk_get_widget(mw,"login_frame");
+               if (!GTK_WIDGET_VISIBLE(login_frame)){
+                       GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
+                       gtk_entry_set_text(GTK_ENTRY(uri_bar),addr_to_call);
+                       addr_to_call=NULL;
+                       linphone_gtk_start_call(uri_bar);
+               }
+       }
+       in_iterate=FALSE;
+       return TRUE;
+}
+
+static void load_uri_history(){
+       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
+       char key[20];
+       int i;
+       GtkEntryCompletion *gep=gtk_entry_completion_new();
+       GtkListStore *model=gtk_list_store_new(1,G_TYPE_STRING);
+       for (i=0;;i++){
+               const char *uri;
+               snprintf(key,sizeof(key),"uri%i",i);
+               uri=linphone_gtk_get_ui_config(key,NULL);
+               if (uri!=NULL) {
+                       GtkTreeIter iter;
+                       gtk_list_store_append(model,&iter);
+                       gtk_list_store_set(model,&iter,0,uri,-1);
+                       if (i==0) gtk_entry_set_text(uribar,uri);
+               }
+               else break;
+       }
+       gtk_entry_completion_set_model(gep,GTK_TREE_MODEL(model));
+       gtk_entry_completion_set_text_column(gep,0);
+       gtk_entry_set_completion(uribar,gep);
+}
+
+static void save_uri_history(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LpConfig *cfg=linphone_core_get_config(lc);
+       GtkEntry *uribar=GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar"));
+       char key[20];
+       int i=0;
+       char *uri=NULL;
+       GtkTreeIter iter;
+       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(uribar));
+
+       if (!gtk_tree_model_get_iter_first(model,&iter)) return;
+       do {
+               gtk_tree_model_get(model,&iter,0,&uri,-1);
+               if (uri) {
+                       snprintf(key,sizeof(key),"uri%i",i);
+                       lp_config_set_string(cfg,"GtkUi",key,uri);
+                       g_free(uri);
+               }else break;
+               i++;
+               if (i>5) break;
+       }while(gtk_tree_model_iter_next(model,&iter));
+       lp_config_sync(cfg);
+}
+
+static void completion_add_text(GtkEntry *entry, const char *text){
+       GtkTreeIter iter;
+       GtkTreeModel *model=gtk_entry_completion_get_model(gtk_entry_get_completion(entry));
+       
+       if (gtk_tree_model_get_iter_first(model,&iter)){ 
+               do {
+                       gchar *uri=NULL;
+                       gtk_tree_model_get(model,&iter,0,&uri,-1);
+                       if (uri!=NULL){
+                               if (strcmp(uri,text)==0) {
+                                       /*remove text */
+                                       gtk_list_store_remove(GTK_LIST_STORE(model),&iter);
+                                       g_free(uri);
+                                       break;
+                               }
+                               g_free(uri);
+                       }
+               }while (gtk_tree_model_iter_next(model,&iter));
+       }
+       /* and prepend it on top of the list */
+       gtk_list_store_prepend(GTK_LIST_STORE(model),&iter);
+       gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,text,-1);
+       save_uri_history();
+}
+
+void linphone_gtk_call_terminated(const char *error){
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       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);
+       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);
+       update_video_title();
+       icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
+       if (icw!=NULL){
+               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
+               gtk_widget_destroy(icw);
+       }
+}
+
+static gboolean in_call_timer(){
+       if (linphone_core_in_call(linphone_gtk_get_core())){
+               linphone_gtk_in_call_view_update_duration(
+                       linphone_core_get_current_call_duration(linphone_gtk_get_core()));
+               return TRUE;
+       }
+       return FALSE;
+}
+
+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);
+       update_video_title();
+       if (linphone_gtk_use_in_call_view())
+               g_timeout_add(250,(GSourceFunc)in_call_timer,NULL);
+}
+
+static gboolean linphone_gtk_start_call_do(GtkWidget *uri_bar){
+       const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
+       if (linphone_core_invite(linphone_gtk_get_core(),entered)!=NULL) {
+               completion_add_text(GTK_ENTRY(uri_bar),entered);
+       }else{
+               linphone_gtk_call_terminated(NULL);
+       }
+       return FALSE;
+}
+
+static void _linphone_gtk_accept_call(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       GtkWidget *icw=GTK_WIDGET(g_object_get_data(G_OBJECT(mw),"incoming_call"));
+       if (icw!=NULL){
+               g_object_set_data(G_OBJECT(mw),"incoming_call",NULL);
+               gtk_widget_destroy(icw);
+       }
+
+       linphone_core_accept_call(lc,NULL);
+       linphone_gtk_call_started(linphone_gtk_get_main_window());
+       if (linphone_gtk_use_in_call_view()){
+               linphone_gtk_in_call_view_set_in_call();
+               linphone_gtk_show_in_call_view();
+       }
+       linphone_gtk_enable_mute_button(
+               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute"))
+               ,TRUE);
+}
+
+void linphone_gtk_start_call(GtkWidget *w){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (linphone_core_inc_invite_pending(lc)){
+               /*accept the call*/
+               _linphone_gtk_accept_call();
+       }else if (linphone_core_in_call(lc)) {
+               /*already in call */
+       }else{
+               /*change into in-call mode, then do the work later as it might block a bit */
+               GtkWidget *mw=gtk_widget_get_toplevel(w);
+               GtkWidget *uri_bar=linphone_gtk_get_widget(mw,"uribar");
+               const char *entered=gtk_entry_get_text(GTK_ENTRY(uri_bar));
+               linphone_gtk_call_started(mw);
+               if (linphone_gtk_use_in_call_view()){
+                       linphone_gtk_in_call_view_set_calling(entered);
+                       linphone_gtk_show_in_call_view();
+               }
+               g_timeout_add(100,(GSourceFunc)linphone_gtk_start_call_do,uri_bar);
+       }
+}
+
+void linphone_gtk_uri_bar_activate(GtkWidget *w){
+       linphone_gtk_start_call(w);
+}
+
+
+void linphone_gtk_terminate_call(GtkWidget *button){
+       const MSList *elem=linphone_core_get_calls(linphone_gtk_get_core());
+       if (elem==NULL) return;
+       linphone_core_terminate_call(linphone_gtk_get_core(),(LinphoneCall*)elem->data);
+}
+
+void linphone_gtk_decline_call(GtkWidget *button){
+       linphone_core_terminate_call(linphone_gtk_get_core(),NULL);
+       gtk_widget_destroy(gtk_widget_get_toplevel(button));
+}
+
+void linphone_gtk_accept_call(GtkWidget *button){
+       _linphone_gtk_accept_call();
+}
+
+static gboolean linphone_gtk_auto_answer(GtkWidget *incall_window){
+       linphone_gtk_accept_call(linphone_gtk_get_widget(incall_window,"accept_call"));
+       return FALSE;
+}
+
+void linphone_gtk_set_audio_video(){
+       linphone_core_enable_video(linphone_gtk_get_core(),TRUE,TRUE);
+       linphone_core_enable_video_preview(linphone_gtk_get_core(),
+           linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT));
+}
+
+void linphone_gtk_set_audio_only(){
+       linphone_core_enable_video(linphone_gtk_get_core(),FALSE,FALSE);
+       linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE);
+}
+
+void linphone_gtk_enable_self_view(GtkWidget *w){
+       gboolean val=gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(w));
+       LinphoneCore *lc=linphone_gtk_get_core();
+       linphone_core_enable_video_preview(lc,val);
+       linphone_core_enable_self_view(lc,val);
+       linphone_gtk_set_ui_config_int("videoselfview",val);
+}
+
+void linphone_gtk_used_identity_changed(GtkWidget *w){
+       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
+       char *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       if (sel && strlen(sel)>0){ //avoid a dummy "changed" at gui startup
+               linphone_core_set_default_proxy_index(linphone_gtk_get_core(),(active==0) ? -1 : (active-1));
+               linphone_gtk_show_directory_search();
+       }
+       if (sel) g_free(sel);
+}
+
+static void linphone_gtk_show_main_window(){
+       GtkWidget *w=linphone_gtk_get_main_window();
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (linphone_core_video_enabled(lc)){
+               linphone_core_enable_video_preview(lc,linphone_gtk_get_ui_config_int("videoselfview",
+               VIDEOSELFVIEW_DEFAULT));
+       }
+       gtk_widget_show(w);
+       gtk_window_present(GTK_WINDOW(w));
+}
+
+static void linphone_gtk_show(LinphoneCore *lc){
+       linphone_gtk_show_main_window();
+}
+
+static void linphone_gtk_inv_recv(LinphoneCore *lc, LinphoneCall *call){
+       GtkWidget *w=linphone_gtk_create_window("incoming_call");
+       GtkWidget *label;
+       gchar *msg;
+       char *from=linphone_call_get_remote_address_as_string(call);
+
+       if (auto_answer){
+               g_timeout_add(2000,(GSourceFunc)linphone_gtk_auto_answer,w);
+       }
+
+       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
+       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
+
+       label=linphone_gtk_get_widget(w,"message");
+       msg=g_strdup_printf(_("Incoming call from %s"),from);
+       gtk_label_set_text(GTK_LABEL(label),msg);
+       gtk_window_set_title(GTK_WINDOW(w),msg);
+       gtk_widget_show(w);
+       gtk_window_present(GTK_WINDOW(w));
+       /*gtk_window_set_urgency_hint(GTK_WINDOW(w),TRUE);*/
+       g_free(msg);
+       g_object_set_data(G_OBJECT(linphone_gtk_get_main_window()),"incoming_call",w);
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"uribar")),
+                       from);
+       ms_free(from);
+}
+
+static void linphone_gtk_notify_recv(LinphoneCore *lc, LinphoneFriend * fid){
+       linphone_gtk_show_friends();
+}
+
+static void linphone_gtk_new_subscriber_response(GtkWidget *dialog, guint response_id, LinphoneFriend *lf){
+       switch(response_id){
+               case GTK_RESPONSE_YES:
+                       linphone_gtk_show_contact(lf);
+               break;
+               default:
+                       linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
+       }
+       gtk_widget_destroy(dialog);
+}
+
+static void linphone_gtk_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url){
+       GtkWidget *dialog;
+
+       if (linphone_gtk_get_ui_config_int("subscribe_deny_all",0)){
+               linphone_core_reject_subscriber(linphone_gtk_get_core(),lf);
+               return;
+       }
+
+       gchar *message=g_strdup_printf(_("%s would like to add you to his contact list.\nWould you allow him to see your presence status or add him to your contact list ?\nIf you answer no, this person will be temporarily blacklisted."),url);
+       dialog = gtk_message_dialog_new (
+                               GTK_WINDOW(linphone_gtk_get_main_window()),
+                                GTK_DIALOG_DESTROY_WITH_PARENT,
+                               GTK_MESSAGE_QUESTION,
+                                GTK_BUTTONS_YES_NO,
+                                "%s",
+                               message);
+       g_free(message);
+       g_signal_connect(G_OBJECT (dialog), "response",
+               G_CALLBACK (linphone_gtk_new_subscriber_response),lf);
+       /* actually show the box */
+       gtk_widget_show(dialog);
+}
+
+typedef struct _AuthTimeout{
+       GtkWidget *w;
+} AuthTimeout;
+
+
+static void auth_timeout_clean(AuthTimeout *tout){
+       tout->w=NULL;
+}
+
+static gboolean auth_timeout_destroy(AuthTimeout *tout){
+       if (tout->w)  {
+               g_object_weak_unref(G_OBJECT(tout->w),(GWeakNotify)auth_timeout_clean,tout);
+               gtk_widget_destroy(tout->w);
+       }
+       g_free(tout);
+       return FALSE;
+}
+
+static AuthTimeout * auth_timeout_new(GtkWidget *w){
+       AuthTimeout *tout=g_new(AuthTimeout,1);
+       tout->w=w;
+       /*so that the timeout no more references the widget when it is destroyed:*/
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)auth_timeout_clean,tout);
+       /*so that the widget is automatically destroyed after some time */
+       g_timeout_add(30000,(GtkFunction)auth_timeout_destroy,tout);
+       return tout;
+}
+
+void linphone_gtk_password_cancel(GtkWidget *w){
+       LinphoneAuthInfo *info;
+       GtkWidget *window=gtk_widget_get_toplevel(w);
+       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
+       linphone_core_abort_authentication(linphone_gtk_get_core(),info);
+       gtk_widget_destroy(window);
+}
+
+void linphone_gtk_password_ok(GtkWidget *w){
+       GtkWidget *entry;
+       GtkWidget *window=gtk_widget_get_toplevel(w);
+       LinphoneAuthInfo *info;
+       info=(LinphoneAuthInfo*)g_object_get_data(G_OBJECT(window),"auth_info");
+       g_object_weak_unref(G_OBJECT(window),(GWeakNotify)linphone_auth_info_destroy,info);
+       entry=linphone_gtk_get_widget(window,"password_entry");
+       linphone_auth_info_set_passwd(info,gtk_entry_get_text(GTK_ENTRY(entry)));
+       linphone_auth_info_set_userid(info,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(window,"userid_entry"))));
+       linphone_core_add_auth_info(linphone_gtk_get_core(),info);
+       gtk_widget_destroy(window);
+}
+
+static void linphone_gtk_auth_info_requested(LinphoneCore *lc, const char *realm, const char *username){
+       GtkWidget *w=linphone_gtk_create_window("password");
+       GtkWidget *label=linphone_gtk_get_widget(w,"message");
+       LinphoneAuthInfo *info;
+       gchar *msg;
+       GtkWidget *mw=linphone_gtk_get_main_window();
+       
+       if (mw && GTK_WIDGET_VISIBLE(linphone_gtk_get_widget(mw,"login_frame"))){
+               /*don't prompt for authentication when login frame is visible*/
+               linphone_core_abort_authentication(lc,NULL);
+               return;
+       }
+
+       msg=g_strdup_printf(_("Please enter your password for username <i>%s</i>\n at domain <i>%s</i>:"),
+               username,realm);
+       gtk_label_set_markup(GTK_LABEL(label),msg);
+       g_free(msg);
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"userid_entry")),username);
+       info=linphone_auth_info_new(username, NULL, NULL, NULL,realm);
+       g_object_set_data(G_OBJECT(w),"auth_info",info);
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_auth_info_destroy,info);
+       gtk_widget_show(w);
+       auth_timeout_new(w);
+}
+
+static void linphone_gtk_display_status(LinphoneCore *lc, const char *status){
+       GtkWidget *w=linphone_gtk_get_main_window();
+       GtkWidget *status_bar=linphone_gtk_get_widget(w,"status_bar");
+       gtk_statusbar_push(GTK_STATUSBAR(status_bar),
+                       gtk_statusbar_get_context_id(GTK_STATUSBAR(status_bar),""),
+                       status);
+}
+
+static void linphone_gtk_display_message(LinphoneCore *lc, const char *msg){
+       linphone_gtk_display_something(GTK_MESSAGE_INFO,msg);
+}
+
+static void linphone_gtk_display_warning(LinphoneCore *lc, const char *warning){
+       linphone_gtk_display_something(GTK_MESSAGE_WARNING,warning);
+}
+
+static void linphone_gtk_display_url(LinphoneCore *lc, const char *msg, const char *url){
+       char richtext[4096];
+       snprintf(richtext,sizeof(richtext),"%s %s",msg,url);
+       linphone_gtk_display_something(GTK_MESSAGE_INFO,richtext);
+}
+
+static void linphone_gtk_call_log_updated(LinphoneCore *lc, LinphoneCallLog *cl){
+       GtkWidget *w=(GtkWidget*)g_object_get_data(G_OBJECT(linphone_gtk_get_main_window()),"call_logs");
+       if (w) linphone_gtk_call_log_update(w);
+}
+
+static void linphone_gtk_call_state_changed(LinphoneCore *lc, LinphoneCall *call, LinphoneCallState cs, const char *msg){
+       switch(cs){
+               case LinphoneCallConnected:
+                       if (linphone_gtk_use_in_call_view())
+                               linphone_gtk_in_call_view_set_in_call();
+                       linphone_gtk_enable_mute_button(
+                               GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"main_mute")),
+                       TRUE);
+               break;
+               case LinphoneCallError:
+                       linphone_gtk_call_terminated(msg);
+               break;
+               case LinphoneCallEnd:
+                       linphone_gtk_call_terminated(NULL);
+               break;
+               case LinphoneCallIncomingReceived:
+                       linphone_gtk_inv_recv (lc,call);
+               break;
+               default:
+               break;
+       }
+}
+
+static void icon_popup_menu(GtkStatusIcon *status_icon, guint button, guint activate_time, gpointer user_data){
+       GtkWidget *menu=(GtkWidget*)g_object_get_data(G_OBJECT(status_icon),"menu");
+       gtk_menu_popup(GTK_MENU(menu),NULL,NULL,gtk_status_icon_position_menu,status_icon,button,activate_time);
+}
+
+void linphone_gtk_open_browser(const char *url){
+       /*in gtk 2.16, gtk_show_uri does not work...*/
+#ifndef WIN32
+#if GTK_CHECK_VERSION(2,18,3)
+       gtk_show_uri(NULL,url,GDK_CURRENT_TIME,NULL);
+#else
+       char cl[255];
+       snprintf(cl,sizeof(cl),"/usr/bin/x-www-browser %s",url);
+       g_spawn_command_line_async(cl,NULL);
+#endif
+#else /*WIN32*/
+       ShellExecute(0,"open",url,NULL,NULL,1);
+#endif
+}
+
+void linphone_gtk_link_to_website(GtkWidget *item){
+       const gchar *home=(const gchar*)g_object_get_data(G_OBJECT(item),"home");
+       linphone_gtk_open_browser(home);
+}
+
+static GtkWidget *create_icon_menu(){
+       GtkWidget *menu=gtk_menu_new();
+       GtkWidget *menu_item;
+       GtkWidget *image;
+       gchar *tmp;
+       const gchar *homesite;
+       
+       homesite=linphone_gtk_get_ui_config("home","http://www.linphone.org");
+       menu_item=gtk_image_menu_item_new_with_label(_("Website link"));
+       tmp=g_strdup(homesite);
+       g_object_set_data(G_OBJECT(menu_item),"home",tmp);
+       g_object_weak_ref(G_OBJECT(menu_item),(GWeakNotify)g_free,tmp);
+       
+       image=gtk_image_new_from_stock(GTK_STOCK_HELP,GTK_ICON_SIZE_MENU);
+       gtk_widget_show(image);
+       gtk_image_menu_item_set_image(GTK_IMAGE_MENU_ITEM(menu_item),image);
+       //g_object_unref(G_OBJECT(image));
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_link_to_website,NULL);
+       
+       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_ABOUT,NULL);
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)linphone_gtk_show_about,NULL);
+       menu_item=gtk_image_menu_item_new_from_stock(GTK_STOCK_QUIT,NULL);
+       gtk_widget_show(menu_item);
+       gtk_menu_shell_append(GTK_MENU_SHELL(menu),menu_item);
+       g_signal_connect_swapped(G_OBJECT(menu_item),"activate",(GCallback)gtk_main_quit,NULL);
+       gtk_widget_show(menu);
+       return menu;
+}
+
+static GtkStatusIcon *icon=NULL;
+
+static void linphone_gtk_init_status_icon(){
+       const char *icon_path=linphone_gtk_get_ui_config("icon",LINPHONE_ICON);
+       GdkPixbuf *pbuf=create_pixbuf(icon_path);
+       GtkWidget *menu=create_icon_menu();
+       const char *title;
+       icon=gtk_status_icon_new_from_pixbuf(pbuf);
+       g_object_unref(G_OBJECT(pbuf));
+       g_signal_connect_swapped(G_OBJECT(icon),"activate",(GCallback)linphone_gtk_show_main_window,linphone_gtk_get_main_window());
+       g_signal_connect(G_OBJECT(icon),"popup-menu",(GCallback)icon_popup_menu,NULL);
+       title=linphone_gtk_get_ui_config("title",_("Linphone - a video internet phone"));
+       gtk_status_icon_set_tooltip(icon,title);
+       gtk_status_icon_set_visible(icon,TRUE);
+       g_object_set_data(G_OBJECT(icon),"menu",menu);
+       g_object_weak_ref(G_OBJECT(icon),(GWeakNotify)gtk_widget_destroy,menu);
+}
+
+void linphone_gtk_load_identities(void){
+       const MSList *elem;
+       GtkComboBox *box=GTK_COMBO_BOX(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"identities"));
+       char *def_identity;
+       LinphoneProxyConfig *def=NULL;
+       int def_index=0,i;
+       GtkListStore *store;
+
+       store=GTK_LIST_STORE(gtk_combo_box_get_model(box));
+       gtk_list_store_clear(store);
+
+       linphone_core_get_default_proxy(linphone_gtk_get_core(),&def);
+       def_identity=g_strdup_printf(_("%s (Default)"),linphone_core_get_primary_contact(linphone_gtk_get_core()));
+       gtk_combo_box_append_text(box,def_identity);
+       g_free(def_identity);
+       for(i=1,elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());
+                       elem!=NULL;
+                       elem=ms_list_next(elem),i++){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               gtk_combo_box_append_text(box,linphone_proxy_config_get_identity(cfg));
+               if (cfg==def) {
+                       def_index=i;
+               }
+       }
+       gtk_combo_box_set_active(box,def_index);
+}
+
+static void linphone_gtk_dtmf_clicked(GtkButton *button){
+       const char *label=gtk_button_get_label(button);
+       GtkWidget *uri_bar=linphone_gtk_get_widget(gtk_widget_get_toplevel(GTK_WIDGET(button)),"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],100);
+       if (linphone_core_in_call(linphone_gtk_get_core())){
+               linphone_core_send_dtmf(linphone_gtk_get_core(),label[0]);
+       }
+}
+
+static void linphone_gtk_connect_digits(void){
+       GtkContainer *cont=GTK_CONTAINER(linphone_gtk_get_widget(linphone_gtk_get_main_window(),"dtmf_table"));
+       GList *children=gtk_container_get_children(cont);
+       GList *elem;
+       for(elem=children;elem!=NULL;elem=elem->next){
+               GtkButton *button=GTK_BUTTON(elem->data);
+               g_signal_connect(G_OBJECT(button),"clicked",(GCallback)linphone_gtk_dtmf_clicked,NULL);
+       }
+}
+
+static void linphone_gtk_check_menu_items(void){
+       bool_t audio_only=!linphone_core_video_enabled(linphone_gtk_get_core());
+       bool_t selfview=linphone_gtk_get_ui_config_int("videoselfview",VIDEOSELFVIEW_DEFAULT);
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
+                                       linphone_gtk_get_main_window(),
+                                       audio_only ? "audio_only_item" : "video_item")), TRUE);
+       gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(linphone_gtk_get_widget(
+                                       linphone_gtk_get_main_window(),"selfview_item")),selfview);
+}
+
+static gboolean linphone_gtk_can_manage_accounts(){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       const MSList *elem;
+       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
+               SipSetup *ss=(SipSetup*)elem->data;
+               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
+                       return TRUE;
+               }
+       }
+       return FALSE;
+}
+
+static void linphone_gtk_configure_main_window(){
+       static gboolean config_loaded=FALSE;
+       static const char *title;
+       static const char *home;
+       static const char *start_call_icon;
+       static const char *stop_call_icon;
+       static const char *search_icon;
+       static gboolean update_check_menu;
+       static gboolean buttons_have_borders;
+       GtkWidget *w=linphone_gtk_get_main_window();
+       if (!config_loaded){
+               title=linphone_gtk_get_ui_config("title","Linphone");
+               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");
+               stop_call_icon=linphone_gtk_get_ui_config("stop_call_icon","stopcall-red.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);
+               config_loaded=TRUE;
+       }
+       linphone_gtk_configure_window(w,"main_window");
+       if (title) {
+               gtk_window_set_title(GTK_WINDOW(w),title);
+#if GTK_CHECK_VERSION(2,16,0)
+               gtk_menu_item_set_label(GTK_MENU_ITEM(linphone_gtk_get_widget(w,"main_menu")),title);
+#endif
+       }
+       if (start_call_icon){
+               GdkPixbuf *pbuf=create_pixbuf(start_call_icon);
+               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"start_call_icon")),pbuf);
+               if (buttons_have_borders)
+                       gtk_button_set_relief(GTK_BUTTON(linphone_gtk_get_widget(w,"start_call")),GTK_RELIEF_NORMAL);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+       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);
+               if (buttons_have_borders)
+                       gtk_button_set_relief(GTK_BUTTON(linphone_gtk_get_widget(w,"terminate_call")),GTK_RELIEF_NORMAL);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+       if (search_icon){
+               GdkPixbuf *pbuf=create_pixbuf(search_icon);
+               gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"directory_search_button_icon")),pbuf);
+               g_object_unref(G_OBJECT(pbuf));
+       }
+       if (home){
+               gchar *tmp;
+               GtkWidget *menu_item=linphone_gtk_get_widget(w,"home_item");
+               tmp=g_strdup(home);
+               g_object_set_data(G_OBJECT(menu_item),"home",tmp);
+       }
+       {
+               GdkPixbuf *pbuf=create_pixbuf("contact-orange.png");
+               if (pbuf) {
+                       gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"contact_tab_icon")),pbuf);
+                       g_object_unref(G_OBJECT(pbuf));
+               }
+       }
+       {
+               GdkPixbuf *pbuf=create_pixbuf("dialer-orange.png");
+               if (pbuf) {
+                       gtk_image_set_from_pixbuf(GTK_IMAGE(linphone_gtk_get_widget(w,"keypad_tab_icon")),pbuf);
+                       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"));
+       }
+}
+
+void linphone_gtk_manage_login(void){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       LinphoneProxyConfig *cfg=NULL;
+       linphone_core_get_default_proxy(lc,&cfg);
+       if (cfg){
+               SipSetup *ss=linphone_proxy_config_get_sip_setup(cfg);
+               if (ss && (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_LOGIN)){
+                       linphone_gtk_show_login_frame(cfg);
+               }
+       }
+}
+
+static void linphone_gtk_init_main_window(){
+       GtkWidget *main_window;
+
+       linphone_gtk_configure_main_window();
+       linphone_gtk_manage_login();
+       load_uri_history();
+       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();
+       linphone_gtk_check_menu_items();
+       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(main_window,
+                                       "incall_mute")),FALSE);
+       linphone_gtk_enable_hold_button(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(main_window,
+                                       "hold_call")),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*/
+}
+
+void linphone_gtk_close(){
+       /* couldn't find a way to prevent closing to destroy the main window*/
+       LinphoneCore *lc=linphone_gtk_get_core();
+       the_ui=NULL;
+       the_ui=linphone_gtk_create_window("main");
+       linphone_gtk_init_main_window();
+       /*shutdown call if any*/
+       if (linphone_core_in_call(lc)){
+               linphone_core_terminate_call(lc,NULL);
+               linphone_gtk_call_terminated(NULL);
+       }
+       linphone_core_enable_video_preview(lc,FALSE);
+}
+
+void linphone_gtk_log_handler(OrtpLogLevel lev, const char *fmt, va_list args){
+       if (verbose){
+               const char *lname="undef";
+               char *msg;
+               #ifdef __linux
+               va_list cap;/*copy of our argument list: a va_list cannot be re-used (SIGSEGV on linux 64 bits)*/
+               #endif
+               switch(lev){
+                       case ORTP_DEBUG:
+                               lname="debug";
+                               break;
+                       case ORTP_MESSAGE:
+                               lname="message";
+                               break;
+                       case ORTP_WARNING:
+                               lname="warning";
+                               break;
+                       case ORTP_ERROR:
+                               lname="error";
+                               break;
+                       case ORTP_FATAL:
+                               lname="fatal";
+                               break;
+                       default:
+                               g_error("Bad level !");
+               }
+#ifdef __linux
+               va_copy(cap,args);
+               msg=g_strdup_vprintf(fmt,cap);
+               va_end(cap);
+#else
+               msg=g_strdup_vprintf(fmt,args);
+#endif
+               fprintf(stdout,"linphone-%s : %s\n",lname,msg);
+               ortp_free(msg);
+       }
+       linphone_gtk_log_push(lev,fmt,args);
+}
+
+
+static void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to){
+    GtkEntry * uri_bar =GTK_ENTRY(linphone_gtk_get_widget(
+               linphone_gtk_get_main_window(), "uribar"));
+       linphone_gtk_show_main_window();
+       gtk_entry_set_text(uri_bar, refer_to);
+       linphone_gtk_start_call(linphone_gtk_get_main_window());
+}
+
+static void linphone_gtk_check_soundcards(){
+       const char **devices=linphone_core_get_sound_devices(linphone_gtk_get_core());
+       if (devices==NULL || devices[0]==NULL){
+               linphone_gtk_display_something(GTK_MESSAGE_WARNING,
+                   _("No sound cards have been detected on this computer.\n"
+                           "You won't be able to send or receive audio calls."));
+       }
+}
+
+int main(int argc, char *argv[]){
+#ifdef ENABLE_NLS
+       void *p;
+#endif
+       const char *config_file;
+       const char *factory_config_file;
+       const char *lang;
+       GtkSettings *settings;
+       GdkPixbuf *pbuf;
+
+       g_thread_init(NULL);
+       gdk_threads_init();
+       
+       progpath = strdup(argv[0]);
+       
+       config_file=linphone_gtk_get_config_file();
+
+#ifdef WIN32
+       /*workaround for windows: sometimes LANG is defined to an integer value, not understood by gtk */
+       if ((lang=getenv("LANG"))!=NULL){
+               if (atoi(lang)!=0){
+                       char tmp[128];
+                       snprintf(tmp,sizeof(tmp),"LANG=",lang);
+                       _putenv(tmp);
+               }
+       }
+#else
+       /*for pulseaudio:*/
+       g_setenv("PULSE_PROP_media.role", "phone", TRUE);
+#endif
+
+       if ((lang=linphone_gtk_get_lang(config_file))!=NULL && lang[0]!='\0'){
+#ifdef WIN32
+               char tmp[128];
+               snprintf(tmp,sizeof(tmp),"LANG=%s",lang);
+               _putenv(tmp);
+#else
+               setenv("LANG",lang,1);
+#endif
+       }
+
+#ifdef ENABLE_NLS
+       p=bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
+       if (p==NULL) perror("bindtextdomain failed");
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+       textdomain (GETTEXT_PACKAGE);
+#else
+       g_message("NLS disabled.\n");
+#endif
+#ifdef WIN32
+       gtk_rc_add_default_file("./gtkrc");
+#endif
+       gdk_threads_enter();
+       
+       if (!gtk_init_with_args(&argc,&argv,_("A free SIP video-phone"),
+                               linphone_options,NULL,NULL)){
+               gdk_threads_leave();
+               return -1;
+       }
+       
+       settings=gtk_settings_get_default();
+       g_type_class_unref (g_type_class_ref (GTK_TYPE_IMAGE_MENU_ITEM));
+       g_object_set(settings, "gtk-menu-images", TRUE, NULL);
+       g_object_set(settings, "gtk-button-images", TRUE, NULL);
+#ifdef WIN32
+       if (workingdir!=NULL)
+               _chdir(workingdir);
+#endif
+       /* Now, look for the factory configuration file, we do it this late
+                since we want to have had time to change directory and to parse
+                the options, in case we needed to access the working directory */
+       factory_config_file = linphone_gtk_get_factory_config_file();
+
+       if (linphone_core_wake_up_possible_already_running_instance(
+               config_file, addr_to_call) == 0){
+               g_message("addr_to_call=%s",addr_to_call);
+               g_warning("Another running instance of linphone has been detected. It has been woken-up.");
+               g_warning("This instance is going to exit now.");
+               gdk_threads_leave();
+               return 0;
+       }
+
+       add_pixmap_directory("pixmaps");
+       add_pixmap_directory(PACKAGE_DATA_DIR "/pixmaps/linphone");
+
+       
+       
+       
+       the_ui=linphone_gtk_create_window("main");
+       
+       linphone_gtk_create_log_window();
+       linphone_core_enable_logs_with_cb(linphone_gtk_log_handler);
+
+       linphone_gtk_init_liblinphone(config_file, factory_config_file);
+       
+       g_set_application_name(linphone_gtk_get_ui_config("title","Linphone"));
+       pbuf=create_pixbuf(linphone_gtk_get_ui_config("icon",LINPHONE_ICON));
+       if (pbuf!=NULL) gtk_window_set_default_icon(pbuf);
+       
+       /* do not lower timeouts under 30 ms because it exhibits a bug on gtk+/win32, with cpu running 20% all the time...*/
+       gtk_timeout_add(30,(GtkFunction)linphone_gtk_iterate,(gpointer)linphone_gtk_get_core());
+       gtk_timeout_add(30,(GtkFunction)linphone_gtk_check_logs,(gpointer)NULL);
+       linphone_gtk_init_main_window();
+       linphone_gtk_init_status_icon();
+       if (!iconified){
+               linphone_gtk_show_main_window();
+               linphone_gtk_check_soundcards();
+       }
+       if (linphone_gtk_get_ui_config_int("update_check_menu",0)==0)
+               linphone_gtk_check_for_new_version();
+
+       gtk_main();
+       gdk_threads_leave();
+       linphone_gtk_destroy_log_window();
+       linphone_core_destroy(the_core);
+       /*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);
+       free(progpath);
+       return 0;
+}
diff --git a/gtk/main.ui b/gtk/main.ui
new file mode 100644 (file)
index 0000000..52e6d78
--- /dev/null
@@ -0,0 +1,1483 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="2.16"/>
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">All users</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Online users</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">ADSL</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Fiber Channel</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model3">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Default</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model4">
+    <columns>
+      <!-- column-name gchararray -->
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">ADSL</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Fiber Channel</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkUIManager" id="uimanager1"/>
+  <object class="GtkWindow" id="main">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <signal name="destroy" handler="linphone_gtk_close"/>
+    <child>
+      <object class="GtkVBox" id="vbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkMenuBar" id="menubar1">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkMenuItem" id="main_menu">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Linphone</property>
+                <property name="use_underline">True</property>
+                <child type="submenu">
+                  <object class="GtkMenu" id="menu1">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkImageMenuItem" id="assistant_item">
+                        <property name="label">_Assistant</property>
+                        <property name="use_underline">True</property>
+                        <property name="image">image3</property>
+                        <property name="use_stock">False</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="settings_menu">
+                        <property name="label">gtk-preferences</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="linphone_gtk_show_parameters"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="call_history_item">
+                        <property name="label">_Call history</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="image">image2</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_show_call_logs"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="disconnect_item">
+                        <property name="label">gtk-disconnect</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="linphone_gtk_logout_clicked"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
+                        <property name="visible">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem5">
+                        <property name="label">gtk-quit</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="gtk_main_quit"/>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuItem" id="menuitem3">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">_Options</property>
+                <property name="use_underline">True</property>
+                <child type="submenu">
+                  <object class="GtkMenu" id="menu2">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkRadioMenuItem" id="audio_only_item">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Audio only</property>
+                        <property name="use_underline">True</property>
+                        <property name="draw_as_radio">True</property>
+                        <signal name="toggled" handler="linphone_gtk_set_audio_only"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkRadioMenuItem" id="video_item">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Audio &amp; video</property>
+                        <property name="use_underline">True</property>
+                        <property name="active">True</property>
+                        <property name="draw_as_radio">True</property>
+                        <property name="group">audio_only_item</property>
+                        <signal name="toggled" handler="linphone_gtk_set_audio_video"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkSeparatorMenuItem" id="menuitem5">
+                        <property name="visible">True</property>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkCheckMenuItem" id="selfview_item">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Enable self-view</property>
+                        <property name="use_underline">True</property>
+                        <property name="active">True</property>
+                        <signal name="toggled" handler="linphone_gtk_enable_self_view"/>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child>
+              <object class="GtkMenuItem" id="menuitem4">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Aid_e</property>
+                <property name="use_underline">True</property>
+                <child type="submenu">
+                  <object class="GtkMenu" id="menu3">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkImageMenuItem" id="imagemenuitem10">
+                        <property name="label">gtk-about</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="use_stock">True</property>
+                        <signal name="activate" handler="linphone_gtk_show_about"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="logs_item">
+                        <property name="label" translatable="yes">Show debug window</property>
+                        <property name="visible">True</property>
+                        <property name="image">image1</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_log_show"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="home_item">
+                        <property name="label" translatable="yes">_Homepage</property>
+                        <property name="visible">True</property>
+                        <property name="use_underline">True</property>
+                        <property name="image">image4</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_link_to_website"/>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkImageMenuItem" id="versioncheck_item">
+                        <property name="label" translatable="yes">Check _Updates</property>
+                        <property name="use_underline">True</property>
+                        <property name="image">image5</property>
+                        <property name="use_stock">False</property>
+                        <signal name="activate" handler="linphone_gtk_check_for_new_version"/>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHBox" id="hbox1">
+            <property name="visible">True</property>
+            <child>
+              <object class="GtkVBox" id="main_frame">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkHBox" id="address_bar">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkButton" id="start_call">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_text" translatable="yes">Start call</property>
+                        <property name="relief">none</property>
+                        <signal name="clicked" handler="linphone_gtk_start_call"/>
+                        <child>
+                          <object class="GtkHBox" id="hbox4">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkImage" id="start_call_icon">
+                                <property name="visible">True</property>
+                                <property name="stock">gtk-apply</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="start_call_label">
+                                <property name="label" translatable="yes">Start call</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">10</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="frame4">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label_xalign">0</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment4">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="left_padding">5</property>
+                            <property name="right_padding">5</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox3">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <object class="GtkEntry" id="uribar">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="has_focus">True</property>
+                                    <property name="tooltip_text" translatable="yes">Enter username, phone number, or full sip address</property>
+                                    <property name="invisible_char">&#x25CF;</property>
+                                    <signal name="activate" handler="linphone_gtk_uri_bar_activate"/>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="label9">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">SIP address or phone number:</property>
+                            <property name="use_markup">True</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="terminate_call">
+                        <property name="visible">True</property>
+                        <property name="sensitive">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="has_tooltip">True</property>
+                        <property name="tooltip_text" translatable="yes">Terminate call</property>
+                        <property name="relief">none</property>
+                        <signal name="clicked" handler="linphone_gtk_terminate_call"/>
+                        <child>
+                          <object class="GtkHBox" id="hbox21">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkImage" id="terminate_call_icon">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="stock">gtk-close</property>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="terminate_call_label">
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Terminate call</property>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">False</property>
+                        <property name="padding">10</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="padding">8</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkNotebook" id="viewswitch">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <child>
+                      <object class="GtkVBox" id="idle_frame">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox5">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkVBox" id="vbox5">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkFrame" id="contact_list_frame">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label_xalign">0</property>
+                                    <child>
+                                      <object class="GtkAlignment" id="alignment6">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="left_padding">12</property>
+                                        <property name="right_padding">12</property>
+                                        <child>
+                                          <object class="GtkVBox" id="vbox7">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="orientation">vertical</property>
+                                            <child>
+                                              <object class="GtkHBox" id="filtering_box">
+                                                <property name="visible">True</property>
+                                                <child>
+                                                  <object class="GtkLabel" id="label2">
+                                                    <property name="visible">True</property>
+                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                    <property name="label" translatable="yes">Lookup:</property>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="padding">12</property>
+                                                    <property name="position">0</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <object class="GtkEntry" id="search_bar">
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                    <property name="invisible_char">&#x25CF;</property>
+                                                    <signal name="changed" handler="linphone_gtk_show_friends"/>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="padding">4</property>
+                                                    <property name="position">1</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <object class="GtkLabel" id="label_in">
+                                                    <property name="visible">True</property>
+                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                    <property name="label" translatable="yes">in</property>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="padding">8</property>
+                                                    <property name="position">2</property>
+                                                  </packing>
+                                                </child>
+                                                <child>
+                                                  <object class="GtkComboBox" id="show_category">
+                                                    <property name="visible">True</property>
+                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                    <property name="model">model1</property>
+                                                    <property name="active">0</property>
+                                                    <signal name="changed" handler="linphone_gtk_show_friends"/>
+                                                    <child>
+                                                      <object class="GtkCellRendererText" id="renderer1"/>
+                                                      <attributes>
+                                                        <attribute name="text">0</attribute>
+                                                      </attributes>
+                                                    </child>
+                                                  </object>
+                                                  <packing>
+                                                    <property name="padding">4</property>
+                                                    <property name="position">3</property>
+                                                  </packing>
+                                                </child>
+                                              </object>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkScrolledWindow" id="scrolledwindow1">
+                                                <property name="visible">True</property>
+                                                <property name="can_focus">True</property>
+                                                <property name="hscrollbar_policy">automatic</property>
+                                                <property name="vscrollbar_policy">automatic</property>
+                                                <child>
+                                                  <object class="GtkTreeView" id="contact_list">
+                                                    <property name="height_request">120</property>
+                                                    <property name="visible">True</property>
+                                                    <property name="can_focus">True</property>
+                                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                    <signal name="button_press_event" handler="linphone_gtk_contact_list_button_pressed"/>
+                                                    <signal name="cursor_changed" handler="linphone_gtk_contact_clicked"/>
+                                                    <signal name="row_activated" handler="linphone_gtk_contact_activated"/>
+                                                    <signal name="popup_menu" handler="linphone_gtk_popup_contact_menu"/>
+                                                  </object>
+                                                </child>
+                                              </object>
+                                              <packing>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkFrame" id="directory_search_box">
+                                                <property name="visible">True</property>
+                                                <property name="label_xalign">0</property>
+                                                <property name="shadow_type">none</property>
+                                                <child>
+                                                  <object class="GtkHBox" id="directory_search_vbox">
+                                                    <property name="visible">True</property>
+                                                    <child>
+                                                      <object class="GtkEntry" id="directory_search_entry">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
+                                                        <property name="invisible_char">&#x25CF;</property>
+                                                        <signal name="focus_in_event" handler="linphone_gtk_directory_search_focus_in"/>
+                                                        <signal name="activate" handler="linphone_gtk_directory_search_activate"/>
+                                                        <signal name="icon_press" handler="linphone_gtk_directory_search_activate"/>
+                                                        <signal name="focus_out_event" handler="linphone_gtk_directory_search_focus_out"/>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="position">0</property>
+                                                      </packing>
+                                                    </child>
+                                                    <child>
+                                                      <object class="GtkButton" id="directory_search_button">
+                                                        <property name="visible">True</property>
+                                                        <property name="can_focus">True</property>
+                                                        <property name="receives_default">True</property>
+                                                        <property name="relief">none</property>
+                                                        <signal name="clicked" handler="linphone_gtk_directory_search_button_clicked"/>
+                                                        <child>
+                                                          <object class="GtkHBox" id="hbox12">
+                                                            <property name="visible">True</property>
+                                                            <child>
+                                                            <object class="GtkImage" id="directory_search_button_icon">
+                                                            <property name="visible">True</property>
+                                                            <property name="stock">gtk-find</property>
+                                                            </object>
+                                                            <packing>
+                                                            <property name="position">0</property>
+                                                            </packing>
+                                                            </child>
+                                                            <child>
+                                                            <object class="GtkLabel" id="directory_search_button_label">
+                                                            <property name="visible">True</property>
+                                                            <property name="label" translatable="yes">Search</property>
+                                                            </object>
+                                                            <packing>
+                                                            <property name="position">1</property>
+                                                            </packing>
+                                                            </child>
+                                                          </object>
+                                                        </child>
+                                                      </object>
+                                                      <packing>
+                                                        <property name="expand">False</property>
+                                                        <property name="position">1</property>
+                                                      </packing>
+                                                    </child>
+                                                  </object>
+                                                </child>
+                                                <child type="label">
+                                                  <object class="GtkLabel" id="label14">
+                                                    <property name="visible">True</property>
+                                                    <property name="label" translatable="yes">&lt;b&gt;Add contacts from directory&lt;/b&gt;</property>
+                                                    <property name="use_markup">True</property>
+                                                  </object>
+                                                </child>
+                                              </object>
+                                              <packing>
+                                                <property name="expand">False</property>
+                                                <property name="fill">False</property>
+                                                <property name="padding">5</property>
+                                                <property name="position">2</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                    </child>
+                                    <child type="label">
+                                      <object class="GtkLabel" id="label12">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="label" translatable="yes">&lt;b&gt;Contact list&lt;/b&gt;</property>
+                                        <property name="use_markup">True</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="padding">8</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHBox" id="hbox7">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <object class="GtkToggleButton" id="main_mute">
+                                        <property name="label" translatable="yes">Mute</property>
+                                        <property name="sensitive">False</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
+                                      </object>
+                                      <packing>
+                                        <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="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHBox" id="internet_kind_controls">
+                                    <child>
+                                      <object class="GtkLabel" id="label7">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Internet connection:</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkComboBox" id="internet_kind">
+                                        <property name="visible">True</property>
+                                        <property name="model">model2</property>
+                                        <property name="active">0</property>
+                                        <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
+                                        <child>
+                                          <object class="GtkCellRendererText" id="renderer2"/>
+                                          <attributes>
+                                            <attribute name="text">0</attribute>
+                                          </attributes>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="padding">8</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHBox" id="hbox6">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkFrame" id="identity_frame">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label_xalign">0</property>
+                                <child>
+                                  <object class="GtkHBox" id="hbox9">
+                                    <property name="visible">True</property>
+                                    <child>
+                                      <object class="GtkAlignment" id="alignment8">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="left_padding">12</property>
+                                        <child>
+                                          <object class="GtkComboBox" id="identities">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="model">model3</property>
+                                            <property name="active">0</property>
+                                            <signal name="changed" handler="linphone_gtk_used_identity_changed"/>
+                                            <child>
+                                              <object class="GtkCellRendererText" id="renderer3"/>
+                                              <attributes>
+                                                <attribute name="text">0</attribute>
+                                              </attributes>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="presence_button">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <signal name="clicked" handler="linphone_gtk_my_presence_clicked"/>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                                <child type="label">
+                                  <object class="GtkLabel" id="label17">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">My current identity:</property>
+                                    <property name="use_markup">True</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkHBox" id="hbox2">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkImage" id="contact_tab_icon">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-missing-image</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label15">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Contacts</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="tab_fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkVBox" id="keypad_frame">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkFrame" id="frame3">
+                            <property name="visible">True</property>
+                            <property name="label_xalign">0.5</property>
+                            <property name="shadow_type">none</property>
+                            <child>
+                              <object class="GtkAlignment" id="alignment5">
+                                <property name="visible">True</property>
+                                <property name="xscale">0</property>
+                                <property name="yscale">0</property>
+                                <child>
+                                  <object class="GtkAspectFrame" id="aspectframe1">
+                                    <property name="visible">True</property>
+                                    <property name="label_xalign">0</property>
+                                    <child>
+                                      <object class="GtkTable" id="dtmf_table">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="border_width">4</property>
+                                        <property name="n_rows">4</property>
+                                        <property name="n_columns">4</property>
+                                        <property name="homogeneous">True</property>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_D">
+                                            <property name="label" translatable="yes">D</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">3</property>
+                                            <property name="right_attach">4</property>
+                                            <property name="top_attach">3</property>
+                                            <property name="bottom_attach">4</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_hash">
+                                            <property name="label" translatable="yes">#</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">2</property>
+                                            <property name="right_attach">3</property>
+                                            <property name="top_attach">3</property>
+                                            <property name="bottom_attach">4</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_0">
+                                            <property name="label" translatable="yes">0</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">1</property>
+                                            <property name="right_attach">2</property>
+                                            <property name="top_attach">3</property>
+                                            <property name="bottom_attach">4</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_star">
+                                            <property name="label" translatable="yes">*</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">3</property>
+                                            <property name="bottom_attach">4</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_C">
+                                            <property name="label" translatable="yes">C</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">3</property>
+                                            <property name="right_attach">4</property>
+                                            <property name="top_attach">2</property>
+                                            <property name="bottom_attach">3</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_9">
+                                            <property name="label" translatable="yes">9</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">2</property>
+                                            <property name="right_attach">3</property>
+                                            <property name="top_attach">2</property>
+                                            <property name="bottom_attach">3</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_8">
+                                            <property name="label" translatable="yes">8</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">1</property>
+                                            <property name="right_attach">2</property>
+                                            <property name="top_attach">2</property>
+                                            <property name="bottom_attach">3</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_7">
+                                            <property name="label" translatable="yes">7</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">2</property>
+                                            <property name="bottom_attach">3</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_B">
+                                            <property name="label" translatable="yes">B</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">3</property>
+                                            <property name="right_attach">4</property>
+                                            <property name="top_attach">1</property>
+                                            <property name="bottom_attach">2</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_6">
+                                            <property name="label" translatable="yes">6</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">2</property>
+                                            <property name="right_attach">3</property>
+                                            <property name="top_attach">1</property>
+                                            <property name="bottom_attach">2</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_5">
+                                            <property name="label" translatable="yes">5</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">1</property>
+                                            <property name="right_attach">2</property>
+                                            <property name="top_attach">1</property>
+                                            <property name="bottom_attach">2</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_4">
+                                            <property name="label" translatable="yes">4</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="top_attach">1</property>
+                                            <property name="bottom_attach">2</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_A">
+                                            <property name="label" translatable="yes">A</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">3</property>
+                                            <property name="right_attach">4</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_3">
+                                            <property name="label" translatable="yes">3</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">2</property>
+                                            <property name="right_attach">3</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_2">
+                                            <property name="label" translatable="yes">2</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">1</property>
+                                            <property name="right_attach">2</property>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkButton" id="dtmf_1">
+                                            <property name="label" translatable="yes">1</property>
+                                            <property name="width_request">50</property>
+                                            <property name="height_request">50</property>
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">True</property>
+                                            <property name="receives_default">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                          </object>
+                                          <packing>
+                                            <property name="x_options">GTK_FILL</property>
+                                            <property name="y_options"></property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label_item">
+                              <placeholder/>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkHBox" id="hbox8">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkImage" id="keypad_tab_icon">
+                            <property name="visible">True</property>
+                            <property name="stock">gtk-missing-image</property>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label16">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">Keypad</property>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                        <property name="tab_fill">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkFrame" id="in_call_frame">
+                        <property name="label_xalign">0.5</property>
+                        <property name="shadow_type">none</property>
+                        <child>
+                          <object class="GtkAlignment" id="alignment1">
+                            <property name="visible">True</property>
+                            <property name="left_padding">12</property>
+                            <property name="right_padding">12</property>
+                            <child>
+                              <object class="GtkVBox" id="vbox3">
+                                <property name="visible">True</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkImage" id="in_call_animation">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-info</property>
+                                    <property name="icon-size">5</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkFrame" id="frame2">
+                                    <property name="visible">True</property>
+                                    <property name="label_xalign">0</property>
+                                    <child>
+                                      <object class="GtkLabel" id="in_call_uri">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">label</property>
+                                        <property name="justify">center</property>
+                                      </object>
+                                    </child>
+                                    <child type="label">
+                                      <object class="GtkLabel" id="label3">
+                                        <property name="visible">True</property>
+                                        <property name="use_markup">True</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkFrame" id="frame1">
+                                    <property name="visible">True</property>
+                                    <property name="label_xalign">0</property>
+                                    <child>
+                                      <object class="GtkVBox" id="vbox4">
+                                        <property name="visible">True</property>
+                                        <property name="orientation">vertical</property>
+                                        <child>
+                                          <object class="GtkLabel" id="in_call_duration">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">Duration</property>
+                                            <property name="justify">center</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                    <child type="label">
+                                      <object class="GtkLabel" id="call_label">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Duration:</property>
+                                        <property name="use_markup">True</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkHButtonBox" id="hbuttonbox4">
+                                    <property name="visible">True</property>
+                                    <property name="layout_style">spread</property>
+                                    <child>
+                                      <object class="GtkToggleButton" id="incall_mute">
+                                        <property name="label" translatable="yes">Mute</property>
+                                        <property name="visible">True</property>
+                                        <property name="sensitive">False</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <signal name="toggled" handler="linphone_gtk_mute_toggled"/>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkToggleButton" id="hold_call">
+                                        <property name="label" translatable="yes">HoldOn</property>
+                                        <property name="visible">True</property>
+                                        <property name="sensitive">False</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <signal name="toggled" handler="linphone_gtk_hold_toggled"/>
+                                      </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">3</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                        <child type="label">
+                          <object class="GtkLabel" id="in_call_status">
+                            <property name="visible">True</property>
+                            <property name="label" translatable="yes">In call</property>
+                            <property name="use_markup">True</property>
+                            <property name="justify">center</property>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                    <child type="tab">
+                      <object class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Call Details</property>
+                      </object>
+                      <packing>
+                        <property name="position">2</property>
+                        <property name="tab_fill">False</property>
+                      </packing>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkFrame" id="login_frame">
+                <property name="label_xalign">0</property>
+                <child>
+                  <object class="GtkAlignment" id="alignment2">
+                    <property name="visible">True</property>
+                    <property name="left_padding">12</property>
+                    <child>
+                      <object class="GtkVBox" id="vbox1">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkFrame" id="frame5">
+                            <property name="visible">True</property>
+                            <property name="label_xalign">0</property>
+                            <child>
+                              <object class="GtkAlignment" id="alignment3">
+                                <property name="visible">True</property>
+                                <property name="left_padding">12</property>
+                                <property name="right_padding">12</property>
+                                <child>
+                                  <object class="GtkTable" id="table1">
+                                    <property name="visible">True</property>
+                                    <property name="n_rows">4</property>
+                                    <property name="n_columns">2</property>
+                                    <child>
+                                      <object class="GtkLabel" id="label8">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Username</property>
+                                      </object>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label10">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Password</property>
+                                      </object>
+                                      <packing>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label13">
+                                        <property name="visible">True</property>
+                                        <property name="label" translatable="yes">Internet connection:</property>
+                                      </object>
+                                      <packing>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkEntry" id="login_username">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="invisible_char">&#x25CF;</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkEntry" id="login_password">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="visibility">False</property>
+                                        <property name="invisible_char">&#x25CF;</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">1</property>
+                                        <property name="bottom_attach">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkComboBox" id="login_internet_kind">
+                                        <property name="visible">True</property>
+                                        <property name="model">model4</property>
+                                        <property name="active">0</property>
+                                        <signal name="changed" handler="linphone_gtk_internet_kind_changed"/>
+                                        <child>
+                                          <object class="GtkCellRendererText" id="renderer4"/>
+                                          <attributes>
+                                            <attribute name="text">0</attribute>
+                                          </attributes>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">2</property>
+                                        <property name="bottom_attach">3</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkCheckButton" id="automatic_login">
+                                        <property name="label" translatable="yes">Automatically log me in</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">False</property>
+                                        <property name="draw_indicator">True</property>
+                                      </object>
+                                      <packing>
+                                        <property name="left_attach">1</property>
+                                        <property name="right_attach">2</property>
+                                        <property name="top_attach">3</property>
+                                        <property name="bottom_attach">4</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <placeholder/>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                            </child>
+                            <child type="label">
+                              <object class="GtkLabel" id="login_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Login information</property>
+                                <property name="use_markup">True</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkHButtonBox" id="hbuttonbox3">
+                            <property name="visible">True</property>
+                            <child>
+                              <object class="GtkButton" id="login_connect">
+                                <property name="label">gtk-connect</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="clicked" handler="linphone_gtk_login_frame_connect_clicked"/>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                  </object>
+                </child>
+                <child type="label">
+                  <object class="GtkLabel" id="label6">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">&lt;b&gt;Welcome !&lt;/b&gt;</property>
+                    <property name="use_markup">True</property>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkStatusbar" id="status_bar">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="spacing">2</property>
+          </object>
+          <packing>
+            <property name="expand">False</property>
+            <property name="fill">False</property>
+            <property name="position">2</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+  <object class="GtkImage" id="image1">
+    <property name="visible">True</property>
+    <property name="stock">gtk-info</property>
+  </object>
+  <object class="GtkImage" id="image2">
+    <property name="visible">True</property>
+    <property name="stock">gtk-refresh</property>
+  </object>
+  <object class="GtkImage" id="image3">
+    <property name="visible">True</property>
+    <property name="stock">gtk-properties</property>
+  </object>
+  <object class="GtkImage" id="image4">
+    <property name="visible">True</property>
+    <property name="stock">gtk-home</property>
+  </object>
+  <object class="GtkImage" id="image5">
+    <property name="visible">True</property>
+    <property name="stock">gtk-execute</property>
+  </object>
+</interface>
diff --git a/gtk/p2pwizard.ui b/gtk/p2pwizard.ui
new file mode 100644 (file)
index 0000000..e8e6703
--- /dev/null
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!--Generated with glade3 3.4.5 on Sun Mar 29 21:17:24 2009 -->
+<interface>
+  <object class="GtkAssistant" id="p2pwizard">
+    <property name="title" translatable="yes">Creating a FONICS account</property>
+    <signal handler="linphone_gtk_fonis_wizard_apply" name="apply"/>
+    <signal handler="linphone_gtk_fonis_wizard_prepare" name="prepare"/>
+    <child>
+      <object class="GtkLabel" id="label1">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">Welcome !
+This wizard will help you to setup a SIP account. 
+</property>
+        <property name="use_markup">True</property>
+        <property name="justify">GTK_JUSTIFY_CENTER</property>
+        <property name="wrap">True</property>
+        <property name="selectable">True</property>
+      </object>
+      <packing>
+        <property name="page_type">GTK_ASSISTANT_PAGE_INTRO</property>
+        <property name="title">Introduction</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <child>
+          <object class="GtkLabel" id="label2">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Please choose a username:</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment1">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkVBox" id="vbox2">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkHBox" id="hbox1">
+                        <property name="visible">True</property>
+                        <child>
+                          <object class="GtkEntry" id="username">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkButton" id="button1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <signal handler="linphone_gtk_fonis_wizard_check_username_clicked" name="clicked"/>
+                            <child>
+                              <object class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkImage" id="image1">
+                                    <property name="visible">True</property>
+                                    <property name="stock">gtk-apply</property>
+                                  </object>
+                                </child>
+                                <child>
+                                  <object class="GtkLabel" id="label5">
+                                    <property name="visible">True</property>
+                                    <property name="label" translatable="yes">Check availability</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="fill">False</property>
+                            <property name="position">1</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="check_result">
+                        <property name="visible">True</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+      <packing>
+        <property name="title">Create your account !</property>
+      </packing>
+    </child>
+    <child>
+      <object class="GtkLabel" id="label3">
+        <property name="visible">True</property>
+        <property name="label" translatable="yes">Done ! Your account is now created and ready to use.</property>
+      </object>
+      <packing>
+        <property name="page_type">GTK_ASSISTANT_PAGE_CONFIRM</property>
+        <property name="title">Finished !</property>
+      </packing>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/parameters.ui b/gtk/parameters.ui
new file mode 100644 (file)
index 0000000..9d7f79e
--- /dev/null
@@ -0,0 +1,1797 @@
+<?xml version="1.0"?>
+<interface>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">3001</property>
+    <property name="lower">500</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">10</property>
+    <property name="value">500</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment2">
+    <property name="upper">65535</property>
+    <property name="lower">1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">10</property>
+    <property name="value">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">65535</property>
+    <property name="lower">1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">10</property>
+    <property name="value">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment4">
+    <property name="upper">65535</property>
+    <property name="lower">1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">10</property>
+    <property name="value">1</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment5">
+    <property name="upper">100000</property>
+    <property name="lower">-1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">10</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkAdjustment" id="adjustment6">
+    <property name="upper">100000</property>
+    <property name="lower">-1</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">10</property>
+    <property name="value">0</property>
+  </object>
+  <object class="GtkListStore" id="model1">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">default soundcard</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model2">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">default soundcard</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model3">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">a sound card</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model4">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">default camera</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model5">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">CIF</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model6">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">Audio codecs</col>
+      </row>
+      <row>
+        <col id="0" translatable="yes">Video codecs</col>
+      </row>
+    </data>
+  </object>
+  <object class="GtkListStore" id="model7">
+    <columns>
+      <column type="gchararray"/>
+    </columns>
+    <data>
+      <row>
+        <col id="0" translatable="yes">C</col>
+      </row>
+    </data>
+  </object>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkWindow" id="parameters">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="title" translatable="yes">Settings</property>
+    <property name="icon">linphone2.png</property>
+    <child>
+      <object class="GtkVBox" id="vbox1">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <child>
+          <object class="GtkNotebook" id="notebook1">
+            <property name="visible">True</property>
+            <property name="can_focus">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <object class="GtkVBox" id="network_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkFrame" id="transport_frame">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox3">
+                            <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkHBox" id="hbox2">
+                                <property name="visible">True</property>
+                                <child>
+                                  <object class="GtkCheckButton" id="mtu_set">
+                                    <property name="label" translatable="yes">Set Maximum Transmission Unit:</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">False</property>
+                                    <property name="draw_indicator">True</property>
+                                    <signal handler="linphone_gtk_mtu_set" name="toggled"/>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkSpinButton" id="mtu">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="adjustment">adjustment1</property>
+                                    <signal handler="linphone_gtk_mtu_changed" name="value_changed"/>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="dtmf_sipinfo">
+                                <property name="label" translatable="yes">Send DTMFs as SIP info</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <signal handler="linphone_gtk_use_sip_info_dtmf_toggled" name="toggled"/>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="ipv6_enabled">
+                                <property name="label" translatable="yes">Use IPv6 instead of IPv4</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="draw_indicator">True</property>
+                                <signal handler="linphone_gtk_ipv6_toggled" name="toggled"/>
+                              </object>
+                              <packing>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label1">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Transport&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="ports_frame">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment2">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table1">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <object class="GtkSpinButton" id="video_rtp_port">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">adjustment2</property>
+                                <signal handler="linphone_gtk_video_port_changed" name="value_changed"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="audio_rtp_port">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">adjustment3</property>
+                                <signal handler="linphone_gtk_audio_port_changed" name="value_changed"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="sip_port">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="adjustment">adjustment4</property>
+                                <signal handler="linphone_gtk_sip_port_changed" name="value_changed"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label7">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Video RTP/UDP:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label6">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Audio RTP/UDP:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label5">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">SIP (UDP):</property>
+                                <property name="justify">right</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label4">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Ports&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="nat_frame">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkVButtonBox" id="vbuttonbox3">
+                        <property name="visible">True</property>
+                        <property name="orientation">vertical</property>
+                        <child>
+                          <object class="GtkRadioButton" id="no_nat">
+                            <property name="label" translatable="yes">Direct connection to the Internet</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="active">True</property>
+                            <property name="draw_indicator">True</property>
+                            <signal handler="linphone_gtk_no_firewall_toggled" name="toggled"/>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkVBox" id="vbox4">
+                            <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkRadioButton" id="use_nat_address">
+                                <property name="label" translatable="yes">Behind NAT / Firewall (specify gateway IP below)</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">no_nat</property>
+                                <signal handler="linphone_gtk_use_nat_address_toggled" name="toggled"/>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox21">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <object class="GtkLabel" id="label39">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">Public IP address:</property>
+                                    <property name="justify">right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" id="nat_address">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal handler="linphone_gtk_nat_address_changed" name="changed"/>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <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>
+                        <child>
+                          <object class="GtkVBox" id="vbox5">
+                            <property name="visible">True</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkRadioButton" id="use_stun">
+                                <property name="label" translatable="yes">Behind NAT / Firewall (use STUN to resolve)</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="active">True</property>
+                                <property name="draw_indicator">True</property>
+                                <property name="group">no_nat</property>
+                                <signal handler="linphone_gtk_use_stun_toggled" name="toggled"/>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox24">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <object class="GtkLabel" id="label42">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="label" translatable="yes">Stun server:</property>
+                                    <property name="justify">right</property>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkEntry" id="stun_server">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal handler="linphone_gtk_stun_server_changed" name="changed"/>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label38">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;NAT and Firewall&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="tab">
+              <object class="GtkHBox" id="hbox12">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkImage" id="image6">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-network</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="network">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Network settings</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="multimedia_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkFrame" id="frame14">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment14">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table5">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">6</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <object class="GtkHBox" id="ring_sound_box">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <object class="GtkFileChooserButton" id="ring_chooser">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal handler="linphone_gtk_ring_file_set" name="file_set"/>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="play_ring">
+                                    <property name="label">gtk-media-play</property>
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="use_stock">True</property>
+                                    <signal handler="linphone_gtk_play_ring_file" name="clicked"/>
+                                  </object>
+                                  <packing>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="ring_sound_label">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Ring sound:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">4</property>
+                                <property name="bottom_attach">5</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="alsa_dev">
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal handler="linphone_gtk_alsa_special_device_changed" name="editing_done"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="capture_device">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal handler="linphone_gtk_capture_device_changed" name="changed"/>
+                                <property name="model">model1</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer1"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="ring_device">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal handler="linphone_gtk_ring_device_changed" name="changed"/>
+                                <property name="model">model2</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer2"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label36">
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">ALSA special device (optional):</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">3</property>
+                                <property name="bottom_attach">4</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label35">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Capture device:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label34">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Ring device:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label32">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Playback device:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="playback_device">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal handler="linphone_gtk_playback_device_changed" name="changed"/>
+                                <property name="model">model3</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer3"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="x_options">GTK_FILL</property>
+                                <property name="y_options">GTK_FILL</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkCheckButton" id="echo_cancelation">
+                                <property name="label" translatable="yes">Enable echo cancellation</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">False</property>
+                                <property name="draw_indicator">True</property>
+                                <signal handler="linphone_gtk_echo_cancelation_toggled" name="toggled"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">5</property>
+                                <property name="bottom_attach">6</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <placeholder/>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label31">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Audio&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame4">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment4">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table2">
+                            <property name="visible">True</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <object class="GtkLabel" id="label9">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Video input device:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="y_options">GTK_EXPAND</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="webcams">
+                                <property name="visible">True</property>
+                                <signal handler="linphone_gtk_cam_changed" name="changed"/>
+                                <property name="model">model4</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer4"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="y_options">GTK_EXPAND</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="video_size_label">
+                                <property name="visible">True</property>
+                                <property name="label" translatable="yes">Prefered video resolution:</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkComboBox" id="video_size">
+                                <property name="visible">True</property>
+                                <property name="active">0</property>
+                                <signal handler="linphone_gtk_video_size_changed" name="changed"/>
+                                <property name="model">model5</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer5"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="video_frame">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Video&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="fill">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="tab">
+              <object class="GtkHBox" id="hbox11">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkImage" id="image5">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-media-play</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label2">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Multimedia settings</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="sip_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkFrame" id="frame11">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="tooltip-text" translatable="yes">This section defines your SIP address when not using a SIP account</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment11">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table4">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">3</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <object class="GtkLabel" id="label25">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Your display name (eg: John Doe):</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="displayname">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal handler="linphone_gtk_update_my_contact" name="changed"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label26">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Your username:</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label27">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Your resulting SIP address:</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="username">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal handler="linphone_gtk_update_my_contact" name="changed"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkEntry" id="sip_address">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="editable">False</property>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">2</property>
+                                <property name="bottom_attach">3</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label24">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Default identity&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame12">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment12">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkHBox" id="hbox13">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkScrolledWindow" id="scrolledwindow2">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="hscrollbar_policy">automatic</property>
+                                <property name="vscrollbar_policy">automatic</property>
+                                <child>
+                                  <object class="GtkTreeView" id="proxy_list">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkVButtonBox" id="vbuttonbox2">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="orientation">vertical</property>
+                                <child>
+                                  <object class="GtkButton" id="add_proxy">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal handler="linphone_gtk_add_proxy" name="clicked"/>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox14">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <object class="GtkImage" id="image7">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="stock">gtk-add</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="add_proxy_label">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Add</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="edit_proxy">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal handler="linphone_gtk_edit_proxy" name="clicked"/>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox16">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <object class="GtkImage" id="image9">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="stock">gtk-edit</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="label_proxy2">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Edit</property>
+                                          </object>
+                                          <packing>
+                                            <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>
+                                <child>
+                                  <object class="GtkButton" id="remove_proxy">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <signal handler="linphone_gtk_remove_proxy" name="clicked"/>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox7">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <child>
+                                          <object class="GtkImage" id="image2">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="stock">gtk-delete</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="label_proxy1">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <property name="label" translatable="yes">Remove</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkButton" id="create_phonics">
+                                    <property name="can_focus">True</property>
+                                    <property name="receives_default">True</property>
+                                    <signal handler="linphone_gtk_create_fonics_account" name="clicked"/>
+                                    <child>
+                                      <object class="GtkHBox" id="hbox1">
+                                        <property name="visible">True</property>
+                                        <child>
+                                          <object class="GtkImage" id="image1">
+                                            <property name="visible">True</property>
+                                            <property name="stock">gtk-network</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">0</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="label11">
+                                            <property name="visible">True</property>
+                                            <property name="label" translatable="yes">Register to FONICS
+virtual network !</property>
+                                          </object>
+                                          <packing>
+                                            <property name="position">1</property>
+                                          </packing>
+                                        </child>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="fill">False</property>
+                                    <property name="position">3</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label28">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Proxy accounts&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame13">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment13">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkHButtonBox" id="hbuttonbox3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <child>
+                              <object class="GtkButton" id="erase_passwords">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <signal handler="linphone_gtk_clear_passwords" name="clicked"/>
+                                <child>
+                                  <object class="GtkHBox" id="hbox18">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <child>
+                                      <object class="GtkImage" id="image11">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="stock">gtk-delete</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkLabel" id="label30">
+                                        <property name="visible">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="label" translatable="yes">Erase all passwords</property>
+                                      </object>
+                                      <packing>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label29">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Privacy&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">2</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="tab">
+              <object class="GtkHBox" id="hbox10">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkImage" id="image4">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="pixbuf">stock_people.png</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label3">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Manage SIP Accounts</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">2</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="codec_tab">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkFrame" id="frame9">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment9">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkVBox" id="vbox8">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="orientation">vertical</property>
+                            <child>
+                              <object class="GtkComboBox" id="codec_view">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="active">0</property>
+                                <signal handler="linphone_gtk_codec_view_changed" name="changed"/>
+                                <property name="model">model6</property>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer6"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkHBox" id="hbox_codec">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <child>
+                                  <object class="GtkScrolledWindow" id="scrolledwindow1">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="hscrollbar_policy">automatic</property>
+                                    <property name="vscrollbar_policy">automatic</property>
+                                    <property name="shadow_type">out</property>
+                                    <child>
+                                      <object class="GtkTreeView" id="codec_list">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="has_tooltip">True</property>
+                                      </object>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="position">0</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <object class="GtkVButtonBox" id="vbuttonbox1">
+                                    <property name="visible">True</property>
+                                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                    <property name="orientation">vertical</property>
+                                    <child>
+                                      <object class="GtkButton" id="button4">
+                                        <property name="label">gtk-go-up</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="use_stock">True</property>
+                                        <signal handler="linphone_gtk_codec_up" name="clicked"/>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">0</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="up_codec">
+                                        <property name="label">gtk-go-down</property>
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <property name="use_stock">True</property>
+                                        <signal handler="linphone_gtk_codec_down" name="clicked"/>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">1</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="enable_codec">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <signal handler="linphone_gtk_codec_enable" name="clicked"/>
+                                        <child>
+                                          <object class="GtkHBox" id="hbox8">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <child>
+                                              <object class="GtkImage" id="image3">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="stock">gtk-yes</property>
+                                              </object>
+                                              <packing>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkLabel" id="label19">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="label" translatable="yes">Enable</property>
+                                              </object>
+                                              <packing>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">2</property>
+                                      </packing>
+                                    </child>
+                                    <child>
+                                      <object class="GtkButton" id="disable_codec">
+                                        <property name="visible">True</property>
+                                        <property name="can_focus">True</property>
+                                        <property name="receives_default">True</property>
+                                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                        <signal handler="linphone_gtk_codec_disable" name="clicked"/>
+                                        <child>
+                                          <object class="GtkHBox" id="hbox9">
+                                            <property name="visible">True</property>
+                                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                            <child>
+                                              <object class="GtkImage" id="image8">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="stock">gtk-no</property>
+                                              </object>
+                                              <packing>
+                                                <property name="position">0</property>
+                                              </packing>
+                                            </child>
+                                            <child>
+                                              <object class="GtkLabel" id="label20">
+                                                <property name="visible">True</property>
+                                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                                <property name="label" translatable="yes">Disable</property>
+                                              </object>
+                                              <packing>
+                                                <property name="position">1</property>
+                                              </packing>
+                                            </child>
+                                          </object>
+                                        </child>
+                                      </object>
+                                      <packing>
+                                        <property name="expand">False</property>
+                                        <property name="fill">False</property>
+                                        <property name="position">3</property>
+                                      </packing>
+                                    </child>
+                                  </object>
+                                  <packing>
+                                    <property name="expand">False</property>
+                                    <property name="position">1</property>
+                                  </packing>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label18">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Codecs&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="frame10">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment10">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkTable" id="table3">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="n_rows">2</property>
+                            <property name="n_columns">2</property>
+                            <child>
+                              <object class="GtkSpinButton" id="upload_bw">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="tooltip-text" translatable="yes">0 stands for "unlimited"</property>
+                                <property name="adjustment">adjustment5</property>
+                                <signal handler="linphone_gtk_upload_bw_changed" name="value_changed"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkSpinButton" id="download_bw">
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="tooltip-text" translatable="yes">0 stands for "unlimited"</property>
+                                <property name="adjustment">adjustment6</property>
+                                <signal handler="linphone_gtk_download_bw_changed" name="value_changed"/>
+                              </object>
+                              <packing>
+                                <property name="left_attach">1</property>
+                                <property name="right_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label23">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Upload speed limit in Kbit/sec:</property>
+                                <property name="justify">right</property>
+                              </object>
+                              <packing>
+                                <property name="top_attach">1</property>
+                                <property name="bottom_attach">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkLabel" id="label22">
+                                <property name="visible">True</property>
+                                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                                <property name="label" translatable="yes">Download speed limit in Kbit/sec:</property>
+                                <property name="justify">right</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label21">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Bandwidth control&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="tab">
+              <object class="GtkHBox" id="hbox15">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <child>
+                  <object class="GtkImage" id="image10">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="stock">gtk-execute</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label33">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="label" translatable="yes">Codecs</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">3</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox2">
+                <property name="visible">True</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkFrame" id="lang_frame">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkComboBox" id="lang_combo">
+                            <property name="visible">True</property>
+                            <signal handler="linphone_gtk_lang_changed" name="changed"/>
+                            <property name="model">model7</property>
+                            <child>
+                              <object class="GtkCellRendererText" id="renderer7"/>
+                              <attributes>
+                                <attribute name="text">0</attribute>
+                              </attributes>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="lang_label">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Language&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkFrame" id="ui_level_frame">
+                    <property name="visible">True</property>
+                    <property name="label_xalign">0</property>
+                    <child>
+                      <object class="GtkAlignment" id="alignment5">
+                        <property name="visible">True</property>
+                        <property name="left_padding">12</property>
+                        <child>
+                          <object class="GtkCheckButton" id="ui_level">
+                            <property name="label" translatable="yes">Show advanced settings</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">False</property>
+                            <property name="draw_indicator">True</property>
+                            <signal handler="linphone_gtk_ui_level_toggled" name="toggled"/>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
+                    <child type="label">
+                      <object class="GtkLabel" id="label12">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">&lt;b&gt;Level&lt;/b&gt;</property>
+                        <property name="use_markup">True</property>
+                      </object>
+                    </child>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+            <child type="tab">
+              <object class="GtkHBox" id="hbox4">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkImage" id="image13">
+                    <property name="visible">True</property>
+                    <property name="stock">gtk-properties</property>
+                    <property name="icon-size">3</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label10">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">User interface</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">4</property>
+                <property name="tab_fill">False</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkHButtonBox" id="hbuttonbox2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button5">
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <signal handler="linphone_gtk_parameters_closed" name="clicked"/>
+                <child>
+                  <object class="GtkHBox" id="hbox3">
+                    <property name="visible">True</property>
+                    <child>
+                      <object class="GtkImage" id="image12">
+                        <property name="visible">True</property>
+                        <property name="stock">gtk-apply</property>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="label8">
+                        <property name="visible">True</property>
+                        <property name="label" translatable="yes">Done</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="padding">10</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="padding">5</property>
+            <property name="position">1</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/password.ui b/gtk/password.ui
new file mode 100644 (file)
index 0000000..59ac152
--- /dev/null
@@ -0,0 +1,141 @@
+<?xml version="1.0"?>
+<interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="password">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Linphone - Authentication required</property>
+    <property name="modal">True</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox9">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkVBox" id="vbox12">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <child>
+              <object class="GtkLabel" id="message">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Please enter the domain password</property>
+                <property name="justify">center</property>
+                <property name="wrap">True</property>
+              </object>
+              <packing>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkTable" id="table1">
+                <property name="visible">True</property>
+                <property name="n_rows">2</property>
+                <property name="n_columns">2</property>
+                <child>
+                  <object class="GtkLabel" id="userid_label">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">UserID</property>
+                  </object>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="userid_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">Password:</property>
+                    <property name="justify">right</property>
+                  </object>
+                  <packing>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkEntry" id="password_entry">
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="visibility">False</property>
+                    <property name="invisible_char">&#x25CF;</property>
+                    <signal handler="linphone_gtk_password_ok" name="activate"/>
+                  </object>
+                  <packing>
+                    <property name="left_attach">1</property>
+                    <property name="right_attach">2</property>
+                    <property name="top_attach">1</property>
+                    <property name="bottom_attach">2</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area8">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button8">
+                <property name="label" translatable="yes">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal handler="linphone_gtk_password_ok" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button9">
+                <property name="label" translatable="yes">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal handler="linphone_gtk_password_cancel" name="clicked"/>
+              </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="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/propertybox.c b/gtk/propertybox.c
new file mode 100644 (file)
index 0000000..179a134
--- /dev/null
@@ -0,0 +1,833 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008-2009  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+typedef enum {
+       CAP_IGNORE,
+       CAP_PLAYBACK,
+       CAP_CAPTURE
+}DeviceCap;
+
+static void linphone_gtk_fill_combo_box(GtkWidget *combo, const char **devices, const char *selected, DeviceCap cap){
+       const char **p=devices;
+       int i=0,active=0;
+       /* glade creates a combo box without list model and text renderer,
+       unless we fill it with a dummy text.
+       This dummy text needs to be removed first*/
+       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
+       for(;*p!=NULL;++p){
+               if ( cap==CAP_IGNORE 
+                       || (cap==CAP_CAPTURE && linphone_core_sound_device_can_capture(linphone_gtk_get_core(),*p))
+                       || (cap==CAP_PLAYBACK && linphone_core_sound_device_can_playback(linphone_gtk_get_core(),*p)) ){
+                       gtk_combo_box_append_text(GTK_COMBO_BOX(combo),*p);
+                       if (strcmp(selected,*p)==0) active=i;
+                       i++;
+               }
+       }
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
+}
+
+void linphone_gtk_fill_video_sizes(GtkWidget *combo){
+       const MSVideoSizeDef *def=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());;
+       int i,active=0;
+       char vsize_def[256];
+       MSVideoSize cur=linphone_core_get_preferred_video_size(linphone_gtk_get_core());
+       /* glade creates a combo box without list model and text renderer,
+       unless we fill it with a dummy text.
+       This dummy text needs to be removed first*/
+       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
+       for(i=0;def->name!=NULL;++def,++i){
+               snprintf(vsize_def,sizeof(vsize_def),"%s (%ix%i)",def->name,def->vsize.width,def->vsize.height);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),vsize_def);
+               if (cur.width==def->vsize.width && cur.height==def->vsize.height) active=i;
+       }
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),active);
+}
+
+void linphone_gtk_parameters_closed(GtkWidget *button){
+       GtkWidget *pb=gtk_widget_get_toplevel(button);
+       gtk_widget_destroy(pb);
+}
+
+void linphone_gtk_update_my_contact(GtkWidget *w){
+       GtkWidget *pb=gtk_widget_get_toplevel(w);
+       const char *username=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")));
+       const char *displayname=gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")));
+       int port=linphone_core_get_sip_port(linphone_gtk_get_core());
+       LinphoneAddress *parsed=linphone_core_get_primary_contact_parsed(linphone_gtk_get_core());
+       char *contact;
+       g_return_if_fail(parsed!=NULL);
+       if (username[0]=='\0') return;
+
+       linphone_address_set_display_name(parsed,displayname);
+       linphone_address_set_username(parsed,username);
+       linphone_address_set_port_int(parsed,port);
+       contact=linphone_address_as_string(parsed);
+       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"sip_address")),contact);
+       linphone_core_set_primary_contact(linphone_gtk_get_core(),contact);
+       ms_free(contact);
+       linphone_address_destroy(parsed);
+       linphone_gtk_load_identities();
+}
+
+void linphone_gtk_stun_server_changed(GtkWidget *w){
+       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
+       linphone_core_set_stun_server(linphone_gtk_get_core(),addr);
+}
+
+void linphone_gtk_nat_address_changed(GtkWidget *w){
+       const gchar *addr=gtk_entry_get_text(GTK_ENTRY(w));
+       linphone_core_set_nat_address(linphone_gtk_get_core(),addr);
+}
+
+void linphone_gtk_ipv6_toggled(GtkWidget *w){
+       linphone_core_enable_ipv6(linphone_gtk_get_core(),
+                               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+}
+
+void linphone_gtk_sip_port_changed(GtkWidget *w){
+       linphone_core_set_sip_port(linphone_gtk_get_core(),
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_audio_port_changed(GtkWidget *w){
+       linphone_core_set_audio_port(linphone_gtk_get_core(),
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_video_port_changed(GtkWidget *w){
+       linphone_core_set_video_port(linphone_gtk_get_core(),
+                       (gint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_no_firewall_toggled(GtkWidget *w){
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
+               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyNoFirewall);
+}
+
+void linphone_gtk_use_nat_address_toggled(GtkWidget *w){
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
+               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyUseNatAddress);
+}
+
+void linphone_gtk_use_stun_toggled(GtkWidget *w){
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)))
+               linphone_core_set_firewall_policy(linphone_gtk_get_core(),LinphonePolicyUseStun);
+}
+
+void linphone_gtk_mtu_changed(GtkWidget *w){
+       if (GTK_WIDGET_SENSITIVE(w))
+               linphone_core_set_mtu(linphone_gtk_get_core(),gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+}
+
+void linphone_gtk_use_sip_info_dtmf_toggled(GtkWidget *w){
+       linphone_core_set_use_info_for_dtmf(linphone_gtk_get_core(),
+               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+}
+
+void linphone_gtk_mtu_set(GtkWidget *w){
+       GtkWidget *mtu=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"mtu");
+       if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w))){
+               gtk_widget_set_sensitive(mtu,TRUE);
+               linphone_gtk_mtu_changed(mtu);
+       }else{
+               gtk_widget_set_sensitive(mtu,FALSE);
+               linphone_core_set_mtu(linphone_gtk_get_core(),0);
+       }
+}
+
+void linphone_gtk_playback_device_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_playback_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_capture_device_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_capture_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_ring_device_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_ringer_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_alsa_special_device_changed(GtkWidget *w){
+       /*
+       const gchar *dev=gtk_entry_get_text(GTK_ENTRY(w));
+       ...*/
+}
+
+void linphone_gtk_cam_changed(GtkWidget *w){
+       gchar *sel=gtk_combo_box_get_active_text(GTK_COMBO_BOX(w));
+       linphone_core_set_video_device(linphone_gtk_get_core(),sel);
+       g_free(sel);
+}
+
+void linphone_gtk_video_size_changed(GtkWidget *w){
+       int sel=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
+       const MSVideoSizeDef *defs=linphone_core_get_supported_video_sizes(linphone_gtk_get_core());
+       if (sel<0) return;
+       linphone_core_set_preferred_video_size(linphone_gtk_get_core(),
+                                       defs[sel].vsize);
+}
+
+void linphone_gtk_ring_file_set(GtkWidget *w){
+       gchar *file=gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(w));
+       linphone_core_set_ring(linphone_gtk_get_core(),file);
+       g_free(file);
+}
+
+static void linphone_gtk_end_of_ring(LinphoneCore *lc, void *user_data){
+       gtk_widget_set_sensitive((GtkWidget*)user_data,TRUE);
+}
+
+void linphone_gtk_play_ring_file(GtkWidget *w){
+       if (linphone_core_preview_ring(linphone_gtk_get_core(),
+                               linphone_core_get_ring(linphone_gtk_get_core()),
+                               linphone_gtk_end_of_ring,
+                               w)==0){
+               gtk_widget_set_sensitive(w,FALSE);
+       }
+}
+
+void linphone_gtk_echo_cancelation_toggled(GtkWidget *w){
+       linphone_core_enable_echo_cancellation(linphone_gtk_get_core(),
+               gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)));
+}
+
+enum {
+       CODEC_NAME,
+       CODEC_RATE,
+       CODEC_BITRATE,
+       CODEC_STATUS,
+       CODEC_PARAMS,
+       CODEC_PRIVDATA,
+       CODEC_COLOR,
+       CODEC_INFO,
+       CODEC_NCOLUMNS
+};
+
+static void fmtp_edited(GtkCellRendererText *renderer, gchar *path, gchar *new_text, gpointer userdata){
+       GtkListStore *store=(GtkListStore*)userdata;
+       GtkTreeIter iter;
+       if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(store),&iter,path)){
+               PayloadType *pt;
+               gtk_list_store_set(store,&iter,CODEC_PARAMS,new_text,-1);
+               gtk_tree_model_get(GTK_TREE_MODEL(store),&iter,CODEC_PRIVDATA,&pt,-1);
+               payload_type_set_recv_fmtp(pt,new_text);
+       }
+}
+
+static void linphone_gtk_init_codec_list(GtkTreeView *listview){
+       GtkCellRenderer *renderer;
+       GtkTreeViewColumn *column;
+       GtkTreeSelection *select;
+
+       GtkListStore *store = gtk_list_store_new (CODEC_NCOLUMNS, G_TYPE_STRING,G_TYPE_INT,
+                                                       G_TYPE_FLOAT,
+                                                       G_TYPE_STRING,
+                                                       G_TYPE_STRING,
+                                                       G_TYPE_POINTER,
+                                                       G_TYPE_STRING,
+                                                       G_TYPE_STRING);
+
+       gtk_tree_view_set_model(listview,GTK_TREE_MODEL(store));
+       g_object_unref(G_OBJECT(store));
+
+       renderer = gtk_cell_renderer_text_new ();
+       column = gtk_tree_view_column_new_with_attributes (_("Name"),
+                                                   renderer,
+                                                   "text", CODEC_NAME,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       column = gtk_tree_view_column_new_with_attributes (_("Rate (Hz)"),
+                                                   renderer,
+                                                   "text", CODEC_RATE,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       column = gtk_tree_view_column_new_with_attributes (_("Status"),
+                                                   renderer,
+                                                   "text", CODEC_STATUS,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       column = gtk_tree_view_column_new_with_attributes (_("Min bitrate (kbit/s)"),
+                                                   renderer,
+                                                   "text", CODEC_BITRATE,
+                                               "foreground",CODEC_COLOR,
+                                                   NULL);
+       gtk_tree_view_append_column (listview, column);
+       renderer = gtk_cell_renderer_text_new ();
+       column = gtk_tree_view_column_new_with_attributes (_("Parameters"),
+                                                   renderer,
+                                                   "text", CODEC_PARAMS,
+                                               "foreground",CODEC_COLOR,
+                                       "editable",TRUE,
+                                                   NULL);
+       g_signal_connect(G_OBJECT(renderer),"edited",G_CALLBACK(fmtp_edited),store);
+       gtk_tree_view_append_column (listview, column);
+       /* Setup the selection handler */
+       select = gtk_tree_view_get_selection (listview);
+       gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+}
+
+static void linphone_gtk_show_codecs(GtkTreeView *listview, const MSList *codeclist)
+{
+       const MSList *elem;
+       GtkTreeIter iter;
+       GtkListStore *store=GTK_LIST_STORE(gtk_tree_view_get_model(listview));
+       GtkTreeSelection *selection;
+
+       gtk_list_store_clear(store);
+
+       for(elem=codeclist; elem!=NULL; elem=elem->next){
+               gchar *status;
+               gint rate;
+               gfloat bitrate; 
+               gchar *color;
+               const char *params="";
+               struct _PayloadType *pt=(struct _PayloadType *)elem->data;
+               if (linphone_core_payload_type_enabled(linphone_gtk_get_core(),pt)) status=_("Enabled");
+               else status=_("Disabled");
+               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
+               else color="red";
+               /* get an iterator */
+               gtk_list_store_append(store,&iter);
+               bitrate=payload_type_get_bitrate(pt)/1000.0;
+               rate=payload_type_get_rate(pt);
+               if (pt->recv_fmtp!=NULL) params=pt->recv_fmtp;
+               gtk_list_store_set(store,&iter, CODEC_NAME,payload_type_get_mime(pt),
+                                       CODEC_RATE,rate,
+                                       CODEC_BITRATE,bitrate,
+                                       CODEC_STATUS,status,
+                                       CODEC_PARAMS,params,
+                                       CODEC_PRIVDATA,(gpointer)pt,
+                                       CODEC_COLOR,(gpointer)color,
+                                       CODEC_INFO,(gpointer)linphone_core_get_payload_type_description(linphone_gtk_get_core(),pt),
+                                       -1);
+       }
+       
+       
+       
+       /* Setup the selection handler */
+       selection = gtk_tree_view_get_selection (listview);
+       gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
+       //gtk_tree_view_columns_autosize(GTK_TREE_VIEW (sec->interfaces));
+#if GTK_CHECK_VERSION(2,12,0)
+       gtk_tree_view_set_tooltip_column(listview,CODEC_INFO);
+#endif
+}
+
+static void linphone_gtk_check_codec_bandwidth(GtkTreeView *v){
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       model=gtk_tree_view_get_model(v);
+       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
+       do{
+               PayloadType *pt=NULL;
+               const gchar *color;
+               gfloat bitrate;
+               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
+               if (linphone_core_check_payload_type_usability(linphone_gtk_get_core(),pt)) color="blue";
+               else color="red";
+               bitrate=payload_type_get_bitrate(pt)/1000.0;
+               gtk_list_store_set(GTK_LIST_STORE(model),&iter,CODEC_COLOR, (gpointer)color,
+                                       CODEC_BITRATE, bitrate,-1);
+       }while(gtk_tree_model_iter_next(model,&iter));
+}
+
+static void linphone_gtk_select_codec(GtkTreeView *v, PayloadType *ref){
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       GtkTreeSelection *selection;
+       selection=gtk_tree_view_get_selection(v);
+       model=gtk_tree_view_get_model(v);
+       g_return_if_fail(gtk_tree_model_get_iter_first(model,&iter));
+       do{
+               PayloadType *pt=NULL;
+               gtk_tree_model_get(model,&iter,CODEC_PRIVDATA,&pt,-1);
+               if (pt==ref){
+                       gtk_tree_selection_select_iter(selection,&iter);
+               }
+               
+       }while(gtk_tree_model_iter_next(model,&iter));
+}
+
+static void linphone_gtk_draw_codec_list(GtkTreeView *v, int type){ /* 0=audio, 1=video*/
+       const MSList *list;
+       if (type==0) list=linphone_core_get_audio_codecs(linphone_gtk_get_core());
+       else list=linphone_core_get_video_codecs(linphone_gtk_get_core());
+       linphone_gtk_show_codecs(v,list);
+}
+
+void linphone_gtk_codec_view_changed(GtkWidget *w){
+       GtkWidget *listview=linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list");
+       int active=gtk_combo_box_get_active(GTK_COMBO_BOX(w));
+       linphone_gtk_draw_codec_list(GTK_TREE_VIEW(listview),active);
+}
+
+void linphone_gtk_download_bw_changed(GtkWidget *w){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
+       linphone_core_set_download_bandwidth(linphone_gtk_get_core(),
+                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+       linphone_gtk_check_codec_bandwidth(v);
+}
+
+void linphone_gtk_upload_bw_changed(GtkWidget *w){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(w),"codec_list"));
+       linphone_core_set_upload_bandwidth(linphone_gtk_get_core(),
+                               (int)gtk_spin_button_get_value(GTK_SPIN_BUTTON(w)));
+       linphone_gtk_check_codec_bandwidth(v);
+}
+
+static void linphone_gtk_codec_move(GtkWidget *button, int dir){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
+       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
+       GtkTreeModel *mod;
+       GtkTreeIter iter;
+       PayloadType *pt=NULL;
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
+               MSList *sel_elem,*before;
+               MSList *codec_list;
+               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
+               if (pt->type==PAYLOAD_VIDEO)
+                       codec_list=ms_list_copy(linphone_core_get_video_codecs(lc));
+               else codec_list=ms_list_copy(linphone_core_get_audio_codecs(lc));
+               sel_elem=ms_list_find(codec_list,pt);
+               if (dir>0) {
+                       if (sel_elem->prev) before=sel_elem->prev;
+                       else before=sel_elem;
+                       codec_list=ms_list_insert(codec_list,before,pt);
+               }
+               else{
+                       if (sel_elem->next) before=sel_elem->next->next;
+                       else before=sel_elem;
+                       codec_list=ms_list_insert(codec_list,before,pt);
+               }
+               codec_list=ms_list_remove_link(codec_list,sel_elem);
+               if (pt->type==PAYLOAD_VIDEO)
+                       linphone_core_set_video_codecs(lc,codec_list);
+               else linphone_core_set_audio_codecs(lc,codec_list);
+               linphone_gtk_show_codecs(v,codec_list);
+               linphone_gtk_select_codec(v,pt);
+       }
+}
+
+static void linphone_gtk_codec_set_enable(GtkWidget *button, gboolean enabled){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(gtk_widget_get_toplevel(button),"codec_list"));
+       GtkTreeSelection *sel=gtk_tree_view_get_selection(v);
+       GtkTreeModel *mod;
+       GtkListStore *store;
+       GtkTreeIter iter;
+       PayloadType *pt=NULL;
+
+       if (gtk_tree_selection_get_selected(sel,&mod,&iter)){
+               store=GTK_LIST_STORE(mod);
+               gtk_tree_model_get(mod,&iter,CODEC_PRIVDATA,&pt,-1);
+               linphone_core_enable_payload_type(linphone_gtk_get_core(),pt,enabled);
+               gtk_list_store_set(store,&iter,CODEC_STATUS, enabled ? _("Enabled") : _("Disabled"), -1);
+       }
+}
+
+void linphone_gtk_codec_up(GtkWidget *button){
+       linphone_gtk_codec_move(button,+1);
+}
+
+void linphone_gtk_codec_down(GtkWidget *button){
+       linphone_gtk_codec_move(button,-1);
+}
+
+void linphone_gtk_codec_enable(GtkWidget *button){
+       linphone_gtk_codec_set_enable(button,TRUE);
+}
+
+void linphone_gtk_codec_disable(GtkWidget *button){
+       linphone_gtk_codec_set_enable(button,FALSE);
+}
+
+void linphone_gtk_clear_passwords(GtkWidget *button){
+       linphone_core_clear_all_auth_info(linphone_gtk_get_core());
+}
+
+enum{
+       PROXY_CONFIG_IDENTITY,
+       PROXY_CONFIG_REF,
+       PROXY_CONFIG_NCOL
+};
+
+void linphone_gtk_show_sip_accounts(GtkWidget *w){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(w,"proxy_list"));
+       GtkTreeModel *model=gtk_tree_view_get_model(v);
+       GtkListStore *store;
+       GtkTreeSelection *select;
+       const MSList *elem;
+       if (!model){
+               GtkCellRenderer *renderer;
+               GtkTreeViewColumn *column;
+               /* create the proxy list */
+               store = gtk_list_store_new (PROXY_CONFIG_NCOL, G_TYPE_STRING, G_TYPE_POINTER);
+               
+               gtk_tree_view_set_model(v,GTK_TREE_MODEL(store));
+               g_object_unref(G_OBJECT(store));
+               renderer = gtk_cell_renderer_text_new ();
+               column = gtk_tree_view_column_new_with_attributes (_("Account"),
+                                                       renderer,
+                                                       "text", PROXY_CONFIG_IDENTITY,
+                                                       NULL);
+               gtk_tree_view_append_column (v, column);
+               
+               select = gtk_tree_view_get_selection (v);
+               gtk_tree_selection_set_mode (select, GTK_SELECTION_SINGLE);
+               model=GTK_TREE_MODEL(store);
+       }else {
+               store=GTK_LIST_STORE(model);
+       }
+       gtk_list_store_clear(store);
+       for(elem=linphone_core_get_proxy_config_list(linphone_gtk_get_core());elem!=NULL;elem=ms_list_next(elem)){
+               LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
+               GtkTreeIter iter;
+               gtk_list_store_append(store,&iter);
+               gtk_list_store_set(store,&iter,PROXY_CONFIG_IDENTITY,linphone_proxy_config_get_identity(cfg),
+                                       PROXY_CONFIG_REF,cfg,-1);
+       }
+}
+
+static void linphone_gtk_proxy_closed(GtkWidget *w){
+       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
+       if (cfg){
+               linphone_proxy_config_done(cfg);
+       }
+}
+
+void linphone_gtk_show_proxy_config(GtkWidget *pb, LinphoneProxyConfig *cfg){
+       GtkWidget *w=linphone_gtk_create_window("sip_account");
+       const char *tmp;
+       if (cfg){
+               linphone_proxy_config_edit(cfg);
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity")),
+                       linphone_proxy_config_get_identity(cfg));
+               gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy")),
+                       linphone_proxy_config_get_addr(cfg));
+               tmp=linphone_proxy_config_get_route(cfg);
+               if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route")),tmp);
+               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod")),
+                       linphone_proxy_config_get_expires(cfg));
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register")),
+                       linphone_proxy_config_register_enabled(cfg));
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish")),
+                       linphone_proxy_config_publish_enabled(cfg));
+       }
+       g_object_set_data(G_OBJECT(w),"config",(gpointer)cfg);
+       g_object_set_data(G_OBJECT(w),"parameters",(gpointer)pb);
+       g_object_weak_ref(G_OBJECT(w),(GWeakNotify)linphone_gtk_proxy_closed,w);
+       gtk_widget_show(w);
+}
+
+void linphone_gtk_proxy_cancel(GtkButton *button){
+       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
+       gtk_widget_destroy(w);
+}
+
+void linphone_gtk_proxy_ok(GtkButton *button){
+       GtkWidget *w=gtk_widget_get_toplevel(GTK_WIDGET(button));
+       LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)g_object_get_data(G_OBJECT(w),"config");
+       gboolean was_editing=TRUE;
+       if (!cfg){
+               was_editing=FALSE;
+               cfg=linphone_proxy_config_new();
+       }
+       linphone_proxy_config_set_identity(cfg,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"identity"))));
+       linphone_proxy_config_set_server_addr(cfg,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"proxy"))));
+       linphone_proxy_config_set_route(cfg,
+               gtk_entry_get_text(GTK_ENTRY(linphone_gtk_get_widget(w,"route"))));
+       linphone_proxy_config_expires(cfg,
+               (int)gtk_spin_button_get_value(
+                       GTK_SPIN_BUTTON(linphone_gtk_get_widget(w,"regperiod"))));
+       linphone_proxy_config_enable_publish(cfg,
+               gtk_toggle_button_get_active(
+                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"publish"))));
+       linphone_proxy_config_enable_register(cfg,
+               gtk_toggle_button_get_active(
+                       GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(w,"register"))));
+       if (was_editing){
+               if (linphone_proxy_config_done(cfg)==-1)
+                       return;
+       }
+       else {
+               if (linphone_core_add_proxy_config(linphone_gtk_get_core(),cfg)==-1) return;
+               linphone_core_set_default_proxy(linphone_gtk_get_core(),cfg);
+       }
+       g_object_set_data(G_OBJECT(w),"config",NULL);
+       linphone_gtk_show_sip_accounts(GTK_WIDGET(g_object_get_data(G_OBJECT(w),"parameters")));
+       gtk_widget_destroy(w);
+       /* also update the main window's list of identities*/
+       linphone_gtk_load_identities();
+}
+
+static LinphoneProxyConfig *linphone_gtk_get_selected_proxy_config(GtkWidget* pb){
+       GtkTreeView *v=GTK_TREE_VIEW(linphone_gtk_get_widget(pb,"proxy_list"));
+       GtkTreeSelection *selection=gtk_tree_view_get_selection(v);
+       GtkTreeIter iter;
+       GtkTreeModel *model;
+       if (gtk_tree_selection_get_selected(selection,&model,&iter)){
+               LinphoneProxyConfig *cfg=NULL;
+               gtk_tree_model_get(model,&iter,PROXY_CONFIG_REF,&cfg,-1);
+               return cfg;
+       }
+       return NULL;
+}
+
+void linphone_gtk_add_proxy(GtkButton *button){
+       linphone_gtk_show_proxy_config(gtk_widget_get_toplevel(GTK_WIDGET(button)),NULL);
+}
+
+void linphone_gtk_remove_proxy(GtkButton *button){
+       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(
+                       gtk_widget_get_toplevel(GTK_WIDGET(button)));
+       if (cfg){
+               linphone_core_remove_proxy_config(linphone_gtk_get_core(),cfg);
+               linphone_gtk_show_sip_accounts(gtk_widget_get_toplevel(GTK_WIDGET(button)));
+               /* also update the main window's list of identities*/
+               linphone_gtk_load_identities();
+       }
+}
+
+void linphone_gtk_edit_proxy(GtkButton *button){
+       GtkWidget *pb=gtk_widget_get_toplevel(GTK_WIDGET(button));
+       LinphoneProxyConfig *cfg=linphone_gtk_get_selected_proxy_config(pb);
+       if (cfg){
+               linphone_gtk_show_proxy_config(pb,cfg);
+               /* also update the main window's list of identities*/
+               linphone_gtk_load_identities();
+       }
+}
+
+typedef struct _LangCodes{
+       const char *code;
+       const char *name;
+}LangCodes;
+
+static LangCodes supported_langs[]={
+       {       "C"     ,       N_("English")   },
+       {       "fr"    ,       N_("French")    },
+       {       "sv"    ,       N_("Swedish")   },
+       {       "it"    ,       N_("Italian")   },
+       {       "es"    ,       N_("Spanish")   },
+       {       "pt_BR" ,       N_("Brazilian Portugese")       },
+       {       "pl"    ,       N_("Polish")    },
+       {       "de"    ,       N_("German")    },
+       {       "ru"    ,       N_("Russian")   },
+       {       "ja"    ,       N_("Japanese")  },
+       {       "nl"    ,       N_("Dutch")     },
+       {       "hu"    ,       N_("Hungarian") },
+       {       "cs"    ,       N_("Czech")     },
+       {       "zh_CN" ,       N_("Chinese")   },
+       {       NULL    ,       NULL            }
+};
+
+static const char *lang_get_name(const char *code){
+       LangCodes *p=supported_langs;
+       while(p->code!=NULL){
+               if (strcmp(p->code,code)==0) return p->name;
+               p++;
+       }
+       return NULL;
+}
+
+static gboolean lang_equals(const char *l1, const char *l2){
+       return ((strncmp(l1,l2,5)==0 || strncmp(l1,l2,2)==0));
+}
+
+static void linphone_gtk_fill_langs(GtkWidget *pb){
+       GtkWidget *combo=linphone_gtk_get_widget(pb,"lang_combo");
+       char code[10];
+       const char *all_langs="C " LINPHONE_ALL_LANGS;
+       const char *name;
+       int i=0,index=0;
+       const char *cur_lang=getenv("LANG");
+       int cur_lang_index=-1;
+       char text[256]={0};
+       if (cur_lang==NULL) cur_lang="C";
+       /* glade creates a combo box without list model and text renderer,
+       unless we fill it with a dummy text.
+       This dummy text needs to be removed first*/
+       gtk_combo_box_remove_text(GTK_COMBO_BOX(combo),0);
+       while(sscanf(all_langs+i,"%s",code)==1){
+               i+=strlen(code);
+               while(all_langs[i]==' ') ++i;
+               name=lang_get_name(code);
+               snprintf(text,sizeof(text)-1,"%s : %s",code,name!=NULL ? _(name) : code);
+               gtk_combo_box_append_text(GTK_COMBO_BOX(combo),text);
+               if (cur_lang_index==-1 && lang_equals(cur_lang,code)) 
+                       cur_lang_index=index;
+               index++;
+       }
+       gtk_combo_box_set_active(GTK_COMBO_BOX(combo),cur_lang_index);
+}
+
+void linphone_gtk_lang_changed(GtkComboBox *combo){
+       const char *selected=gtk_combo_box_get_active_text(combo);
+       char code[10];
+       const char *cur_lang=getenv("LANG");
+       if (selected!=NULL){
+               sscanf(selected,"%s",code);
+               if (cur_lang==NULL) cur_lang="C";
+               if (!lang_equals(cur_lang,code)){
+                       GtkWidget *dialog = gtk_message_dialog_new (GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(combo))),
+                               GTK_DIALOG_DESTROY_WITH_PARENT,
+                               GTK_MESSAGE_INFO,
+                               GTK_BUTTONS_CLOSE,
+                               "%s",
+                               (const gchar*)_("You need to restart linphone for the new language selection to take effect."));
+                               /* Destroy the dialog when the user responds to it (e.g. clicks a button) */
+                       g_signal_connect_swapped (G_OBJECT (dialog), "response",
+                                       G_CALLBACK (gtk_widget_destroy),
+                                       G_OBJECT (dialog));
+                       gtk_widget_show(dialog);
+                       linphone_gtk_set_lang(code);
+               }
+       }
+}
+
+static void linphone_gtk_ui_level_adapt(GtkWidget *top) {
+       gboolean ui_advanced;
+       const char *simple_ui = linphone_gtk_get_ui_config("simple_ui", "parameters.codec_tab parameters.transport_frame parameters.ports_frame");
+
+       ui_advanced = linphone_gtk_get_ui_config_int("advanced_ui", TRUE);
+       if (ui_advanced) {
+               linphone_gtk_visibility_set(simple_ui, "parameters", top, TRUE);
+       } else {
+               linphone_gtk_visibility_set(simple_ui, "parameters", top, FALSE);
+       }
+}
+
+void linphone_gtk_ui_level_toggled(GtkWidget *w) {
+       gint ui_advanced;
+       GtkWidget *top;
+
+       top = gtk_widget_get_toplevel(w);
+       ui_advanced = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w));
+       linphone_gtk_set_ui_config_int("advanced_ui", ui_advanced);
+       linphone_gtk_ui_level_adapt(top);
+}
+
+void linphone_gtk_show_parameters(void){
+       GtkWidget *pb=linphone_gtk_create_window("parameters");
+       LinphoneCore *lc=linphone_gtk_get_core();
+       const char **sound_devices=linphone_core_get_sound_devices(lc);
+       const char *tmp;
+       LinphoneAddress *contact;
+       LinphoneFirewallPolicy pol;
+       GtkWidget *codec_list=linphone_gtk_get_widget(pb,"codec_list");
+       int mtu;
+       int ui_advanced;
+
+       /* NETWORK CONFIG */
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ipv6_enabled")),
+                               linphone_core_ipv6_enabled(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"sip_port")),
+                               linphone_core_get_sip_port(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"audio_rtp_port")),
+                               linphone_core_get_audio_port(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"video_rtp_port")),
+                               linphone_core_get_video_port(lc));
+       tmp=linphone_core_get_nat_address(lc);
+       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"nat_address")),tmp);
+       tmp=linphone_core_get_stun_server(lc);
+       if (tmp) gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"stun_server")),tmp);
+       pol=linphone_core_get_firewall_policy(lc);
+       switch(pol){
+               case LinphonePolicyNoFirewall:
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"no_nat")),TRUE);
+               break;
+               case LinphonePolicyUseNatAddress:
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_nat_address")),TRUE);
+               break;
+               case LinphonePolicyUseStun:
+                       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"use_stun")),TRUE);
+               break;
+       }
+       mtu=linphone_core_get_mtu(lc);
+       if (mtu<=0){
+               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),FALSE);
+               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),1500);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),FALSE);
+       }else{
+               gtk_widget_set_sensitive(linphone_gtk_get_widget(pb,"mtu"),TRUE);
+               gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"mtu")),mtu);
+               gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"mtu_set")),TRUE);
+       }
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"dtmf_sipinfo")),
+                                       linphone_core_get_use_info_for_dtmf(lc));
+       /* MUTIMEDIA CONFIG */
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"playback_device"), sound_devices,
+                                       linphone_core_get_playback_device(lc),CAP_PLAYBACK);
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"ring_device"), sound_devices,
+                                       linphone_core_get_ringer_device(lc),CAP_PLAYBACK);
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"capture_device"), sound_devices,
+                                       linphone_core_get_capture_device(lc), CAP_CAPTURE);
+       linphone_gtk_fill_combo_box(linphone_gtk_get_widget(pb,"webcams"),linphone_core_get_video_devices(lc),
+                                       linphone_core_get_video_device(lc),CAP_IGNORE);
+       linphone_gtk_fill_video_sizes(linphone_gtk_get_widget(pb,"video_size"));
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"echo_cancelation")),
+                                       linphone_core_echo_cancellation_enabled(lc));
+
+       gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(linphone_gtk_get_widget(pb,"ring_chooser")),
+                                       linphone_core_get_ring(lc));
+       /* SIP CONFIG */
+       contact=linphone_core_get_primary_contact_parsed(lc);
+       if (contact){
+               if (linphone_address_get_display_name(contact)) {
+                       const char *dn=linphone_address_get_display_name(contact);
+                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"displayname")),dn);
+               }
+               if (linphone_address_get_username(contact))
+                       gtk_entry_set_text(GTK_ENTRY(linphone_gtk_get_widget(pb,"username")),linphone_address_get_username(contact));
+       }
+       linphone_address_destroy(contact);
+       linphone_gtk_show_sip_accounts(pb);
+       /* CODECS CONFIG */
+       linphone_gtk_init_codec_list(GTK_TREE_VIEW(codec_list));
+       linphone_gtk_draw_codec_list(GTK_TREE_VIEW(codec_list),0);
+       gtk_combo_box_set_active(GTK_COMBO_BOX(linphone_gtk_get_widget(pb,"codec_view")),0);
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"download_bw")),
+                               linphone_core_get_download_bandwidth(lc));
+       gtk_spin_button_set_value(GTK_SPIN_BUTTON(linphone_gtk_get_widget(pb,"upload_bw")),
+                               linphone_core_get_upload_bandwidth(lc));
+       
+
+       /* UI CONFIG */
+       linphone_gtk_fill_langs(pb);
+       ui_advanced = linphone_gtk_get_ui_config_int("advanced_ui", 1);
+       linphone_gtk_set_ui_config_int("advanced_ui", ui_advanced);
+       gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(linphone_gtk_get_widget(pb,"ui_level")),
+                               ui_advanced);
+       linphone_gtk_ui_level_adapt(pb);
+
+       gtk_widget_show(pb);
+}
diff --git a/gtk/setupwizard.c b/gtk/setupwizard.c
new file mode 100644 (file)
index 0000000..e5f8702
--- /dev/null
@@ -0,0 +1,264 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w);
+
+static GtkWidget *create_intro(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(_("Welcome !\nThis assistant will help you to use a SIP account for your calls."));
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static GtkWidget *create_setup_signin_choice(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *t1=gtk_radio_button_new_with_label(NULL,_("Create an account by choosing a username"));
+       GtkWidget *t2=gtk_radio_button_new_with_label_from_widget(GTK_RADIO_BUTTON(t1),_("I have already an account and just want to use it"));
+       gtk_box_pack_start (GTK_BOX (vbox), t1, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), t2, TRUE, TRUE, 2);
+       gtk_widget_show_all(vbox);
+       g_object_set_data(G_OBJECT(vbox),"create_account",t1);
+       g_object_set_data(G_OBJECT(vbox),"setup_account",t2);
+       return vbox;
+}
+
+static void create_username_changed(GtkEntry *entry, GtkWidget *w){
+       GtkWidget *assistant=gtk_widget_get_toplevel(w);
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(assistant),w,
+               gtk_entry_get_text_length(entry)>=3);
+}
+
+static GtkWidget *create_username_chooser(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *hbox=gtk_hbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(_("Please choose a username:"));
+       GtkWidget *label2=gtk_label_new(_("Username:"));
+       GtkWidget *label3=gtk_label_new(NULL);
+       GtkWidget *entry=gtk_entry_new();
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (hbox), label2, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), label3, TRUE, TRUE, 2);
+       gtk_widget_show_all(vbox);
+       g_object_set_data(G_OBJECT(vbox),"username",entry);
+       g_object_set_data(G_OBJECT(vbox),"errorstring",label3);
+       g_signal_connect(G_OBJECT(entry),"changed",(GCallback)create_username_changed,vbox);
+       return vbox;
+}
+
+static GtkWidget *create_username_checking_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(NULL);
+       GtkWidget *progress=gtk_progress_bar_new();
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       g_object_set_data(G_OBJECT(vbox),"progress",progress);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static void *progress_bar_update(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
+       GtkWidget *pb=(GtkWidget*)ctx;
+       if (ws==LinphoneWaitingProgress) gtk_progress_bar_pulse(GTK_PROGRESS_BAR(pb));
+       else if (ws==LinphoneWaitingFinished) gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(pb),1);
+       return ctx;
+}
+
+static void check_username(GtkWidget *page){
+       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
+       GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
+       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
+       gchar *text=g_strdup_printf(_("Checking if '%s' is available..."),linphone_account_creator_get_username(creator));
+       LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(gtk_widget_get_toplevel(page));
+       int res;
+       gtk_label_set_text(GTK_LABEL(label),text);
+       g_free(text);
+       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
+       res=linphone_account_creator_test_existence(c);
+       if (res==1){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Sorry this username already exists. Please try a new one."));
+       }else if (res==0){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
+               gtk_assistant_set_page_complete(GTK_ASSISTANT(gtk_widget_get_toplevel(page)),page,TRUE);
+       }else if (res==-1){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
+       }
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
+}
+
+static GtkWidget *create_confirmation_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(NULL);
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static GtkWidget *create_creation_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(NULL);
+       GtkWidget *progress=gtk_progress_bar_new();
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_box_pack_start (GTK_BOX (vbox), progress, TRUE, TRUE, 2);
+       g_object_set_data(G_OBJECT(vbox),"label",label);
+       g_object_set_data(G_OBJECT(vbox),"progress",progress);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static GtkWidget *create_finish_page(){
+       GtkWidget *vbox=gtk_vbox_new(FALSE,2);
+       GtkWidget *label=gtk_label_new(_("Thank you. Your account is now configured and ready for use."));
+       gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 2);
+       gtk_widget_show_all(vbox);
+       return vbox;
+}
+
+static void linphone_gtk_assistant_closed(GtkWidget *w){
+       gtk_widget_destroy(w);
+}
+
+static int linphone_gtk_assistant_forward(int curpage, gpointer data){
+       GtkWidget *w=(GtkWidget*)data;
+       GtkWidget *box=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),curpage);
+       if (curpage==1){
+               GtkWidget *create_button=(GtkWidget*)g_object_get_data(G_OBJECT(box),"create_account");
+               if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(create_button))){
+                       g_error("Not implemented yet...");
+               }
+       }else if (curpage==2){
+               LinphoneAccountCreator *c=linphone_gtk_assistant_get_creator(w);
+               linphone_account_creator_set_username(c,gtk_entry_get_text(GTK_ENTRY(g_object_get_data(G_OBJECT(box),"username"))));
+       }
+       return curpage+1;
+}
+
+static void linphone_gtk_assistant_apply(GtkWidget *w){
+       LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(w);
+       GtkWidget *page=gtk_assistant_get_nth_page(GTK_ASSISTANT(w),gtk_assistant_get_current_page(GTK_ASSISTANT(w)));
+       GtkWidget *progress=(GtkWidget*)g_object_get_data(G_OBJECT(page),"progress");
+       LinphoneProxyConfig *res;
+       gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Please wait..."));
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),progress_bar_update,progress);
+       res=linphone_account_creator_validate(creator);
+       if (res){
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Ok !"));
+               gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
+       }else{
+               gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress),_("Communication problem, please try again later."));
+       }
+       linphone_core_set_waiting_callback(linphone_gtk_get_core(),linphone_gtk_wait,NULL);
+       if (res) linphone_core_add_proxy_config(linphone_gtk_get_core(),res);
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),page,TRUE);
+}
+
+static void linphone_gtk_assistant_prepare(GtkWidget *assistant, GtkWidget *page){
+       int pagenum=gtk_assistant_get_current_page(GTK_ASSISTANT(assistant));
+       if (pagenum==3){
+               check_username(page);
+       }else if (pagenum==4){
+               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
+               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
+               gchar *text=g_strdup_printf("You have choosen '%s' as username.\nDo you confirm the creation of the account ?",linphone_account_creator_get_username(creator));
+               gtk_label_set_text(GTK_LABEL(label),text);
+               g_free(text);
+       }else if (pagenum==5){
+               GtkWidget *label=(GtkWidget*)g_object_get_data(G_OBJECT(page),"label");
+               LinphoneAccountCreator *creator=linphone_gtk_assistant_get_creator(assistant);
+               gchar *text=g_strdup_printf("Account creation in progress for '%s'",linphone_account_creator_get_username(creator));
+               gtk_label_set_text(GTK_LABEL(label),text);
+               g_free(text);
+       }
+}
+
+static LinphoneAccountCreator * linphone_gtk_assistant_init(GtkWidget *w){
+       const MSList *elem;
+       LinphoneCore *lc=linphone_gtk_get_core();
+       for(elem=linphone_core_get_sip_setups(lc);elem!=NULL;elem=elem->next){
+               SipSetup *ss=(SipSetup*)elem->data;
+               if (sip_setup_get_capabilities(ss) & SIP_SETUP_CAP_ACCOUNT_MANAGER){
+                       LinphoneAccountCreator *creator=linphone_account_creator_new(lc,ss->name);
+                       g_object_set_data(G_OBJECT(w),"creator",creator);
+                       return creator;
+               }
+       }
+       return NULL;
+}
+
+LinphoneAccountCreator *linphone_gtk_assistant_get_creator(GtkWidget*w){
+       return (LinphoneAccountCreator*)g_object_get_data(G_OBJECT(w),"creator");
+}
+
+GtkWidget * linphone_gtk_create_assistant(void){
+       GtkWidget *w=gtk_assistant_new();
+       GtkWidget *p1=create_intro();
+       GtkWidget *p2=create_setup_signin_choice();
+       GtkWidget *p3=create_username_chooser();
+       GtkWidget *checking=create_username_checking_page();
+       GtkWidget *confirm=create_confirmation_page();
+       GtkWidget *creation=create_creation_page();
+       GtkWidget *end=create_finish_page();
+       
+       linphone_gtk_assistant_init(w);
+       gtk_assistant_append_page(GTK_ASSISTANT(w),p1);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p1,GTK_ASSISTANT_PAGE_INTRO);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p1,_("Welcome to the account setup assistant"));
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p1,TRUE);
+       gtk_assistant_append_page(GTK_ASSISTANT(w),p2);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p2,GTK_ASSISTANT_PAGE_CONTENT);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p2,_("Account setup assistant"));
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),p2,TRUE);
+       gtk_assistant_append_page(GTK_ASSISTANT(w),p3);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),p3,GTK_ASSISTANT_PAGE_CONTENT);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),p3,_("Choosing a username"));
+       
+       gtk_assistant_append_page(GTK_ASSISTANT(w),checking);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),checking,GTK_ASSISTANT_PAGE_PROGRESS);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),checking,_("Verifying"));
+       
+       gtk_assistant_append_page(GTK_ASSISTANT(w),confirm);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),confirm,GTK_ASSISTANT_PAGE_CONFIRM);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),confirm,_("Confirmation"));
+       gtk_assistant_set_page_complete(GTK_ASSISTANT(w),confirm,TRUE);
+
+       gtk_assistant_append_page(GTK_ASSISTANT(w),creation);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),creation,GTK_ASSISTANT_PAGE_PROGRESS);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),creation,_("Creating your account"));
+
+       gtk_assistant_append_page(GTK_ASSISTANT(w),end);
+       gtk_assistant_set_page_type(GTK_ASSISTANT(w),end,GTK_ASSISTANT_PAGE_SUMMARY);
+       gtk_assistant_set_page_title(GTK_ASSISTANT(w),end,_("Now ready !"));
+       
+       gtk_assistant_set_forward_page_func(GTK_ASSISTANT(w),linphone_gtk_assistant_forward,w,NULL);
+       g_signal_connect(G_OBJECT(w),"close",(GCallback)linphone_gtk_assistant_closed,NULL);
+       g_signal_connect(G_OBJECT(w),"cancel",(GCallback)linphone_gtk_assistant_closed,NULL);
+       g_signal_connect(G_OBJECT(w),"apply",(GCallback)linphone_gtk_assistant_apply,NULL);
+       g_signal_connect(G_OBJECT(w),"prepare",(GCallback)linphone_gtk_assistant_prepare,NULL);
+       gtk_widget_show(w);
+       
+       return w;
+}
+
diff --git a/gtk/sip_account.ui b/gtk/sip_account.ui
new file mode 100644 (file)
index 0000000..0c49aaf
--- /dev/null
@@ -0,0 +1,244 @@
+<?xml version="1.0"?>
+<interface>
+  <object class="GtkAdjustment" id="adjustment1">
+    <property name="upper">100000</property>
+    <property name="lower">0</property>
+    <property name="page_increment">10</property>
+    <property name="step_increment">1</property>
+    <property name="page_size">10</property>
+    <property name="value">3600</property>
+  </object>
+  <!-- interface-requires gtk+ 2.6 -->
+  <!-- interface-naming-policy toplevel-contextual -->
+  <object class="GtkDialog" id="sip_account">
+    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+    <property name="border_width">5</property>
+    <property name="title" translatable="yes">Linphone - Configure a SIP account</property>
+    <property name="window_position">center-on-parent</property>
+    <property name="icon">linphone2.png</property>
+    <property name="type_hint">dialog</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <object class="GtkVBox" id="dialog-vbox2">
+        <property name="visible">True</property>
+        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <object class="GtkFrame" id="frame15">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="label_xalign">0</property>
+            <child>
+              <object class="GtkAlignment" id="alignment15">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <object class="GtkVBox" id="vbox11">
+                    <property name="visible">True</property>
+                    <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                    <property name="orientation">vertical</property>
+                    <child>
+                      <object class="GtkTable" id="table6">
+                        <property name="visible">True</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="n_rows">4</property>
+                        <property name="n_columns">2</property>
+                        <child>
+                          <object class="GtkLabel" id="label38">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Your SIP identity:</property>
+                            <property name="justify">right</property>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="identity">
+                            <property name="width_request">275</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="tooltip-text" translatable="yes">Looks like sip:&lt;username&gt;@&lt;domain&gt;</property>
+                            <property name="text" translatable="yes">sip:</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label39">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">SIP Proxy address:</property>
+                            <property name="justify">right</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="proxy">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="tooltip-text" translatable="yes">Looks like sip:&lt;proxy hostname&gt;</property>
+                            <property name="text" translatable="yes">sip:</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label40">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Route (optional):</property>
+                            <property name="justify">right</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkEntry" id="route">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkLabel" id="label41">
+                            <property name="visible">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="label" translatable="yes">Registration duration (sec):</property>
+                            <property name="justify">right</property>
+                          </object>
+                          <packing>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <object class="GtkSpinButton" id="regperiod">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                            <property name="adjustment">adjustment1</property>
+                          </object>
+                          <packing>
+                            <property name="left_attach">1</property>
+                            <property name="right_attach">2</property>
+                            <property name="top_attach">3</property>
+                            <property name="bottom_attach">4</property>
+                          </packing>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="register">
+                        <property name="label" translatable="yes">Register at startup</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="active">True</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkCheckButton" id="publish">
+                        <property name="label" translatable="yes">Publish presence information</property>
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="receives_default">False</property>
+                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                        <property name="draw_indicator">True</property>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </object>
+                </child>
+              </object>
+            </child>
+            <child type="label">
+              <object class="GtkLabel" id="label42">
+                <property name="visible">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="label" translatable="yes">Configure a SIP account</property>
+                <property name="use_markup">True</property>
+              </object>
+            </child>
+          </object>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <object class="GtkHButtonBox" id="dialog-action_area2">
+            <property name="visible">True</property>
+            <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+            <property name="layout_style">end</property>
+            <child>
+              <object class="GtkButton" id="button6">
+                <property name="label">gtk-ok</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal handler="linphone_gtk_proxy_ok" name="clicked"/>
+              </object>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkButton" id="button7">
+                <property name="label">gtk-cancel</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+                <property name="use_stock">True</property>
+                <signal handler="linphone_gtk_proxy_cancel" name="clicked"/>
+              </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="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/gtk/stock_people.png b/gtk/stock_people.png
new file mode 100644 (file)
index 0000000..ed2d33b
Binary files /dev/null and b/gtk/stock_people.png differ
diff --git a/gtk/support.c b/gtk/support.c
new file mode 100644 (file)
index 0000000..2124d2e
--- /dev/null
@@ -0,0 +1,235 @@
+#include "linphone.h"
+
+#include "lpconfig.h"
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory                   (const gchar     *directory)
+{
+  pixmaps_directories = g_list_prepend (pixmaps_directories,
+                                        g_strdup (directory));
+}
+
+/* This is an internally used function to find pixmap files. */
+static gchar*
+find_pixmap_file                       (const gchar     *filename)
+{
+  GList *elem;
+
+  /* We step through each of the pixmaps directory to find it. */
+  elem = pixmaps_directories;
+  while (elem)
+    {
+      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+                                         G_DIR_SEPARATOR_S, filename);
+      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
+        return pathname;
+      g_free (pathname);
+      elem = elem->next;
+    }
+  return NULL;
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GtkWidget *pixmap;
+
+  if (!filename || !filename[0])
+      return gtk_image_new ();
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return gtk_image_new ();
+    }
+
+  pixmap = gtk_image_new_from_file (pathname);
+  g_free (pathname);
+  return pixmap;
+}
+
+/* This is an internally used function to create pixmaps. */
+GdkPixbuf*
+create_pixbuf                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+
+  if (!filename || !filename[0])
+      return NULL;
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return NULL;
+    }
+
+  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
+  if (!pixbuf)
+    {
+      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+               pathname, error->message);
+      g_error_free (error);
+    }
+  g_free (pathname);
+  return pixbuf;
+}
+
+/* This is an internally used function to create animations */
+GdkPixbufAnimation *
+create_pixbuf_animation(const gchar     *filename)
+{
+       gchar *pathname = NULL;
+       GdkPixbufAnimation *pixbuf;
+       GError *error = NULL;
+       
+       if (!filename || !filename[0])
+               return NULL;
+       
+       pathname = find_pixmap_file (filename);
+       
+       if (!pathname){
+               g_warning (_("Couldn't find pixmap file: %s"), filename);
+               return NULL;
+       }
+       
+       pixbuf = gdk_pixbuf_animation_new_from_file (pathname, &error);
+       if (!pixbuf){
+               fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+                       pathname, error->message);
+               g_error_free (error);
+       }
+       g_free (pathname);
+       return pixbuf;
+}
+
+
+
+/* This is used to set ATK action descriptions. */
+void
+glade_set_atk_action_description       (AtkAction       *action,
+                                        const gchar     *action_name,
+                                        const gchar     *description)
+{
+  gint n_actions, i;
+
+  n_actions = atk_action_get_n_actions (action);
+  for (i = 0; i < n_actions; i++)
+    {
+      if (!strcmp (atk_action_get_name (action, i), action_name))
+        atk_action_set_description (action, i, description);
+    }
+}
+
+
+static char linphone_lang[256]={0};
+
+/*lang has to be read before the config file is parsed...*/
+const char *linphone_gtk_get_lang(const char *config_file){
+       FILE *f=fopen(config_file,"r");
+       if (f){
+               char tmp[256];
+               while(fgets(tmp,sizeof(tmp),f)!=NULL){
+                       char *p;
+                       if ((p=strstr(tmp,"lang="))!=NULL){
+                               p+=5;
+                               sscanf(p,"%s",linphone_lang);
+                               g_message("Found lang %s",linphone_lang);
+                               break;
+                       }
+               }
+               fclose(f);
+       }
+       return linphone_lang;
+}
+
+void linphone_gtk_set_lang(const char *code){
+       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+       const char *curlang;
+       curlang=getenv("LANG");
+       if (curlang!=NULL && strncmp(curlang,code,2)==0) {
+               /* do not loose the _territory@encoding part*/
+               return;
+       }
+       lp_config_set_string(cfg,"GtkUi","lang",code);
+#ifdef WIN32
+       char tmp[128];
+       snprintf(tmp,sizeof(tmp),"LANG=%s",code);
+       _putenv(tmp);
+#else
+       setenv("LANG",code,1);
+#endif
+}
+
+const gchar *linphone_gtk_get_ui_config(const char *key, const char *def){
+       LinphoneCore *lc=linphone_gtk_get_core();
+       if (lc){
+               LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+               return lp_config_get_string(cfg,"GtkUi",key,def);
+       }else{
+               g_error ("Cannot read config, no core created yet.");
+               return NULL;
+       }
+}
+
+int linphone_gtk_get_ui_config_int(const char *key, int def){
+       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+       return lp_config_get_int(cfg,"GtkUi",key,def);
+}
+
+void linphone_gtk_set_ui_config_int(const char *key , int val){
+       LpConfig *cfg=linphone_core_get_config(linphone_gtk_get_core());
+       lp_config_set_int(cfg,"GtkUi",key,val);
+}
+
+
+static void parse_item(const char *item, const char *window_name, GtkWidget *w,  gboolean show){
+       char tmp[64];
+       char *dot;
+       strcpy(tmp,item);
+       dot=strchr(tmp,'.');
+       if (dot){
+               *dot='\0';
+               dot++;
+               if (strcmp(window_name,tmp)==0){
+                       GtkWidget *wd=linphone_gtk_get_widget(w,dot);
+                       if (wd) {
+                               if (!show) gtk_widget_hide(wd);
+                               else gtk_widget_show(wd);
+                       }
+               }
+       }
+}
+
+void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show){
+       char item[64];
+       const char *i;
+       const char *b;
+       int len;
+       for(b=i=hiddens;*i!='\0';++i){
+               if (*i==' '){
+                       len=MIN(i-b,sizeof(item)-1);
+                       strncpy(item,b,len);
+                       item[len]='\0';
+                       b=i+1;
+                       parse_item(item,window_name,w,show);
+               }
+       }
+       len=MIN(i-b,sizeof(item)-1);
+       if (len>0){
+               strncpy(item,b,len);
+               item[len]='\0';
+               parse_item(item,window_name,w,show);
+       }
+}
+
diff --git a/gtk/update.c b/gtk/update.c
new file mode 100755 (executable)
index 0000000..6fac1b8
--- /dev/null
@@ -0,0 +1,157 @@
+/*\r
+linphone, gtk-glade interface.\r
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)\r
+\r
+This program is free software; you can redistribute it and/or\r
+modify it under the terms of the GNU General Public License\r
+as published by the Free Software Foundation; either version 2\r
+of the License, or (at your option) any later version.\r
+\r
+This program is distributed in the hope that it will be useful,\r
+but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+GNU General Public License for more details.\r
+\r
+You should have received a copy of the GNU General Public License\r
+along with this program; if not, write to the Free Software\r
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
+*/\r
+\r
+#include "linphone.h"\r
+\r
+#ifdef WIN32\r
+\r
+#include <wininet.h>\r
+\r
+static int linphone_gtk_get_new_version(const char *version_url, char *version, size_t size){\r
+       DWORD dwDownloaded = 0;\r
+       HINTERNET  hSession = NULL, hConnect = NULL;\r
+       int ret=-1;\r
+       \r
+       hSession=InternetOpen("Linphone",INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0);\r
+       \r
+       if (hSession==NULL) return -1;\r
+       \r
+       hConnect=InternetOpenUrl(hSession,version_url,NULL,0,0,0);\r
+       \r
+       if (hConnect==NULL) {\r
+               InternetCloseHandle(hSession);\r
+               return -1;\r
+       }\r
+       dwDownloaded=0;\r
+       if (InternetReadFile(hConnect,version,size,&dwDownloaded) && dwDownloaded>0){\r
+               version[dwDownloaded]='\0';\r
+               ms_message("Got response: %s", version);\r
+               /*check this not just html containing 404 not found*/\r
+               if (strstr(version,"html")==0)\r
+                       ret=0;\r
+       }\r
+       \r
+       // Close any open handles.\r
+       if (hConnect) InternetCloseHandle(hConnect);\r
+       if (hSession) InternetCloseHandle(hSession);\r
+       return ret;\r
+}\r
+\r
+#else\r
+\r
+static int linphone_gtk_get_new_version(const char *url, char *version, size_t size){\r
+       \r
+       return -1;\r
+}\r
+\r
+#endif\r
+\r
+static void new_version_response(GtkWidget *dialog, int response_id, gpointer download_site){\r
+       if (response_id==GTK_RESPONSE_YES){\r
+               linphone_gtk_open_browser((const char*)download_site);\r
+       }\r
+       gtk_widget_destroy(dialog);\r
+}\r
+\r
+static gboolean popup_new_version(const char *download_site){\r
+       GtkWidget *dialog;\r
+       /* draw a question box. link to dialog_click callback */\r
+       dialog = gtk_message_dialog_new (\r
+                               GTK_WINDOW(linphone_gtk_get_main_window()),\r
+                GTK_DIALOG_DESTROY_WITH_PARENT,\r
+                               GTK_MESSAGE_QUESTION,\r
+                GTK_BUTTONS_YES_NO,\r
+                _("A more recent version is availalble from %s.\nWould you like to open a browser to download it ?"),\r
+                               download_site);\r
+       g_signal_connect(G_OBJECT (dialog), "response",\r
+            G_CALLBACK (new_version_response),\r
+               (gpointer)download_site);\r
+       /* actually show the box */\r
+       gtk_widget_show(dialog);\r
+       return FALSE;\r
+}\r
+\r
+static gboolean popup_version_ok(){\r
+       linphone_gtk_display_something(GTK_MESSAGE_INFO,_("You are running the lastest version."));\r
+       return FALSE;\r
+}\r
+\r
+static int copytilldot(char *n, const char *v){\r
+       int ret=0;\r
+       while(*v!='\0' && *v!='.' && *v!='-' && *v!='\n' && *v!='\r' && *v!='\t'){\r
+               *n=*v;\r
+               ret++;\r
+               v++;\r
+               n++;\r
+       }\r
+       *n='\0';\r
+       if (*v!='\0') ret=ret+1;\r
+       return ret;\r
+}\r
+\r
+static int version_compare(const char *v1, const char *v2){\r
+       char n1[16];\r
+       char n2[16];\r
+       int ret;\r
+       if (*v1=='\0' && *v2=='\0') return 0;\r
+       v1+=copytilldot(n1,v1);\r
+       v2+=copytilldot(n2,v2);\r
+       ms_message("Comparing %s <> %s",n1,n2);\r
+       ret=strcmp(n1,n2);\r
+       if (ret==0) return version_compare(v1,v2);\r
+       else return ret;\r
+}\r
+\r
+static void *check_for_new_version(void *d){\r
+       const char *version_url=(const char *)d;\r
+       char version[256];\r
+       if (linphone_gtk_get_new_version(version_url,version,sizeof(version))==0){\r
+               if (version_compare(version,LINPHONE_VERSION)>0){\r
+                       const char *download_site=linphone_gtk_get_ui_config("download_site",NULL);\r
+                       if (download_site)   {\r
+                               gdk_threads_enter();\r
+                               g_idle_add((GSourceFunc)popup_new_version,(gpointer)download_site);\r
+                               gdk_threads_leave();\r
+                       }\r
+               }else{\r
+                       if (linphone_gtk_get_ui_config_int("update_check_menu",0)){\r
+                               gdk_threads_enter();\r
+                               g_idle_add((GSourceFunc)popup_version_ok,NULL);\r
+                               gdk_threads_leave();\r
+                       }\r
+               }\r
+       }\r
+       return NULL;\r
+}\r
+\r
+void linphone_gtk_check_for_new_version(void){\r
+       ortp_thread_t thread;\r
+       static gboolean done=FALSE;\r
+       const char *version_url;\r
+       if (done) return;\r
+       done=TRUE;\r
+       version_url=linphone_gtk_get_ui_config("last_version_url",NULL);\r
+       if (version_url==NULL) return ;\r
+       ortp_thread_create(&thread,NULL,check_for_new_version,(void*)version_url);\r
+}\r
+\r
+/*called when the user clicks on the "Check for updates" menu item */\r
+void linphone_gtk_check_for_updates(void){\r
+       linphone_gtk_check_for_new_version();\r
+}\r
diff --git a/gtk/utils.c b/gtk/utils.c
new file mode 100644 (file)
index 0000000..69ae435
--- /dev/null
@@ -0,0 +1,99 @@
+/*
+linphone, gtk-glade interface.
+Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+*/
+
+#include "linphone.h"
+
+static void run_gtk(){
+       while (gtk_events_pending ())
+               gtk_main_iteration ();
+
+}
+
+void *linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress){
+       GtkWidget *w;
+       switch(ws){
+               case LinphoneWaitingStart:
+                       gdk_threads_enter();
+                       w=linphone_gtk_create_window("waiting");
+                       gtk_window_set_transient_for(GTK_WINDOW(w),GTK_WINDOW(linphone_gtk_get_main_window()));
+                       gtk_window_set_position(GTK_WINDOW(w),GTK_WIN_POS_CENTER_ON_PARENT);
+                       if (purpose) {
+                               gtk_progress_bar_set_text(
+                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
+                                       purpose);
+                       }
+                       gtk_widget_show(w);
+                       /*g_message("Creating waiting window");*/
+                       run_gtk();
+                       gdk_threads_leave();
+                       return w;
+               break;
+               case LinphoneWaitingProgress:
+                       w=(GtkWidget*)ctx;
+                       gdk_threads_enter();
+                       if (progress>=0){
+                               gtk_progress_bar_set_fraction(
+                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar")),
+                                       progress);
+                               
+                               
+                       }else {
+                               gtk_progress_bar_pulse(
+                                       GTK_PROGRESS_BAR(linphone_gtk_get_widget(w,"progressbar"))
+                               );
+                       }
+                       /*g_message("Updating progress");*/
+                       run_gtk();
+                       gdk_threads_leave();
+                       g_usleep(50000);
+                       return w;
+               break;
+               case LinphoneWaitingFinished:
+                       w=(GtkWidget*)ctx;
+                       gdk_threads_enter();
+                       gtk_widget_destroy(w);
+                       run_gtk();
+                       gdk_threads_leave();
+                       return NULL;
+               break;
+       }
+       return NULL;
+}
+
+GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
+       GInputStream *stream=g_memory_input_stream_new_from_data (data,len,NULL);
+       GError *error=NULL;
+       
+       GdkPixbuf *pbuf=gdk_pixbuf_new_from_stream_at_scale (stream,w,h,preserve_ratio,NULL,&error);
+       g_input_stream_close(stream,NULL,NULL);
+       g_object_unref(G_OBJECT(stream));
+       if (pbuf==NULL){
+               g_warning("Could not open image from memory");
+       }
+       return pbuf;
+}
+
+GtkWidget * _gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio){
+       GtkWidget *image;
+       GdkPixbuf *pbuf=_gdk_pixbuf_new_from_memory_at_scale(data,len,w,h,preserve_ratio);
+       if (pbuf==NULL) return NULL;
+       image=gtk_image_new_from_pixbuf(pbuf);
+       g_object_unref(G_OBJECT(pbuf));
+       return image;
+}
diff --git a/gtk/waiting.ui b/gtk/waiting.ui
new file mode 100644 (file)
index 0000000..4413dfa
--- /dev/null
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<!--Generated with glade3 3.4.5 on Sun Mar 29 15:33:09 2009 -->
+<interface>
+  <object class="GtkWindow" id="waiting">
+    <property name="title" translatable="yes">Linphone</property>
+    <property name="resizable">False</property>
+    <property name="modal">True</property>
+    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
+    <property name="icon">linphone2.png</property>
+    <property name="deletable">False</property>
+    <child>
+      <object class="GtkFrame" id="frame1">
+        <property name="visible">True</property>
+        <property name="label_xalign">0</property>
+        <child>
+          <object class="GtkAlignment" id="alignment1">
+            <property name="visible">True</property>
+            <property name="left_padding">12</property>
+            <child>
+              <object class="GtkHBox" id="hbox1">
+                <property name="visible">True</property>
+                <property name="spacing">5</property>
+                <child>
+                  <object class="GtkImage" id="image1">
+                    <property name="visible">True</property>
+                    <property name="stock">gtk-dialog-info</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">False</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkProgressBar" id="progressbar">
+                    <property name="visible">True</property>
+                  </object>
+                  <packing>
+                    <property name="padding">5</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+            </child>
+          </object>
+        </child>
+        <child type="label">
+          <object class="GtkLabel" id="label1">
+            <property name="visible">True</property>
+            <property name="label" translatable="yes">Please wait</property>
+            <property name="use_markup">True</property>
+            <property name="justify">GTK_JUSTIFY_CENTER</property>
+          </object>
+        </child>
+      </object>
+    </child>
+  </object>
+</interface>
index 3fcfbdd201be78602c434d3009da6cdf8a202447..1e699aa8a882bb200bc60d08ba4f0f283c4b020b 100644 (file)
@@ -1,29 +1,29 @@
 # List of source files containing translatable strings.
-gtk-glade/calllogs.c
-gtk-glade/logging.c
-gtk-glade/support.c
-gtk-glade/chat.c
-gtk-glade/main.c
-gtk-glade/friendlist.c
-gtk-glade/propertybox.c
-gtk-glade/update.c
-gtk-glade/buddylookup.c
-gtk-glade/setupwizard.c
-gtk-glade/incall_view.c
-gtk-glade/loginframe.c
-gtk-glade/main.glade
-gtk-glade/about.glade
-gtk-glade/contact.glade
-gtk-glade/log.glade
-gtk-glade/password.glade
-gtk-glade/call_logs.glade
-gtk-glade/main.glade
-gtk-glade/sip_account.glade
-gtk-glade/chatroom.glade
-gtk-glade/incoming_call.glade
-gtk-glade/parameters.glade
-gtk-glade/buddylookup.glade
-gtk-glade/waiting.glade
+gtk/calllogs.c
+gtk/logging.c
+gtk/support.c
+gtk/chat.c
+gtk/main.c
+gtk/friendlist.c
+gtk/propertybox.c
+gtk/update.c
+gtk/buddylookup.c
+gtk/setupwizard.c
+gtk/incall_view.c
+gtk/loginframe.c
+gtk/main.ui
+gtk/about.ui
+gtk/contact.ui
+gtk/log.ui
+gtk/password.ui
+gtk/call_logs.ui
+gtk/main.ui
+gtk/sip_account.ui
+gtk/chatroom.ui
+gtk/incoming_call.ui
+gtk/parameters.ui
+gtk/buddylookup.ui
+gtk/waiting.ui
 coreapi/linphonecore.c
 coreapi/misc.c
 coreapi/presence.c