diff --git a/ChangeLog b/ChangeLog index 3e2c955775..07921a293a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-06-14 Dave Peticolas + + * src/gnome/dialog-transfer.c: use libglade + + * rpm/gnucash.spec.in: fix bug + 2001-06-13 Dave Peticolas * src/experimental/cgi-bin/Makefile.am: add .cvsignore to dist diff --git a/rpm/gnucash.spec.in b/rpm/gnucash.spec.in index 5445df319a..2b9e47b7fc 100644 --- a/rpm/gnucash.spec.in +++ b/rpm/gnucash.spec.in @@ -43,7 +43,7 @@ rm -rf $RPM_BUILD_ROOT %attr(555,-,-) /usr/bin/update-finance-quote %attr(555,-,-) /usr/share/gnucash/finance-quote-helper /usr/info/* -/usr/lib/libgncengine.* +/usr/lib/libgnc.* /usr/share/gnucash/accounts /usr/share/gnucash/doc /usr/share/gnucash/glade diff --git a/src/gnome/dialog-transfer.c b/src/gnome/dialog-transfer.c index c19f938777..c7d60561fb 100644 --- a/src/gnome/dialog-transfer.c +++ b/src/gnome/dialog-transfer.c @@ -32,7 +32,6 @@ #include "account-tree.h" #include "dialog-transfer.h" #include "dialog-utils.h" -#include "glade-gnc-dialogs.h" #include "global-options.h" #include "gnc-amount-edit.h" #include "gnc-component-manager.h" @@ -442,9 +441,6 @@ gnc_xfer_dialog_fill_tree_frame(XferDialog *xferData, GtkWidget *scroll_win; GtkWidget *button; GtkWidget *tree; - GtkObject *tdo; - - tdo = GTK_OBJECT (xferData->dialog); tree = gnc_account_tree_new(); atree = GNC_ACCOUNT_TREE (tree); @@ -458,9 +454,9 @@ gnc_xfer_dialog_fill_tree_frame(XferDialog *xferData, gnc_account_tree_hide_income_expense(GNC_ACCOUNT_TREE(tree)); gnc_account_tree_refresh(GNC_ACCOUNT_TREE(tree)); - scroll_win = gtk_object_get_data (tdo, - (direction == XFER_DIALOG_TO) ? - "to_window" : "from_window"); + scroll_win = gnc_glade_lookup_widget (xferData->dialog, + (direction == XFER_DIALOG_TO) ? + "to_window" : "from_window"); gtk_container_add(GTK_CONTAINER(scroll_win), tree); @@ -479,9 +475,9 @@ gnc_xfer_dialog_fill_tree_frame(XferDialog *xferData, } } - button = gtk_object_get_data (tdo, - (direction == XFER_DIALOG_TO) ? - "to_show_button" : "from_show_button"); + button = gnc_glade_lookup_widget (xferData->dialog, + (direction == XFER_DIALOG_TO) ? + "to_show_button" : "from_show_button"); if (direction == XFER_DIALOG_TO) xferData->to_show_button = button; @@ -1333,11 +1329,12 @@ static void gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) { GtkWidget *dialog; - GtkObject *tdo; + GladeXML *xml; - dialog = create_Transfer_Dialog(); + xml = gnc_glade_xml_new ("transfer.glade", "Transfer Dialog"); + + dialog = glade_xml_get_widget (xml, "Transfer Dialog"); xferData->dialog = dialog; - tdo = GTK_OBJECT (dialog); /* parent */ if (parent != NULL) @@ -1370,7 +1367,7 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) GtkWidget *hbox; amount = gnc_amount_edit_new(); - hbox = gtk_object_get_data(tdo, "amount_hbox"); + hbox = glade_xml_get_widget (xml, "amount_hbox"); gtk_box_pack_end(GTK_BOX(hbox), amount, TRUE, TRUE, 0); gnc_amount_edit_set_evaluate_on_enter (GNC_AMOUNT_EDIT (amount), TRUE); xferData->amount_edit = amount; @@ -1380,7 +1377,7 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) GTK_SIGNAL_FUNC(gnc_xfer_amount_update_cb), xferData); date = gnc_date_edit_new(time(NULL), FALSE, FALSE); - hbox = gtk_object_get_data(tdo, "date_hbox"); + hbox = glade_xml_get_widget (xml, "date_hbox"); gtk_box_pack_end(GTK_BOX(hbox), date, TRUE, TRUE, 0); xferData->date_entry = date; @@ -1389,22 +1386,25 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) { GtkWidget *entry; - entry = gtk_object_get_data(tdo, "num_entry"); + entry = glade_xml_get_widget (xml, "num_entry"); xferData->num_entry = entry; gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry)); - entry = gtk_object_get_data(tdo, "description_entry"); + entry = glade_xml_get_widget (xml, "description_entry"); xferData->description_entry = entry; /* Get signals from the Description for quickfill. */ gtk_signal_connect(GTK_OBJECT(entry), "insert_text", - GTK_SIGNAL_FUNC(gnc_xfer_description_insert_cb), xferData); + GTK_SIGNAL_FUNC(gnc_xfer_description_insert_cb), + xferData); gtk_signal_connect(GTK_OBJECT(entry), "button_release_event", - GTK_SIGNAL_FUNC(gnc_xfer_description_button_release_cb), xferData ); - gtk_signal_connect_after(GTK_OBJECT(entry), "key_press_event", - GTK_SIGNAL_FUNC(gnc_xfer_description_key_press_cb), xferData ); + GTK_SIGNAL_FUNC(gnc_xfer_description_button_release_cb), + xferData); + gtk_signal_connect_after + (GTK_OBJECT(entry), "key_press_event", + GTK_SIGNAL_FUNC(gnc_xfer_description_key_press_cb), xferData); - entry = gtk_object_get_data(tdo, "memo_entry"); + entry = glade_xml_get_widget (xml, "memo_entry"); xferData->memo_entry = entry; gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry)); } @@ -1423,10 +1423,10 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) GTK_SIGNAL_FUNC(gnc_xfer_dialog_to_tree_select_cb), xferData); - label = gtk_object_get_data(tdo, "from_currency_label"); + label = glade_xml_get_widget (xml, "from_currency_label"); xferData->from_currency_label = label; - label = gtk_object_get_data(tdo, "to_currency_label"); + label = glade_xml_get_widget (xml, "to_currency_label"); xferData->to_currency_label = label; } @@ -1440,24 +1440,24 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) GtkWidget *hbox; GtkWidget *button; - frame = gtk_object_get_data(tdo, "curr_transfer_frame"); + frame = glade_xml_get_widget (xml, "curr_transfer_frame"); xferData->curr_transfer_frame = frame; - label = gtk_object_get_data(tdo, "curr_acct_label"); + label = glade_xml_get_widget (xml, "curr_acct_label"); xferData->curr_acct_label = label; - combo = gtk_object_get_data(tdo, "curr_acct_combo"); + combo = glade_xml_get_widget (xml, "curr_acct_combo"); xferData->curr_acct_combo = combo; xferData->curr_accts_list = NULL; - entry = gtk_object_get_data(tdo, "curr_acct_combo_entry"); + entry = glade_xml_get_widget (xml, "curr_acct_combo_entry"); xferData->curr_acct_combo_entry = entry; edit = gnc_amount_edit_new(); gnc_amount_edit_set_print_info(GNC_AMOUNT_EDIT(edit), gnc_default_price_print_info ()); - hbox = gtk_object_get_data(tdo, "price_hbox"); + hbox = glade_xml_get_widget (xml, "price_hbox"); gtk_box_pack_start(GTK_BOX(hbox), edit, TRUE, TRUE, 0); xferData->price_edit = edit; entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (edit)); @@ -1466,7 +1466,7 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry)); edit = gnc_amount_edit_new(); - hbox = gtk_object_get_data(tdo, "to_amount_hbox"); + hbox = glade_xml_get_widget (xml, "to_amount_hbox"); gtk_box_pack_start(GTK_BOX(hbox), edit, TRUE, TRUE, 0); xferData->to_amount_edit = edit; entry = gnc_amount_edit_gtk_entry (GNC_AMOUNT_EDIT (edit)); @@ -1475,13 +1475,13 @@ gnc_xfer_dialog_create(GtkWidget * parent, XferDialog *xferData) xferData); gnome_dialog_editable_enters(GNOME_DIALOG(dialog), GTK_EDITABLE(entry)); - button = gtk_object_get_data(tdo, "price_radio"); + button = glade_xml_get_widget (xml, "price_radio"); xferData->price_radio = button; gtk_signal_connect(GTK_OBJECT(xferData->price_radio), "toggled", GTK_SIGNAL_FUNC(price_amount_radio_toggled_cb), xferData); - button = gtk_object_get_data(tdo, "amount_radio"); + button = glade_xml_get_widget (xml, "amount_radio"); xferData->amount_radio = button; gtk_signal_connect(GTK_OBJECT(xferData->amount_radio), "toggled", GTK_SIGNAL_FUNC(price_amount_radio_toggled_cb), diff --git a/src/gnome/glade-gnc-dialogs.c b/src/gnome/glade-gnc-dialogs.c index 175e4463a6..6d3809679c 100644 --- a/src/gnome/glade-gnc-dialogs.c +++ b/src/gnome/glade-gnc-dialogs.c @@ -5017,409 +5017,3 @@ create_QIF_Import_Druid (void) return QIF_Import_Druid; } -GtkWidget* -create_Transfer_Dialog (void) -{ - GtkWidget *Transfer_Dialog; - GtkWidget *dialog_vbox13; - GtkWidget *vbox78; - GtkWidget *frame33; - GtkWidget *hbox70; - GtkWidget *vbox80; - GtkWidget *label814; - GtkWidget *label816; - GtkWidget *label817; - GtkWidget *label818; - GtkWidget *vbox81; - GtkWidget *amount_big_hbox; - GtkWidget *amount_hbox; - GtkWidget *date_hbox; - GtkWidget *label815; - GtkWidget *num_entry; - GtkWidget *description_entry; - GtkWidget *memo_entry; - GtkWidget *hbox66; - GtkWidget *frame34; - GtkWidget *vbox82; - GtkWidget *from_window; - GtkWidget *hbox77; - GtkWidget *label820; - GtkWidget *from_currency_label; - GtkWidget *from_show_button; - GtkWidget *frame35; - GtkWidget *vbox83; - GtkWidget *to_window; - GtkWidget *hbox78; - GtkWidget *label822; - GtkWidget *to_currency_label; - GtkWidget *to_show_button; - GtkWidget *curr_transfer_frame; - GtkWidget *hbox79; - GtkWidget *vbox85; - GtkWidget *curr_acct_label; - GSList *price_amount_group_group = NULL; - GtkWidget *price_radio; - GtkWidget *amount_radio; - GtkWidget *vbox86; - GtkWidget *curr_acct_combo; - GtkWidget *curr_acct_combo_entry; - GtkWidget *price_hbox; - GtkWidget *to_amount_hbox; - GtkWidget *dialog_action_area13; - GtkWidget *button66; - GtkWidget *button68; - - Transfer_Dialog = gnome_dialog_new (_("Transfer Funds"), NULL); - gtk_object_set_data (GTK_OBJECT (Transfer_Dialog), "Transfer_Dialog", Transfer_Dialog); - gtk_window_set_policy (GTK_WINDOW (Transfer_Dialog), TRUE, TRUE, FALSE); - - dialog_vbox13 = GNOME_DIALOG (Transfer_Dialog)->vbox; - gtk_object_set_data (GTK_OBJECT (Transfer_Dialog), "dialog_vbox13", dialog_vbox13); - gtk_widget_show (dialog_vbox13); - - vbox78 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox78); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "vbox78", vbox78, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox78); - gtk_box_pack_start (GTK_BOX (dialog_vbox13), vbox78, TRUE, TRUE, 0); - - frame33 = gtk_frame_new (_("Transfer Information")); - gtk_widget_ref (frame33); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "frame33", frame33, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame33); - gtk_box_pack_start (GTK_BOX (vbox78), frame33, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame33), 3); - - hbox70 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox70); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "hbox70", hbox70, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox70); - gtk_container_add (GTK_CONTAINER (frame33), hbox70); - - vbox80 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox80); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "vbox80", vbox80, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox80); - gtk_box_pack_start (GTK_BOX (hbox70), vbox80, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (vbox80), 3); - - label814 = gtk_label_new (_("Amount:")); - gtk_widget_ref (label814); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "label814", label814, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label814); - gtk_box_pack_start (GTK_BOX (vbox80), label814, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label814), 1, 0.5); - - label816 = gtk_label_new (_("Num:")); - gtk_widget_ref (label816); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "label816", label816, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label816); - gtk_box_pack_start (GTK_BOX (vbox80), label816, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label816), 1, 0.5); - - label817 = gtk_label_new (_("Description:")); - gtk_widget_ref (label817); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "label817", label817, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label817); - gtk_box_pack_start (GTK_BOX (vbox80), label817, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label817), 1, 0.5); - - label818 = gtk_label_new (_("Memo:")); - gtk_widget_ref (label818); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "label818", label818, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label818); - gtk_box_pack_start (GTK_BOX (vbox80), label818, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label818), 1, 0.5); - - vbox81 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox81); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "vbox81", vbox81, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox81); - gtk_box_pack_start (GTK_BOX (hbox70), vbox81, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (vbox81), 3); - - amount_big_hbox = gtk_hbox_new (FALSE, 5); - gtk_widget_ref (amount_big_hbox); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "amount_big_hbox", amount_big_hbox, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (amount_big_hbox); - gtk_box_pack_start (GTK_BOX (vbox81), amount_big_hbox, TRUE, TRUE, 0); - - amount_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (amount_hbox); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "amount_hbox", amount_hbox, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (amount_hbox); - gtk_box_pack_start (GTK_BOX (amount_big_hbox), amount_hbox, TRUE, TRUE, 0); - - date_hbox = gtk_hbox_new (FALSE, 3); - gtk_widget_ref (date_hbox); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "date_hbox", date_hbox, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (date_hbox); - gtk_box_pack_start (GTK_BOX (amount_big_hbox), date_hbox, FALSE, FALSE, 0); - - label815 = gtk_label_new (_("Date:")); - gtk_widget_ref (label815); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "label815", label815, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label815); - gtk_box_pack_start (GTK_BOX (date_hbox), label815, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label815), 1, 0.5); - - num_entry = gtk_entry_new (); - gtk_widget_ref (num_entry); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "num_entry", num_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (num_entry); - gtk_box_pack_start (GTK_BOX (vbox81), num_entry, FALSE, FALSE, 0); - - description_entry = gtk_entry_new (); - gtk_widget_ref (description_entry); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "description_entry", description_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (description_entry); - gtk_box_pack_start (GTK_BOX (vbox81), description_entry, FALSE, FALSE, 0); - - memo_entry = gtk_entry_new (); - gtk_widget_ref (memo_entry); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "memo_entry", memo_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (memo_entry); - gtk_box_pack_start (GTK_BOX (vbox81), memo_entry, FALSE, FALSE, 0); - - hbox66 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox66); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "hbox66", hbox66, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox66); - gtk_box_pack_start (GTK_BOX (vbox78), hbox66, TRUE, TRUE, 0); - - frame34 = gtk_frame_new (_("Transfer From")); - gtk_widget_ref (frame34); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "frame34", frame34, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame34); - gtk_box_pack_start (GTK_BOX (hbox66), frame34, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame34), 3); - - vbox82 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox82); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "vbox82", vbox82, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox82); - gtk_container_add (GTK_CONTAINER (frame34), vbox82); - gtk_container_set_border_width (GTK_CONTAINER (vbox82), 3); - - from_window = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (from_window); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "from_window", from_window, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (from_window); - gtk_box_pack_start (GTK_BOX (vbox82), from_window, TRUE, TRUE, 0); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (from_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - hbox77 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox77); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "hbox77", hbox77, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox77); - gtk_box_pack_start (GTK_BOX (vbox82), hbox77, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (hbox77), 3); - - label820 = gtk_label_new (_("Currency:")); - gtk_widget_ref (label820); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "label820", label820, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label820); - gtk_box_pack_start (GTK_BOX (hbox77), label820, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (label820), 0, 0.5); - - from_currency_label = gtk_label_new (_(" ")); - gtk_widget_ref (from_currency_label); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "from_currency_label", from_currency_label, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (from_currency_label); - gtk_box_pack_start (GTK_BOX (hbox77), from_currency_label, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (from_currency_label), 1, 0.5); - - from_show_button = gtk_check_button_new_with_label (_("Show Income/Expense")); - gtk_widget_ref (from_show_button); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "from_show_button", from_show_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (from_show_button); - gtk_box_pack_start (GTK_BOX (vbox82), from_show_button, FALSE, FALSE, 0); - - frame35 = gtk_frame_new (_("Transfer To")); - gtk_widget_ref (frame35); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "frame35", frame35, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame35); - gtk_box_pack_start (GTK_BOX (hbox66), frame35, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame35), 3); - - vbox83 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox83); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "vbox83", vbox83, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox83); - gtk_container_add (GTK_CONTAINER (frame35), vbox83); - gtk_container_set_border_width (GTK_CONTAINER (vbox83), 3); - - to_window = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (to_window); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "to_window", to_window, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (to_window); - gtk_box_pack_start (GTK_BOX (vbox83), to_window, TRUE, TRUE, 0); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (to_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - - hbox78 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox78); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "hbox78", hbox78, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox78); - gtk_box_pack_start (GTK_BOX (vbox83), hbox78, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (hbox78), 3); - - label822 = gtk_label_new (_("Currency:")); - gtk_widget_ref (label822); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "label822", label822, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label822); - gtk_box_pack_start (GTK_BOX (hbox78), label822, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (label822), 0, 0.5); - - to_currency_label = gtk_label_new (_(" ")); - gtk_widget_ref (to_currency_label); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "to_currency_label", to_currency_label, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (to_currency_label); - gtk_box_pack_start (GTK_BOX (hbox78), to_currency_label, TRUE, TRUE, 0); - gtk_misc_set_alignment (GTK_MISC (to_currency_label), 1, 0.5); - - to_show_button = gtk_check_button_new_with_label (_("Show Income/Expense")); - gtk_widget_ref (to_show_button); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "to_show_button", to_show_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (to_show_button); - gtk_box_pack_start (GTK_BOX (vbox83), to_show_button, FALSE, FALSE, 0); - - curr_transfer_frame = gtk_frame_new (_("Currency Transfer")); - gtk_widget_ref (curr_transfer_frame); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "curr_transfer_frame", curr_transfer_frame, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (curr_transfer_frame); - gtk_box_pack_start (GTK_BOX (vbox78), curr_transfer_frame, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (curr_transfer_frame), 3); - - hbox79 = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (hbox79); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "hbox79", hbox79, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox79); - gtk_container_add (GTK_CONTAINER (curr_transfer_frame), hbox79); - - vbox85 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox85); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "vbox85", vbox85, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox85); - gtk_box_pack_start (GTK_BOX (hbox79), vbox85, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (vbox85), 3); - - curr_acct_label = gtk_label_new (_("Currency Account:")); - gtk_widget_ref (curr_acct_label); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "curr_acct_label", curr_acct_label, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (curr_acct_label); - gtk_box_pack_start (GTK_BOX (vbox85), curr_acct_label, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (curr_acct_label), 1, 0.5); - - price_radio = gtk_radio_button_new_with_label (price_amount_group_group, _("Exchange Rate:")); - price_amount_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (price_radio)); - gtk_widget_ref (price_radio); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "price_radio", price_radio, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (price_radio); - gtk_box_pack_start (GTK_BOX (vbox85), price_radio, FALSE, FALSE, 0); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (price_radio), TRUE); - - amount_radio = gtk_radio_button_new_with_label (price_amount_group_group, _("To Amount:")); - price_amount_group_group = gtk_radio_button_group (GTK_RADIO_BUTTON (amount_radio)); - gtk_widget_ref (amount_radio); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "amount_radio", amount_radio, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (amount_radio); - gtk_box_pack_start (GTK_BOX (vbox85), amount_radio, FALSE, FALSE, 0); - - vbox86 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox86); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "vbox86", vbox86, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox86); - gtk_box_pack_start (GTK_BOX (hbox79), vbox86, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (vbox86), 3); - - curr_acct_combo = gtk_combo_new (); - gtk_widget_ref (curr_acct_combo); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "curr_acct_combo", curr_acct_combo, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (curr_acct_combo); - gtk_box_pack_start (GTK_BOX (vbox86), curr_acct_combo, FALSE, FALSE, 0); - - curr_acct_combo_entry = GTK_COMBO (curr_acct_combo)->entry; - gtk_widget_ref (curr_acct_combo_entry); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "curr_acct_combo_entry", curr_acct_combo_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (curr_acct_combo_entry); - gtk_entry_set_editable (GTK_ENTRY (curr_acct_combo_entry), FALSE); - - price_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (price_hbox); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "price_hbox", price_hbox, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (price_hbox); - gtk_box_pack_start (GTK_BOX (vbox86), price_hbox, TRUE, TRUE, 0); - - to_amount_hbox = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (to_amount_hbox); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "to_amount_hbox", to_amount_hbox, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (to_amount_hbox); - gtk_box_pack_start (GTK_BOX (vbox86), to_amount_hbox, TRUE, TRUE, 0); - - dialog_action_area13 = GNOME_DIALOG (Transfer_Dialog)->action_area; - gtk_object_set_data (GTK_OBJECT (Transfer_Dialog), "dialog_action_area13", dialog_action_area13); - gtk_widget_show (dialog_action_area13); - gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area13), GTK_BUTTONBOX_END); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area13), 8); - - gnome_dialog_append_button (GNOME_DIALOG (Transfer_Dialog), GNOME_STOCK_BUTTON_OK); - button66 = g_list_last (GNOME_DIALOG (Transfer_Dialog)->buttons)->data; - gtk_widget_ref (button66); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "button66", button66, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button66); - GTK_WIDGET_SET_FLAGS (button66, GTK_CAN_DEFAULT); - - gnome_dialog_append_button (GNOME_DIALOG (Transfer_Dialog), GNOME_STOCK_BUTTON_CANCEL); - button68 = g_list_last (GNOME_DIALOG (Transfer_Dialog)->buttons)->data; - gtk_widget_ref (button68); - gtk_object_set_data_full (GTK_OBJECT (Transfer_Dialog), "button68", button68, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (button68); - GTK_WIDGET_SET_FLAGS (button68, GTK_CAN_DEFAULT); - - return Transfer_Dialog; -} - diff --git a/src/gnome/glade-gnc-dialogs.h b/src/gnome/glade-gnc-dialogs.h index 1a11a5b76f..4427326b5f 100644 --- a/src/gnome/glade-gnc-dialogs.h +++ b/src/gnome/glade-gnc-dialogs.h @@ -13,4 +13,3 @@ GtkWidget* create_Commodity_Dialog (void); GtkWidget* create_Account_Dialog (void); GtkWidget* create_New_Commodity_Format_Druid (void); GtkWidget* create_QIF_Import_Druid (void); -GtkWidget* create_Transfer_Dialog (void); diff --git a/src/gnome/glade/Makefile.am b/src/gnome/glade/Makefile.am index 49b15e0edd..c4a9af4f82 100644 --- a/src/gnome/glade/Makefile.am +++ b/src/gnome/glade/Makefile.am @@ -8,6 +8,7 @@ glade_DATA = \ report.glade \ stocks.glade \ tax.glade \ + transfer.glade \ userpass.glade STRING_FILES = \ @@ -19,6 +20,7 @@ STRING_FILES = \ report_strings.c \ stocks_strings.c \ tax_strings.c \ + transfer_strings.c \ userpass_strings.c EXTRA_DIST = $(glade_DATA) $(STRING_FILES) diff --git a/src/gnome/glade/transfer.glade b/src/gnome/glade/transfer.glade new file mode 100644 index 0000000000..8decdf4fc5 --- /dev/null +++ b/src/gnome/glade/transfer.glade @@ -0,0 +1,682 @@ + + + + + Glade + glade + + + + C + True + True + False + False + False + False + True + transfer_strings.c + + + + GnomeDialog + Transfer Dialog + Transfer Funds + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + True + False + False + False + + + GtkVBox + GnomeDialog:vbox + dialog-vbox13 + False + 8 + + 4 + True + True + + + + GtkHButtonBox + GnomeDialog:action_area + dialog-action_area13 + GTK_BUTTONBOX_END + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + button66 + True + True + GNOME_STOCK_BUTTON_OK + + + + GtkButton + button68 + True + True + GNOME_STOCK_BUTTON_CANCEL + + + + + GtkVBox + vbox78 + False + 0 + + 0 + True + True + + + + GtkFrame + frame33 + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkHBox + hbox70 + False + 0 + + + GtkVBox + vbox80 + 3 + True + 0 + + 0 + False + False + + + + GtkLabel + label814 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label816 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label817 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label818 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkVBox + vbox81 + 3 + True + 0 + + 0 + True + True + + + + GtkHBox + amount_big_hbox + False + 5 + + 0 + True + True + + + + GtkHBox + amount_hbox + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + date_hbox + False + 3 + + 0 + False + False + + + + GtkLabel + label815 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + Placeholder + + + + + + GtkEntry + num_entry + True + True + True + 0 + + + 0 + False + False + + + + + GtkEntry + description_entry + True + True + True + 0 + + + 0 + False + False + + + + + GtkEntry + memo_entry + True + True + True + 0 + + + 0 + False + False + + + + + + + + GtkHBox + hbox66 + False + 0 + + 0 + True + True + + + + GtkFrame + frame34 + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkVBox + vbox82 + 3 + False + 0 + + + GtkScrolledWindow + from_window + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + hbox77 + 3 + False + 0 + + 0 + False + False + + + + GtkLabel + label820 + + GTK_JUSTIFY_CENTER + False + 0 + 0.5 + 0 + 0 + + 0 + True + True + + + + + GtkLabel + from_currency_label + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + True + True + + + + + + GtkCheckButton + from_show_button + True + + False + True + + 0 + False + False + + + + + + + GtkFrame + frame35 + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkVBox + vbox83 + 3 + False + 0 + + + GtkScrolledWindow + to_window + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + hbox78 + 3 + False + 0 + + 0 + False + False + + + + GtkLabel + label822 + + GTK_JUSTIFY_CENTER + False + 0 + 0.5 + 0 + 0 + + 0 + True + True + + + + + GtkLabel + to_currency_label + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + True + True + + + + + + GtkCheckButton + to_show_button + True + + False + True + + 0 + False + False + + + + + + + + GtkFrame + curr_transfer_frame + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkHBox + hbox79 + False + 0 + + + GtkVBox + vbox85 + 3 + True + 0 + + 0 + False + False + + + + GtkLabel + curr_acct_label + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkRadioButton + price_radio + True + + True + True + price_amount_group + + 0 + False + False + + + + + GtkRadioButton + amount_radio + True + + False + True + price_amount_group + + 0 + False + False + + + + + + GtkVBox + vbox86 + 3 + True + 0 + + 0 + True + True + + + + GtkCombo + curr_acct_combo + False + True + False + True + False + + + 0 + False + False + + + + GtkEntry + GtkCombo:entry + curr_acct_combo_entry + True + False + True + 0 + + + + + + GtkHBox + price_hbox + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + to_amount_hbox + False + 0 + + 0 + True + True + + + + Placeholder + + + + + + + + + + diff --git a/src/gnome/glade/transfer_strings.c b/src/gnome/glade/transfer_strings.c new file mode 100644 index 0000000000..6879cd1791 --- /dev/null +++ b/src/gnome/glade/transfer_strings.c @@ -0,0 +1,25 @@ +/* + * 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_("Transfer Funds"); +gchar *s = N_("Transfer Information"); +gchar *s = N_("Amount:"); +gchar *s = N_("Num:"); +gchar *s = N_("Description:"); +gchar *s = N_("Memo:"); +gchar *s = N_("Date:"); +gchar *s = N_("Transfer From"); +gchar *s = N_("Currency:"); +gchar *s = N_(" "); +gchar *s = N_("Show Income/Expense"); +gchar *s = N_("Transfer To"); +gchar *s = N_("Currency:"); +gchar *s = N_(" "); +gchar *s = N_("Show Income/Expense"); +gchar *s = N_("Currency Transfer"); +gchar *s = N_("Currency Account:"); +gchar *s = N_("Exchange Rate:"); +gchar *s = N_("To Amount:"); diff --git a/src/gnome/gnc-dialogs.glade b/src/gnome/gnc-dialogs.glade index e13a6993d5..96f6541bbf 100644 --- a/src/gnome/gnc-dialogs.glade +++ b/src/gnome/gnc-dialogs.glade @@ -7362,665 +7362,4 @@ Click "Cancel" to abort the QIF import process. - - GnomeDialog - Transfer Dialog - Transfer Funds - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - True - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox13 - False - 8 - - 4 - True - True - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area13 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - button66 - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - button68 - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - GtkVBox - vbox78 - False - 0 - - 0 - True - True - - - - GtkFrame - frame33 - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkHBox - hbox70 - False - 0 - - - GtkVBox - vbox80 - 3 - True - 0 - - 0 - False - False - - - - GtkLabel - label814 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label816 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label817 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label818 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkVBox - vbox81 - 3 - True - 0 - - 0 - True - True - - - - GtkHBox - amount_big_hbox - False - 5 - - 0 - True - True - - - - GtkHBox - amount_hbox - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - date_hbox - False - 3 - - 0 - False - False - - - - GtkLabel - label815 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - Placeholder - - - - - - GtkEntry - num_entry - True - True - True - 0 - - - 0 - False - False - - - - - GtkEntry - description_entry - True - True - True - 0 - - - 0 - False - False - - - - - GtkEntry - memo_entry - True - True - True - 0 - - - 0 - False - False - - - - - - - - GtkHBox - hbox66 - False - 0 - - 0 - True - True - - - - GtkFrame - frame34 - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox82 - 3 - False - 0 - - - GtkScrolledWindow - from_window - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - hbox77 - 3 - False - 0 - - 0 - False - False - - - - GtkLabel - label820 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - True - True - - - - - GtkLabel - from_currency_label - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - True - True - - - - - - GtkCheckButton - from_show_button - True - - False - True - - 0 - False - False - - - - - - - GtkFrame - frame35 - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox83 - 3 - False - 0 - - - GtkScrolledWindow - to_window - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - hbox78 - 3 - False - 0 - - 0 - False - False - - - - GtkLabel - label822 - - GTK_JUSTIFY_CENTER - False - 0 - 0.5 - 0 - 0 - - 0 - True - True - - - - - GtkLabel - to_currency_label - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - True - True - - - - - - GtkCheckButton - to_show_button - True - - False - True - - 0 - False - False - - - - - - - - GtkFrame - curr_transfer_frame - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkHBox - hbox79 - False - 0 - - - GtkVBox - vbox85 - 3 - True - 0 - - 0 - False - False - - - - GtkLabel - curr_acct_label - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkRadioButton - price_radio - True - - True - True - price_amount_group - - 0 - False - False - - - - - GtkRadioButton - amount_radio - True - - False - True - price_amount_group - - 0 - False - False - - - - - - GtkVBox - vbox86 - 3 - True - 0 - - 0 - True - True - - - - GtkCombo - curr_acct_combo - False - True - False - True - False - - - 0 - False - False - - - - GtkEntry - GtkCombo:entry - curr_acct_combo_entry - True - False - True - 0 - - - - - - GtkHBox - price_hbox - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - to_amount_hbox - False - 0 - - 0 - True - True - - - - Placeholder - - - - - - - - -