From dce78b75eea57aaf9487f649f84f532c4a7a4116 Mon Sep 17 00:00:00 2001
From: smorlat <smorlat@3f6dc0c8-ddfe-455d-9043-3cd528dc4637>
Date: Wed, 15 Apr 2009 05:58:06 +0000
Subject: [PATCH] add missing file.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@417 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
---
 linphone/NEWS                    |  2 +-
 linphone/gtk-glade/setupwizard.c | 88 ++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+), 1 deletion(-)
 create mode 100644 linphone/gtk-glade/setupwizard.c

diff --git a/linphone/NEWS b/linphone/NEWS
index 4f3e49ea4d..c3355328b6 100644
--- a/linphone/NEWS
+++ b/linphone/NEWS
@@ -1,4 +1,4 @@
-linphone-3.1.1 -- April 7, 2009
+linphone-3.1.1 -- April 14, 2009
 	* fix crash when opening property box, in some rare case
 	* windows version uses the new libmsdscap plugin (video capture using directshow)
 	* improved translations
diff --git a/linphone/gtk-glade/setupwizard.c b/linphone/gtk-glade/setupwizard.c
new file mode 100644
index 0000000000..46c92cb404
--- /dev/null
+++ b/linphone/gtk-glade/setupwizard.c
@@ -0,0 +1,88 @@
+/*
+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 *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);
+	gtk_widget_show_all(vbox);
+	return vbox;
+}
+
+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;
+}
+
+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);
+	return vbox;
+}
+
+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;
+}
+
+GtkWidget * linphone_gtk_create_setup_wizard(void){
+	GtkWidget *w=gtk_assistant_new();
+	GtkWidget *p1=create_intro();
+	GtkWidget *p2=create_setup_signin_choice();
+	GtkWidget *p3=create_username_chooser();
+	GtkWidget *p4=create_finish_page();
+	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_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_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,_("Account setup assistant - enter your information"));
+	gtk_assistant_append_page(GTK_ASSISTANT(w),p4);
+	gtk_assistant_set_page_type(GTK_ASSISTANT(w),p4,GTK_ASSISTANT_PAGE_SUMMARY);
+	gtk_assistant_set_page_title(GTK_ASSISTANT(w),p4,_("Now ready !"));
+	return w;
+}
+
-- 
GitLab