Skip to content

Commit

Permalink
Fix spelling/grammar of OMEdit GUI (#11724)
Browse files Browse the repository at this point in the history
- Change incorrect pluralization, e.g. Libraries Browser => Library
  Browser.
- Fix inconsistent capitalization, use lower case everywhere when
  referring to e.g. the message browser.
- Simplify most GUI headers, e.g. Library Browser => Libraries.
- Hide the header of the library tree view since the library browser
  window itself already has a header.
- Change Hide => Autohide Variable Browser in options to better describe
  what the option does.
- Change && => and in options.
  • Loading branch information
perost committed Dec 14, 2023
1 parent 0f5b149 commit c26d25e
Show file tree
Hide file tree
Showing 17 changed files with 105 additions and 104 deletions.
2 changes: 1 addition & 1 deletion OMEdit/OMEditLIB/Annotations/ShapeAnnotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ void ShapeAnnotation::applyLinePattern(QPainter *painter)
pen.setCosmetic(true);
/* Ticket #2272, Ticket #2268.
* If thickness is greater than 4 then don't make the pen cosmetic since cosmetic pens don't change the width with respect to zoom.
* Use non cosmetic pens for Libraries Browser and shapes inside component when thickness is greater than 4.
* Use non cosmetic pens for Library Browser and shapes inside component when thickness is greater than 4.
*/
if (thickness > 4
&& ((mpGraphicsView && mpGraphicsView->isRenderingLibraryPixmap()) || mpParentComponent)) {
Expand Down
2 changes: 1 addition & 1 deletion OMEdit/OMEditLIB/Editors/CompositeModelEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ bool CompositeModelEditor::validateText()
NotificationsDialog::CriticalIcon,
MainWindow::instance());
pNotificationsDialog->setNotificationLabelString(GUIMessages::getMessage(GUIMessages::ERROR_IN_TEXT).arg("Composite Model")
.append(GUIMessages::getMessage(GUIMessages::CHECK_MESSAGES_BROWSER))
.append(GUIMessages::getMessage(GUIMessages::CHECK_MESSAGE_BROWSER))
.append(GUIMessages::getMessage(GUIMessages::REVERT_PREVIOUS_OR_FIX_ERRORS_MANUALLY)));
pNotificationsDialog->getOkButton()->setText(Helper::revertToLastCorrectVersion);
pNotificationsDialog->getOkButton()->setAutoDefault(false);
Expand Down
4 changes: 2 additions & 2 deletions OMEdit/OMEditLIB/Editors/ModelicaEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ bool ModelicaEditor::validateText(LibraryTreeItem **pLibraryTreeItem)
NotificationsDialog::CriticalIcon,
MainWindow::instance());
pNotificationsDialog->setNotificationLabelString(GUIMessages::getMessage(GUIMessages::ERROR_IN_TEXT).arg("Modelica")
.append(GUIMessages::getMessage(GUIMessages::CHECK_MESSAGES_BROWSER))
.append(GUIMessages::getMessage(GUIMessages::CHECK_MESSAGE_BROWSER))
.append(GUIMessages::getMessage(GUIMessages::REVERT_PREVIOUS_OR_FIX_ERRORS_MANUALLY)));
pNotificationsDialog->getOkButton()->setText(Helper::revertToLastCorrectVersion);
pNotificationsDialog->getOkButton()->setAutoDefault(false);
Expand Down Expand Up @@ -438,7 +438,7 @@ bool ModelicaEditor::validateText(LibraryTreeItem **pLibraryTreeItem)
mLastValidText = mpPlainTextEdit->toPlainText();
}
}
/* Update the Libraries Browser when Modelica text change is done
/* Update the Library Browser when Modelica text change is done
* See discussion #10728
*/
MainWindow::instance()->getLibraryWidget()->getLibraryTreeModel()->showHideProtectedClasses();
Expand Down
2 changes: 1 addition & 1 deletion OMEdit/OMEditLIB/Editors/OMSimulatorEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool OMSimulatorEditor::validateText()
NotificationsDialog::CriticalIcon,
MainWindow::instance());
pNotificationsDialog->setNotificationLabelString(GUIMessages::getMessage(GUIMessages::ERROR_IN_TEXT).arg("SSP Model")
.append(GUIMessages::getMessage(GUIMessages::CHECK_MESSAGES_BROWSER))
.append(GUIMessages::getMessage(GUIMessages::CHECK_MESSAGE_BROWSER))
.append(GUIMessages::getMessage(GUIMessages::REVERT_PREVIOUS_OR_FIX_ERRORS_MANUALLY)));
pNotificationsDialog->getOkButton()->setText(Helper::revertToLastCorrectVersion);
pNotificationsDialog->getOkButton()->setAutoDefault(false);
Expand Down
50 changes: 25 additions & 25 deletions OMEdit/OMEditLIB/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
// Create an object of MessagesWidget.
MessagesWidget::create();
// Create MessagesDockWidget dock
mpMessagesDockWidget = new QDockWidget(tr("Messages Browser"), this);
mpMessagesDockWidget = new QDockWidget(tr("Messages"), this);
mpMessagesDockWidget->setObjectName("Messages");
mpMessagesDockWidget->setAllowedAreas(Qt::BottomDockWidgetArea);
mpMessagesDockWidget->setWidget(MessagesWidget::instance());
addDockWidget(Qt::BottomDockWidgetArea, mpMessagesDockWidget);
mpMessagesDockWidget->hide();
connect(MessagesWidget::instance(), SIGNAL(messageAdded()), SLOT(showMessagesBrowser()));
connect(MessagesWidget::instance(), SIGNAL(messageAdded()), SLOT(showMessageBrowser()));
// Create the OMCProxy object.
mpOMCProxy = new OMCProxy(threadData, this);
if (getExitApplicationStatus()) {
Expand Down Expand Up @@ -254,15 +254,15 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
// Create an object of LibraryWidget
mpLibraryWidget = new LibraryWidget(this);
// Create LibraryDockWidget
mpLibraryDockWidget = new QDockWidget(tr("Libraries Browser"), this);
mpLibraryDockWidget = new QDockWidget(tr("Libraries"), this);
mpLibraryDockWidget->setObjectName("Libraries");
mpLibraryDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
mpLibraryDockWidget->setWidget(mpLibraryWidget);
addDockWidget(Qt::LeftDockWidgetArea, mpLibraryDockWidget);
mpLibraryWidget->getLibraryTreeView()->setFocus(Qt::ActiveWindowFocusReason);
// Create an object of SearchWidget
mpSearchWidget = new SearchWidget(this);
mpSearchDockWidget = new QDockWidget(tr("Search Browser"),this);
mpSearchDockWidget = new QDockWidget(tr("Search"),this);
mpSearchDockWidget->setObjectName("Search");
mpSearchDockWidget->setAllowedAreas(Qt::BottomDockWidgetArea | Qt::TopDockWidgetArea);
mpSearchDockWidget->setWidget(mpSearchWidget);
Expand All @@ -273,29 +273,29 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
// create stack frames widget
mpStackFramesWidget = new StackFramesWidget(this);
// Create stack frames dock widget
mpStackFramesDockWidget = new QDockWidget(tr("Stack Frames Browser"), this);
mpStackFramesDockWidget = new QDockWidget(tr("Stack Frames"), this);
mpStackFramesDockWidget->setObjectName("StackFrames");
mpStackFramesDockWidget->setWidget(mpStackFramesWidget);
addDockWidget(Qt::TopDockWidgetArea, mpStackFramesDockWidget);
// create breakpoints widget
mpBreakpointsWidget = new BreakpointsWidget(this);
// Create breakpoints dock widget
mpBreakpointsDockWidget = new QDockWidget(tr("BreakPoints Browser"), this);
mpBreakpointsDockWidget = new QDockWidget(tr("Breakpoints"), this);
mpBreakpointsDockWidget->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
mpBreakpointsDockWidget->setObjectName("BreakPoints");
mpBreakpointsDockWidget->setWidget(mpBreakpointsWidget);
addDockWidget(Qt::TopDockWidgetArea, mpBreakpointsDockWidget);
// create locals widget
mpLocalsWidget = new LocalsWidget(this);
// Create locals dock widget
mpLocalsDockWidget = new QDockWidget(tr("Locals Browser"), this);
mpLocalsDockWidget = new QDockWidget(tr("Locals"), this);
mpLocalsDockWidget->setObjectName("Locals");
mpLocalsDockWidget->setWidget(mpLocalsWidget);
addDockWidget(Qt::RightDockWidgetArea, mpLocalsDockWidget);
// Create target output widget
mpTargetOutputWidget = new TargetOutputWidget(this);
// Create GDB console dock widget
mpTargetOutputDockWidget = new QDockWidget(tr("Output Browser"), this);
mpTargetOutputDockWidget = new QDockWidget(tr("Console Output"), this);
mpTargetOutputDockWidget->setObjectName("OutputBrowser");
mpTargetOutputDockWidget->setWidget(mpTargetOutputWidget);
addDockWidget(Qt::BottomDockWidgetArea, mpTargetOutputDockWidget);
Expand All @@ -311,7 +311,7 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
// create an object of DocumentationWidget
mpDocumentationWidget = new DocumentationWidget(this);
// Create DocumentationWidget dock
mpDocumentationDockWidget = new QDockWidget(tr("Documentation Browser"), this);
mpDocumentationDockWidget = new QDockWidget(tr("Documentation"), this);
mpDocumentationDockWidget->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
mpDocumentationDockWidget->setObjectName("Documentation");
mpDocumentationDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
Expand All @@ -324,7 +324,7 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
// create an object of VariablesWidget
mpVariablesWidget = new VariablesWidget(this);
// Create VariablesWidget dock
mpVariablesDockWidget = new QDockWidget(Helper::variablesBrowser, this);
mpVariablesDockWidget = new QDockWidget(Helper::variableBrowser, this);
mpVariablesDockWidget->setObjectName("Variables");
mpVariablesDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
addDockWidget(Qt::RightDockWidgetArea, mpVariablesDockWidget);
Expand All @@ -339,7 +339,7 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
*/
mpThreeDViewer = 0;
// Create ThreeDViewer dock
mpThreeDViewerDockWidget = new QDockWidget(tr("3D Viewer Browser"), this);
mpThreeDViewerDockWidget = new QDockWidget(tr("3D Viewer"), this);
mpThreeDViewerDockWidget->setObjectName("3DViewer");
mpThreeDViewerDockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
addDockWidget(Qt::RightDockWidgetArea, mpThreeDViewerDockWidget);
Expand All @@ -357,7 +357,7 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
createActions();
createToolbars();
createMenus();
// enable/disable re-simulation toolbar based on variables browser visibiltiy.
// enable/disable re-simulation toolbar based on variable browser visibiltiy.
connect(mpVariablesDockWidget, SIGNAL(visibilityChanged(bool)), this, SLOT(enableReSimulationToolbar(bool)));
// Create the archived simulation widget
ArchivedSimulationsWidget::create();
Expand Down Expand Up @@ -388,7 +388,7 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
pCentralWidgetLayout->setContentsMargins(0, 0, 0, 0);
QWidget *pCentralWidget = new QWidget;
pCentralWidgetLayout->addWidget(mpCentralStackedWidget, 1);
// Create a QTabWidget that mimicks the Messages Browser
// Create a QTabWidget that mimicks the Message Browser
mpMessagesTabWidget = new QTabWidget(this);
mpMessagesTabWidget->setTabsClosable(true);
mpMessagesTabWidget->setDocumentMode(true);
Expand Down Expand Up @@ -426,7 +426,7 @@ void MainWindow::setUpMainWindow(threadData_t *threadData)
mpLocalsWidget->getLocalsTreeView()->header()->restoreState(pSettings->value("localsTreeState").toByteArray());
pSettings->endGroup();
if (restoreMessagesWidget) {
showMessagesBrowser();
showMessageBrowser();
}
}
switchToWelcomePerspective();
Expand Down Expand Up @@ -1073,7 +1073,7 @@ void MainWindow::instantiateModel(LibraryTreeItem *pLibraryTreeItem)
if (OptionsDialog::instance()->getMessagesPage()->getResetMessagesNumberBeforeSimulationCheckBox()->isChecked()) {
MessagesWidget::instance()->resetMessagesNumber();
}
// check clear messages browser before instantiating
// check clear message browser before instantiating
if (OptionsDialog::instance()->getMessagesPage()->getClearMessagesBrowserBeforeSimulationCheckBox()->isChecked()) {
MessagesWidget::instance()->clearMessages();
}
Expand Down Expand Up @@ -1106,7 +1106,7 @@ void MainWindow::checkModel(LibraryTreeItem *pLibraryTreeItem)
if (OptionsDialog::instance()->getMessagesPage()->getResetMessagesNumberBeforeSimulationCheckBox()->isChecked()) {
MessagesWidget::instance()->resetMessagesNumber();
}
// check clear messages browser before checking
// check clear message browser before checking
if (OptionsDialog::instance()->getMessagesPage()->getClearMessagesBrowserBeforeSimulationCheckBox()->isChecked()) {
MessagesWidget::instance()->clearMessages();
}
Expand Down Expand Up @@ -1596,7 +1596,7 @@ void MainWindow::findFileAndGoToLine(QString fileName, QString lineNumber)

