diff --git a/src/AccountSettingsWindow.cpp b/src/AccountSettingsWindow.cpp index 1bb2789..5759393 100644 --- a/src/AccountSettingsWindow.cpp +++ b/src/AccountSettingsWindow.cpp @@ -6,6 +6,7 @@ #include "AutoTextControl.h" #include "CBLocale.h" #include "Database.h" +#include "Help.h" #include "PrefWindow.h" #undef B_TRANSLATION_CONTEXT @@ -44,6 +45,8 @@ AccountSettingsWindow::AccountSettingsWindow(Account* account) templocale = fAccount->GetLocale(); fPrefView = new CurrencyPrefView("prefview", &templocale); + HelpButton* helpButton = new HelpButton("start.html", "#new-account"); + fOK = new BButton("okbutton", B_TRANSLATE("OK"), new BMessage(M_EDIT_ACCOUNT_SETTINGS)); if (strlen(fAccountName->Text()) < 1) @@ -66,7 +69,9 @@ AccountSettingsWindow::AccountSettingsWindow(Account* account) .Add(fPrefView) .End() .AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING) - .AddGlue() + .AddGlue(0) + .Add(helpButton) + .AddGlue(1) .Add(cancel) .Add(fOK) .End() diff --git a/src/CategoryWindow.cpp b/src/CategoryWindow.cpp index 78c8ae7..cbc670e 100644 --- a/src/CategoryWindow.cpp +++ b/src/CategoryWindow.cpp @@ -16,6 +16,7 @@ #include "AutoTextControl.h" #include "Database.h" +#include "Help.h" #undef B_TRANSLATION_CONTEXT @@ -103,6 +104,8 @@ CategoryView::CategoryView(const char* name, const int32& flags) : BView(name, flags) { // the buttons + HelpButton* helpButton = new HelpButton("menus.html", "#categories"); + fEditButton = new BButton( "editbutton", B_TRANSLATE("Edit" B_UTF8_ELLIPSIS), new BMessage(M_SHOW_EDIT_WINDOW)); fRemoveButton = new BButton( @@ -130,7 +133,9 @@ CategoryView::CategoryView(const char* name, const int32& flags) .SetInsets(B_USE_DEFAULT_SPACING) .Add(scrollView) .AddGroup(B_HORIZONTAL) - .AddGlue() + .AddGlue(0) + .Add(helpButton) + .AddGlue(1) .Add(fEditButton) .Add(fRemoveButton) .Add(fAddButton) diff --git a/src/PrefWindow.cpp b/src/PrefWindow.cpp index 9918ee6..f57cc73 100644 --- a/src/PrefWindow.cpp +++ b/src/PrefWindow.cpp @@ -9,6 +9,7 @@ #include #include "Database.h" +#include "Help.h" #undef B_TRANSLATION_CONTEXT @@ -26,6 +27,7 @@ PrefWindow::PrefWindow(const BRect& frame, BMessenger target) fNegNumberView = new NegativeNumberView("negcolor", gNegativeColor); + HelpButton* helpButton = new HelpButton("menus.html", "#app-settings"); BButton* cancel = new BButton("cancelbutton", B_TRANSLATE("Cancel"), new BMessage(B_QUIT_REQUESTED)); BButton* ok = new BButton("okbutton", B_TRANSLATE("OK"), new BMessage(M_EDIT_OPTIONS)); @@ -37,7 +39,9 @@ PrefWindow::PrefWindow(const BRect& frame, BMessenger target) .SetInsets(B_USE_DEFAULT_SPACING) .Add(fNegNumberView) .AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING) - .AddGlue() + .AddGlue(0) + .Add(helpButton) + .AddGlue(1) .Add(cancel) .Add(ok) .End() diff --git a/src/ReportWindow.cpp b/src/ReportWindow.cpp index 3560c84..6c0ae29 100644 --- a/src/ReportWindow.cpp +++ b/src/ReportWindow.cpp @@ -68,7 +68,7 @@ ReportWindow::ReportWindow(BRect frame) BGroupLayout* listLayout = new BGroupLayout(B_VERTICAL, 1.0f); - HelpButton* help = new HelpButton("report.html", NULL); + HelpButton* help = new HelpButton("reports.html", NULL); // clang-format off BLayoutBuilder::Group<>(this, B_HORIZONTAL) diff --git a/src/ScheduleAddWindow.cpp b/src/ScheduleAddWindow.cpp index 803c490..91eca08 100644 --- a/src/ScheduleAddWindow.cpp +++ b/src/ScheduleAddWindow.cpp @@ -16,6 +16,7 @@ #include "CalendarButton.h" #include "Database.h" #include "DateBox.h" +#include "Help.h" #include "NumBox.h" #include "ScheduledExecutor.h" #include "ScheduledTransData.h" @@ -137,6 +138,8 @@ ScheduleAddWindow::ScheduleAddWindow(const BRect& frame, const TransactionData& BButton* cancelButton = new BButton("cancelbutton", B_TRANSLATE("Cancel"), new BMessage(B_QUIT_REQUESTED)); + HelpButton* helpButton = new HelpButton("menus.html", "#schedule"); + // clang-format off BView* calendarStartWidget = new BView("calendarstartwidget", B_WILL_DRAW); BLayoutBuilder::Group<>(calendarStartWidget, B_HORIZONTAL, -2) @@ -181,7 +184,9 @@ ScheduleAddWindow::ScheduleAddWindow(const BRect& frame, const TransactionData& .End() .AddStrut(B_USE_BIG_SPACING) .AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING) - .AddGlue() + .AddGlue(0) + .Add(helpButton) + .AddGlue(1) .Add(cancelButton) .Add(okButton) .End() diff --git a/src/ScheduleListWindow.cpp b/src/ScheduleListWindow.cpp index 98255b1..b10ecaa 100644 --- a/src/ScheduleListWindow.cpp +++ b/src/ScheduleListWindow.cpp @@ -65,7 +65,7 @@ ScheduleListView::ScheduleListView(const char* name, const int32& flags) fBestWidth = MAX(fBestWidth, 400); HelpButton* helpButton - = new HelpButton("start.html", "#scheduled-transactions"); + = new HelpButton("menus.html", "#scheduled-transactions"); // clang-format off BLayoutBuilder::Group<>(this, B_VERTICAL) diff --git a/src/TransferWindow.cpp b/src/TransferWindow.cpp index 321e321..3a87f5c 100644 --- a/src/TransferWindow.cpp +++ b/src/TransferWindow.cpp @@ -14,6 +14,7 @@ #include "Database.h" #include "DateBox.h" #include "Fixed.h" +#include "Help.h" #include "MsgDefs.h" #undef B_TRANSLATION_CONTEXT @@ -60,6 +61,8 @@ TransferWindow::InitObject(Account* src, Account* dest, const Fixed& amount) fToLabel = new BStringView("tolabel", B_TRANSLATE("To account:")); fToLabel->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); + HelpButton* helpButton = new HelpButton("start.html", "#transfer"); + fOK = new BButton("okbutton", B_TRANSLATE("OK"), new BMessage(M_CREATE_TRANSFER)); fOK->SetEnabled(false); fOK->MakeDefault(true); @@ -160,7 +163,9 @@ TransferWindow::InitObject(Account* src, Account* dest, const Fixed& amount) .End() .AddStrut(B_USE_DEFAULT_SPACING) .AddGroup(B_HORIZONTAL) - .AddGlue() + .AddGlue(0) + .Add(helpButton) + .AddGlue(1) .Add(fCancel) .Add(fOK) .AddGlue()