Commit be38a93e authored by Tom on the web's avatar Tom on the web 🚴🏿
Browse files

Cleanup whatsthis texts

now the whatsthis text and the tooltip texts are the same widget,
follow up with placing the texts more nicely
parent a048f7d8
Pipeline #84589 passed with stage
in 53 seconds
......@@ -376,7 +376,6 @@ void KgDifficultyGUI::init(KXmlGuiWindow* window, KgDifficulty* difficulty)
const QIcon icon = QIcon::fromTheme(QStringLiteral("games-difficult"));
KSelectAction* menu = new KgDifficultyGUI::Menu(icon, i18nc("Game difficulty level", "Difficulty"), window);
menu->setToolTip(i18n("Set the difficulty level"));
menu->setWhatsThis(i18n("Set the difficulty level of the game."));
QObject::connect(menu, &KSelectAction::indexTriggered, selector, &Selector::slotActivated);
QObject::connect(difficulty, &KgDifficulty::editableChanged, menu, &QAction::setEnabled);
QObject::connect(selector, &Selector::signalSelected, menu, &KSelectAction::setCurrentItem);
......
......@@ -39,7 +39,7 @@ struct KStandardGameActionInfo
const KStandardGameActionInfo g_rgActionInfo[] = {
// "game" menu
{ KStandardGameAction::New, KStandardShortcut::New, 0, "game_new", I18N_NOOP2("new game", "&New"), I18N_NOOP("Start a new game."), "document-new", I18N_NOOP("Start a new game") },
{ KStandardGameAction::New, KStandardShortcut::New, 0, "game_new", I18N_NOOP2("new game", "&New"), nullptr, "document-new", I18N_NOOP("Start a new game.") },
{ KStandardGameAction::Load, KStandardShortcut::Open, 0, "game_load", nullptr, I18N_NOOP("&Load..."), nullptr, "document-open", I18N_NOOP("Open a saved game...") },
{ KStandardGameAction::LoadRecent, KStandardShortcut::AccelNone, 0, "game_load_recent", nullptr, I18N_NOOP("Load &Recent"), nullptr, nullptr, I18N_NOOP("Open a recently saved game...") },
{ KStandardGameAction::Restart, KStandardShortcut::Reload, 0, "game_restart", nullptr, I18N_NOOP("Restart &Game"), nullptr, "view-refresh", I18N_NOOP("Restart the game") },
......
......@@ -107,7 +107,6 @@ void KGameDifficultyPrivate::init(KXmlGuiWindow* window, const QObject* recvr, c
m_menu = new KSelectAction(QIcon::fromTheme( QStringLiteral( "games-difficult") ), i18nc("Game difficulty level", "Difficulty" ), window);
m_menu->setToolTip(i18n("Set the difficulty level"));
m_menu->setWhatsThis(i18n("Set the difficulty level of the game."));
connect(m_menu, &KSelectAction::indexTriggered,
this, &KGameDifficultyPrivate::changeSelection);
m_menu->setObjectName( QStringLiteral("options_game_difficulty" ));
......@@ -116,7 +115,6 @@ void KGameDifficultyPrivate::init(KXmlGuiWindow* window, const QObject* recvr, c
setParent(window);
m_comboBox = new KComboBox(window);
m_comboBox->setToolTip(i18n("Difficulty"));
connect(m_comboBox, QOverload<int>::of(&QComboBox::activated),
this, &KGameDifficultyPrivate::changeSelection);
window->statusBar()->addPermanentWidget(m_comboBox);
......@@ -295,9 +293,9 @@ void KGameDifficulty::setRestartOnChange(onChange restart)
self()->d->m_restartOnChange = restart;
if (restart==RestartOnChange)
self()->d->m_comboBox->setWhatsThis(i18n("Select the <b>difficulty</b> of the game.<br />If you change the difficulty level while a game is running, you will have to cancel it and start a new one."));
self()->d->m_comboBox->setToolTip(i18n("Select the <b>difficulty</b> of the game.<br />If you change the difficulty level while a game is running, you will have to cancel it and start a new one."));
else
self()->d->m_comboBox->setWhatsThis(i18n("Select the <b>difficulty</b> of the game.<br />You can change the difficulty level during a running game."));
self()->d->m_comboBox->setToolTip(i18n("Select the <b>difficulty</b> of the game.<br />You can change the difficulty level during a running game."));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment