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: hjk <hjk121@nokiamail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
This commit is contained in:
Eike Ziller
2014-02-20 14:52:10 +01:00
committed by hjk
parent e64fefdbc4
commit 4251265a63
20 changed files with 43 additions and 18 deletions

View File

@@ -105,7 +105,7 @@ AndroidPotentialKitWidget::AndroidPotentialKitWidget(QWidget *parent)
layout->addWidget(label, 0, 0, 1, 2); layout->addWidget(label, 0, 0, 1, 2);
QPushButton *openOptions = new QPushButton; QPushButton *openOptions = new QPushButton;
openOptions->setText(tr("Open Settings")); openOptions->setText(Core::ICore::msgShowOptionsDialog());
openOptions->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); openOptions->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
layout->addWidget(openOptions, 1, 1); layout->addWidget(openOptions, 1, 1);

View File

@@ -390,7 +390,7 @@ NoKitPage::NoKitPage(CMakeOpenProjectWizard *cmakeWizard)
layout->addWidget(m_descriptionLabel); layout->addWidget(m_descriptionLabel);
m_optionsButton = new QPushButton; m_optionsButton = new QPushButton;
m_optionsButton->setText(tr("Show Options")); m_optionsButton->setText(Core::ICore::msgShowOptionsDialog());
connect(m_optionsButton, SIGNAL(clicked()), connect(m_optionsButton, SIGNAL(clicked()),
this, SLOT(showOptions())); this, SLOT(showOptions()));

View File

@@ -700,7 +700,7 @@ ExternalToolManager::ExternalToolManager()
d->m_configureSeparator = new QAction(this); d->m_configureSeparator = new QAction(this);
d->m_configureSeparator->setSeparator(true); 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())); connect(d->m_configureAction, SIGNAL(triggered()), this, SLOT(openPreferences()));
// add the external tools menu // add the external tools menu

View File

@@ -66,7 +66,7 @@ static void showGraphicalShellError(QWidget *parent, const QString &app, const Q
if (!error.isEmpty()) if (!error.isEmpty())
mbox.setDetailedText(QApplication::translate("Core::Internal", mbox.setDetailedText(QApplication::translate("Core::Internal",
"'%1' returned the following error:\n\n%2").arg(app, error)); "'%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); QMessageBox::ActionRole);
mbox.exec(); mbox.exec();
if (mbox.clickedButton() == settingsButton) if (mbox.clickedButton() == settingsButton)

View File

@@ -338,6 +338,11 @@ bool ICore::showOptionsDialog(const Id group, const Id page, QWidget *parent)
return m_mainwindow->showOptionsDialog(group, page, 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, bool ICore::showWarningWithOptions(const QString &title, const QString &text,
const QString &details, const QString &details,
Id settingsCategory, Id settingsCategory,

View File

@@ -73,6 +73,7 @@ public:
const QVariantMap &extraVariables = QVariantMap()); const QVariantMap &extraVariables = QVariantMap());
static bool showOptionsDialog(Id group, Id page, QWidget *parent = 0); static bool showOptionsDialog(Id group, Id page, QWidget *parent = 0);
static QString msgShowOptionsDialog();
static bool showWarningWithOptions(const QString &title, const QString &text, static bool showWarningWithOptions(const QString &title, const QString &text,
const QString &details = QString(), const QString &details = QString(),

View File

@@ -223,7 +223,7 @@ LocatorWidget::LocatorWidget(Locator *qop) :
m_completionList(new CompletionList(this)), m_completionList(new CompletionList(this)),
m_filterMenu(new QMenu(this)), m_filterMenu(new QMenu(this)),
m_refreshAction(new QAction(tr("Refresh"), 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_fileLineEdit(new Utils::FancyLineEdit),
m_updateRequested(false), m_updateRequested(false),
m_acceptRequested(false), m_acceptRequested(false),

View File

@@ -325,7 +325,8 @@ IVersionControl* VcsManager::findVersionControlForDirectory(const QString &input
.arg(versionControl->displayName()), .arg(versionControl->displayName()),
InfoBarEntry::GlobalSuppressionEnabled); InfoBarEntry::GlobalSuppressionEnabled);
d->m_unconfiguredVcs = versionControl; d->m_unconfiguredVcs = versionControl;
info.setCustomButtonInfo(tr("Configure"), m_instance, SLOT(configureVcs())); info.setCustomButtonInfo(Core::ICore::msgShowOptionsDialog(), m_instance,
SLOT(configureVcs()));
infoBar->addInfo(info); infoBar->addInfo(info);
} }
return 0; return 0;

View File

@@ -166,7 +166,7 @@ bool Protocol::showConfigurationError(const Protocol *p,
QMessageBox mb(QMessageBox::Warning, title, message, QMessageBox::Cancel, parent); QMessageBox mb(QMessageBox::Warning, title, message, QMessageBox::Cancel, parent);
QPushButton *settingsButton = 0; QPushButton *settingsButton = 0;
if (showConfig) if (showConfig)
settingsButton = mb.addButton(tr("Settings..."), QMessageBox::AcceptRole); settingsButton = mb.addButton(Core::ICore::msgShowOptionsDialog(), QMessageBox::AcceptRole);
mb.exec(); mb.exec();
bool rc = false; bool rc = false;
if (mb.clickedButton() == settingsButton) if (mb.clickedButton() == settingsButton)

View File

@@ -100,7 +100,7 @@ DebuggerSettings::DebuggerSettings()
item = new SavedAction(this); item = new SavedAction(this);
insertItem(SettingsDialog, item); insertItem(SettingsDialog, item);
item->setText(tr("Debugger Properties...")); item->setText(tr("Configure Debugger..."));
// //
// View // View

View File

@@ -83,7 +83,7 @@ DebuggerKitConfigWidget::DebuggerKitConfigWidget(Kit *workingCopy, const KitInfo
refresh(); refresh();
connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentDebuggerChanged(int))); 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); m_manageButton->setContentsMargins(0, 0, 0, 0);
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageDebuggers())); connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageDebuggers()));

