feat/简化帮助及改名替换-csm-0520

csm
jiangyini 7 days ago
parent baf323b0c1
commit 38f9df431f

@ -351,7 +351,7 @@ void StdCmdRestartInSafeMode::activated(int iMsg)
QMessageBox restartBox(Gui::getMainWindow()); QMessageBox restartBox(Gui::getMainWindow());
restartBox.setIcon(QMessageBox::Warning); restartBox.setIcon(QMessageBox::Warning);
restartBox.setWindowTitle(QObject::tr("Restart in Safe Mode")); restartBox.setWindowTitle(QObject::tr("Restart in Safe Mode"));
restartBox.setText(QObject::tr("Restart FreeCAD and enter safe mode?")); restartBox.setText(QObject::tr("Restart Light works 3D and enter safe mode?"));
restartBox.setInformativeText( restartBox.setInformativeText(
QObject::tr("Safe mode temporarily disables the configuration and addons.") QObject::tr("Safe mode temporarily disables the configuration and addons.")
); );

@ -268,12 +268,12 @@
<html><head><meta name="qrichtext" content="1" /><style type="text/css"> <html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; } p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Fira Sans'; font-size:9pt; font-weight:400; font-style:normal;"> </style></head><body style=" font-family:'Fira Sans'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:x-large; font-weight:600;">FreeCAD license </span></p> <p style=" margin-top:16px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:x-large; font-weight:600;">Light works 3D license </span></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The FreeCAD application is licensed under the terms of the LGPL2+ license, as stated below.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The Light works 3D application is licensed under the terms of the LGPL2+ license, as stated below.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">Third-party libraries licenses</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:14pt; font-weight:600;">Third-party libraries licenses</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt; font-weight:600;"><br /></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:14pt; font-weight:600;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The different libraries used in FreeCAD and their respective licenses are described on the<a href="https://www.freecad.org/wiki/Third_Party_Libraries"><span style=" text-decoration: underline; color:#0000ff;">Third Party Libraries wiki page</span></a>.</p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The different libraries used in Light works 3D and their respective licenses are described in the documentation.</p>
<hr /> <hr />
<hr /> <hr />
<hr /> <hr />

@ -289,7 +289,7 @@ void AboutDialog::setupLabels()
} }
if (url == QStringLiteral("Unknown")) { if (url == QStringLiteral("Unknown")) {
url = QStringLiteral("https://github.com/FreeCAD/FreeCAD"); // Just take a guess url = QStringLiteral("https://github.com/LightWorks/LightWorks3D"); // Just take a guess
} }
// This may only create valid URLs for Github, but some other hosts use the same format // This may only create valid URLs for Github, but some other hosts use the same format
@ -328,7 +328,7 @@ void AboutDialog::showCredits()
QString creditsHTML QString creditsHTML
= QStringLiteral("<html><body><h1>%1</h1><p>%2</p><h2>%3</h2><ul>") = QStringLiteral("<html><body><h1>%1</h1><p>%2</p><h2>%3</h2><ul>")
.arg(tr("Credits", "Header for the Credits tab of the About screen")) .arg(tr("Credits", "Header for the Credits tab of the About screen"))
.arg(tr("FreeCAD would not be possible without the contributions of:")) .arg(tr("Light works 3D would not be possible without the contributions of:"))
.arg(tr("Individuals", "Header for the list of individual people in the Credits list.")); .arg(tr("Individuals", "Header for the list of individual people in the Credits list."));
QTextStream stream(&creditsFile); QTextStream stream(&creditsFile);

@ -176,7 +176,7 @@ QByteArray PythonOnlineHelp::fileNotFound() const
"<table width=\"100%\" cellspacing=0 cellpadding=2 border=0 summary=\"heading\">" "<table width=\"100%\" cellspacing=0 cellpadding=2 border=0 summary=\"heading\">"
"<tr bgcolor=\"#7799ee\">" "<tr bgcolor=\"#7799ee\">"
"<td valign=bottom>&nbsp;<br>" "<td valign=bottom>&nbsp;<br>"
"<font color=\"#ffffff\" face=\"helvetica, arial\">&nbsp;<br><big><big><strong>FreeCAD " "<font color=\"#ffffff\" face=\"helvetica, arial\">&nbsp;<br><big><big><strong>Light works 3D "
"Documentation</strong></big></big></font></td>" "Documentation</strong></big></big></font></td>"
"<td align=right valign=bottom>" "<td align=right valign=bottom>"
"<font color=\"#ffffff\" face=\"helvetica, arial\">&nbsp;</font></td></tr></table>" "<font color=\"#ffffff\" face=\"helvetica, arial\">&nbsp;</font></td></tr></table>"
@ -211,7 +211,7 @@ QByteArray PythonOnlineHelp::loadFailed(const QString& error) const
"<tr bgcolor=\"#7799ee\">" "<tr bgcolor=\"#7799ee\">"
"<td valign=bottom>&nbsp;<br>" "<td valign=bottom>&nbsp;<br>"
"<font color=\"#ffffff\" face=\"helvetica, " "<font color=\"#ffffff\" face=\"helvetica, "
"arial\">&nbsp;<br><big><big><strong>FreeCAD " "arial\">&nbsp;<br><big><big><strong>Light works 3D "
"Documentation</strong></big></big></font></td>" "Documentation</strong></big></big></font></td>"
"<td align=right valign=bottom>" "<td align=right valign=bottom>"
"<font color=\"#ffffff\" face=\"helvetica, arial\">&nbsp;</font></td></tr></table>" "<font color=\"#ffffff\" face=\"helvetica, arial\">&nbsp;</font></td></tr></table>"

