diff --git a/ChangeLog b/ChangeLog index b06d3fd683..a52e4b2b0f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-06-15 Dave Peticolas + + * src/gnome/dialog-account.c: use libglade + + * src/gnome/dialog-userpass.c: fix bloop + + * src/gnome/druid-commodity.c: use libglade + 2001-06-14 Dave Peticolas * src/gnome/druid-qif-import.c: use libglade diff --git a/po/POTFILES.in b/po/POTFILES.in index 678388e359..3c146c05c6 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -28,6 +28,7 @@ src/gnome/druid-qif-import.c src/gnome/druid-stock-split.c src/gnome/glade-gnc-dialogs.c src/gnome/glade-support.c +src/gnome/glade/account_strings.c src/gnome/glade/commodity_strings.c src/gnome/glade/price_strings.c src/gnome/glade/qif_strings.c diff --git a/src/gnome/dialog-account.c b/src/gnome/dialog-account.c index 77eee3eeb3..6c97cc3d5e 100644 --- a/src/gnome/dialog-account.c +++ b/src/gnome/dialog-account.c @@ -32,7 +32,6 @@ #include "account-tree.h" #include "dialog-account.h" #include "dialog-utils.h" -#include "glade-gnc-dialogs.h" #include "global-options.h" #include "gnc-amount-edit.h" #include "gnc-commodity-edit.h" @@ -1572,8 +1571,11 @@ gnc_account_window_create(AccountWindow *aw) GtkWidget *date; GtkObject *awo; GtkWidget *box; + GladeXML *xml; - aw->dialog = create_Account_Dialog (); + xml = gnc_glade_xml_new ("account.glade", "Account Dialog"); + + aw->dialog = glade_xml_get_widget (xml, "Account Dialog"); awo = GTK_OBJECT (aw->dialog); awd = GNOME_DIALOG (awo); @@ -1592,46 +1594,44 @@ gnc_account_window_create(AccountWindow *aw) gnome_dialog_button_connect (awd, 2, GTK_SIGNAL_FUNC(gnc_account_window_help_cb), aw); - aw->notebook = gtk_object_get_data (awo, "account_notebook"); + aw->notebook = glade_xml_get_widget (xml, "account_notebook"); - aw->name_entry = gtk_object_get_data(awo, "name_entry"); + aw->name_entry = glade_xml_get_widget (xml, "name_entry"); gtk_signal_connect(GTK_OBJECT (aw->name_entry), "changed", GTK_SIGNAL_FUNC(gnc_account_name_changed_cb), aw); - aw->description_entry = gtk_object_get_data(awo, "description_entry"); - aw->code_entry = gtk_object_get_data(awo, "code_entry"); - aw->notes_text = gtk_object_get_data(awo, "notes_text"); - - gtk_object_set_data(awo, "account_window_struct", aw); + aw->description_entry = glade_xml_get_widget (xml, "description_entry"); + aw->code_entry = glade_xml_get_widget (xml, "code_entry"); + aw->notes_text = glade_xml_get_widget (xml, "notes_text"); gnome_dialog_editable_enters(awd, GTK_EDITABLE(aw->name_entry)); gnome_dialog_editable_enters(awd, GTK_EDITABLE(aw->description_entry)); gnome_dialog_editable_enters(awd, GTK_EDITABLE(aw->code_entry)); - box = gtk_object_get_data(awo, "currency_hbox"); + box = glade_xml_get_widget (xml, "currency_hbox"); aw->currency_edit = gnc_commodity_edit_new (); gtk_box_pack_start(GTK_BOX(box), aw->currency_edit, TRUE, TRUE, 0); gtk_signal_connect (GTK_OBJECT (aw->currency_edit), "changed", GTK_SIGNAL_FUNC (currency_changed_cb), aw); - box = gtk_object_get_data(awo, "security_hbox"); + box = glade_xml_get_widget (xml, "security_hbox"); aw->security_edit = gnc_commodity_edit_new (); gtk_box_pack_start(GTK_BOX(box), aw->security_edit, TRUE, TRUE, 0); - aw->get_quote_check = gtk_object_get_data (awo, "get_quote_check"); + aw->get_quote_check = glade_xml_get_widget (xml, "get_quote_check"); gtk_signal_connect (GTK_OBJECT (aw->get_quote_check), "toggled", GTK_SIGNAL_FUNC (get_quote_check_cb), aw); - box = gtk_object_get_data(awo, "source_box"); + box = glade_xml_get_widget (xml, "source_box"); aw->source_menu = gnc_ui_source_menu_create(aw_get_account (aw)); gtk_box_pack_start(GTK_BOX(box), aw->source_menu, TRUE, TRUE, 0); - box = gtk_object_get_data(awo, "quote_tz_box"); + box = glade_xml_get_widget (xml, "quote_tz_box"); aw->quote_tz_menu = gnc_ui_quote_tz_menu_create(aw_get_account (aw)); gtk_box_pack_start(GTK_BOX(box), aw->quote_tz_menu, TRUE, TRUE, 0); - box = gtk_object_get_data(awo, "parent_scroll"); + box = glade_xml_get_widget (xml, "parent_scroll"); aw->top_level_account = xaccMallocAccount(); xaccAccountSetName(aw->top_level_account, _("New top level account")); @@ -1657,15 +1657,15 @@ gnc_account_window_create(AccountWindow *aw) gtk_signal_connect(GTK_OBJECT (aw->parent_tree), "unselect_account", GTK_SIGNAL_FUNC(gnc_parent_tree_select), aw); - aw->tax_related_button = gtk_object_get_data (awo, "tax_related_button"); + aw->tax_related_button = glade_xml_get_widget (xml, "tax_related_button"); - box = gtk_object_get_data(awo, "opening_balance_box"); + box = glade_xml_get_widget (xml, "opening_balance_box"); amount = gnc_amount_edit_new (); aw->opening_balance_edit = amount; gtk_box_pack_start(GTK_BOX(box), amount, TRUE, TRUE, 0); gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE); - box = gtk_object_get_data (awo, "opening_balance_date_box"); + box = glade_xml_get_widget (xml, "opening_balance_date_box"); date = gnc_date_edit_new(time(NULL), FALSE, FALSE); aw->opening_balance_date_edit = date; gtk_box_pack_start(GTK_BOX(box), date, TRUE, TRUE, 0); @@ -1673,14 +1673,15 @@ gnc_account_window_create(AccountWindow *aw) aw->opening_balance_page = gtk_notebook_get_nth_page (GTK_NOTEBOOK (aw->notebook), 1); - aw->opening_equity_radio = gtk_object_get_data (awo, "opening_equity_radio"); + aw->opening_equity_radio = glade_xml_get_widget (xml, + "opening_equity_radio"); gtk_signal_connect (GTK_OBJECT (aw->opening_equity_radio), "toggled", GTK_SIGNAL_FUNC (opening_equity_cb), aw); aw->transfer_account_frame = - gtk_object_get_data (awo, "transfer_account_frame"); + glade_xml_get_widget (xml, "transfer_account_frame"); - box = gtk_object_get_data(awo, "transfer_account_scroll"); + box = glade_xml_get_widget (xml, "transfer_account_scroll"); aw->transfer_tree = gnc_account_tree_new (); gtk_clist_column_titles_hide (GTK_CLIST (aw->transfer_tree)); @@ -1692,7 +1693,7 @@ gnc_account_window_create(AccountWindow *aw) gtk_container_add(GTK_CONTAINER(box), GTK_WIDGET(aw->transfer_tree)); /* This goes at the end so the select callback has good data. */ - aw->type_list = gtk_object_get_data(awo, "type_list"); + aw->type_list = glade_xml_get_widget (xml, "type_list"); gnc_account_type_list_create (aw); if (last_width == 0) diff --git a/src/gnome/dialog-userpass.c b/src/gnome/dialog-userpass.c index af6866cf79..c43471d309 100644 --- a/src/gnome/dialog-userpass.c +++ b/src/gnome/dialog-userpass.c @@ -49,7 +49,7 @@ gnc_get_username_password (GtkWidget *parent, xml = gnc_glade_xml_new ("userpass.glade", "Username Password Dialog"); - dialog = dialog = glade_xml_get_widget (xml, "Username Password Dialog"); + dialog = glade_xml_get_widget (xml, "Username Password Dialog"); if (parent) gnome_dialog_set_parent (GNOME_DIALOG (dialog), GTK_WINDOW (parent)); diff --git a/src/gnome/druid-commodity.c b/src/gnome/druid-commodity.c index 4a17772d6c..14b9f680e0 100644 --- a/src/gnome/druid-commodity.c +++ b/src/gnome/druid-commodity.c @@ -32,12 +32,11 @@ #include #include "FileDialog.h" +#include "dialog-utils.h" #include "druid-commodity.h" #include "druid-utils.h" #include "dialog-commodity.h" #include "query-user.h" -#include "glade-gnc-dialogs.h" -#include "glade-cb-gnc-dialogs.h" #include "gnc-commodity.h" #include "gnc-engine.h" #include "gnc-ui.h" @@ -60,7 +59,6 @@ struct _commoditydruid { GList * pages; int is_modal; - }; struct _commoditydruidpage { @@ -82,6 +80,14 @@ static int gnc_ui_commodity_druid_comm_check_cb(GnomeDruidPage * page, gpointer druid, gpointer user_data); +static gboolean gnc_ui_commodity_druid_cancel_cb(GnomeDruidPage * page, + gpointer druid, + gpointer user_data); + +static void gnc_ui_commodity_druid_finish_cb(GnomeDruidPage * page, + gpointer druid, + gpointer user_data); + void gnc_import_legacy_commodities(const char * filename) { @@ -124,22 +130,32 @@ gnc_ui_commodity_druid_create(const char * filename) { gnc_commodity * found; CommodityDruidPage * new_page; GnomeDruidPage * back_page; + GladeXML * xml; - /* call the glade creator */ - d->window = create_New_Commodity_Format_Druid(); + xml = gnc_glade_xml_new ("commodity.glade", "New Commodity Format Druid"); + + d->window = glade_xml_get_widget (xml, "New Commodity Format Druid"); dobj = GTK_OBJECT(d->window); gtk_signal_connect (dobj, "delete_event", GTK_SIGNAL_FUNC (window_delete_cb), d); - d->druid = gtk_object_get_data(dobj, "commodity_druid"); - d->intro_page = gtk_object_get_data(dobj, "start_page"); - d->finish_page = gtk_object_get_data(dobj, "finish_page"); + d->druid = glade_xml_get_widget (xml, "commodity_druid"); + d->intro_page = glade_xml_get_widget (xml, "start_page"); + d->finish_page = glade_xml_get_widget (xml, "finish_page"); back_page = GNOME_DRUID_PAGE(d->intro_page); d->is_modal = FALSE; - gtk_object_set_data(dobj, "commodity_druid_struct", (gpointer)d); + gtk_object_set_data(dobj, "commodity_druid_struct", d); + + glade_xml_signal_connect_data + (xml, "gnc_ui_commodity_druid_cancel_cb", + GTK_SIGNAL_FUNC (gnc_ui_commodity_druid_cancel_cb), d); + + glade_xml_signal_connect_data + (xml, "gnc_ui_commodity_druid_finish_cb", + GTK_SIGNAL_FUNC (gnc_ui_commodity_druid_finish_cb), d); d->new_map = g_hash_table_new(g_str_hash, g_str_equal); d->old_map = g_hash_table_new(g_str_hash, g_str_equal); @@ -350,12 +366,10 @@ gnc_ui_commodity_druid_destroy(CommodityDruid * cd) { * callbacks ********************************************************************/ -gboolean +static gboolean gnc_ui_commodity_druid_cancel_cb(GnomeDruidPage * page, gpointer druid, gpointer user_data) { - CommodityDruid * cd = - (CommodityDruid *)gtk_object_get_data(GTK_OBJECT(user_data), - "commodity_druid_struct"); + CommodityDruid * cd = user_data; /* unload the current file (can't have out-of-date commodities) */ gncFileQuit(); @@ -463,12 +477,10 @@ finish_helper(gpointer key, gpointer value, gpointer data) { } -void +static void gnc_ui_commodity_druid_finish_cb(GnomeDruidPage * page, gpointer druid, gpointer user_data) { - CommodityDruid * cd = - (CommodityDruid *)gtk_object_get_data(GTK_OBJECT(user_data), - "commodity_druid_struct"); + CommodityDruid * cd = user_data; /* add the new commodities to the engine's namespace map and * replace the account commodity pointers */ @@ -477,4 +489,3 @@ gnc_ui_commodity_druid_finish_cb(GnomeDruidPage * page, gpointer druid, /* destroy the dialog */ gnc_ui_commodity_druid_destroy(cd); } - diff --git a/src/gnome/glade-gnc-dialogs.c b/src/gnome/glade-gnc-dialogs.c index f5395b74df..f50b1e1167 100644 --- a/src/gnome/glade-gnc-dialogs.c +++ b/src/gnome/glade-gnc-dialogs.c @@ -3375,600 +3375,3 @@ create_Commodity_Dialog (void) return Commodity_Dialog; } -GtkWidget* -create_Account_Dialog (void) -{ - GtkWidget *Account_Dialog; - GtkWidget *dialog_vbox12; - GtkWidget *account_notebook; - GtkWidget *vbox75; - GtkWidget *frame28; - GtkWidget *hbox62; - GtkWidget *vbox76; - GtkWidget *label807; - GtkWidget *label808; - GtkWidget *label809; - GtkWidget *label810; - GtkWidget *label811; - GtkWidget *vbox77; - GtkWidget *name_entry; - GtkWidget *description_entry; - GtkWidget *currency_hbox; - GtkWidget *security_hbox; - GtkWidget *code_entry; - GtkWidget *hbox65; - GtkWidget *frame29; - GtkWidget *scrolledwindow7; - GtkWidget *type_list; - GtkWidget *label812; - GtkWidget *frame30; - GtkWidget *parent_scroll; - GtkWidget *price_quote_frame; - GtkWidget *vbox129; - GtkWidget *get_quote_check; - GtkWidget *hbox103; - GtkWidget *vbox116; - GtkWidget *label813; - GtkWidget *label847713; - GtkWidget *vbox117; - GtkWidget *source_box; - GtkWidget *quote_tz_box; - GtkWidget *frame32; - GtkWidget *scrolledwindow9; - GtkWidget *notes_text; - GtkWidget *tax_related_button; - GtkWidget *label8477388; - GtkWidget *vbox118; - GtkWidget *opening_balance_frame; - GtkWidget *hbox101; - GtkWidget *vbox114; - GtkWidget *label847737; - GtkWidget *label847738; - GtkWidget *vbox115; - GtkWidget *opening_balance_box; - GtkWidget *opening_balance_date_box; - GtkWidget *frame49; - GtkWidget *vbox120; - GSList *vbox120_group = NULL; - GtkWidget *opening_equity_radio; - GtkWidget *radiobutton8; - GtkWidget *transfer_account_frame; - GtkWidget *transfer_account_scroll; - GtkWidget *label847739; - GtkWidget *dialog_action_area12; - GtkWidget *button63; - GtkWidget *cancel_button; - GtkWidget *button72; - - Account_Dialog = gnome_dialog_new (_("New Account"), NULL); - gtk_object_set_data (GTK_OBJECT (Account_Dialog), "Account_Dialog", Account_Dialog); - gtk_window_set_policy (GTK_WINDOW (Account_Dialog), TRUE, TRUE, FALSE); - - dialog_vbox12 = GNOME_DIALOG (Account_Dialog)->vbox; - gtk_object_set_data (GTK_OBJECT (Account_Dialog), "dialog_vbox12", dialog_vbox12); - gtk_widget_show (dialog_vbox12); - - account_notebook = gtk_notebook_new (); - gtk_widget_ref (account_notebook); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "account_notebook", account_notebook, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (account_notebook); - gtk_box_pack_start (GTK_BOX (dialog_vbox12), account_notebook, TRUE, TRUE, 0); - - vbox75 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox75); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox75", vbox75, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox75); - gtk_container_add (GTK_CONTAINER (account_notebook), vbox75); - - frame28 = gtk_frame_new (_("Account Information")); - gtk_widget_ref (frame28); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "frame28", frame28, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame28); - gtk_box_pack_start (GTK_BOX (vbox75), frame28, FALSE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame28), 3); - - hbox62 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox62); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "hbox62", hbox62, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox62); - gtk_container_add (GTK_CONTAINER (frame28), hbox62); - - vbox76 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox76); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox76", vbox76, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox76); - gtk_box_pack_start (GTK_BOX (hbox62), vbox76, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (vbox76), 3); - - label807 = gtk_label_new (_("Account Name:")); - gtk_widget_ref (label807); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label807", label807, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label807); - gtk_box_pack_start (GTK_BOX (vbox76), label807, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label807), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label807), 1, 0.5); - - label808 = gtk_label_new (_("Description:")); - gtk_widget_ref (label808); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label808", label808, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label808); - gtk_box_pack_start (GTK_BOX (vbox76), label808, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label808), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label808), 1, 0.5); - - label809 = gtk_label_new (_("Currency:")); - gtk_widget_ref (label809); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label809", label809, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label809); - gtk_box_pack_start (GTK_BOX (vbox76), label809, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label809), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label809), 1, 0.5); - - label810 = gtk_label_new (_("Security:")); - gtk_widget_ref (label810); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label810", label810, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label810); - gtk_box_pack_start (GTK_BOX (vbox76), label810, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label810), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label810), 1, 0.5); - - label811 = gtk_label_new (_("Account Code:")); - gtk_widget_ref (label811); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label811", label811, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label811); - gtk_box_pack_start (GTK_BOX (vbox76), label811, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label811), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label811), 1, 0.5); - - vbox77 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox77); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox77", vbox77, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox77); - gtk_box_pack_start (GTK_BOX (hbox62), vbox77, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (vbox77), 3); - - name_entry = gtk_entry_new (); - gtk_widget_ref (name_entry); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "name_entry", name_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (name_entry); - gtk_box_pack_start (GTK_BOX (vbox77), name_entry, FALSE, FALSE, 0); - - description_entry = gtk_entry_new (); - gtk_widget_ref (description_entry); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "description_entry", description_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (description_entry); - gtk_box_pack_start (GTK_BOX (vbox77), description_entry, FALSE, FALSE, 0); - - currency_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (currency_hbox); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "currency_hbox", currency_hbox, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (currency_hbox); - gtk_box_pack_start (GTK_BOX (vbox77), currency_hbox, TRUE, TRUE, 0); - - security_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (security_hbox); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "security_hbox", security_hbox, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (security_hbox); - gtk_box_pack_start (GTK_BOX (vbox77), security_hbox, TRUE, TRUE, 0); - - code_entry = gtk_entry_new (); - gtk_widget_ref (code_entry); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "code_entry", code_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (code_entry); - gtk_box_pack_start (GTK_BOX (vbox77), code_entry, FALSE, FALSE, 0); - - hbox65 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox65); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "hbox65", hbox65, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox65); - gtk_box_pack_start (GTK_BOX (vbox75), hbox65, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (hbox65), 3); - - frame29 = gtk_frame_new (_("Account Type")); - gtk_widget_ref (frame29); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "frame29", frame29, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame29); - gtk_box_pack_start (GTK_BOX (hbox65), frame29, FALSE, FALSE, 0); - - scrolledwindow7 = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (scrolledwindow7); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "scrolledwindow7", scrolledwindow7, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (scrolledwindow7); - gtk_container_add (GTK_CONTAINER (frame29), scrolledwindow7); - gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow7), 3); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow7), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); - - type_list = gtk_clist_new (1); - gtk_widget_ref (type_list); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "type_list", type_list, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (type_list); - gtk_container_add (GTK_CONTAINER (scrolledwindow7), type_list); - gtk_clist_set_column_width (GTK_CLIST (type_list), 0, 80); - gtk_clist_column_titles_hide (GTK_CLIST (type_list)); - - label812 = gtk_label_new (_("label812")); - gtk_widget_ref (label812); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label812", label812, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label812); - gtk_clist_set_column_widget (GTK_CLIST (type_list), 0, label812); - - frame30 = gtk_frame_new (_("Parent Account")); - gtk_widget_ref (frame30); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "frame30", frame30, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame30); - gtk_box_pack_start (GTK_BOX (hbox65), frame30, TRUE, TRUE, 0); - - parent_scroll = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (parent_scroll); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "parent_scroll", parent_scroll, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (parent_scroll); - gtk_container_add (GTK_CONTAINER (frame30), parent_scroll); - gtk_container_set_border_width (GTK_CONTAINER (parent_scroll), 3); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (parent_scroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); - - price_quote_frame = gtk_frame_new (_("Price Quote Source")); - gtk_widget_ref (price_quote_frame); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "price_quote_frame", price_quote_frame, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (price_quote_frame); - gtk_box_pack_start (GTK_BOX (vbox75), price_quote_frame, FALSE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (price_quote_frame), 3); - - vbox129 = gtk_vbox_new (FALSE, 3); - gtk_widget_ref (vbox129); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox129", vbox129, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox129); - gtk_container_add (GTK_CONTAINER (price_quote_frame), vbox129); - gtk_container_set_border_width (GTK_CONTAINER (vbox129), 3); - - get_quote_check = gtk_check_button_new_with_label (_("Get Online Quotes")); - gtk_widget_ref (get_quote_check); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "get_quote_check", get_quote_check, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (get_quote_check); - gtk_box_pack_start (GTK_BOX (vbox129), get_quote_check, FALSE, FALSE, 0); - - hbox103 = gtk_hbox_new (FALSE, 2); - gtk_widget_ref (hbox103); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "hbox103", hbox103, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox103); - gtk_box_pack_start (GTK_BOX (vbox129), hbox103, TRUE, TRUE, 0); - - vbox116 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox116); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox116", vbox116, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox116); - gtk_box_pack_start (GTK_BOX (hbox103), vbox116, FALSE, FALSE, 0); - - label813 = gtk_label_new (_("The source for price quotes:")); - gtk_widget_ref (label813); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label813", label813, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label813); - gtk_box_pack_start (GTK_BOX (vbox116), label813, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label813), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label813), 1, 0.5); - - label847713 = gtk_label_new (_("Timezone for these quotes:")); - gtk_widget_ref (label847713); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847713", label847713, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label847713); - gtk_box_pack_start (GTK_BOX (vbox116), label847713, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label847713), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label847713), 1, 0.5); - - vbox117 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox117); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox117", vbox117, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox117); - gtk_box_pack_start (GTK_BOX (hbox103), vbox117, TRUE, TRUE, 0); - - source_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (source_box); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "source_box", source_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (source_box); - gtk_box_pack_start (GTK_BOX (vbox117), source_box, TRUE, TRUE, 0); - - quote_tz_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (quote_tz_box); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "quote_tz_box", quote_tz_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (quote_tz_box); - gtk_box_pack_start (GTK_BOX (vbox117), quote_tz_box, TRUE, TRUE, 0); - - frame32 = gtk_frame_new (_("Notes")); - gtk_widget_ref (frame32); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "frame32", frame32, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame32); - gtk_box_pack_start (GTK_BOX (vbox75), frame32, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame32), 3); - - scrolledwindow9 = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (scrolledwindow9); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "scrolledwindow9", scrolledwindow9, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (scrolledwindow9); - gtk_container_add (GTK_CONTAINER (frame32), scrolledwindow9); - gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow9), 3); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow9), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); - - notes_text = gtk_text_new (NULL, NULL); - gtk_widget_ref (notes_text); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "notes_text", notes_text, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (notes_text); - gtk_container_add (GTK_CONTAINER (scrolledwindow9), notes_text); - gtk_text_set_editable (GTK_TEXT (notes_text), TRUE); - - tax_related_button = gtk_check_button_new_with_label (_("Tax Related")); - gtk_widget_ref (tax_related_button); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "tax_related_button", tax_related_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (tax_related_button); - gtk_box_pack_start (GTK_BOX (vbox75), tax_related_button, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (tax_related_button), 3); - - label8477388 = gtk_label_new (_("General Information")); - gtk_widget_ref (label8477388); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label8477388", label8477388, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477388); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (account_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (account_notebook), 0), label8477388); - - vbox118 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox118); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox118", vbox118, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox118); - gtk_container_add (GTK_CONTAINER (account_notebook), vbox118); - - opening_balance_frame = gtk_frame_new (_("Balance Information")); - gtk_widget_ref (opening_balance_frame); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_frame", opening_balance_frame, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (opening_balance_frame); - gtk_box_pack_start (GTK_BOX (vbox118), opening_balance_frame, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (opening_balance_frame), 3); - - hbox101 = gtk_hbox_new (FALSE, 2); - gtk_widget_ref (hbox101); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "hbox101", hbox101, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox101); - gtk_container_add (GTK_CONTAINER (opening_balance_frame), hbox101); - gtk_container_set_border_width (GTK_CONTAINER (hbox101), 3); - - vbox114 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox114); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox114", vbox114, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox114); - gtk_box_pack_start (GTK_BOX (hbox101), vbox114, FALSE, FALSE, 0); - - label847737 = gtk_label_new (_("Balance:")); - gtk_widget_ref (label847737); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847737", label847737, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label847737); - gtk_box_pack_start (GTK_BOX (vbox114), label847737, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label847737), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label847737), 1, 0.5); - - label847738 = gtk_label_new (_("Date:")); - gtk_widget_ref (label847738); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847738", label847738, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label847738); - gtk_box_pack_start (GTK_BOX (vbox114), label847738, FALSE, FALSE, 0); - gtk_label_set_justify (GTK_LABEL (label847738), GTK_JUSTIFY_RIGHT); - gtk_misc_set_alignment (GTK_MISC (label847738), 1, 0.5); - - vbox115 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox115); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox115", vbox115, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox115); - gtk_box_pack_start (GTK_BOX (hbox101), vbox115, TRUE, TRUE, 0); - - opening_balance_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (opening_balance_box); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_box", opening_balance_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (opening_balance_box); - gtk_box_pack_start (GTK_BOX (vbox115), opening_balance_box, TRUE, TRUE, 0); - - opening_balance_date_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (opening_balance_date_box); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_balance_date_box", opening_balance_date_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (opening_balance_date_box); - gtk_box_pack_start (GTK_BOX (vbox115), opening_balance_date_box, TRUE, TRUE, 0); - - frame49 = gtk_frame_new (_("Transfer Type")); - gtk_widget_ref (frame49); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "frame49", frame49, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame49); - gtk_box_pack_start (GTK_BOX (vbox118), frame49, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame49), 3); - - vbox120 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox120); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "vbox120", vbox120, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox120); - gtk_container_add (GTK_CONTAINER (frame49), vbox120); - gtk_container_set_border_width (GTK_CONTAINER (vbox120), 3); - - opening_equity_radio = gtk_radio_button_new_with_label (vbox120_group, _("Use Opening Balances Equity account")); - vbox120_group = gtk_radio_button_group (GTK_RADIO_BUTTON (opening_equity_radio)); - gtk_widget_ref (opening_equity_radio); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "opening_equity_radio", opening_equity_radio, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (opening_equity_radio); - gtk_box_pack_start (GTK_BOX (vbox120), opening_equity_radio, FALSE, FALSE, 0); - - radiobutton8 = gtk_radio_button_new_with_label (vbox120_group, _("Select Transfer Account")); - vbox120_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton8)); - gtk_widget_ref (radiobutton8); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "radiobutton8", radiobutton8, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (radiobutton8); - gtk_box_pack_start (GTK_BOX (vbox120), radiobutton8, FALSE, FALSE, 0); - - transfer_account_frame = gtk_frame_new (_("Transfer Account")); - gtk_widget_ref (transfer_account_frame); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "transfer_account_frame", transfer_account_frame, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (transfer_account_frame); - gtk_box_pack_start (GTK_BOX (vbox118), transfer_account_frame, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (transfer_account_frame), 3); - gtk_widget_set_sensitive (transfer_account_frame, FALSE); - - transfer_account_scroll = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (transfer_account_scroll); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "transfer_account_scroll", transfer_account_scroll, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (transfer_account_scroll); - gtk_container_add (GTK_CONTAINER (transfer_account_frame), transfer_account_scroll); - gtk_container_set_border_width (GTK_CONTAINER (transfer_account_scroll), 3); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (transfer_account_scroll), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); - - label847739 = gtk_label_new (_("Opening Balance")); - gtk_widget_ref (label847739); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "label847739", label847739, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label847739); - gtk_notebook_set_tab_label (GTK_NOTEBOOK (account_notebook), gtk_notebook_get_nth_page (GTK_NOTEBOOK (account_notebook), 1), label847739); - - dialog_action_area12 = GNOME_DIALOG (Account_Dialog)->action_area; - gtk_object_set_data (GTK_OBJECT (Account_Dialog), "dialog_action_area12", dialog_action_area12); - gtk_widget_show (dialog_action_area12); - gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area12), GTK_BUTTONBOX_END); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area12), 8); - - gnome_dialog_append_button (GNOME_DIALOG (Account_Dialog), GNOME_STOCK_BUTTON_OK); - button63 = g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data; - gtk_widget_ref (button63); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "button63", button63, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button63); - GTK_WIDGET_SET_FLAGS (button63, GTK_CAN_DEFAULT); - - gnome_dialog_append_button (GNOME_DIALOG (Account_Dialog), GNOME_STOCK_BUTTON_CANCEL); - cancel_button = g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data; - gtk_widget_ref (cancel_button); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "cancel_button", cancel_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (cancel_button); - GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT); - - gnome_dialog_append_button (GNOME_DIALOG (Account_Dialog), GNOME_STOCK_BUTTON_HELP); - button72 = g_list_last (GNOME_DIALOG (Account_Dialog)->buttons)->data; - gtk_widget_ref (button72); - gtk_object_set_data_full (GTK_OBJECT (Account_Dialog), "button72", button72, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button72); - GTK_WIDGET_SET_FLAGS (button72, GTK_CAN_DEFAULT); - - return Account_Dialog; -} - -GtkWidget* -create_New_Commodity_Format_Druid (void) -{ - GtkWidget *New_Commodity_Format_Druid; - GtkWidget *commodity_druid; - GtkWidget *start_page; - GdkColor start_page_bg_color = { 0, 39321, 49087, 39321 }; - GdkColor start_page_textbox_color = { 0, 65535, 65535, 65535 }; - GdkColor start_page_logo_bg_color = { 0, 65535, 65535, 65535 }; - GdkColor start_page_title_color = { 0, 65535, 65535, 65535 }; - GtkWidget *finish_page; - GdkColor finish_page_bg_color = { 0, 39835, 49087, 40092 }; - GdkColor finish_page_textbox_color = { 0, 65535, 65535, 65535 }; - GdkColor finish_page_logo_bg_color = { 0, 65535, 65535, 65535 }; - GdkColor finish_page_title_color = { 0, 65535, 65535, 65535 }; - - New_Commodity_Format_Druid = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_object_set_data (GTK_OBJECT (New_Commodity_Format_Druid), "New_Commodity_Format_Druid", New_Commodity_Format_Druid); - gtk_window_set_title (GTK_WINDOW (New_Commodity_Format_Druid), _("Import currency and stock information")); - gtk_window_set_policy (GTK_WINDOW (New_Commodity_Format_Druid), FALSE, TRUE, TRUE); - - commodity_druid = gnome_druid_new (); - gtk_widget_ref (commodity_druid); - gtk_object_set_data_full (GTK_OBJECT (New_Commodity_Format_Druid), "commodity_druid", commodity_druid, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (commodity_druid); - gtk_container_add (GTK_CONTAINER (New_Commodity_Format_Druid), commodity_druid); - - start_page = gnome_druid_page_start_new (); - gtk_widget_ref (start_page); - gtk_object_set_data_full (GTK_OBJECT (New_Commodity_Format_Druid), "start_page", start_page, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (start_page); - gnome_druid_append_page (GNOME_DRUID (commodity_druid), GNOME_DRUID_PAGE (start_page)); - gnome_druid_set_page (GNOME_DRUID (commodity_druid), GNOME_DRUID_PAGE (start_page)); - gnome_druid_page_start_set_bg_color (GNOME_DRUID_PAGE_START (start_page), &start_page_bg_color); - gnome_druid_page_start_set_textbox_color (GNOME_DRUID_PAGE_START (start_page), &start_page_textbox_color); - gnome_druid_page_start_set_logo_bg_color (GNOME_DRUID_PAGE_START (start_page), &start_page_logo_bg_color); - gnome_druid_page_start_set_title_color (GNOME_DRUID_PAGE_START (start_page), &start_page_title_color); - gnome_druid_page_start_set_title (GNOME_DRUID_PAGE_START (start_page), _("Import currency and stock information ")); - gnome_druid_page_start_set_text (GNOME_DRUID_PAGE_START (start_page), _("The file you are loading is from an older version of GnuCash. \nInformation about currencies, stocks, and mutual funds needs to\nbe updated for the new version. \n\nThis dialog will prompt you for some additional information about \neach currency, stock, and mutual fund that appear in your\naccounts. After you have entered this information, you can\nupdate your accounts for the new version of GnuCash.\n\nHit \"Cancel\" now to stop loading the file. ")); - - finish_page = gnome_druid_page_finish_new (); - gtk_widget_ref (finish_page); - gtk_object_set_data_full (GTK_OBJECT (New_Commodity_Format_Druid), "finish_page", finish_page, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (finish_page); - gnome_druid_append_page (GNOME_DRUID (commodity_druid), GNOME_DRUID_PAGE (finish_page)); - gnome_druid_page_finish_set_bg_color (GNOME_DRUID_PAGE_FINISH (finish_page), &finish_page_bg_color); - gnome_druid_page_finish_set_textbox_color (GNOME_DRUID_PAGE_FINISH (finish_page), &finish_page_textbox_color); - gnome_druid_page_finish_set_logo_bg_color (GNOME_DRUID_PAGE_FINISH (finish_page), &finish_page_logo_bg_color); - gnome_druid_page_finish_set_title_color (GNOME_DRUID_PAGE_FINISH (finish_page), &finish_page_title_color); - gnome_druid_page_finish_set_title (GNOME_DRUID_PAGE_FINISH (finish_page), _("Update your accounts with the new information")); - gnome_druid_page_finish_set_text (GNOME_DRUID_PAGE_FINISH (finish_page), _("Click \"Finish\" to update your accounts to use the new \ninformation you have entered.\n\nClick \"Cancel\" to cancel the file-loading process. \n\nClick \"Back\" to review your currency selections.")); - - gtk_signal_connect (GTK_OBJECT (start_page), "cancel", - GTK_SIGNAL_FUNC (gnc_ui_commodity_druid_cancel_cb), - New_Commodity_Format_Druid); - gtk_signal_connect (GTK_OBJECT (finish_page), "finish", - GTK_SIGNAL_FUNC (gnc_ui_commodity_druid_finish_cb), - New_Commodity_Format_Druid); - gtk_signal_connect (GTK_OBJECT (finish_page), "cancel", - GTK_SIGNAL_FUNC (gnc_ui_commodity_druid_cancel_cb), - New_Commodity_Format_Druid); - - return New_Commodity_Format_Druid; -} - diff --git a/src/gnome/glade-gnc-dialogs.h b/src/gnome/glade-gnc-dialogs.h index e0bfafce58..825dad800a 100644 --- a/src/gnome/glade-gnc-dialogs.h +++ b/src/gnome/glade-gnc-dialogs.h @@ -10,5 +10,3 @@ GtkWidget* create_Financial_Calculator_Dialog (void); GtkWidget* create_Amortization_Schedule_Dialog (void); GtkWidget* create_Commodity_Selector_Dialog (void); GtkWidget* create_Commodity_Dialog (void); -GtkWidget* create_Account_Dialog (void); -GtkWidget* create_New_Commodity_Format_Druid (void); diff --git a/src/gnome/glade/Makefile.am b/src/gnome/glade/Makefile.am index c87d56d584..226f9d3e83 100644 --- a/src/gnome/glade/Makefile.am +++ b/src/gnome/glade/Makefile.am @@ -1,5 +1,6 @@ gladedir = $(GNC_GLADE_DIR) glade_DATA = \ + account.glade \ commodity.glade \ help.glade \ price.glade \ @@ -13,6 +14,7 @@ glade_DATA = \ userpass.glade STRING_FILES = \ + account_strings.c \ commodity_strings.c \ help_strings.c \ price_strings.c \ diff --git a/src/gnome/glade/account.glade b/src/gnome/glade/account.glade new file mode 100644 index 0000000000..4dcf65bc12 --- /dev/null +++ b/src/gnome/glade/account.glade @@ -0,0 +1,820 @@ + + + + + Glade + glade + + + + C + True + True + False + False + False + False + True + account_strings.c + + + + GnomeDialog + Account Dialog + New Account + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + True + False + False + False + + + GtkVBox + GnomeDialog:vbox + dialog-vbox12 + False + 8 + + 4 + True + True + + + + GtkHButtonBox + GnomeDialog:action_area + dialog-action_area12 + GTK_BUTTONBOX_END + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + button63 + True + True + GNOME_STOCK_BUTTON_OK + + + + GtkButton + cancel_button + True + True + GNOME_STOCK_BUTTON_CANCEL + + + + GtkButton + button72 + True + True + GNOME_STOCK_BUTTON_HELP + + + + + GtkNotebook + account_notebook + True + True + True + GTK_POS_TOP + False + 2 + 2 + False + + 0 + True + True + + + + GtkVBox + vbox75 + False + 0 + + + GtkFrame + frame28 + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + True + + + + GtkHBox + hbox62 + False + 0 + + + GtkVBox + vbox76 + 3 + True + 0 + + 0 + True + True + + + + GtkLabel + label807 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label808 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label809 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label810 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label811 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkVBox + vbox77 + 3 + True + 0 + + 0 + True + True + + + + GtkEntry + name_entry + True + True + True + 0 + + + 0 + False + False + + + + + GtkEntry + description_entry + True + True + True + 0 + + + 0 + False + False + + + + + GtkHBox + currency_hbox + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + security_hbox + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkEntry + code_entry + True + True + True + 0 + + + 0 + False + False + + + + + + + + GtkHBox + hbox65 + 3 + False + 0 + + 0 + True + True + + + + GtkFrame + frame29 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + False + + + + GtkScrolledWindow + scrolledwindow7 + 3 + GTK_POLICY_NEVER + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + GtkCList + type_list + True + 1 + 80 + GTK_SELECTION_SINGLE + False + GTK_SHADOW_IN + + + GtkLabel + CList:title + label812 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + + + GtkFrame + frame30 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkScrolledWindow + parent_scroll + 3 + GTK_POLICY_NEVER + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + Placeholder + + + + + + + GtkFrame + price_quote_frame + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + True + + + + GtkVBox + vbox129 + 3 + False + 3 + + + GtkCheckButton + get_quote_check + True + + False + True + + 0 + False + False + + + + + GtkHBox + hbox103 + False + 2 + + 0 + True + True + + + + GtkVBox + vbox116 + True + 0 + + 0 + False + False + + + + GtkLabel + label813 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label847713 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkVBox + vbox117 + True + 0 + + 0 + True + True + + + + GtkHBox + source_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + quote_tz_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + + + + + GtkFrame + frame32 + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkScrolledWindow + scrolledwindow9 + 3 + GTK_POLICY_NEVER + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + GtkText + notes_text + True + True + + + + + + + GtkCheckButton + tax_related_button + 3 + True + + False + True + + 0 + False + False + + + + + + GtkLabel + Notebook:tab + label8477388 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkVBox + vbox118 + False + 0 + + + GtkFrame + opening_balance_frame + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + False + + + + GtkHBox + hbox101 + 3 + False + 2 + + + GtkVBox + vbox114 + True + 0 + + 0 + False + False + + + + GtkLabel + label847737 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label847738 + + GTK_JUSTIFY_RIGHT + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkVBox + vbox115 + True + 0 + + 0 + True + True + + + + GtkHBox + opening_balance_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + opening_balance_date_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + + + + GtkFrame + frame49 + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + False + False + + + + GtkVBox + vbox120 + 3 + False + 0 + + + GtkRadioButton + opening_equity_radio + True + + False + True + + 0 + False + False + + + + + GtkRadioButton + radiobutton8 + True + + False + True + + 0 + False + False + + + + + + + GtkFrame + transfer_account_frame + 3 + False + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkScrolledWindow + transfer_account_scroll + 3 + GTK_POLICY_NEVER + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + + Placeholder + + + + + + + GtkLabel + Notebook:tab + label847739 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + + diff --git a/src/gnome/glade/account_strings.c b/src/gnome/glade/account_strings.c new file mode 100644 index 0000000000..f9fdf5cbf4 --- /dev/null +++ b/src/gnome/glade/account_strings.c @@ -0,0 +1,31 @@ +/* + * Translatable strings file generated by Glade. + * Add this file to your project's POTFILES.in. + * DO NOT compile it as part of your application. + */ + +gchar *s = N_("New Account"); +gchar *s = N_("Account Information"); +gchar *s = N_("Account Name:"); +gchar *s = N_("Description:"); +gchar *s = N_("Currency:"); +gchar *s = N_("Security:"); +gchar *s = N_("Account Code:"); +gchar *s = N_("Account Type"); +gchar *s = N_("label812"); +gchar *s = N_("Parent Account"); +gchar *s = N_("Price Quote Source"); +gchar *s = N_("Get Online Quotes"); +gchar *s = N_("The source for price quotes:"); +gchar *s = N_("Timezone for these quotes:"); +gchar *s = N_("Notes"); +gchar *s = N_("Tax Related"); +gchar *s = N_("General Information"); +gchar *s = N_("Balance Information"); +gchar *s = N_("Balance:"); +gchar *s = N_("Date:"); +gchar *s = N_("Transfer Type"); +gchar *s = N_("Use Opening Balances Equity account"); +gchar *s = N_("Select Transfer Account"); +gchar *s = N_("Transfer Account"); +gchar *s = N_("Opening Balance"); diff --git a/src/gnome/glade/commodity.glade b/src/gnome/glade/commodity.glade index e4c71188fd..36c71102f9 100644 --- a/src/gnome/glade/commodity.glade +++ b/src/gnome/glade/commodity.glade @@ -18,6 +18,79 @@ commodity_strings.c + + GtkWindow + New Commodity Format Druid + Import currency and stock information + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + True + True + + + GnomeDruid + commodity_druid + + + GnomeDruidPageStart + start_page + + cancel + gnc_ui_commodity_druid_cancel_cb + New_Commodity_Format_Druid + Fri, 11 Aug 2000 21:12:16 GMT + + Import currency and stock information + The file you are loading is from an older version of GnuCash. +Information about currencies, stocks, and mutual funds needs to +be updated for the new version. + +This dialog will prompt you for some additional information about +each currency, stock, and mutual fund that appear in your +accounts. After you have entered this information, you can +update your accounts for the new version of GnuCash. + +Hit "Cancel" now to stop loading the file. + 255,255,255 + 0,0,0 + 153,191,153 + 255,255,255 + 255,255,255 + + + + GnomeDruidPageFinish + finish_page + + finish + gnc_ui_commodity_druid_finish_cb + New_Commodity_Format_Druid + Fri, 11 Aug 2000 21:17:16 GMT + + + cancel + gnc_ui_commodity_druid_cancel_cb + New_Commodity_Format_Druid + Fri, 11 Aug 2000 21:17:46 GMT + + Update your accounts with the new information + Click "Finish" to update your accounts to use the new +information you have entered. + +Click "Cancel" to cancel the file-loading process. + +Click "Back" to review your currency selections. + 155,191,156 + 255,255,255 + 255,255,255 + 0,0,0 + 255,255,255 + + + + GnomeDialog Commodities Dialog diff --git a/src/gnome/glade/commodity_strings.c b/src/gnome/glade/commodity_strings.c index 13e5a2dec7..4dcb14924b 100644 --- a/src/gnome/glade/commodity_strings.c +++ b/src/gnome/glade/commodity_strings.c @@ -4,6 +4,25 @@ * DO NOT compile it as part of your application. */ +gchar *s = N_("Import currency and stock information"); +gchar *s = N_("Import currency and stock information "); +gchar *s = N_("The file you are loading is from an older version of GnuCash. \n" + "Information about currencies, stocks, and mutual funds needs to\n" + "be updated for the new version. \n" + "\n" + "This dialog will prompt you for some additional information about \n" + "each currency, stock, and mutual fund that appear in your\n" + "accounts. After you have entered this information, you can\n" + "update your accounts for the new version of GnuCash.\n" + "\n" + "Hit \"Cancel\" now to stop loading the file. "); +gchar *s = N_("Update your accounts with the new information"); +gchar *s = N_("Click \"Finish\" to update your accounts to use the new \n" + "information you have entered.\n" + "\n" + "Click \"Cancel\" to cancel the file-loading process. \n" + "\n" + "Click \"Back\" to review your currency selections."); gchar *s = N_("Commodities"); gchar *s = N_("Commodities"); gchar *s = N_("Show National Currencies"); diff --git a/src/gnome/gnc-dialogs.glade b/src/gnome/gnc-dialogs.glade index f902c872b9..931ac93304 100644 --- a/src/gnome/gnc-dialogs.glade +++ b/src/gnome/gnc-dialogs.glade @@ -4924,876 +4924,4 @@ Daily (365) - - GnomeDialog - Account Dialog - New Account - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - True - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox12 - False - 8 - - 4 - True - True - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area12 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button63 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - cancel_button - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - GtkButton - button72 - True - True - GNOME_STOCK_BUTTON_HELP - - - - - GtkNotebook - account_notebook - True - True - True - GTK_POS_TOP - False - 2 - 2 - False - - 0 - True - True - - - - GtkVBox - vbox75 - False - 0 - - - GtkFrame - frame28 - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - True - - - - GtkHBox - hbox62 - False - 0 - - - GtkVBox - vbox76 - 3 - True - 0 - - 0 - True - True - - - - GtkLabel - label807 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label808 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label809 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label810 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label811 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkVBox - vbox77 - 3 - True - 0 - - 0 - True - True - - - - GtkEntry - name_entry - True - True - True - 0 - - - 0 - False - False - - - - - GtkEntry - description_entry - True - True - True - 0 - - - 0 - False - False - - - - - GtkHBox - currency_hbox - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - security_hbox - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkEntry - code_entry - True - True - True - 0 - - - 0 - False - False - - - - - - - - GtkHBox - hbox65 - 3 - False - 0 - - 0 - True - True - - - - GtkFrame - frame29 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkScrolledWindow - scrolledwindow7 - 3 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - - GtkCList - type_list - True - 1 - 80 - GTK_SELECTION_SINGLE - False - GTK_SHADOW_IN - - - GtkLabel - CList:title - label812 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - GtkFrame - frame30 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkScrolledWindow - parent_scroll - 3 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - - Placeholder - - - - - - - GtkFrame - price_quote_frame - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - True - - - - GtkVBox - vbox129 - 3 - False - 3 - - - GtkCheckButton - get_quote_check - True - - False - True - - 0 - False - False - - - - - GtkHBox - hbox103 - False - 2 - - 0 - True - True - - - - GtkVBox - vbox116 - True - 0 - - 0 - False - False - - - - GtkLabel - label813 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label847713 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkVBox - vbox117 - True - 0 - - 0 - True - True - - - - GtkHBox - source_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - quote_tz_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - - - - - GtkFrame - frame32 - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkScrolledWindow - scrolledwindow9 - 3 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - - GtkText - notes_text - True - True - - - - - - - GtkCheckButton - tax_related_button - 3 - True - - False - True - - 0 - False - False - - - - - - GtkLabel - Notebook:tab - label8477388 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkVBox - vbox118 - False - 0 - - - GtkFrame - opening_balance_frame - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkHBox - hbox101 - 3 - False - 2 - - - GtkVBox - vbox114 - True - 0 - - 0 - False - False - - - - GtkLabel - label847737 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label847738 - - GTK_JUSTIFY_RIGHT - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkVBox - vbox115 - True - 0 - - 0 - True - True - - - - GtkHBox - opening_balance_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - opening_balance_date_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - - - - GtkFrame - frame49 - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - False - False - - - - GtkVBox - vbox120 - 3 - False - 0 - - - GtkRadioButton - opening_equity_radio - True - - False - True - - 0 - False - False - - - - - GtkRadioButton - radiobutton8 - True - - False - True - - 0 - False - False - - - - - - - GtkFrame - transfer_account_frame - 3 - False - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkScrolledWindow - transfer_account_scroll - 3 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - - Placeholder - - - - - - - GtkLabel - Notebook:tab - label847739 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - - GtkWindow - New Commodity Format Druid - Import currency and stock information - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - False - True - True - - - GnomeDruid - commodity_druid - - - GnomeDruidPageStart - start_page - - cancel - gnc_ui_commodity_druid_cancel_cb - New_Commodity_Format_Druid - Fri, 11 Aug 2000 21:12:16 GMT - - Import currency and stock information - The file you are loading is from an older version of GnuCash. -Information about currencies, stocks, and mutual funds needs to -be updated for the new version. - -This dialog will prompt you for some additional information about -each currency, stock, and mutual fund that appear in your -accounts. After you have entered this information, you can -update your accounts for the new version of GnuCash. - -Hit "Cancel" now to stop loading the file. - 255,255,255 - 0,0,0 - 153,191,153 - 255,255,255 - 255,255,255 - - - - GnomeDruidPageFinish - finish_page - - finish - gnc_ui_commodity_druid_finish_cb - New_Commodity_Format_Druid - Fri, 11 Aug 2000 21:17:16 GMT - - - cancel - gnc_ui_commodity_druid_cancel_cb - New_Commodity_Format_Druid - Fri, 11 Aug 2000 21:17:46 GMT - - Update your accounts with the new information - Click "Finish" to update your accounts to use the new -information you have entered. - -Click "Cancel" to cancel the file-loading process. - -Click "Back" to review your currency selections. - 155,191,156 - 255,255,255 - 255,255,255 - 0,0,0 - 255,255,255 - - - -