*** expense.bak Mon Jul 3 19:14:54 2000 --- expense.c Mon Jul 3 19:15:10 2000 *************** *** 69,74 **** --- 69,76 ---- static GtkWidget *menu_item_category2[16]; static GtkWidget *menu_expense_type; static GtkWidget *menu_item_expense_type[28]; + static GtkWidget *menu_currency; + static GtkWidget *menu_item_currency[24]; static GtkWidget *spinner_mon, *spinner_day, *spinner_year; GtkAdjustment *adj_mon, *adj_day, *adj_year; GtkWidget *scrolled_window; *************** *** 76,81 **** --- 78,84 ---- static int glob_detail_category; static int glob_detail_type; static int glob_detail_payment; + static int glob_detail_currency; static int glob_row_selected; static void display_records(); *************** *** 262,268 **** ex.type = glob_detail_type; ex.payment = glob_detail_payment; ! ex.currency=23; text = gtk_entry_get_text(GTK_ENTRY(entry_amount)); ex.amount = text; if (ex.amount[0]=='\0') { --- 265,271 ---- ex.type = glob_detail_type; ex.payment = glob_detail_payment; ! ex.currency=glob_detail_currency; text = gtk_entry_get_text(GTK_ENTRY(entry_amount)); ex.amount = text; if (ex.amount[0]=='\0') { *************** *** 546,554 **** --- 549,560 ---- (menu_item_expense_type[mex->ex.type]), TRUE); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM (menu_item_payment[mex->ex.payment]), TRUE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM + (menu_item_currency[mex->ex.currency]), TRUE); gtk_option_menu_set_history(GTK_OPTION_MENU(menu_category2), mex->attrib & 0x0F); gtk_option_menu_set_history(GTK_OPTION_MENU(menu_expense_type), mex->ex.type); gtk_option_menu_set_history(GTK_OPTION_MENU(menu_payment), mex->ex.payment); + gtk_option_menu_set_history(GTK_OPTION_MENU(menu_currency), mex->ex.currency); gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinner_mon), mex->ex.date.tm_mon+1); *************** *** 619,624 **** --- 625,633 ---- case EXPENSE_PAYMENT: glob_detail_payment=sel; break; + case EXPENSE_CURRENCY: + glob_detail_currency=sel; + break; } } *************** *** 727,732 **** --- 736,768 ---- "Train", NULL }; + char *currency[]={ + _("Australia"), + _("Austria"), + _("Belgium"), + _("Brazil"), + _("Canada"), + _("Denmark"), + _("Finland"), + _("France"), + _("German"), + _("Hong Kong."), + _("Iceland"), + _("Ireland"), + _("Italy"), + _("Japan"), + _("Luxembourg"), + _("Mexico"), + _("Holland"), + _("New Zealand"), + _("Norway"), + _("Spain"), + _("Sweden"), + _("Switzerland"), + _("U.K."), + _("U.S.A."), + NULL + }; jp_logf(LOG_DEBUG, "Expense: make_menus\n"); *************** *** 753,758 **** --- 789,795 ---- make_menu(&categories[1], EXPENSE_CAT2, &menu_category2, menu_item_category2); make_menu(payment, EXPENSE_PAYMENT, &menu_payment, menu_item_payment); make_menu(expense_type, EXPENSE_TYPE, &menu_expense_type, menu_item_expense_type); + make_menu(currency, EXPENSE_CURRENCY, &menu_currency, menu_item_currency); } *************** *** 995,1000 **** --- 1032,1046 ---- label = gtk_label_new("Payment: "); gtk_box_pack_start(GTK_BOX(temp_hbox), label, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(temp_hbox), menu_payment, TRUE, TRUE, 0); + + + /* Currency Menu */ + temp_hbox = gtk_hbox_new(FALSE, 0); + gtk_box_pack_start(GTK_BOX(vbox2), temp_hbox, FALSE, FALSE, 0); + + label = gtk_label_new(_("Currency: ")); + gtk_box_pack_start(GTK_BOX(temp_hbox), label, FALSE, FALSE, 0); + gtk_box_pack_start(GTK_BOX(temp_hbox), menu_currency, TRUE, TRUE, 0);