View File

@@ -29,6 +29,7 @@
#include "kitchooser.h" #include "kitchooser.h"
#include "kitconfigwidget.h"
#include "kitinformation.h" #include "kitinformation.h"
#include "kitmanager.h" #include "kitmanager.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
@@ -49,7 +50,7 @@ KitChooser::KitChooser(QWidget *parent) :
{ {
m_chooser = new QComboBox(this); m_chooser = new QComboBox(this);
m_chooser->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 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); QHBoxLayout *layout = new QHBoxLayout(this);
layout->setContentsMargins(0, 0, 0, 0); layout->setContentsMargins(0, 0, 0, 0);

View File

@@ -53,4 +53,9 @@ void KitConfigWidget::setMutable(bool b)
m_kit->setMutable(m_kitInformation->id(), b); m_kit->setMutable(m_kitInformation->id(), b);
} }
QString KitConfigWidget::msgManage()
{
return tr("Manage...");
}
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -67,6 +67,8 @@ public:
bool isMutable() const; bool isMutable() const;
void setMutable(bool b); void setMutable(bool b);
static QString msgManage();
signals: signals:
void dirty(); void dirty();

View File

@@ -129,7 +129,7 @@ ToolChainInformationConfigWidget::ToolChainInformationConfigWidget(Kit *k, const
refresh(); refresh();
connect(m_comboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(currentToolChainChanged(int))); 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); m_manageButton->setContentsMargins(0, 0, 0, 0);
connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageToolChains())); connect(m_manageButton, SIGNAL(clicked()), this, SLOT(manageToolChains()));
@@ -316,7 +316,7 @@ DeviceInformationConfigWidget::DeviceInformationConfigWidget(Kit *workingCopy, c
{ {
m_comboBox->setModel(m_model); m_comboBox->setModel(m_model);
m_manageButton = new QPushButton(tr("Manage")); m_manageButton = new QPushButton(KitConfigWidget::msgManage());
refresh(); refresh();
m_comboBox->setToolTip(toolTip()); m_comboBox->setToolTip(toolTip());

View File

@@ -54,6 +54,7 @@ ProjectWizardPage::ProjectWizardPage(QWidget *parent) :
m_ui(new Ui::WizardPage) m_ui(new Ui::WizardPage)
{ {
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->vcsManageButton->setText(Core::ICore::msgShowOptionsDialog());
connect(m_ui->projectComboBox, SIGNAL(currentIndexChanged(int)), connect(m_ui->projectComboBox, SIGNAL(currentIndexChanged(int)),
this, SLOT(slotProjectChanged(int))); this, SLOT(slotProjectChanged(int)));
connect(m_ui->vcsManageButton, SIGNAL(clicked()), this, SLOT(slotManageVcs())); connect(m_ui->vcsManageButton, SIGNAL(clicked()), this, SLOT(slotManageVcs()));

View File

@@ -2,6 +2,14 @@
<ui version="4.0"> <ui version="4.0">
<class>ProjectExplorer::Internal::WizardPage</class> <class>ProjectExplorer::Internal::WizardPage</class>
<widget class="QWizardPage" name="ProjectExplorer::Internal::WizardPage"> <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"> <property name="title">
<string>Project Management</string> <string>Project Management</string>
</property> </property>
@@ -67,7 +75,7 @@
<item row="2" column="2"> <item row="2" column="2">
<widget class="QPushButton" name="vcsManageButton"> <widget class="QPushButton" name="vcsManageButton">
<property name="text"> <property name="text">
<string>Manage...</string> <string/>
</property> </property>
</widget> </widget>
</item> </item>
@@ -108,8 +116,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>316</width> <width>373</width>
<height>103</height> <height>104</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">

View File

@@ -33,6 +33,7 @@
#include "buildinfo.h" #include "buildinfo.h"
#include "projectexplorerconstants.h" #include "projectexplorerconstants.h"
#include "kit.h" #include "kit.h"
#include "kitconfigwidget.h"
#include "kitmanager.h" #include "kitmanager.h"
#include "kitoptionspage.h" #include "kitoptionspage.h"
@@ -79,7 +80,7 @@ TargetSetupWidget::TargetSetupWidget(Kit *k,
Utils::FadingWidget *panel = new Utils::FadingWidget(m_detailsWidget); Utils::FadingWidget *panel = new Utils::FadingWidget(m_detailsWidget);
QHBoxLayout *panelLayout = new QHBoxLayout(panel); QHBoxLayout *panelLayout = new QHBoxLayout(panel);
m_manageButton = new QPushButton(tr("Manage...")); m_manageButton = new QPushButton(KitConfigWidget::msgManage());
panelLayout->addWidget(m_manageButton); panelLayout->addWidget(m_manageButton);
m_detailsWidget->setToolWidget(panel); m_detailsWidget->setToolWidget(panel);

View File

@@ -55,7 +55,7 @@ QtKitConfigWidget::QtKitConfigWidget(ProjectExplorer::Kit *k, const ProjectExplo
versionIds.append(v->uniqueId()); versionIds.append(v->uniqueId());
versionsChanged(versionIds, QList<int>(), QList<int>()); versionsChanged(versionIds, QList<int>(), QList<int>());
m_manageButton = new QPushButton(tr("Manage...")); m_manageButton = new QPushButton(KitConfigWidget::msgManage());
refresh(); refresh();
m_combo->setToolTip(toolTip()); m_combo->setToolTip(toolTip());

View File

@@ -61,7 +61,7 @@ VcsConfigurationPage::VcsConfigurationPage(const Core::IVersionControl *vc, QWid
setSubTitle(tr("Please configure <b>%1</b> now.").arg(vc->displayName())); setSubTitle(tr("Please configure <b>%1</b> now.").arg(vc->displayName()));
d->m_versionControl = vc; 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); QVBoxLayout *verticalLayout = new QVBoxLayout(this);
verticalLayout->addWidget(d->m_configureButton); verticalLayout->addWidget(d->m_configureButton);