@ -815,13 +815,6 @@ MenuItem* StdWorkbench::setupMenuBar() const
// Help // Help
auto help = new MenuItem(menuBar); auto help = new MenuItem(menuBar);
help->setCommand("&Help"); help->setCommand("&Help");
*help << "Std_WhatsThis"
<< "Separator"
// Start page and additional separator are dynamically inserted here
<< "Std_FreeCADUserHub" << "Std_FreeCADForum" << "Std_ReportBug" << "Separator"
<< "Std_RestartInSafeMode" << "Separator"
<< "Std_DevHandbook" << "Std_PythonHelp" << "Separator"
<< "Std_FreeCADWebsite" << "Std_FreeCADDonation" << "Std_About";
return menuBar; return menuBar;
} }
@ -879,11 +872,6 @@ ToolBarItem* StdWorkbench::setupToolBars() const
structure->setCommand("Structure"); structure->setCommand("Structure");
*structure << "Std_Part" << "Std_Group" << "Std_LinkActions" << "Std_VarSet"; *structure << "Std_Part" << "Std_Group" << "Std_LinkActions" << "Std_VarSet";
// Help
auto help = new ToolBarItem(root);
help->setCommand("Help");
*help << "Std_WhatsThis";
return root; return root;
} }
@ -1027,7 +1015,6 @@ MenuItem* NoneWorkbench::setupMenuBar() const
// Help // Help
auto help = new MenuItem(menuBar); auto help = new MenuItem(menuBar);
help->setCommand("&Help"); help->setCommand("&Help");
*help << "Std_OnlineHelp" << "Std_About";
return menuBar; return menuBar;
} }
@ -1067,7 +1054,9 @@ MenuItem* TestWorkbench::setupMenuBar() const
MenuItem* menuBar = StdWorkbench::setupMenuBar(); MenuItem* menuBar = StdWorkbench::setupMenuBar();
MenuItem* item = menuBar->findItem("&Help"); MenuItem* item = menuBar->findItem("&Help");
item->removeItem(item->findItem("Std_WhatsThis")); if (auto whatsThis = item->findItem("Std_WhatsThis")) {
item->removeItem(whatsThis);
}
// Test commands // Test commands
auto test = new MenuItem; auto test = new MenuItem;

@ -55,8 +55,8 @@
void PrintInitHelp(); void PrintInitHelp();
const auto sBanner = fmt::format( const auto sBanner = fmt::format(
"(C) 2001-{} FreeCAD contributors\n" "(C) 2001-{} LightWorks contributors\n"
"FreeCAD is free and open-source software licensed under the terms of LGPL2+ license.\n\n", "Light works 3D is free and open-source software licensed under the terms of LGPL2+ license.\n\n",
FCCopyrightYear FCCopyrightYear
); );
@ -188,10 +188,10 @@ int main(int argc, char** argv)
#endif #endif
// Name and Version of the Application // Name and Version of the Application
App::Application::Config()["ExeName"] = "FreeCAD"; App::Application::Config()["ExeName"] = "Light works 3D";
App::Application::Config()["ExeVendor"] = "FreeCAD"; App::Application::Config()["ExeVendor"] = "LightWorks";
App::Application::Config()["AppDataSkipVendor"] = "true"; App::Application::Config()["AppDataSkipVendor"] = "true";
App::Application::Config()["MaintainerUrl"] = "https://freecad.org"; App::Application::Config()["MaintainerUrl"] = "";
// set the banner (for logging and console) // set the banner (for logging and console)
App::Application::Config()["CopyrightInfo"] = sBanner; App::Application::Config()["CopyrightInfo"] = sBanner;
@ -207,7 +207,7 @@ int main(int argc, char** argv)
App::Application::Config()["SplashWarningColor"] = "#CA333B"; App::Application::Config()["SplashWarningColor"] = "#CA333B";
App::Application::Config()["SplashInfoColor"] = "#000000"; App::Application::Config()["SplashInfoColor"] = "#000000";
App::Application::Config()["SplashInfoPosition"] = "6,75"; App::Application::Config()["SplashInfoPosition"] = "6,75";
App::Application::Config()["DesktopFileName"] = "org.freecad.FreeCAD"; App::Application::Config()["DesktopFileName"] = "com.lightworks.LightWorks3D";
try { try {
// Init phase =========================================================== // Init phase ===========================================================

@ -72,11 +72,16 @@ void StartGui::Manipulator::modifyMenuBar(Gui::MenuItem* menuBar)
} }
Gui::MenuItem* helpMenu = menuBar->findItem("&Help"); Gui::MenuItem* helpMenu = menuBar->findItem("&Help");
if (!helpMenu) {
return;
}
Gui::MenuItem* loadStart = new Gui::MenuItem(); Gui::MenuItem* loadStart = new Gui::MenuItem();
Gui::MenuItem* loadSeparator = new Gui::MenuItem(); Gui::MenuItem* loadSeparator = new Gui::MenuItem();
loadStart->setCommand("Start_Start"); loadStart->setCommand("Start_Start");
loadSeparator->setCommand("Separator"); loadSeparator->setCommand("Separator");
Gui::MenuItem* firstItem = helpMenu->findItem("Std_FreeCADUserHub"); Gui::MenuItem* firstItem = helpMenu->findItem("Std_FreeCADUserHub");
if (firstItem) {
helpMenu->insertItem(firstItem, loadStart); helpMenu->insertItem(firstItem, loadStart);
helpMenu->insertItem(firstItem, loadSeparator); helpMenu->insertItem(firstItem, loadSeparator);
} }
}

Loading…
Cancel
Save