Skip to content

Commit

Permalink
Change Reconcile Window layout
Browse files Browse the repository at this point in the history
+ Some code changes in Main menu
+ Code review changes
  • Loading branch information
dospuntos committed Apr 27, 2024
1 parent 0f510d5 commit 32e8cac
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 130 deletions.
22 changes: 11 additions & 11 deletions locales/en.catkeys
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1 English application/x-vnd.wgp-CapitalBe 2175615134
1 English application/x-vnd.wgp-CapitalBe 513412878
Year ReportWindow Year
Edit transaction TransactionEditWindow Edit transaction
None ReportWindow None
Expand All @@ -11,8 +11,8 @@ Report a bug… MainWindow Report a bug…
OK PrefWindow OK
CapitalBe didn't understand the date you entered. DateBox CapitalBe didn't understand the date you entered.
To account TransferWindow To account
CapitalBe MainWindow CapitalBe
Category CheckView Category
Reports… MainWindow Reports…
Cancel TransferWindow Cancel
Weekly BudgetWindow Weekly
Enter CheckView Enter
Expand All @@ -30,8 +30,7 @@ You need to enter a payee. PayeeBox You need to enter a payee.
Split ScheduledTransItem Split
Could not export your financial data to the file %%FILENAME%%. MainWindow Could not export your financial data to the file %%FILENAME%%.
Separator: PrefWindow Separator:
Program MainWindow Program
Starting balance: ReconcileWindow Starting balance:
Bank charges ReconcileWindow Bank charges
CapitalBe uses the words 'Income','Spending', and 'Split' for managing categories, so you can't use them as category names. Please choose a different name for your new category. CategoryWindow CapitalBe uses the words 'Income','Spending', and 'Split' for managing categories, so you can't use them as category names. Please choose a different name for your new category.
Total charges: %s ReconcileWindow Total charges: %s
CapitalBe: MainWindow CapitalBe:
Expand All @@ -40,9 +39,9 @@ You need to select an account in order to reconcile it. MainWindow You need to
Spending category CategoryWindow Spending category
Add… CategoryWindow Add…
Total NetWorthReport Total
Interest earned: ReconcileWindow Interest earned:
Category SplitView Category
Transactions ReportWindow Transactions
Date ReconcileWindow Date
Budget: QuickTrackerItem Budget:
Couldn't quick balance. ReconcileWindow Couldn't quick balance.
Total BudgetWindow Total
Expand Down Expand Up @@ -80,6 +79,7 @@ English CheckView Path to localized helpfiles. Only translate if available in yo
Closed AccountListItem Closed
CapitalBe didn't understand the amount for Bank Charges. ReconcileWindow CapitalBe didn't understand the amount for Bank Charges.
Import MainWindow Import
Interest earned ReconcileWindow Interest earned
CapitalBe understands lots of different ways of entering dates. Apparently, this wasn't one of them. You'll need to change how you entered this date. Sorry. ReportWindow CapitalBe understands lots of different ways of entering dates. Apparently, this wasn't one of them. You'll need to change how you entered this date. Sorry.
Could not import the data in the file %%FILENAME%%. MainWindow Could not import the data in the file %%FILENAME%%.
Once deleted, you will not be able to get back any data on this account. MainWindow Once deleted, you will not be able to get back any data on this account.
Expand All @@ -105,7 +105,6 @@ Add Item SplitView Add Item
Scheduled transactions… MainWindow Scheduled transactions…
Delete MainWindow Delete
Date format: %s PrefWindow Date format: %s
Bank charges: ReconcileWindow Bank charges:
Quick balance successful! ReconcileWindow Quick balance successful!
Quarter ReportWindow Quarter
Account interest ReconcileWindow Account interest
Expand All @@ -119,6 +118,7 @@ Average BudgetWindow Average
Quarterly Budget Quarterly
Currency PrefWindow Currency
Summary BudgetWindow Summary
Ending balance ReconcileWindow Ending balance
Frequency ScheduleAddWindow Frequency
Category BudgetReport Category
Accounts: ReportWindow Accounts:
Expand All @@ -132,6 +132,7 @@ Reset ReconcileWindow Reset
Frequency: ScheduleAddWindow Frequency:
Category: ScheduleAddWindow Category:
OK AccountSettingsWindow OK
About CapitalBe MainWindow About CapitalBe
Annually Budget Annually
Payee SplitView Payee
Can't use this category name CategoryWindow Can't use this category name
Expand All @@ -156,7 +157,6 @@ Account name: AccountSettingsWindow Account name:
Set all to zero BudgetWindow Set all to zero
When the split items are added together, they need to add up to %%ENTERED_AMOUNT%%. Currently, they add up to %%TOTAL_AMOUNT%% SplitView When the split items are added together, they need to add up to %%ENTERED_AMOUNT%%. Currently, they add up to %%TOTAL_AMOUNT%%
Date is missing. ReconcileWindow Date is missing.
Date: ReconcileWindow Date:
Numbered transactions cannot be scheduled. MainWindow Numbered transactions cannot be scheduled.
New… MainWindow New…
English ReconcileWindow Path to localized helpfiles. Only translate if available in your language. English
Expand All @@ -167,7 +167,6 @@ Starting date: ScheduleAddWindow Starting date:
Settings… MainWindow Settings…
Monthly Budget Monthly
Cancel PrefWindow Cancel
Unreconciled total ReconcileWindow Unreconciled total
Quarterly ScheduleListWindow Quarterly
12 month statistics BudgetWindow 12 month statistics
Not transferring any money TransferWindow Not transferring any money
Expand All @@ -180,6 +179,7 @@ Amount TransactionReport Amount
Transaction MainWindow Transaction
Edit transfer TransferWindow Edit transfer
Amount TransferWindow Amount
Reports MainWindow Reports
Categories CategoryWindow Categories
Date CheckView Date
Account MainWindow Account
Expand All @@ -192,7 +192,6 @@ CapitalBe didn't understand the amount. CurrencyBox CapitalBe didn't understand
Day, Month, Year PrefWindow Day, Month, Year
Remove… ScheduleListWindow Remove…
If you intend to transfer money, it will need to be an amount that is not zero. TransferWindow If you intend to transfer money, it will need to be an amount that is not zero.
Budget… MainWindow Budget…
You can schedule transfers, deposits, or ATM transactions. MainWindow You can schedule transfers, deposits, or ATM transactions.
Success! ReconcileWindow Success!
Income CategoryWindow Income
Expand All @@ -203,11 +202,12 @@ Type: %s ScheduleAddWindow Type: %s
Weekly Budget Weekly
Split SplitFilterView Split
Bank charge ReconcileWindow Bank charge
Budget MainWindow Budget
Cancel AccountSettingsWindow Cancel
Ending balance: ReconcileWindow Ending balance:
Date PrefWindow Date
OK ScheduleAddWindow OK
Date SplitView Date
Quit MainWindow Quit
Lowest BudgetWindow Lowest
Previous MainWindow Previous
New category name: CategoryWindow New category name:
Expand All @@ -228,9 +228,9 @@ Split SplitView Split
The split total must match the amount box. SplitView The split total must match the amount box.
Delete… MainWindow Delete…
Amount BudgetWindow Amount
About CapitalBe… MainWindow About CapitalBe…
Scheduled transactions ScheduleListWindow Scheduled transactions
Starting date: ReportWindow Starting date:
Starting balance ReconcileWindow Starting balance
Amount CashFlowReport Amount
Quarterly ScheduleAddWindow Quarterly
Hide Split SplitView Hide Split
Expand Down
6 changes: 3 additions & 3 deletions src/CategoryWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ CategoryView::CategoryView(const char* name, const int32& flags) : BView(name, f
SetViewColor(240, 240, 240);

// the buttons
temp = B_TRANSLATE("Edit");
temp = B_TRANSLATE("Edit" B_UTF8_ELLIPSIS);
fEditButton = new BButton("editbutton", temp.String(), new BMessage(M_SHOW_EDIT_WINDOW));

temp = B_TRANSLATE("Remove");
temp = B_TRANSLATE("Remove" B_UTF8_ELLIPSIS);
fRemoveButton = new BButton("removebutton", temp.String(), new BMessage(M_SHOW_REMOVE_WINDOW));

temp = B_TRANSLATE("Add");
temp = B_TRANSLATE("Add" B_UTF8_ELLIPSIS);
fAddButton = new BButton("addbutton", temp.String(), new BMessage(M_SHOW_ADD_WINDOW));

// the category list
Expand Down
75 changes: 25 additions & 50 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
int32 gTextViewHeight = 20;
int32 gStringViewHeight = 20;

MainWindow::MainWindow(BRect frame) : BWindow(frame, "", B_DOCUMENT_WINDOW, 0)
MainWindow::MainWindow(BRect frame) : BWindow(frame, "", B_TITLED_WINDOW, 0)
{
BString temp;
SetTitle(B_TRANSLATE_SYSTEM_NAME("CapitalBe"));
Expand Down Expand Up @@ -88,62 +88,48 @@ MainWindow::MainWindow(BRect frame) : BWindow(frame, "", B_DOCUMENT_WINDOW, 0)
r.bottom = 20;
BMenuBar* bar = new BMenuBar("keybar");

BMenu* menu = new BMenu(B_TRANSLATE("Program"));

temp = B_TRANSLATE("Report a bug…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_REPORT_BUG)));
temp = B_TRANSLATE("Settings…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_OPTIONS_WINDOW), ','));

BMenu* menu = new BMenu(B_TRANSLATE("CapitalBe"));
menu->AddItem(new BMenuItem(B_TRANSLATE("Report a bug" B_UTF8_ELLIPSIS), new BMessage(M_REPORT_BUG)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_OPTIONS_WINDOW), ','));
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(B_TRANSLATE("About CapitalBe"), new BMessage(M_SHOW_ABOUT)));
menu->AddSeparatorItem();
temp = B_TRANSLATE("About CapitalBe…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_ABOUT)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Quit"), new BMessage(B_QUIT_REQUESTED), 'Q'));
bar->AddItem(menu);

