diff --git a/ChangeLog b/ChangeLog index 56226de4f9..b2dbbf24a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2001-06-12 Dave Peticolas + * src/gnome/glade/price.glade: new file for old price dialogs + + * src/gnome/dialog-price-editor.c: use libglade + * src/gnome/reconcile-list.c: obey new option below * src/scm/prefs.scm: add option wrt checking off cleared diff --git a/src/gnome/dialog-price-editor.c b/src/gnome/dialog-price-editor.c index d9116c6499..5e38c14a67 100644 --- a/src/gnome/dialog-price-editor.c +++ b/src/gnome/dialog-price-editor.c @@ -763,6 +763,7 @@ sort_commodity_toggled_cb (GtkToggleButton *togglebutton, static void gnc_price_dialog_create (PricesDialog *pdb_dialog) { + GladeXML *xml; GNCPrintAmountInfo print_info; GtkWidget *price_dialog; GtkWidget *button; @@ -771,7 +772,9 @@ gnc_price_dialog_create (PricesDialog *pdb_dialog) GtkWidget *box; GtkWidget *w; - price_dialog = create_Price_Dialog (); + xml = gnc_glade_xml_new ("price.glade", "Price Dialog"); + + price_dialog = glade_xml_get_widget (xml, "Price Dialog"); pdb_dialog->price_dialog = price_dialog; gnome_dialog_button_connect (GNOME_DIALOG (price_dialog), 0, @@ -786,7 +789,7 @@ gnc_price_dialog_create (PricesDialog *pdb_dialog) GTK_SIGNAL_FUNC (price_window_delete_cb), pdb_dialog); - box = lookup_widget (price_dialog, "commodity_box"); + box = glade_xml_get_widget (xml, "commodity_box"); w = gnc_commodity_edit_new (); pdb_dialog->commodity_edit = w; @@ -796,7 +799,7 @@ gnc_price_dialog_create (PricesDialog *pdb_dialog) gtk_signal_connect (GTK_OBJECT (w), "changed", GTK_SIGNAL_FUNC (commodity_changed_cb), pdb_dialog); - box = lookup_widget (price_dialog, "currency_box"); + box = glade_xml_get_widget (xml, "currency_box"); w = gnc_currency_edit_new (); pdb_dialog->currency_edit = w; @@ -806,7 +809,7 @@ gnc_price_dialog_create (PricesDialog *pdb_dialog) gtk_signal_connect (GTK_OBJECT (GTK_COMBO(w)->entry), "changed", GTK_SIGNAL_FUNC (currency_changed_cb), pdb_dialog); - box = lookup_widget (price_dialog, "date_box"); + box = glade_xml_get_widget (xml, "date_box"); w = gnc_date_edit_new (time (NULL), FALSE, FALSE); pdb_dialog->date_edit = w; @@ -816,10 +819,10 @@ gnc_price_dialog_create (PricesDialog *pdb_dialog) gtk_signal_connect (GTK_OBJECT (w), "date_changed", GTK_SIGNAL_FUNC (date_changed_cb), pdb_dialog); - w = lookup_widget (price_dialog, "source_entry"); + w = glade_xml_get_widget (xml, "source_entry"); pdb_dialog->source_entry = w; - w = lookup_widget (price_dialog, "type_option"); + w = glade_xml_get_widget (xml, "type_option"); pdb_dialog->type_option = w; gnc_option_menu_init (w); @@ -827,7 +830,7 @@ gnc_price_dialog_create (PricesDialog *pdb_dialog) gtk_container_forall (GTK_CONTAINER (menu), connect_type_menu_item, pdb_dialog); - box = lookup_widget (price_dialog, "price_box"); + box = glade_xml_get_widget (xml, "price_box"); w = gnc_amount_edit_new (); pdb_dialog->price_edit = w; @@ -847,8 +850,11 @@ static void gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog) { GtkWidget *dialog; + GladeXML *xml; - dialog = create_Prices_Dialog (); + xml = gnc_glade_xml_new ("price.glade", "Prices Dialog"); + + dialog = glade_xml_get_widget (xml, "Prices Dialog"); pdb_dialog->dialog = dialog; gnc_price_dialog_create (pdb_dialog); @@ -875,7 +881,7 @@ gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog) GtkWidget *income_radio; GtkWidget *list; - list = lookup_widget (dialog, "price_list"); + list = glade_xml_get_widget (xml, "price_list"); pdb_dialog->price_list = list; gtk_signal_connect (GTK_OBJECT(list), "select_row", @@ -891,37 +897,37 @@ gnc_prices_dialog_create (GtkWidget * parent, PricesDialog *pdb_dialog) { GtkWidget *button; - button = lookup_widget (dialog, "sort_by_commodity_radio"); + button = glade_xml_get_widget (xml, "sort_by_commodity_radio"); pdb_dialog->sort_radio = button; gtk_signal_connect (GTK_OBJECT (button), "toggled", GTK_SIGNAL_FUNC (sort_commodity_toggled_cb), pdb_dialog); - button = lookup_widget (dialog, "edit_button"); + button = glade_xml_get_widget (xml, "edit_button"); pdb_dialog->edit_button = button; gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (edit_clicked), pdb_dialog); - button = lookup_widget (dialog, "remove_button"); + button = glade_xml_get_widget (xml, "remove_button"); pdb_dialog->remove_button = button; gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (remove_clicked), pdb_dialog); - button = lookup_widget (dialog, "remove_old_button"); + button = glade_xml_get_widget (xml, "remove_old_button"); pdb_dialog->remove_old_button = button; gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (remove_old_clicked), pdb_dialog); - button = lookup_widget (dialog, "add_button"); + button = glade_xml_get_widget (xml, "add_button"); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (add_clicked), pdb_dialog); - button = lookup_widget (dialog, "get_quotes_button"); + button = glade_xml_get_widget (xml, "get_quotes_button"); gtk_signal_connect (GTK_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (get_quotes_clicked), pdb_dialog); diff --git a/src/gnome/glade-gnc-dialogs.c b/src/gnome/glade-gnc-dialogs.c index 7a76ebafa1..4d1ba327e4 100644 --- a/src/gnome/glade-gnc-dialogs.c +++ b/src/gnome/glade-gnc-dialogs.c @@ -7298,425 +7298,3 @@ create_Edit_Report_Size (void) return Edit_Report_Size; } -GtkWidget* -create_Prices_Dialog (void) -{ - GtkWidget *Prices_Dialog; - GtkWidget *vbox121; - GtkWidget *frame50; - GtkWidget *vbox122; - GtkWidget *scrolledwindow32; - GtkWidget *price_list; - GtkWidget *label8477415; - GtkWidget *label8477416; - GtkWidget *label8477417; - GtkWidget *label8477418; - GtkWidget *label8477419; - GtkWidget *label8477420; - GtkWidget *hbox108; - GSList *price_sort_radio_group = NULL; - GtkWidget *sort_by_commodity_radio; - GtkWidget *radiobutton10; - GtkWidget *hbuttonbox5; - GtkWidget *add_button; - GtkWidget *remove_button; - GtkWidget *remove_old_button; - GtkWidget *edit_button; - GtkWidget *get_quotes_button; - GtkWidget *hbuttonbox4; - GtkWidget *close_button; - GtkTooltips *tooltips; - - tooltips = gtk_tooltips_new (); - - Prices_Dialog = gnome_dialog_new (_("Price Editor"), NULL); - gtk_object_set_data (GTK_OBJECT (Prices_Dialog), "Prices_Dialog", Prices_Dialog); - gtk_window_set_policy (GTK_WINDOW (Prices_Dialog), TRUE, TRUE, FALSE); - - vbox121 = GNOME_DIALOG (Prices_Dialog)->vbox; - gtk_object_set_data (GTK_OBJECT (Prices_Dialog), "vbox121", vbox121); - gtk_widget_show (vbox121); - - frame50 = gtk_frame_new (_("Prices")); - gtk_widget_ref (frame50); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "frame50", frame50, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (frame50); - gtk_box_pack_start (GTK_BOX (vbox121), frame50, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (frame50), 3); - - vbox122 = gtk_vbox_new (FALSE, 5); - gtk_widget_ref (vbox122); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "vbox122", vbox122, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox122); - gtk_container_add (GTK_CONTAINER (frame50), vbox122); - - scrolledwindow32 = gtk_scrolled_window_new (NULL, NULL); - gtk_widget_ref (scrolledwindow32); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "scrolledwindow32", scrolledwindow32, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (scrolledwindow32); - gtk_box_pack_start (GTK_BOX (vbox122), scrolledwindow32, TRUE, TRUE, 0); - gtk_container_set_border_width (GTK_CONTAINER (scrolledwindow32), 3); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow32), GTK_POLICY_NEVER, GTK_POLICY_ALWAYS); - - price_list = gtk_clist_new (6); - gtk_widget_ref (price_list); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "price_list", price_list, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (price_list); - gtk_container_add (GTK_CONTAINER (scrolledwindow32), price_list); - gtk_clist_set_column_width (GTK_CLIST (price_list), 0, 80); - gtk_clist_set_column_width (GTK_CLIST (price_list), 1, 80); - gtk_clist_set_column_width (GTK_CLIST (price_list), 2, 80); - gtk_clist_set_column_width (GTK_CLIST (price_list), 3, 80); - gtk_clist_set_column_width (GTK_CLIST (price_list), 4, 80); - gtk_clist_set_column_width (GTK_CLIST (price_list), 5, 80); - gtk_clist_set_selection_mode (GTK_CLIST (price_list), GTK_SELECTION_BROWSE); - gtk_clist_column_titles_show (GTK_CLIST (price_list)); - - label8477415 = gtk_label_new (_("Commodity")); - gtk_widget_ref (label8477415); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "label8477415", label8477415, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477415); - gtk_clist_set_column_widget (GTK_CLIST (price_list), 0, label8477415); - - label8477416 = gtk_label_new (_("Currency")); - gtk_widget_ref (label8477416); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "label8477416", label8477416, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477416); - gtk_clist_set_column_widget (GTK_CLIST (price_list), 1, label8477416); - - label8477417 = gtk_label_new (_("Date")); - gtk_widget_ref (label8477417); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "label8477417", label8477417, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477417); - gtk_clist_set_column_widget (GTK_CLIST (price_list), 2, label8477417); - - label8477418 = gtk_label_new (_("Source")); - gtk_widget_ref (label8477418); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "label8477418", label8477418, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477418); - gtk_clist_set_column_widget (GTK_CLIST (price_list), 3, label8477418); - - label8477419 = gtk_label_new (_("Type")); - gtk_widget_ref (label8477419); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "label8477419", label8477419, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477419); - gtk_clist_set_column_widget (GTK_CLIST (price_list), 4, label8477419); - - label8477420 = gtk_label_new (_("Price")); - gtk_widget_ref (label8477420); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "label8477420", label8477420, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477420); - gtk_clist_set_column_widget (GTK_CLIST (price_list), 5, label8477420); - - hbox108 = gtk_hbox_new (TRUE, 10); - gtk_widget_ref (hbox108); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "hbox108", hbox108, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox108); - gtk_box_pack_start (GTK_BOX (vbox122), hbox108, FALSE, FALSE, 0); - gtk_container_set_border_width (GTK_CONTAINER (hbox108), 3); - - sort_by_commodity_radio = gtk_radio_button_new_with_label (price_sort_radio_group, _("Sort by Commodity")); - price_sort_radio_group = gtk_radio_button_group (GTK_RADIO_BUTTON (sort_by_commodity_radio)); - gtk_widget_ref (sort_by_commodity_radio); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "sort_by_commodity_radio", sort_by_commodity_radio, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (sort_by_commodity_radio); - gtk_box_pack_start (GTK_BOX (hbox108), sort_by_commodity_radio, FALSE, FALSE, 0); - - radiobutton10 = gtk_radio_button_new_with_label (price_sort_radio_group, _("Sort by Date")); - price_sort_radio_group = gtk_radio_button_group (GTK_RADIO_BUTTON (radiobutton10)); - gtk_widget_ref (radiobutton10); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "radiobutton10", radiobutton10, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (radiobutton10); - gtk_box_pack_start (GTK_BOX (hbox108), radiobutton10, FALSE, FALSE, 0); - - hbuttonbox5 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox5); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "hbuttonbox5", hbuttonbox5, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox5); - gtk_box_pack_start (GTK_BOX (vbox122), hbuttonbox5, FALSE, FALSE, 0); - gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox5), GTK_BUTTONBOX_SPREAD); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox5), 20); - gtk_button_box_set_child_size (GTK_BUTTON_BOX (hbuttonbox5), 50, 27); - - add_button = gtk_button_new_with_label (_("Add")); - gtk_widget_ref (add_button); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "add_button", add_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (add_button); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), add_button); - GTK_WIDGET_SET_FLAGS (add_button, GTK_CAN_DEFAULT); - gtk_tooltips_set_tip (tooltips, add_button, _("Add a new price."), NULL); - - remove_button = gtk_button_new_with_label (_("Remove")); - gtk_widget_ref (remove_button); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "remove_button", remove_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (remove_button); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), remove_button); - GTK_WIDGET_SET_FLAGS (remove_button, GTK_CAN_DEFAULT); - gtk_tooltips_set_tip (tooltips, remove_button, _("Remove the current price"), NULL); - - remove_old_button = gtk_button_new_with_label (_("Remove Old...")); - gtk_widget_ref (remove_old_button); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "remove_old_button", remove_old_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (remove_old_button); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), remove_old_button); - GTK_WIDGET_SET_FLAGS (remove_old_button, GTK_CAN_DEFAULT); - gtk_tooltips_set_tip (tooltips, remove_old_button, _("Remove prices older than a user-entered date"), NULL); - - edit_button = gtk_button_new_with_label (_("Edit")); - gtk_widget_ref (edit_button); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "edit_button", edit_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (edit_button); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), edit_button); - GTK_WIDGET_SET_FLAGS (edit_button, GTK_CAN_DEFAULT); - gtk_tooltips_set_tip (tooltips, edit_button, _("Edit the current price."), NULL); - - get_quotes_button = gtk_button_new_with_label (_("Get Quotes")); - gtk_widget_ref (get_quotes_button); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "get_quotes_button", get_quotes_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (get_quotes_button); - gtk_container_add (GTK_CONTAINER (hbuttonbox5), get_quotes_button); - GTK_WIDGET_SET_FLAGS (get_quotes_button, GTK_CAN_DEFAULT); - gtk_tooltips_set_tip (tooltips, get_quotes_button, _("Get new online quotes for stock accounts."), NULL); - - hbuttonbox4 = GNOME_DIALOG (Prices_Dialog)->action_area; - gtk_object_set_data (GTK_OBJECT (Prices_Dialog), "hbuttonbox4", hbuttonbox4); - gtk_widget_show (hbuttonbox4); - gtk_button_box_set_layout (GTK_BUTTON_BOX (hbuttonbox4), GTK_BUTTONBOX_END); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbuttonbox4), 8); - - gnome_dialog_append_button (GNOME_DIALOG (Prices_Dialog), GNOME_STOCK_BUTTON_CLOSE); - close_button = g_list_last (GNOME_DIALOG (Prices_Dialog)->buttons)->data; - gtk_widget_ref (close_button); - gtk_object_set_data_full (GTK_OBJECT (Prices_Dialog), "close_button", close_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (close_button); - GTK_WIDGET_SET_FLAGS (close_button, GTK_CAN_DEFAULT); - - gtk_object_set_data (GTK_OBJECT (Prices_Dialog), "tooltips", tooltips); - - return Prices_Dialog; -} - -GtkWidget* -create_Price_Dialog (void) -{ - GtkWidget *Price_Dialog; - GtkWidget *dialog_vbox18; - GtkWidget *price_info_frame; - GtkWidget *vbox126; - GtkWidget *hbox106; - GtkWidget *vbox125; - GtkWidget *label8477399; - GtkWidget *label8477400; - GtkWidget *label8477401; - GtkWidget *label8477402; - GtkWidget *label8477403; - GtkWidget *label8477404; - GtkWidget *vbox126zz; - GtkWidget *commodity_box; - GtkWidget *currency_box; - GtkWidget *date_box; - GtkWidget *source_entry; - GtkWidget *type_option; - GtkWidget *type_option_menu; - GtkWidget *glade_menuitem; - GtkWidget *price_box; - GtkWidget *dialog_action_area18; - GtkWidget *ok_button; - GtkWidget *cancel_button; - - Price_Dialog = gnome_dialog_new (_("Price Editor"), NULL); - gtk_object_set_data (GTK_OBJECT (Price_Dialog), "Price_Dialog", Price_Dialog); - gtk_window_set_modal (GTK_WINDOW (Price_Dialog), TRUE); - gtk_window_set_policy (GTK_WINDOW (Price_Dialog), FALSE, FALSE, FALSE); - - dialog_vbox18 = GNOME_DIALOG (Price_Dialog)->vbox; - gtk_object_set_data (GTK_OBJECT (Price_Dialog), "dialog_vbox18", dialog_vbox18); - gtk_widget_show (dialog_vbox18); - - price_info_frame = gtk_frame_new (_("Price Information")); - gtk_widget_ref (price_info_frame); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "price_info_frame", price_info_frame, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (price_info_frame); - gtk_box_pack_start (GTK_BOX (dialog_vbox18), price_info_frame, TRUE, TRUE, 0); - - vbox126 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox126); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "vbox126", vbox126, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox126); - gtk_container_add (GTK_CONTAINER (price_info_frame), vbox126); - gtk_container_set_border_width (GTK_CONTAINER (vbox126), 3); - - hbox106 = gtk_hbox_new (FALSE, 2); - gtk_widget_ref (hbox106); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "hbox106", hbox106, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbox106); - gtk_box_pack_start (GTK_BOX (vbox126), hbox106, FALSE, FALSE, 0); - - vbox125 = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox125); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "vbox125", vbox125, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox125); - gtk_box_pack_start (GTK_BOX (hbox106), vbox125, FALSE, FALSE, 0); - - label8477399 = gtk_label_new (_("Commodity:")); - gtk_widget_ref (label8477399); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "label8477399", label8477399, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477399); - gtk_box_pack_start (GTK_BOX (vbox125), label8477399, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label8477399), 1, 0.5); - - label8477400 = gtk_label_new (_("Currency:")); - gtk_widget_ref (label8477400); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "label8477400", label8477400, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477400); - gtk_box_pack_start (GTK_BOX (vbox125), label8477400, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label8477400), 1, 0.5); - - label8477401 = gtk_label_new (_("Date:")); - gtk_widget_ref (label8477401); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "label8477401", label8477401, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477401); - gtk_box_pack_start (GTK_BOX (vbox125), label8477401, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label8477401), 1, 0.5); - - label8477402 = gtk_label_new (_("Source:")); - gtk_widget_ref (label8477402); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "label8477402", label8477402, - (GtkDestroyNotify) gtk_widget_unref); - gtk_box_pack_start (GTK_BOX (vbox125), label8477402, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label8477402), 1, 0.5); - - label8477403 = gtk_label_new (_("Type:")); - gtk_widget_ref (label8477403); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "label8477403", label8477403, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477403); - gtk_box_pack_start (GTK_BOX (vbox125), label8477403, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label8477403), 1, 0.5); - - label8477404 = gtk_label_new (_("Price:")); - gtk_widget_ref (label8477404); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "label8477404", label8477404, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label8477404); - gtk_box_pack_start (GTK_BOX (vbox125), label8477404, FALSE, FALSE, 0); - gtk_misc_set_alignment (GTK_MISC (label8477404), 1, 0.5); - - vbox126zz = gtk_vbox_new (TRUE, 0); - gtk_widget_ref (vbox126zz); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "vbox126zz", vbox126zz, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox126zz); - gtk_box_pack_start (GTK_BOX (hbox106), vbox126zz, TRUE, TRUE, 0); - - commodity_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (commodity_box); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "commodity_box", commodity_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (commodity_box); - gtk_box_pack_start (GTK_BOX (vbox126zz), commodity_box, TRUE, TRUE, 0); - - currency_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (currency_box); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "currency_box", currency_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (currency_box); - gtk_box_pack_start (GTK_BOX (vbox126zz), currency_box, TRUE, TRUE, 0); - - date_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (date_box); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "date_box", date_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (date_box); - gtk_box_pack_start (GTK_BOX (vbox126zz), date_box, TRUE, TRUE, 0); - - source_entry = gtk_entry_new (); - gtk_widget_ref (source_entry); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "source_entry", source_entry, - (GtkDestroyNotify) gtk_widget_unref); - gtk_box_pack_start (GTK_BOX (vbox126zz), source_entry, FALSE, FALSE, 0); - gtk_entry_set_editable (GTK_ENTRY (source_entry), FALSE); - - type_option = gtk_option_menu_new (); - gtk_widget_ref (type_option); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "type_option", type_option, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (type_option); - gtk_box_pack_start (GTK_BOX (vbox126zz), type_option, FALSE, FALSE, 0); - type_option_menu = gtk_menu_new (); - glade_menuitem = gtk_menu_item_new_with_label (_("Bid")); - gtk_widget_show (glade_menuitem); - gtk_menu_append (GTK_MENU (type_option_menu), glade_menuitem); - glade_menuitem = gtk_menu_item_new_with_label (_("Ask")); - gtk_widget_show (glade_menuitem); - gtk_menu_append (GTK_MENU (type_option_menu), glade_menuitem); - glade_menuitem = gtk_menu_item_new_with_label (_("Last")); - gtk_widget_show (glade_menuitem); - gtk_menu_append (GTK_MENU (type_option_menu), glade_menuitem); - glade_menuitem = gtk_menu_item_new_with_label (_("Net Asset Value")); - gtk_widget_show (glade_menuitem); - gtk_menu_append (GTK_MENU (type_option_menu), glade_menuitem); - glade_menuitem = gtk_menu_item_new_with_label (_("Unknown")); - gtk_widget_show (glade_menuitem); - gtk_menu_append (GTK_MENU (type_option_menu), glade_menuitem); - gtk_option_menu_set_menu (GTK_OPTION_MENU (type_option), type_option_menu); - - price_box = gtk_hbox_new (FALSE, 0); - gtk_widget_ref (price_box); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "price_box", price_box, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (price_box); - gtk_box_pack_start (GTK_BOX (vbox126zz), price_box, TRUE, TRUE, 0); - - dialog_action_area18 = GNOME_DIALOG (Price_Dialog)->action_area; - gtk_object_set_data (GTK_OBJECT (Price_Dialog), "dialog_action_area18", dialog_action_area18); - gtk_widget_show (dialog_action_area18); - gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area18), GTK_BUTTONBOX_END); - gtk_button_box_set_spacing (GTK_BUTTON_BOX (dialog_action_area18), 8); - - gnome_dialog_append_button (GNOME_DIALOG (Price_Dialog), GNOME_STOCK_BUTTON_OK); - ok_button = g_list_last (GNOME_DIALOG (Price_Dialog)->buttons)->data; - gtk_widget_ref (ok_button); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "ok_button", ok_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (ok_button); - GTK_WIDGET_SET_FLAGS (ok_button, GTK_CAN_DEFAULT); - - gnome_dialog_append_button (GNOME_DIALOG (Price_Dialog), GNOME_STOCK_BUTTON_CANCEL); - cancel_button = g_list_last (GNOME_DIALOG (Price_Dialog)->buttons)->data; - gtk_widget_ref (cancel_button); - gtk_object_set_data_full (GTK_OBJECT (Price_Dialog), "cancel_button", cancel_button, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (cancel_button); - GTK_WIDGET_SET_FLAGS (cancel_button, GTK_CAN_DEFAULT); - - return Price_Dialog; -} - diff --git a/src/gnome/glade-gnc-dialogs.h b/src/gnome/glade-gnc-dialogs.h index 3f7cd08a46..736acaf304 100644 --- a/src/gnome/glade-gnc-dialogs.h +++ b/src/gnome/glade-gnc-dialogs.h @@ -25,5 +25,3 @@ GtkWidget* create_Stock_Split_Druid (void); GtkWidget* create_Username_Password_Dialog (void); GtkWidget* create_Edit_Column_View_Page (void); GtkWidget* create_Edit_Report_Size (void); -GtkWidget* create_Prices_Dialog (void); -GtkWidget* create_Price_Dialog (void); diff --git a/src/gnome/glade/Makefile.am b/src/gnome/glade/Makefile.am index ce5f768f25..1c3f3a9efd 100644 --- a/src/gnome/glade/Makefile.am +++ b/src/gnome/glade/Makefile.am @@ -1,9 +1,11 @@ gladedir = $(GNC_GLADE_DIR) glade_DATA = \ - commodity.glade + commodity.glade \ + price.glade STRING_FILES = \ - commodity_strings.c + commodity_strings.c \ + price_strings.c EXTRA_DIST = $(glade_DATA) $(STRING_FILES) diff --git a/src/gnome/glade/price.glade b/src/gnome/glade/price.glade new file mode 100644 index 0000000000..65df56df8e --- /dev/null +++ b/src/gnome/glade/price.glade @@ -0,0 +1,623 @@ + + + + + Glade + glade + + + + C + True + True + False + False + False + False + True + price_strings.c + + + + GnomeDialog + Prices Dialog + Price Editor + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + True + True + False + False + False + + + GtkVBox + GnomeDialog:vbox + vbox121 + False + 8 + + 4 + True + True + + + + GtkHButtonBox + GnomeDialog:action_area + hbuttonbox4 + GTK_BUTTONBOX_END + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + close_button + True + True + GNOME_STOCK_BUTTON_CLOSE + + + + + GtkFrame + frame50 + 3 + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkVBox + vbox122 + False + 5 + + + GtkScrolledWindow + scrolledwindow32 + 3 + GTK_POLICY_NEVER + GTK_POLICY_ALWAYS + GTK_UPDATE_CONTINUOUS + GTK_UPDATE_CONTINUOUS + + 0 + True + True + + + + GtkCList + price_list + True + 6 + 80,80,80,80,80,80 + GTK_SELECTION_BROWSE + True + GTK_SHADOW_IN + + + GtkLabel + CList:title + label8477415 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label8477416 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label8477417 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label8477418 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label8477419 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + GtkLabel + CList:title + label8477420 + + GTK_JUSTIFY_CENTER + False + 0.5 + 0.5 + 0 + 0 + + + + + + GtkHBox + hbox108 + 3 + True + 10 + + 0 + False + False + + + + GtkRadioButton + sort_by_commodity_radio + True + + False + True + price_sort_radio + + 0 + False + False + + + + + GtkRadioButton + radiobutton10 + True + + False + True + price_sort_radio + + 0 + False + False + + + + + + GtkHButtonBox + hbuttonbox5 + GTK_BUTTONBOX_SPREAD + 20 + 50 + 27 + 7 + 0 + + 0 + False + False + + + + GtkButton + add_button + Add a new price. + True + True + + + + + GtkButton + remove_button + Remove the current price + True + True + + + + + GtkButton + remove_old_button + Remove prices older than a user-entered date + True + True + + + + + GtkButton + edit_button + Edit the current price. + True + True + + + + + GtkButton + get_quotes_button + Get new online quotes for stock accounts. + True + True + + + + + + + + + + GnomeDialog + Price Dialog + False + Price Editor + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + True + False + False + False + False + False + + + GtkVBox + GnomeDialog:vbox + dialog-vbox18 + False + 8 + + 4 + True + True + + + + GtkHButtonBox + GnomeDialog:action_area + dialog-action_area18 + GTK_BUTTONBOX_END + 8 + 85 + 27 + 7 + 0 + + 0 + False + True + GTK_PACK_END + + + + GtkButton + ok_button + True + True + GNOME_STOCK_BUTTON_OK + + + + GtkButton + cancel_button + True + True + GNOME_STOCK_BUTTON_CANCEL + + + + + GtkFrame + price_info_frame + + 0 + GTK_SHADOW_ETCHED_IN + + 0 + True + True + + + + GtkVBox + vbox126 + 3 + False + 0 + + + GtkHBox + hbox106 + False + 2 + + 0 + False + False + + + + GtkVBox + vbox125 + True + 0 + + 0 + False + False + + + + GtkLabel + label8477399 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label8477400 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label8477401 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label8477402 + False + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label8477403 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + GtkLabel + label8477404 + + GTK_JUSTIFY_CENTER + False + 1 + 0.5 + 0 + 0 + + 0 + False + False + + + + + + GtkVBox + vbox126zz + True + 0 + + 0 + True + True + + + + GtkHBox + commodity_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + currency_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkHBox + date_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + GtkEntry + source_entry + False + True + False + True + 0 + + + 0 + False + False + + + + + GtkOptionMenu + type_option + True + Bid +Ask +Last +Net Asset Value +Unknown + + 0 + + 0 + False + False + + + + + GtkHBox + price_box + False + 0 + + 0 + True + True + + + + Placeholder + + + + + + + + + + diff --git a/src/gnome/glade/price_strings.c b/src/gnome/glade/price_strings.c new file mode 100644 index 0000000000..d96d35aced --- /dev/null +++ b/src/gnome/glade/price_strings.c @@ -0,0 +1,40 @@ +/* + * 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_("Price Editor"); +gchar *s = N_("Prices"); +gchar *s = N_("Commodity"); +gchar *s = N_("Currency"); +gchar *s = N_("Date"); +gchar *s = N_("Source"); +gchar *s = N_("Type"); +gchar *s = N_("Price"); +gchar *s = N_("Sort by Commodity"); +gchar *s = N_("Sort by Date"); +gchar *s = N_("Add a new price."); +gchar *s = N_("Add"); +gchar *s = N_("Remove the current price"); +gchar *s = N_("Remove"); +gchar *s = N_("Remove prices older than a user-entered date"); +gchar *s = N_("Remove Old..."); +gchar *s = N_("Edit the current price."); +gchar *s = N_("Edit"); +gchar *s = N_("Get new online quotes for stock accounts."); +gchar *s = N_("Get Quotes"); +gchar *s = N_("Price Editor"); +gchar *s = N_("Price Information"); +gchar *s = N_("Commodity:"); +gchar *s = N_("Currency:"); +gchar *s = N_("Date:"); +gchar *s = N_("Source:"); +gchar *s = N_("Type:"); +gchar *s = N_("Price:"); +gchar *s = N_("Bid\n" + "Ask\n" + "Last\n" + "Net Asset Value\n" + "Unknown\n" + ""); diff --git a/src/gnome/gnc-dialogs.glade b/src/gnome/gnc-dialogs.glade index c56b2be416..7f8cd01db0 100644 --- a/src/gnome/gnc-dialogs.glade +++ b/src/gnome/gnc-dialogs.glade @@ -10798,606 +10798,4 @@ quit without making any changes. - - GnomeDialog - Prices Dialog - Price Editor - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - True - False - False - False - - - GtkVBox - GnomeDialog:vbox - vbox121 - False - 8 - - 4 - True - True - - - - GtkHButtonBox - GnomeDialog:action_area - hbuttonbox4 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - close_button - True - True - GNOME_STOCK_BUTTON_CLOSE - - - - - GtkFrame - frame50 - 3 - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox122 - False - 5 - - - GtkScrolledWindow - scrolledwindow32 - 3 - GTK_POLICY_NEVER - GTK_POLICY_ALWAYS - GTK_UPDATE_CONTINUOUS - GTK_UPDATE_CONTINUOUS - - 0 - True - True - - - - GtkCList - price_list - True - 6 - 80,80,80,80,80,80 - GTK_SELECTION_BROWSE - True - GTK_SHADOW_IN - - - GtkLabel - CList:title - label8477415 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - CList:title - label8477416 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - CList:title - label8477417 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - CList:title - label8477418 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - CList:title - label8477419 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - GtkLabel - CList:title - label8477420 - - GTK_JUSTIFY_CENTER - False - 0.5 - 0.5 - 0 - 0 - - - - - - GtkHBox - hbox108 - 3 - True - 10 - - 0 - False - False - - - - GtkRadioButton - sort_by_commodity_radio - True - - False - True - price_sort_radio - - 0 - False - False - - - - - GtkRadioButton - radiobutton10 - True - - False - True - price_sort_radio - - 0 - False - False - - - - - - GtkHButtonBox - hbuttonbox5 - GTK_BUTTONBOX_SPREAD - 20 - 50 - 27 - 7 - 0 - - 0 - False - False - - - - GtkButton - add_button - Add a new price. - True - True - - - - - GtkButton - remove_button - Remove the current price - True - True - - - - - GtkButton - remove_old_button - Remove prices older than a user-entered date - True - True - - - - - GtkButton - edit_button - Edit the current price. - True - True - - - - - GtkButton - get_quotes_button - Get new online quotes for stock accounts. - True - True - - - - - - - - - - GnomeDialog - Price Dialog - False - Price Editor - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - False - False - False - False - False - - - GtkVBox - GnomeDialog:vbox - dialog-vbox18 - False - 8 - - 4 - True - True - - - - GtkHButtonBox - GnomeDialog:action_area - dialog-action_area18 - GTK_BUTTONBOX_END - 8 - 85 - 27 - 7 - 0 - - 0 - False - True - GTK_PACK_END - - - - GtkButton - ok_button - True - True - GNOME_STOCK_BUTTON_OK - - - - GtkButton - cancel_button - True - True - GNOME_STOCK_BUTTON_CANCEL - - - - - GtkFrame - price_info_frame - - 0 - GTK_SHADOW_ETCHED_IN - - 0 - True - True - - - - GtkVBox - vbox126 - 3 - False - 0 - - - GtkHBox - hbox106 - False - 2 - - 0 - False - False - - - - GtkVBox - vbox125 - True - 0 - - 0 - False - False - - - - GtkLabel - label8477399 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label8477400 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label8477401 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label8477402 - False - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label8477403 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - GtkLabel - label8477404 - - GTK_JUSTIFY_CENTER - False - 1 - 0.5 - 0 - 0 - - 0 - False - False - - - - - - GtkVBox - vbox126zz - True - 0 - - 0 - True - True - - - - GtkHBox - commodity_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - currency_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkHBox - date_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - GtkEntry - source_entry - False - True - False - True - 0 - - - 0 - False - False - - - - - GtkOptionMenu - type_option - True - Bid -Ask -Last -Net Asset Value -Unknown - - 0 - - 0 - False - False - - - - - GtkHBox - price_box - False - 0 - - 0 - True - True - - - - Placeholder - - - - - - - - -