Skip to content

Commit

Permalink
Feat/Menu: New entries for Support Forum/HowTo
Browse files Browse the repository at this point in the history
  • Loading branch information
TwinFan committed Feb 16, 2024
1 parent 2fae1b8 commit 1e9d850
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Include/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,8 @@ constexpr const char* REMOTE_SIGNATURE = "TwinFan.plugin.XPMP2.Remote";
#define MENU_HELP_AC_INFO_WND "A/C Info Window"
#define MENU_HELP_SETTINGS "Settings"
#define MENU_HELP_INSTALL_CSL "Installaton of CSL Models"
#define MENU_HELP_SUPPORT_FORUM "Support Forum"
#define MENU_HELP_SUPPORT_HOWTO "Support HowTo"
#define MENU_NEWVER "New Version %s available!"
#ifdef DEBUG
#define MENU_RELOAD_PLUGINS "Reload all Plugins (Caution!)"
Expand Down Expand Up @@ -270,6 +272,9 @@ constexpr const char* REMOTE_SIGNATURE = "TwinFan.plugin.XPMP2.Remote";
#define HELP_SET_CSL "setup/configuration/settings-csl"
#define HELP_SET_DEBUG "setup/configuration/settings-debug"

#define URL_SUPPORT_FORUM "https://forums.x-plane.org/index.php?/forums/forum/457-livetraffic-support/"
#define URL_SUPPORT_HOWTO "https://forums.x-plane.org/index.php?/forums/topic/174691-support"

//MARK: File Paths
// these are under the plugins directory
#define PATH_FLIGHT_MODELS "Resources/FlightModels.prf"
Expand Down
11 changes: 10 additions & 1 deletion Src/LiveTraffic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ enum menuItems {
MENU_ID_HELP_AC_INFO_WND,
MENU_ID_HELP_SETTINGS,
MENU_ID_HELP_INSTALL_CSL,
MENU_ID_HELP_SUPPORT_FORUM,
MENU_ID_HELP_SUPPORT_HOWTO,
MENU_ID_NEWVER,
#ifdef DEBUG
MENU_ID_RELOAD_PLUGINS,
Expand Down Expand Up @@ -130,7 +132,11 @@ void MenuHandler(void * /*mRef*/, void * iRef)
void MenuHandlerHelp (void * /*mRef*/, void * iRef)
{
const char* helpPath = static_cast<const char*>(iRef);
LTOpenHelp(helpPath);
// if it starts with https it is a full URL, otherwise a help sub path
if (stribeginwith(helpPath, "https://"))
LTOpenURL(helpPath);
else
LTOpenHelp(helpPath);
}

// the "Aircraft displayed" menu item includes the number of displayed a/c
Expand Down Expand Up @@ -323,6 +329,9 @@ bool RegisterMenuItem ()
aMenuItems[MENU_ID_HELP_AC_INFO_WND] = XPLMAppendMenuItem(menuHelpID, MENU_HELP_AC_INFO_WND, (void*)HELP_AC_INFO_WND,1);
aMenuItems[MENU_ID_HELP_SETTINGS] = XPLMAppendMenuItem(menuHelpID, MENU_HELP_SETTINGS, (void*)HELP_SETTINGS,1);
aMenuItems[MENU_ID_HELP_INSTALL_CSL] = XPLMAppendMenuItem(menuHelpID, MENU_HELP_INSTALL_CSL, (void*)HELP_INSTALL_CSL,1);
XPLMAppendMenuSeparator(menuHelpID);
aMenuItems[MENU_ID_HELP_SUPPORT_FORUM]= XPLMAppendMenuItem(menuHelpID, MENU_HELP_SUPPORT_FORUM, (void*)URL_SUPPORT_FORUM,1);
aMenuItems[MENU_ID_HELP_SUPPORT_HOWTO]= XPLMAppendMenuItem(menuHelpID, MENU_HELP_SUPPORT_HOWTO, (void*)URL_SUPPORT_HOWTO,1);

#ifdef DEBUG
// Separator
Expand Down
15 changes: 12 additions & 3 deletions docs/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ <h1 id="support">Support</h1>

<h1 id="release-notes">Release Notes</h1>

<p>The issue number links refer to issue on GitHub with (often technical) details.</p>
<p>The issue number links refer to issues on GitHub with (often technical) details.</p>

<h2>v3</h2>

Expand All @@ -147,7 +147,11 @@ <h3>v3.5.1</h3>
<P>Change log:</P>

<ul>
<li>Not designated a Beta version as v3.5.0 accidently was. No usage time limit.</li>
<li>Not designated a Beta version as v3.5.0 accidently was. No usage time limit.<br>
You want to set <i><a href="https://twinfan.gitbook.io/livetraffic/setup/configuration/settings-advanced#logging">Settings &gt; Advanced &gt; Logging</a> &gt; Log.txt logging level</i>
back to "Warning" to reduce output to <code>Log.txt</code>.
That setting got set to "Debug" while running a Beta version.
</li>
<li>
RealTraffic with historic data:
<ul>
Expand All @@ -157,7 +161,12 @@ <h3>v3.5.1</h3>
</ul>
</li>
<li>
OpenSky Master File: Cleanup old database files.
OpenSky Master File: Removal of no longer used database files.
</li>
<li>
Additional Help menu entries for
<a href="https://forums.x-plane.org/index.php?/forums/forum/457-livetraffic-support/">Support Forum</a> and
<a href="https://forums.x-plane.org/index.php?/forums/topic/174691-support">Support HowTo</a>.
</li>
</ul>

Expand Down

0 comments on commit 1e9d850

Please sign in to comment.