Move DoHelpWelcome out of HelpMenus

This commit is contained in:
Paul Licameli 2019-06-12 23:51:23 -04:00
parent 2d11e6bda9
commit f8c40dc8e7
5 changed files with 12 additions and 12 deletions

View File

@ -1544,7 +1544,7 @@ bool AudacityApp::OnInit()
// Mainly this is to tell users of ALPHAS who don't know that they have an ALPHA.
// Disabled for now, after discussion.
// project->MayCheckForUpdates();
HelpActions::DoHelpWelcome(*project);
SplashDialog::DoHelpWelcome(*project);
}
#ifdef USE_FFMPEG

View File

@ -132,9 +132,4 @@ void DoTogglePinnedHead( AudacityProject & );
void DoRecord( AudacityProject & );
}
/// Namespace for functions for Help menu
namespace HelpActions {
void DoHelpWelcome( AudacityProject & );
}
#endif

View File

@ -26,6 +26,7 @@ most commonly asked questions about Audacity.
#include "Experimental.h"
#include <wx/dialog.h>
#include <wx/frame.h>
#include <wx/html/htmlwin.h>
#include <wx/button.h>
#include <wx/dcclient.h>
@ -35,6 +36,7 @@ most commonly asked questions about Audacity.
#include <wx/image.h>
#include "FileNames.h"
#include "Project.h"
#include "ShuttleGui.h"
#include "widgets/AudacityMessageBox.h"
#include "widgets/LinkingHtmlWindow.h"
@ -64,6 +66,11 @@ END_EVENT_TABLE()
IMPLEMENT_CLASS(SplashDialog, wxDialogWrapper)
void SplashDialog::DoHelpWelcome( AudacityProject &project )
{
Show2( &GetProjectFrame( project ) );
}
SplashDialog::SplashDialog(wxWindow * parent)
: wxDialogWrapper(parent, -1, _("Welcome to Audacity!"),
wxPoint( -1, 60 ), // default x position, y position 60 pixels from top of screen.

View File

@ -21,6 +21,9 @@ class HtmlWindow;
class SplashDialog final : public wxDialogWrapper {
DECLARE_DYNAMIC_CLASS(SplashDialog)
public:
static void DoHelpWelcome( AudacityProject &project );
SplashDialog(wxWindow * parent);
virtual ~ SplashDialog();
void OnOK(wxCommandEvent & event);

View File

@ -282,11 +282,6 @@ namespace HelpActions {
// exported helper functions
void DoHelpWelcome( AudacityProject &project )
{
SplashDialog::Show2( &GetProjectFrame( project ) );
}
// Menu handler functions
struct Handler : CommandHandlerObject {
@ -396,7 +391,7 @@ void MayCheckForUpdates(AudacityProject &project)
void OnHelpWelcome(const CommandContext &context)
{
DoHelpWelcome( context.project );
SplashDialog::DoHelpWelcome( context.project );
}
#endif