Skip to content

Commit

Permalink
Add a "Help" menu item
Browse files Browse the repository at this point in the history
Starts the online version of the English Vision page of the user
guide.
Updated catkeys.
  • Loading branch information
Humdinger committed Apr 10, 2017
1 parent 8de56c6 commit 781329d
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ClientWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,9 @@ void ClientWindow::Init()
menu->AddItem(
item = new BMenuItem(B_TRANSLATE("About Vision"), new BMessage(B_ABOUT_REQUESTED)));
item->SetTarget(vision_app);
menu->AddItem(
item = new BMenuItem(B_TRANSLATE("Help"), new BMessage(M_HELP_SHOW)));
item->SetTarget(vision_app);
menu->AddItem(item = new BMenuItem(B_TRANSLATE("Preferences" B_UTF8_ELLIPSIS), new BMessage(M_PREFS_SHOW)));
item->SetTarget(vision_app);

Expand Down
4 changes: 4 additions & 0 deletions src/Vision.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,10 @@ void VisionApp::MessageReceived(BMessage* msg)
PostMessage(B_QUIT_REQUESTED);
} break;

case M_HELP_SHOW: {
LoadURL("https://www.haiku-os.org/docs/userguide/en/applications/vision.html");
} break;

case M_PREFS_SHOW: {
if (fPrefsWin)
fPrefsWin->Activate();
Expand Down
1 change: 1 addition & 0 deletions src/VisionMessages.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ const uint32 M_OPEN_TERM = 0x2005;
const uint32 M_MAKE_NEW_NETWORK = 0x2006;
const uint32 M_STATUS_CLEAR = 0x2007;
const uint32 M_STATUS_ADDITEMS = 0x2008;
const uint32 M_HELP_SHOW = 0x2009;

// names view

Expand Down
3 changes: 2 additions & 1 deletion src/locales/de.catkeys
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1 german application/x-vnd.Ink-Vision 3932130148
1 german application/x-vnd.Ink-Vision 3406632783
[@] Attempting to rejoin…\n ChannelAgent [@] Versuche einen Rejoin…\n
*** Attempting to rejoin %channel%…\n ChannelAgent *** Versuche einen Rejoin mit %channel%…\n
*** Now talking in %channel%\n ChannelAgent *** Momentan in %channel%\n
Expand Down Expand Up @@ -36,6 +36,7 @@ Cut ClientWindow Ausschneiden
Down ClientWindow Runter
Edit ClientWindow Bearbeiten
Expand network ClientWindow Netzwerk ausklappen
Help ClientWindow Help
List channels… ClientWindow Kanäle auflisten…
Move network down ClientWindow Netzwerk runter
Move network up ClientWindow Netzwerk rauf
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.catkeys
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
1 English application/x-vnd.Ink-Vision 3932130148
1 English application/x-vnd.Ink-Vision 3406632783
[@] Attempting to rejoin…\n ChannelAgent [@] Attempting to rejoin…\n
*** Attempting to rejoin %channel%…\n ChannelAgent *** Attempting to rejoin %channel%…\n
*** Now talking in %channel%\n ChannelAgent *** Now talking in %channel%\n
Expand Down Expand Up @@ -36,6 +36,7 @@ Cut ClientWindow Cut
Down ClientWindow Down
Edit ClientWindow Edit
Expand network ClientWindow Expand network
Help ClientWindow Help
List channels… ClientWindow List channels…
Move network down ClientWindow Move network down
Move network up ClientWindow Move network up
Expand Down

0 comments on commit 781329d

Please sign in to comment.