Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Gazebo classic end-of-life notice #3405

Merged
merged 2 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions gazebo/gazebo_shared.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@
void gazebo_shared::printVersion()
{
fprintf(stderr, "%s", GAZEBO_VERSION_HEADER);
const char* msg = R"(
# # ####### ####### ### ##### #######
## # # # # # # # #
# # # # # # # # #
# # # # # # # # #####
# # # # # # # # #
# ## # # # # # # #
# # ####### # ### ##### #######

This version of Gazebo, now called Gazebo classic, reaches end-of-life
in January 2025. Users are highly encouraged to migrate to the new Gazebo
using our migration guides (https://gazebosim.org/docs/latest/gazebo_classic_migration/)


)";
#ifndef _WIN32
fprintf(stderr, "\033[1;33m%s\033[0m", msg);
#else
fprintf(stderr, "%s",msg);
#endif
}

/////////////////////////////////////////////////
Expand Down
29 changes: 27 additions & 2 deletions gazebo/gui/MainWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#include <ignition/math/Pose3.hh>
#include <ignition/transport/Node.hh>
#include <qlabel.h>
#include <sdf/sdf.hh>
#include <boost/algorithm/string.hpp>

Expand Down Expand Up @@ -626,7 +627,17 @@ void MainWindow::About()
"<td>";
helpTxt += GAZEBO_VERSION_HEADER;
helpTxt += "</td></tr></table>";

helpTxt += R"(
<table><tr>
<td style='background-color: #ffcc00;padding: 20px; font-weight: bold'>
This version of Gazebo, now called Gazebo classic, reaches end-of-life
in January 2025. Users are highly encouraged to migrate to the new Gazebo
using our <a style='color: #f58113'
href='https://gazebosim.org/docs/latest/gazebo_classic_migration/'>
migration guides
</a>
</td></tr></table>
)";
helpTxt += "<div style='margin-left: 10px'>"
"<div>"
"<table>"
Expand Down Expand Up @@ -1666,9 +1677,23 @@ void MainWindow::ShowMenuBar(QMenuBar *_bar)

this->dataPtr->menuLayout->addWidget(this->dataPtr->menuBar);

this->dataPtr->menuLayout->addStretch(5);
if (!this->dataPtr->eolNotice) {
// Add Gazebo classic EOL notice label
this->dataPtr->eolNotice = new QLabel(this->dataPtr->menuBar);
this->dataPtr->eolNotice->setText(R"(<font color='#ff9966'>
This version of Gazebo reaches end-of-life in January 2025.
Consider <a style='color: #ffcc00'
href='https://gazebosim.org/docs/latest/gazebo_classic_migration/
'>migrating to the new Gazebo</a></font>)");
this->dataPtr->menuLayout->addStretch(1);
this->dataPtr->menuLayout->addWidget(this->dataPtr->eolNotice);
}


this->dataPtr->menuLayout->addStretch(4);
this->dataPtr->menuLayout->setContentsMargins(0, 0, 0, 0);


// OSX:
// There is a problem on osx with the qt5 menubar being out of focus when
// the application is launched from a terminal, so prevent using a native
Expand Down
3 changes: 3 additions & 0 deletions gazebo/gui/MainWindowPrivate.hh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ namespace gazebo

// whether the file is atleast saved once or not.
public: bool isSavedOnce = false;

/// \brief Label for displaying the Gazebo classic EOL notice.
public: QLabel *eolNotice = nullptr;
};
}
}
Expand Down
Loading