Commit 4251265a authored by Eike Ziller's avatar Eike Ziller Committed by hjk

Unify text on buttons that open the options dialog

We have many buttons that open the options dialog, and many of these use
different terms.

Change-Id: I073fe2a23569c6f4174a2fb6567359c89cb2427c
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@digia.com>
parent e64fefdb
......@@ -105,7 +105,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
layout->addWidget(label, 0, 0, 1, 2);
QPushButton *openOptions = new QPushButton;
openOptions->setText(tr("Open Settings"));
openOptions->setText(Core::ICore::msgShowOptionsDialog());
openOptions->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
layout->addWidget(openOptions, 1, 1);
......
......@@ -390,7 +390,7 @@ NoKitPage::NoKitPage(CMakeOpenProjectWizard *cmakeWizard)
layout->addWidget(m_descriptionLabel);
m_optionsButton = new QPushButton;
m_optionsButton->setText(tr("Show Options"));
m_optionsButton->setText(Core::ICore::msgShowOptionsDialog());
connect(m_optionsButton, SIGNAL(clicked()),
this, SLOT(showOptions()));
......
......@@ -700,7 +700,7 @@ ExternalToolManager::ExternalToolManager()
d->m_configureSeparator = new QAction(this);
d->m_configureSeparator->setSeparator(true);
d->m_configureAction = new QAction(tr("Configure..."), this);
d->m_configureAction = new QAction(Core::ICore::msgShowOptionsDialog(), this);
connect(d->m_configureAction, SIGNAL(triggered()), this, SLOT(openPreferences()));
// add the external tools menu
......
......@@ -66,7 +66,7 @@ static void showGraphicalShellError(QWidget *parent, const QString &app, const Q
if (!error.isEmpty())
mbox.setDetailedText(QApplication::translate("Core::Internal",
"'%1' returned the following error:\n\n%2").arg(app, error));
QAbstractButton *settingsButton = mbox.addButton(QApplication::translate("Core::Internal", "Settings..."),
QAbstractButton *settingsButton = mbox.addButton(Core::ICore::msgShowOptionsDialog(),
QMessageBox::ActionRole);
mbox.exec();
if (mbox.clickedButton() == settingsButton)
......
......@@ -338,6 +338,11 @@ bool ICore::showOptionsDialog(const Id group, const Id page, QWidget *parent)
return m_mainwindow->showOptionsDialog(group, page, parent);
}
QString ICore::msgShowOptionsDialog()
{
return QCoreApplication::translate("Core", "Configure...", "msgShowOptionsDialog");
}
bool ICore::showWarningWithOptions(const QString &title, const QString &text,
const QString &details,
Id settingsCategory,
......
......@@ -73,6 +73,7 @@ public:
const QVariantMap &extraVariables = QVariantMap());
static bool showOptionsDialog(Id group, Id page, QWidget *parent = 0);
static QString msgShowOptionsDialog();
static bool showWarningWithOptions(const QString &title, const QString &text,
const QString &details = QString(),
......
......@@ -223,7 +223,7 @@ LocatorWidget::LocatorWidget(Locator *qop) :
m_completionList(new CompletionList(this)),
m_filterMenu(new QMenu(this)),
m_refreshAction(new QAction(tr("Refresh"), this)),
m_configureAction(new QAction(tr("Configure..."), this)),
m_configureAction(new QAction(Core::ICore::msgShowOptionsDialog(), this)),
m_fileLineEdit(new Utils::FancyLineEdit),
m_updateRequested(false),
m_acceptRequested(false),
......
......@@ -325,7 +325,8 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
.arg(versionControl->displayName()),
InfoBarEntry::GlobalSuppressionEnabled);
d->m_unconfiguredVcs = versionControl;
info.setCustomButtonInfo(tr("Configure"), m_instance, SLOT(configureVcs()));
info.setCustomButtonInfo(Core::ICore::msgShowOptionsDialog(), m_instance,
SLOT(configureVcs()));
infoBar->addInfo(info);
}
return 0;
......
......@@ -166,7 +166,7 @@ bool Protocol::showConfigurationError(const Protocol *p,
QMessageBox mb(QMessageBox::Warning, title, message, QMessageBox::Cancel, parent);
QPushButton *settingsButton = 0;
if (showConfig)
settingsButton = mb.addButton(tr("Settings..."), QMessageBox::AcceptRole);
settingsButton = mb.addButton(Core::ICore::msgShowOptionsDialog(), QMessageBox::AcceptRole);
mb.exec();
bool rc = false;
if (mb.clickedButton() == settingsButton)
......
......@@ -100,7 +100,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this);
insertItem(SettingsDialog, item);
item->setText(tr("Debugger Properties..."));
item->setText(tr("Configure Debugger..."));
//
// View
......
......@@ -83,7 +83,7 @@ DebuggerKitConfigWidget::DebuggerKitConfigWidget(Kit *workingCopy, const KitInfo
refresh();
connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentDebuggerChanged(int)));
m_manageButton = new QPushButton(tr("Manage..."));
m_manageButton = new QPushButton(KitConfigWidget::msgManage());
m_manageButton->setContentsMargins(0, 0, 0, 0);
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageDebuggers()));
......
......@@ -29,6 +29,7 @@
#include "kitchooser.h"
#include "kitconfigwidget.h"
#include "kitinformation.h"
#include "kitmanager.h"
#include "projectexplorerconstants.h"
......@@ -49,7 +50,7 @@ KitChooser::KitChooser(QWidget *parent) :
{
m_chooser = new QComboBox(this);
m_chooser->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
m_manageButton = new QPushButton(tr("Manage..."), this);
m_manageButton = new QPushButton(KitConfigWidget::msgManage(), this);
QHBoxLayout *layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0);
......
......@@ -53,4 +53,9 @@ void KitConfigWidget::setMutable(bool b)
m_kit->setMutable(m_kitInformation->id(), b);
}
QString KitConfigWidget::msgManage()
{
return tr("Manage...");
}
} // namespace ProjectExplorer
......@@ -67,6 +67,8 @@ public:
bool isMutable() const;
void setMutable(bool b);
static QString msgManage();
signals:
void dirty();
......
......@@ -129,7 +129,7 @@ ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Kit *k, const
refresh();
connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentToolChainChanged(int)));
m_manageButton = new QPushButton(tr("Manage..."));
m_manageButton = new QPushButton(KitConfigWidget::msgManage());
m_manageButton->setContentsMargins(0, 0, 0, 0);
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageToolChains()));
......@@ -316,7 +316,7 @@ DeviceInformationConfigWidget::DeviceInformationConfigWidget(Kit *workingCopy, c
{
m_comboBox->setModel(m_model);
m_manageButton = new QPushButton(tr("Manage"));
m_manageButton = new QPushButton(KitConfigWidget::msgManage());
refresh();
m_comboBox->setToolTip(toolTip());
......
......@@ -54,6 +54,7 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent) :
m_ui(new Ui::WizardPage)
{
m_ui->setupUi(this);
m_ui->vcsManageButton->setText(Core::ICore::msgShowOptionsDialog());
connect(m_ui->projectComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(slotProjectChanged(int)));
connect(m_ui->vcsManageButton, SIGNAL(clicked()), this, SLOT(slotManageVcs()));
......
......@@ -2,6 +2,14 @@
<ui version="4.0">
<class>ProjectExplorer::Internal::WizardPage</class>
<widget class="QWizardPage" name="ProjectExplorer::Internal::WizardPage">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>397</width>
<height>248</height>
</rect>
</property>
<property name="title">
<string>Project Management</string>
</property>
......@@ -67,7 +75,7 @@
<item row="2" column="2">
<widget class="QPushButton" name="vcsManageButton">
<property name="text">
<string>Manage...</string>
<string/>
</property>
</widget>
</item>
......@@ -108,8 +116,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>316</width>
<height>103</height>
<width>373</width>
<height>104</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
......
......@@ -33,6 +33,7 @@
#include "buildinfo.h"
#include "projectexplorerconstants.h"
#include "kit.h"
#include "kitconfigwidget.h"
#include "kitmanager.h"
#include "kitoptionspage.h"
......@@ -79,7 +80,7 @@ TargetSetupWidget::TargetSetupWidget(Kit *k,
Utils::FadingWidget *panel = new Utils::FadingWidget(m_detailsWidget);
QHBoxLayout *panelLayout = new QHBoxLayout(panel);
m_manageButton = new QPushButton(tr("Manage..."));
m_manageButton = new QPushButton(KitConfigWidget::msgManage());
panelLayout->addWidget(m_manageButton);
m_detailsWidget->setToolWidget(panel);
......
......@@ -55,7 +55,7 @@ QtKitConfigWidget::QtKitConfigWidget(ProjectExplorer::Kit *k, const ProjectExplo
versionIds.append(v->uniqueId());
versionsChanged(versionIds, QList<int>(), QList<int>());
m_manageButton = new QPushButton(tr("Manage..."));
m_manageButton = new QPushButton(KitConfigWidget::msgManage());
refresh();
m_combo->setToolTip(toolTip());
......
......@@ -61,7 +61,7 @@ VcsConfigurationPage::VcsConfigurationPage(const Core::IVersionControl *vc, QWid
setSubTitle(tr("Please configure <b>%1</b> now.").arg(vc->displayName()));
d->m_versionControl = vc;
d->m_configureButton = new QPushButton(tr("Configure..."), this);
d->m_configureButton = new QPushButton(Core::ICore::msgShowOptionsDialog(), this);
QVBoxLayout *verticalLayout = new QVBoxLayout(this);
verticalLayout->addWidget(d->m_configureButton);
......
Markdown is supported
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