/*!
* \brief MainWindow::printStandardOutAndErrorFilesMessages
* Reads the omeditoutput.txt and omediterror.txt files and add the data to Messages Browser if there is any.
* Reads the omeditoutput.txt and omediterror.txt files and add the data to Message Browser if there is any.
*/
void MainWindow::printStandardOutAndErrorFilesMessages()
{
Expand Down Expand Up @@ -1816,14 +1816,14 @@ void MainWindow::writeNewApiProfiling(const QString &str)
}

/*!
* \brief MainWindow::showMessagesBrowser
* \brief MainWindow::showMessageBrowser
* Slot activated when MessagesWidget::messageAdded signal is raised.\n
* Shows the Messages Browser.
* Shows the Message Browser.
*/
void MainWindow::showMessagesBrowser()
void MainWindow::showMessageBrowser()
{
mpMessagesDockWidget->show();
// In case user has tabbed the dock widgets then make Messages Browser active.
// In case user has tabbed the dock widgets then make Message Browser active.
QList<QDockWidget*> tabifiedDockWidgetsList = tabifiedDockWidgets(mpMessagesDockWidget);
if (tabifiedDockWidgetsList.size() > 0) {
tabifyDockWidget(tabifiedDockWidgetsList.at(0), mpMessagesDockWidget);
Expand Down Expand Up @@ -2288,7 +2288,7 @@ void MainWindow::redo()

/*!
* \brief MainWindow::focusFilterClasses
* Sets the focus on filter classes text box in Libraries Browser.
* Sets the focus on filter classes text box in Library Browser.
*/
void MainWindow::focusFilterClasses()
{
Expand Down Expand Up @@ -3613,7 +3613,7 @@ void MainWindow::threeDViewerDockWidgetVisibilityChanged(bool visible)
*/
void MainWindow::messagesTabBarClicked(int index)
{
showMessagesBrowser();
showMessageBrowser();
MessagesWidget::instance()->getMessagesTabWidget()->setCurrentIndex(index);
}

Expand Down Expand Up @@ -5295,7 +5295,7 @@ void AboutOMEditDialog::showReportIssue()

/*!
* \class MessageTab
* \brief Creates a tab that mimicks the tab of Messages Browser.
* \brief Creates a tab that mimicks the tab of Message Browser.
*/
/*!
* \brief MessageTab::MessageTab
Expand All @@ -5308,7 +5308,7 @@ MessageTab::MessageTab(bool fixedTab)
mpProgressLabel->setElideMode(Qt::ElideMiddle);
mpProgressLabel->installEventFilter(this);
if (fixedTab) {
mpProgressLabel->setText(tr("Click to open Messages Browser."));
mpProgressLabel->setText(tr("Click to open message browser."));
}
mpProgressBar = new QProgressBar;
mpProgressBar->setAlignment(Qt::AlignHCenter);
Expand Down
2 changes: 1 addition & 1 deletion OMEdit/OMEditLIB/MainWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ class MainWindow : public QMainWindow
QToolBar *mpOMSimulatorToolbar;
QHash<QString, TransformationsWidget*> mTransformationsWidgetHash;
public slots:
void showMessagesBrowser();
void showMessageBrowser();
void switchToWelcomePerspectiveSlot();
void switchToModelingPerspectiveSlot();
void switchToPlottingPerspectiveSlot();
Expand Down
4 changes: 2 additions & 2 deletions OMEdit/OMEditLIB/Modeling/InstallLibraryDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ void InstallLibraryDialog::installLibrary()
accept();
} else {
QMessageBox::critical(this, QString("%1 - %2").arg(Helper::applicationName, Helper::error),
tr("The library <b>%1</b> is not installed. See Messages Browser for any possible messages.").arg(library), Helper::ok);
tr("The library <b>%1</b> is not installed. See message browser for any possible messages.").arg(library), Helper::ok);
mpProgressLabel->hide();
mpOkButton->setEnabled(true);
}
Expand Down Expand Up @@ -307,7 +307,7 @@ void UpgradeInstalledLibrariesDialog::upgradeInstalledLibraries()
accept();
} else {
QMessageBox::critical(this, QString("%1 - %2").arg(Helper::applicationName, Helper::error),
tr("Fail to upgrade libraries. See Messages Browser for any possible messages."), Helper::ok);
tr("Failed to upgrade libraries. See message browser for any possible messages."), Helper::ok);
mpProgressLabel->hide();
mpUpgradeButton->setEnabled(true);
}
Expand Down

0 comments on commit c26d25e

Please sign in to comment.