menu = new BMenu(B_TRANSLATE("File"));
temp = B_TRANSLATE("Categories…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_CATEGORY_WINDOW)));
temp = B_TRANSLATE("Scheduled transactions…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_SCHEDULED_WINDOW)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Categories" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_CATEGORY_WINDOW)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Scheduled transactions" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_SCHEDULED_WINDOW)));
menu->AddSeparatorItem();
temp = B_TRANSLATE("Import from QIF file…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_IMPORT_PANEL)));
temp = B_TRANSLATE("Export to QIF file…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_EXPORT_PANEL)));

menu->AddItem(new BMenuItem(B_TRANSLATE("Import from QIF file" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_IMPORT_PANEL)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Export to QIF file" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_EXPORT_PANEL)));
bar->AddItem(menu);

menu = new BMenu(B_TRANSLATE("Account"));
bar->AddItem(menu);

temp = B_TRANSLATE("Reconcile…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_RECONCILE_WINDOW), 'R'));
menu->AddItem(new BMenuItem(B_TRANSLATE("Reconcile" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_RECONCILE_WINDOW), 'R'));
menu->AddSeparatorItem();
temp = B_TRANSLATE("New…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_NEW_ACCOUNT), 'N'));
temp = B_TRANSLATE("Delete…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_DELETE_ACCOUNT)));
menu->AddItem(new BMenuItem(B_TRANSLATE("New" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_NEW_ACCOUNT), 'N'));
menu->AddItem(new BMenuItem(B_TRANSLATE("Delete" B_UTF8_ELLIPSIS), new BMessage(M_DELETE_ACCOUNT)));
fAccountClosedItem = new BMenuItem(B_TRANSLATE("Close"), new BMessage(M_CLOSE_ACCOUNT));
menu->AddItem(fAccountClosedItem);
menu->AddSeparatorItem();
temp = B_TRANSLATE("Settings…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_ACCOUNT_SETTINGS)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Settings" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_ACCOUNT_SETTINGS)));
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(B_TRANSLATE("Previous"), new BMessage(M_PREVIOUS_ACCOUNT),
B_UP_ARROW, B_COMMAND_KEY | B_SHIFT_KEY));
menu->AddItem(new BMenuItem(B_TRANSLATE("Next"), new BMessage(M_NEXT_ACCOUNT), B_DOWN_ARROW,
B_COMMAND_KEY | B_SHIFT_KEY));

menu = new BMenu(B_TRANSLATE("Transaction"));
bar->AddItem(menu);
temp = B_TRANSLATE("Edit…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_EDIT_TRANSACTION), 'E'));
temp = B_TRANSLATE("Enter a transfer…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_ENTER_TRANSFER), 'T'));

menu->AddItem(new BMenuItem(B_TRANSLATE("Edit" B_UTF8_ELLIPSIS), new BMessage(M_EDIT_TRANSACTION), 'E'));
menu->AddItem(new BMenuItem(B_TRANSLATE("Enter a transfer" B_UTF8_ELLIPSIS), new BMessage(M_ENTER_TRANSFER), 'T'));
menu->AddSeparatorItem();
menu->AddItem(new BMenuItem(B_TRANSLATE("Delete"), new BMessage(M_DELETE_TRANSACTION)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Delete" B_UTF8_ELLIPSIS), new BMessage(M_DELETE_TRANSACTION)));
menu->AddSeparatorItem();
temp = B_TRANSLATE("Schedule this transaction…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SCHEDULE_TRANSACTION)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Schedule this transaction" B_UTF8_ELLIPSIS), new BMessage(M_SCHEDULE_TRANSACTION)));
menu->AddSeparatorItem();
menu->AddItem(
new BMenuItem(B_TRANSLATE("Previous"), new BMessage(M_PREVIOUS_TRANSACTION), B_UP_ARROW));
Expand All @@ -152,10 +138,8 @@ MainWindow::MainWindow(BRect frame) : BWindow(frame, "", B_DOCUMENT_WINDOW, 0)

menu = new BMenu(B_TRANSLATE("Tools"));
bar->AddItem(menu);
temp = B_TRANSLATE("Budget…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_BUDGET_WINDOW)));
temp = B_TRANSLATE("Reports…");
menu->AddItem(new BMenuItem(temp.String(), new BMessage(M_SHOW_REPORTS_WINDOW)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Budget"), new BMessage(M_SHOW_BUDGET_WINDOW)));
menu->AddItem(new BMenuItem(B_TRANSLATE("Reports"), new BMessage(M_SHOW_REPORTS_WINDOW)));

// We load the financial data before we create any of the views because the
// notifications are not sent and startup time is *significantly* reduced
Expand Down Expand Up @@ -523,10 +507,8 @@ MainWindow::MessageReceived(BMessage* msg)
break;
}

BRect r(Frame());
ReconcileWindow* recwin = new ReconcileWindow(BRect(100, 100, 600, 425), acc);
recwin->MoveTo(r.left + ((Bounds().Width() - recwin->Bounds().Width()) / 2),
r.top + ((Bounds().Height() - recwin->Bounds().Height()) / 2));
ReconcileWindow* recwin = new ReconcileWindow(BRect(100, 100, 700, 425), acc);
recwin->CenterIn(Frame());
recwin->Show();
break;
}
Expand Down Expand Up @@ -554,13 +536,6 @@ MainWindow::MessageReceived(BMessage* msg)
catwin->Show();
break;
}
case M_PURCHASE_FULL_VERSION:
{
BMessage msg(B_NETPOSITIVE_OPEN_URL);
msg.AddString("be:url", "http://www.capitalbe.com/");
be_roster->Launch(B_NETPOSITIVE_APP_SIGNATURE, &msg);
break;
}
default:
{
BWindow::MessageReceived(msg);
Expand Down
1 change: 0 additions & 1 deletion src/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ enum
M_FILE_OPEN,
M_FILE_BACKUP,

M_PURCHASE_FULL_VERSION,
M_REPORT_BUG,

M_SHOW_NEW_ACCOUNT,
Expand Down
Loading

0 comments on commit 32e8cac

Please sign in to comment.