mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-05-21 Dave Peticolas <dave@krondo.com>
* src/gnome/new-user-callbacks.c: use gncp_new_user_finish * src/gnome/new-user-funs.c: finish new user choices dialog. (gncp_new_user_finish): new func * src/scm/main.scm: use new 'new user' call * src/guile/gnc.gwp: change new user api * src/guile/gnucash.h: change new user api git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4255 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
2174d5c043
commit
dcd198c528
11
ChangeLog
11
ChangeLog
@ -1,5 +1,16 @@
|
|||||||
2001-05-21 Dave Peticolas <dave@krondo.com>
|
2001-05-21 Dave Peticolas <dave@krondo.com>
|
||||||
|
|
||||||
|
* src/gnome/new-user-callbacks.c: use gncp_new_user_finish
|
||||||
|
|
||||||
|
* src/gnome/new-user-funs.c: finish new user choices dialog.
|
||||||
|
(gncp_new_user_finish): new func
|
||||||
|
|
||||||
|
* src/scm/main.scm: use new 'new user' call
|
||||||
|
|
||||||
|
* src/guile/gnc.gwp: change new user api
|
||||||
|
|
||||||
|
* src/guile/gnucash.h: change new user api
|
||||||
|
|
||||||
* doc/sgml/C/xacc-balancesheet.sgml: fix warning
|
* doc/sgml/C/xacc-balancesheet.sgml: fix warning
|
||||||
|
|
||||||
2001-05-20 Dave Peticolas <dave@krondo.com>
|
2001-05-20 Dave Peticolas <dave@krondo.com>
|
||||||
|
@ -110,9 +110,7 @@ on_newUserDruidFinishPage_finish (GnomeDruidPage *gnomedruidpage,
|
|||||||
|
|
||||||
gnc_ui_delete_new_user_window();
|
gnc_ui_delete_new_user_window();
|
||||||
|
|
||||||
gh_eval_str("(gnc:default-ui-start)");
|
gncp_new_user_finish();
|
||||||
gh_eval_str("(gnc:show-main-window)");
|
|
||||||
gh_eval_str("(gnc:hook-run-danglers gnc:*book-opened-hook* #f)");
|
|
||||||
|
|
||||||
set_first_startup(0);
|
set_first_startup(0);
|
||||||
|
|
||||||
@ -150,10 +148,8 @@ on_newAccountCancelDialog_OKButton_clicked
|
|||||||
|
|
||||||
gnc_ui_delete_new_user_window();
|
gnc_ui_delete_new_user_window();
|
||||||
gnc_ui_delete_nu_cancel_dialog();
|
gnc_ui_delete_nu_cancel_dialog();
|
||||||
|
|
||||||
gh_eval_str("(gnc:default-ui-start)");
|
gncp_new_user_finish();
|
||||||
gh_eval_str("(gnc:show-main-window)");
|
|
||||||
gh_eval_str("(gnc:hook-run-danglers gnc:*book-opened-hook* #f)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -650,4 +646,3 @@ on_finalAccountDruidPage_next (GnomeDruidPage *gnomedruidpage,
|
|||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,13 +26,16 @@
|
|||||||
#include <guile/gh.h>
|
#include <guile/gh.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "druid-qif-import.h"
|
||||||
#include "new-user-callbacks.h"
|
#include "new-user-callbacks.h"
|
||||||
#include "new-user-interface.h"
|
#include "new-user-interface.h"
|
||||||
#include "new-user-funs.h"
|
#include "new-user-funs.h"
|
||||||
#include "glade-support.h"
|
#include "glade-support.h"
|
||||||
#include "gnc-amount-edit.h"
|
#include "gnc-amount-edit.h"
|
||||||
#include "gnc-currency-edit.h"
|
#include "gnc-currency-edit.h"
|
||||||
|
#include "gnc-ui.h"
|
||||||
#include "gnc-ui-util.h"
|
#include "gnc-ui-util.h"
|
||||||
|
#include "window-help.h"
|
||||||
|
|
||||||
#include "Group.h"
|
#include "Group.h"
|
||||||
#include "io-example-account.h"
|
#include "io-example-account.h"
|
||||||
@ -350,3 +353,58 @@ gnc_ui_delete_nu_cancel_dialog(void)
|
|||||||
return deleteit(&cancelDialog);
|
return deleteit(&cancelDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gnc_ui_show_new_user_choice_window(void)
|
||||||
|
{
|
||||||
|
GtkWidget *dialog;
|
||||||
|
GtkWidget *new_accounts_button;
|
||||||
|
GtkWidget *import_qif_button;
|
||||||
|
GtkWidget *tutorial_button;
|
||||||
|
gint result;
|
||||||
|
|
||||||
|
dialog = create_newUserChoiceWindow ();
|
||||||
|
|
||||||
|
gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE);
|
||||||
|
|
||||||
|
new_accounts_button = lookup_widget (dialog, "new_accounts_button");
|
||||||
|
import_qif_button = lookup_widget (dialog, "import_qif_button");
|
||||||
|
tutorial_button = lookup_widget (dialog, "tutorial_button");
|
||||||
|
|
||||||
|
result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
|
||||||
|
if (result != 0)
|
||||||
|
{
|
||||||
|
gnc_ui_show_nu_cancel_dialog();
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
gncp_new_user_finish ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (new_accounts_button)))
|
||||||
|
{
|
||||||
|
gnc_ui_show_new_user_window ();
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gtk_toggle_button_get_active
|
||||||
|
(GTK_TOGGLE_BUTTON (import_qif_button)))
|
||||||
|
{
|
||||||
|
gnc_ui_qif_import_druid_make ();
|
||||||
|
}
|
||||||
|
else if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (tutorial_button)))
|
||||||
|
{
|
||||||
|
/* FIXME: change to tutorial */
|
||||||
|
helpWindow (NULL, NULL, HH_ABOUT);
|
||||||
|
}
|
||||||
|
|
||||||
|
gncp_new_user_finish ();
|
||||||
|
gtk_widget_destroy (dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gncp_new_user_finish (void)
|
||||||
|
{
|
||||||
|
gh_eval_str("(gnc:default-ui-start)");
|
||||||
|
gh_eval_str("(gnc:show-main-window)");
|
||||||
|
gh_eval_str("(gnc:hook-run-danglers gnc:*book-opened-hook* #f)");
|
||||||
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
int gnc_ui_show_new_user_window(void);
|
int gnc_ui_show_new_user_window(void);
|
||||||
int gnc_ui_delete_new_user_window(void);
|
int gnc_ui_delete_new_user_window(void);
|
||||||
|
|
||||||
int gnc_ui_show_new_user_choice_window(void);
|
void gnc_ui_show_new_user_choice_window(void);
|
||||||
|
|
||||||
int gnc_ui_show_nu_cancel_dialog(void);
|
int gnc_ui_show_nu_cancel_dialog(void);
|
||||||
int gnc_ui_delete_nu_cancel_dialog(void);
|
int gnc_ui_delete_nu_cancel_dialog(void);
|
||||||
@ -52,5 +52,6 @@ void gnc_new_user_unblock_amount_changed (void);
|
|||||||
|
|
||||||
/* private */
|
/* private */
|
||||||
void on_finalAccountBalanceEdit_changed (GNCAmountEdit *gae);
|
void on_finalAccountBalanceEdit_changed (GNCAmountEdit *gae);
|
||||||
|
void gncp_new_user_finish (void);
|
||||||
|
|
||||||
#endif /* NEW_USER_FUNS_H */
|
#endif /* NEW_USER_FUNS_H */
|
||||||
|
@ -551,9 +551,9 @@ create_newUserChoiceWindow (void)
|
|||||||
GtkWidget *frame4;
|
GtkWidget *frame4;
|
||||||
GtkWidget *vbox6;
|
GtkWidget *vbox6;
|
||||||
GSList *new_user_group_group = NULL;
|
GSList *new_user_group_group = NULL;
|
||||||
GtkWidget *radiobutton1;
|
GtkWidget *new_accounts_button;
|
||||||
GtkWidget *radiobutton2;
|
GtkWidget *import_qif_button;
|
||||||
GtkWidget *radiobutton3;
|
GtkWidget *tutorial_button;
|
||||||
GtkWidget *dialog_action_area2;
|
GtkWidget *dialog_action_area2;
|
||||||
GtkWidget *button1;
|
GtkWidget *button1;
|
||||||
GtkWidget *button3;
|
GtkWidget *button3;
|
||||||
@ -585,32 +585,32 @@ create_newUserChoiceWindow (void)
|
|||||||
gtk_container_add (GTK_CONTAINER (frame4), vbox6);
|
gtk_container_add (GTK_CONTAINER (frame4), vbox6);
|
||||||
gtk_container_set_border_width (GTK_CONTAINER (vbox6), 3);
|
gtk_container_set_border_width (GTK_CONTAINER (vbox6), 3);
|
||||||
|
|
||||||
radiobutton1 = gtk_radio_button_new_with_label (new_user_group_group, _("Create a new set of accounts"));
|
new_accounts_button = gtk_radio_button_new_with_label (new_user_group_group, _("Create a new set of accounts"));
|
||||||
new_user_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton1));
|
new_user_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (new_accounts_button));
|
||||||
gtk_widget_set_name (radiobutton1, "radiobutton1");
|
gtk_widget_set_name (new_accounts_button, "new_accounts_button");
|
||||||
gtk_widget_ref (radiobutton1);
|
gtk_widget_ref (new_accounts_button);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (newUserChoiceWindow), "radiobutton1", radiobutton1,
|
gtk_object_set_data_full (GTK_OBJECT (newUserChoiceWindow), "new_accounts_button", new_accounts_button,
|
||||||
(GtkDestroyNotify) gtk_widget_unref);
|
(GtkDestroyNotify) gtk_widget_unref);
|
||||||
gtk_widget_show (radiobutton1);
|
gtk_widget_show (new_accounts_button);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox6), radiobutton1, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox6), new_accounts_button, FALSE, FALSE, 0);
|
||||||
|
|
||||||
radiobutton2 = gtk_radio_button_new_with_label (new_user_group_group, _("Import my QIF files"));
|
import_qif_button = gtk_radio_button_new_with_label (new_user_group_group, _("Import my QIF files"));
|
||||||
new_user_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton2));
|
new_user_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (import_qif_button));
|
||||||
gtk_widget_set_name (radiobutton2, "radiobutton2");
|
gtk_widget_set_name (import_qif_button, "import_qif_button");
|
||||||
gtk_widget_ref (radiobutton2);
|
gtk_widget_ref (import_qif_button);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (newUserChoiceWindow), "radiobutton2", radiobutton2,
|
gtk_object_set_data_full (GTK_OBJECT (newUserChoiceWindow), "import_qif_button", import_qif_button,
|
||||||
(GtkDestroyNotify) gtk_widget_unref);
|
(GtkDestroyNotify) gtk_widget_unref);
|
||||||
gtk_widget_show (radiobutton2);
|
gtk_widget_show (import_qif_button);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox6), radiobutton2, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox6), import_qif_button, FALSE, FALSE, 0);
|
||||||
|
|
||||||
radiobutton3 = gtk_radio_button_new_with_label (new_user_group_group, _("Open the new user tutorial"));
|
tutorial_button = gtk_radio_button_new_with_label (new_user_group_group, _("Open the new user tutorial"));
|
||||||
new_user_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton3));
|
new_user_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (tutorial_button));
|
||||||
gtk_widget_set_name (radiobutton3, "radiobutton3");
|
gtk_widget_set_name (tutorial_button, "tutorial_button");
|
||||||
gtk_widget_ref (radiobutton3);
|
gtk_widget_ref (tutorial_button);
|
||||||
gtk_object_set_data_full (GTK_OBJECT (newUserChoiceWindow), "radiobutton3", radiobutton3,
|
gtk_object_set_data_full (GTK_OBJECT (newUserChoiceWindow), "tutorial_button", tutorial_button,
|
||||||
(GtkDestroyNotify) gtk_widget_unref);
|
(GtkDestroyNotify) gtk_widget_unref);
|
||||||
gtk_widget_show (radiobutton3);
|
gtk_widget_show (tutorial_button);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox6), radiobutton3, FALSE, FALSE, 0);
|
gtk_box_pack_start (GTK_BOX (vbox6), tutorial_button, FALSE, FALSE, 0);
|
||||||
|
|
||||||
dialog_action_area2 = GNOME_DIALOG (newUserChoiceWindow)->action_area;
|
dialog_action_area2 = GNOME_DIALOG (newUserChoiceWindow)->action_area;
|
||||||
gtk_widget_set_name (dialog_action_area2, "dialog_action_area2");
|
gtk_widget_set_name (dialog_action_area2, "dialog_action_area2");
|
||||||
|
@ -743,7 +743,7 @@ will appear If you choose New File in the File menu unless you have set the
|
|||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkRadioButton</class>
|
<class>GtkRadioButton</class>
|
||||||
<name>radiobutton1</name>
|
<name>new_accounts_button</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<label>Create a new set of accounts</label>
|
<label>Create a new set of accounts</label>
|
||||||
<active>False</active>
|
<active>False</active>
|
||||||
@ -758,7 +758,7 @@ will appear If you choose New File in the File menu unless you have set the
|
|||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkRadioButton</class>
|
<class>GtkRadioButton</class>
|
||||||
<name>radiobutton2</name>
|
<name>import_qif_button</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<label>Import my QIF files</label>
|
<label>Import my QIF files</label>
|
||||||
<active>False</active>
|
<active>False</active>
|
||||||
@ -773,7 +773,7 @@ will appear If you choose New File in the File menu unless you have set the
|
|||||||
|
|
||||||
<widget>
|
<widget>
|
||||||
<class>GtkRadioButton</class>
|
<class>GtkRadioButton</class>
|
||||||
<name>radiobutton3</name>
|
<name>tutorial_button</name>
|
||||||
<can_focus>True</can_focus>
|
<can_focus>True</can_focus>
|
||||||
<label>Open the new user tutorial</label>
|
<label>Open the new user tutorial</label>
|
||||||
<active>False</active>
|
<active>False</active>
|
||||||
|
@ -163,7 +163,7 @@
|
|||||||
(gnc:lookup-global-option "__new_user" "first_startup")))
|
(gnc:lookup-global-option "__new_user" "first_startup")))
|
||||||
1))
|
1))
|
||||||
(begin
|
(begin
|
||||||
(gnc:show-new-user-window)
|
(gnc:show-new-user-choice-window)
|
||||||
(gnc:start-ui-event-loop))
|
(gnc:start-ui-event-loop))
|
||||||
(begin
|
(begin
|
||||||
(gnc:load-account-file)
|
(gnc:load-account-file)
|
||||||
|
Loading…
Reference in New Issue
Block a user