Gui: add 'Donate' to Help menu
This commit is contained in:
@@ -514,6 +514,33 @@ void StdCmdOnlineHelpWebsite::activated(int iMsg)
|
||||
OpenURLInBrowser(url.c_str());
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_FreeCADDonation
|
||||
//===========================================================================
|
||||
|
||||
DEF_STD_CMD(StdCmdFreeCADDonation)
|
||||
|
||||
StdCmdFreeCADDonation::StdCmdFreeCADDonation()
|
||||
:Command("Std_FreeCADDonation")
|
||||
{
|
||||
sGroup = QT_TR_NOOP("Help");
|
||||
sMenuText = QT_TR_NOOP("Donate");
|
||||
sToolTipText = QT_TR_NOOP("Donate to FreeCAD development");
|
||||
sWhatsThis = "Std_FreeCADDonation";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "internet-web-browser";
|
||||
eType = 0;
|
||||
}
|
||||
|
||||
void StdCmdFreeCADDonation::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites");
|
||||
std::string url = hURLGrp->GetASCII("DonatePage", "https://wiki.freecadweb.org/Donate");
|
||||
hURLGrp->SetASCII("DonatePage", url.c_str());
|
||||
OpenURLInBrowser(url.c_str());
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_FreeCADWebsite
|
||||
//===========================================================================
|
||||
@@ -814,6 +841,7 @@ void CreateStdCommands(void)
|
||||
rcCmdMgr.addCommand(new StdCmdOnlineHelp());
|
||||
rcCmdMgr.addCommand(new StdCmdOnlineHelpWebsite());
|
||||
rcCmdMgr.addCommand(new StdCmdFreeCADWebsite());
|
||||
rcCmdMgr.addCommand(new StdCmdFreeCADDonation());
|
||||
rcCmdMgr.addCommand(new StdCmdFreeCADUserHub());
|
||||
rcCmdMgr.addCommand(new StdCmdFreeCADPowerUserHub());
|
||||
rcCmdMgr.addCommand(new StdCmdFreeCADForum());
|
||||
|
||||
@@ -695,7 +695,7 @@ MenuItem* StdWorkbench::setupMenuBar() const
|
||||
// Help
|
||||
MenuItem* help = new MenuItem( menuBar );
|
||||
help->setCommand("&Help");
|
||||
*help << "Std_OnlineHelp" << "Std_FreeCADWebsite"
|
||||
*help << "Std_OnlineHelp" << "Std_FreeCADWebsite" << "Std_FreeCADDonation"
|
||||
<< "Std_FreeCADUserHub" << "Std_FreeCADPowerUserHub"
|
||||
<< "Std_PythonHelp" << "Std_FreeCADForum"
|
||||
<< "Std_FreeCADFAQ" << "Std_About" << "Std_WhatsThis";
|
||||
|
||||
Reference in New Issue
Block a user