Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2001-06-16 Dave Peticolas <dave@krondo.com>
* src/guile/gnc.gwp: update for api change * src/scm/main.scm: update for api change * src/gnome/glade/newuser.glade: new file for new user glade xml * src/gnome/glade-support.[ch]: remove generated files * src/gnome/new-user-*.[ch]: remove old files * src/gnome/dialog-new-user.c: new file for new user dialog code. * src/gnome/druid-hierarchy.c: new file for account hierarchy creation druid code. Rename api calls to reflect the more general use of the druid. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4708 57a11ea4-9604-0410-9ed3-97b8803252fd
- Loading branch information
Showing
25 changed files
with
1,994 additions
and
3,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
/********************************************************************\ | ||
* dialog-new-user.c -- new user dialog for GnuCash * | ||
* Copyright (C) 2001 Dave Peticolas <dave@krondo.com> * | ||
* * | ||
* 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, contact: * | ||
* * | ||
* Free Software Foundation Voice: +1-617-542-5942 * | ||
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * | ||
* Boston, MA 02111-1307, USA gnu@gnu.org * | ||
\********************************************************************/ | ||
|
||
#include "config.h" | ||
|
||
#include <gnome.h> | ||
#include <guile/gh.h> | ||
|
||
#include "dialog-new-user.h" | ||
#include "dialog-utils.h" | ||
#include "druid-hierarchy.h" | ||
#include "druid-qif-import.h" | ||
#include "global-options.h" | ||
#include "gnc-ui.h" | ||
#include "window-help.h" | ||
|
||
|
||
static void gnc_ui_new_user_cancel_dialog (void); | ||
|
||
|
||
void | ||
gnc_set_first_startup (gboolean first_startup) | ||
{ | ||
gnc_set_boolean_option ("__new_user", "first_startup", first_startup); | ||
} | ||
|
||
void | ||
gnc_ui_new_user_dialog (void) | ||
{ | ||
GtkWidget *dialog; | ||
GtkWidget *new_accounts_button; | ||
GtkWidget *import_qif_button; | ||
GtkWidget *tutorial_button; | ||
GladeXML *xml; | ||
gint result; | ||
|
||
xml = gnc_glade_xml_new ("newuser.glade", "New User Dialog"); | ||
|
||
dialog = glade_xml_get_widget (xml, "New User Dialog"); | ||
|
||
gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE); | ||
|
||
new_accounts_button = glade_xml_get_widget (xml, "new_accounts_button"); | ||
import_qif_button = glade_xml_get_widget (xml, "import_qif_button"); | ||
tutorial_button = glade_xml_get_widget (xml, "tutorial_button"); | ||
|
||
result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); | ||
if (result != 0) | ||
{ | ||
gnc_ui_new_user_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_hierarchy_druid (); | ||
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))) | ||
{ | ||
helpWindow (NULL, NULL, HH_QUICKSTART); | ||
} | ||
|
||
gncp_new_user_finish (); | ||
gtk_widget_destroy (dialog); | ||
} | ||
|
||
static void | ||
gnc_ui_new_user_cancel_dialog (void) | ||
{ | ||
GtkWidget *dialog; | ||
GtkWidget *toggle; | ||
GladeXML *xml; | ||
gint result; | ||
|
||
xml = gnc_glade_xml_new ("newuser.glade", "New User Cancel Dialog"); | ||
|
||
dialog = glade_xml_get_widget (xml, "New User Cancel Dialog"); | ||
toggle = glade_xml_get_widget (xml, "run_again_toggle"); | ||
|
||
gnome_dialog_close_hides (GNOME_DIALOG (dialog), TRUE); | ||
|
||
result = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); | ||
if (result == 0) | ||
{ | ||
gboolean keepshowing = TRUE; | ||
|
||
keepshowing = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle)); | ||
|
||
gnc_set_first_startup (keepshowing); | ||
|
||
gncp_new_user_finish (); | ||
} | ||
} | ||
|
||
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)"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/********************************************************************\ | ||
* dialog-new-user.h -- new user dialog for GnuCash * | ||
* Copyright (C) 2001 Dave Peticolas <dave@krondo.com> * | ||
* * | ||
* 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, contact: * | ||
* * | ||
* Free Software Foundation Voice: +1-617-542-5942 * | ||
* 59 Temple Place - Suite 330 Fax: +1-617-542-2652 * | ||
* Boston, MA 02111-1307, USA gnu@gnu.org * | ||
\********************************************************************/ | ||
|
||
#ifndef DIALOG_NEW_USER_H | ||
#define DIALOG_NEW_USER_H | ||
|
||
void gnc_ui_new_user_dialog (void); | ||
void gnc_set_first_startup (gboolean first_startup); | ||
|
||
/* private */ | ||
void gncp_new_user_finish (void); | ||
|
||
#endif |
Oops, something went wrong.