diff --git a/linphone/NEWS b/linphone/NEWS index 4f3e49ea4dd6636e2c735e7d28be81160911f0c6..c3355328b63b27a07faff1ac0e653d92728e8e60 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 0000000000000000000000000000000000000000..46c92cb404c3a6d5074cd67bc33535f893de51bd --- /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; +} +