Commit 5bc6692e authored by Eike Ziller's avatar Eike Ziller

Reduce number of categories and minimum size of preferences

Merges the Project, Qt4 and Tool Chain categories into one Build & Run
category, which makes it finally possible to reduce the minimum height
of the preferences dialog.

Change-Id: I8d94aac9c9531200f5d8ca212a53d3edc5734138
Reviewed-on: http://codereview.qt-project.org/5023Reviewed-by: default avatarQt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 7fa56b08
......@@ -47,7 +47,6 @@
<file>images/category_core.png</file>
<file>images/category_texteditor.png</file>
<file>images/category_help.png</file>
<file>images/category_project.png</file>
<file>images/category_design.png</file>
<file>images/category_qt.png</file>
<file>editormanager/BinFiles.mimetypes.xml</file>
......@@ -65,6 +64,7 @@
<file>images/category_cpp.png</file>
<file>images/category_vcs.png</file>
<file>images/category_qml.png</file>
<file>images/filtericon.png</file>
<file>images/filtericon.png</file>
<file>images/category_buildrun.png</file>
</qresource>
</RCC>
......@@ -393,7 +393,7 @@ void SettingsDialog::createGui()
mainGridLayout->addWidget(buttonBox, 2, 0, 1, 2);
mainGridLayout->setColumnStretch(1, 4);
setLayout(mainGridLayout);
setMinimumSize(1070, 680);
setMinimumSize(1000, 550);
}
SettingsDialog::~SettingsDialog()
......
......@@ -2511,7 +2511,7 @@ void DebuggerPluginPrivate::showQtDumperLibraryWarning(const QString &details)
dialog.exec();
if (dialog.clickedButton() == qtPref) {
ICore::instance()->showOptionsDialog(
_(QtSupport::Constants::QT_SETTINGS_CATEGORY),
_(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY),
_(QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID));
} else if (dialog.clickedButton() == helperOff) {
action(UseDebuggingHelpers)->setValue(qVariantFromValue(false), false);
......
......@@ -4504,16 +4504,16 @@ bool checkGdbConfiguration(const DebuggerStartParameters &sp, ConfigurationCheck
const QString binary = gdbBinary(sp);
if (gdbBinary(sp).isEmpty()) {
check->errorDetails.push_back(msgNoGdbBinaryForToolChain(sp.toolChainAbi));
check->settingsCategory = _(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
check->settingsPage = _(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
check->settingsCategory = _(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
check->settingsPage = _(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
return false;
}
if (sp.toolChainAbi.os() == Abi::WindowsOS && !QFileInfo(binary).isAbsolute()) {
// See initialization below, we need an absolute path to be able to locate Python on Windows.
check->errorDetails.push_back(GdbEngine::tr("The gdb location must be given as an "
"absolute path in the debugger settings (%1).").arg(binary));
check->settingsCategory = _(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
check->settingsPage = _(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY);
check->settingsCategory = _(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
check->settingsPage = _(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
return false;
}
return true;
......
......@@ -165,7 +165,6 @@ const char ICON_RUN_SMALL[] = ":/projectexplorer/images/run_small.png";
const char ICON_DEBUG_SMALL[] = ":/projectexplorer/images/debugger_start_small.png";
const char ICON_STOP[] = ":/projectexplorer/images/stop.png";
const char ICON_STOP_SMALL[] = ":/projectexplorer/images/stop_small.png";
const char ICON_TOOLCHAIN_SETTINGS_CATEGORY[] = ":projectexplorer/images/build.png"; // FIXME: Need an icon!
const char ICON_WINDOW[] = ":/projectexplorer/images/window.png";
const char TASK_BUILD[] = "ProjectExplorer.Task.Build";
......@@ -181,10 +180,9 @@ const char RESOURCE_MIMETYPE[] = "application/vnd.nokia.xml.qt.resource";
// Settings page
const char PROJECTEXPLORER_SETTINGS_CATEGORY[] = "K.ProjectExplorer";
const char PROJECTEXPLORER_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Projects");
const char PROJECTEXPLORER_SETTINGS_CATEGORY_ICON[] = ":/core/images/category_project.png";
const char PROJECTEXPLORER_SETTINGS_ID[] = "ProjectExplorer.ProjectExplorer";
const char TOOLCHAIN_SETTINGS_CATEGORY[] = "ProjectExplorer.Settings.ToolChains";
const char PROJECTEXPLORER_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Build & Run");
const char PROJECTEXPLORER_SETTINGS_CATEGORY_ICON[] = ":/core/images/category_buildrun.png";
const char PROJECTEXPLORER_SETTINGS_ID[] = "A.ProjectExplorer.ProjectExplorer";
const char TOOLCHAIN_SETTINGS_PAGE_ID[] = "M.ProjectExplorer.ToolChainOptions";
// Task categories
......
......@@ -467,17 +467,18 @@ QString ToolChainOptionsPage::displayName() const
QString ToolChainOptionsPage::category() const
{
return QLatin1String(Constants::TOOLCHAIN_SETTINGS_CATEGORY);
return QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
}
QString ToolChainOptionsPage::displayCategory() const
{
return tr("Tool Chains");
return QCoreApplication::translate("ProjectExplorer",
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
}
QIcon ToolChainOptionsPage::categoryIcon() const
{
return QIcon(QLatin1String(Constants::ICON_TOOLCHAIN_SETTINGS_CATEGORY));
return QIcon(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON);
}
QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
......
......@@ -49,6 +49,7 @@
#include <texteditor/texteditoractionhandler.h>
#include <projectexplorer/taskhub.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/qtsupportconstants.h>
......@@ -116,7 +117,7 @@ void QmlProjectPlugin::showQmlObserverToolWarning()
dialog.exec();
if (dialog.clickedButton() == qtPref) {
Core::ICore::instance()->showOptionsDialog(
QtSupport::Constants::QT_SETTINGS_CATEGORY,
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID);
}
}
......
......@@ -39,6 +39,7 @@
#include <coreplugin/icore.h>
#include <projectexplorer/environmentwidget.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/debuggerlanguagechooser.h>
#include <utils/detailswidget.h>
#include <utils/environment.h>
......@@ -279,7 +280,7 @@ void QmlProjectRunConfigurationWidget::qmlDebugServerPortChanged(uint port)
void QmlProjectRunConfigurationWidget::manageQtVersions()
{
ICore *core = ICore::instance();
core->showOptionsDialog(QtSupport::Constants::QT_SETTINGS_CATEGORY,
core->showOptionsDialog(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID);
}
......
......@@ -180,13 +180,13 @@ void Qt4ProjectConfigWidget::updateShadowBuildUi()
void Qt4ProjectConfigWidget::manageQtVersions()
{
Core::ICore *core = Core::ICore::instance();
core->showOptionsDialog(QtSupport::Constants::QT_SETTINGS_CATEGORY, QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID);
core->showOptionsDialog(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY, QtSupport::Constants::QTVERSION_SETTINGS_PAGE_ID);
}
void Qt4ProjectConfigWidget::manageToolChains()
{
Core::ICore *core = Core::ICore::instance();
core->showOptionsDialog(ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_CATEGORY,
core->showOptionsDialog(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY,
ProjectExplorer::Constants::TOOLCHAIN_SETTINGS_PAGE_ID);
}
......
......@@ -50,6 +50,7 @@
#include <utils/pathchooser.h>
#include <projectexplorer/toolchainmanager.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtconcurrent/runextensions.h>
#include <QtCore/QDir>
......@@ -84,17 +85,18 @@ QString QtOptionsPage::displayName() const
QString QtOptionsPage::category() const
{
return QLatin1String(Constants::QT_SETTINGS_CATEGORY);
return QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
}
QString QtOptionsPage::displayCategory() const
{
return QCoreApplication::translate("Qt4ProjectManager", Constants::QT_SETTINGS_TR_CATEGORY);
return QCoreApplication::translate("ProjectExplorer",
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
}
QIcon QtOptionsPage::categoryIcon() const
{
return QIcon(QLatin1String(Constants::QT_SETTINGS_CATEGORY_ICON));
return QIcon(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON);
}
QWidget *QtOptionsPage::createPage(QWidget *parent)
......
......@@ -37,10 +37,8 @@ namespace QtSupport {
namespace Constants {
//Qt4 settings pages
const char * const QT_SETTINGS_CATEGORY = "L.Qt4";
const char * const QT_SETTINGS_CATEGORY_ICON = ":/core/images/category_qt.png";
const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt4");
const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions";
const char * const QTVERSION_SETTINGS_PAGE_ID = "B.Qt Versions";
const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions");
// QtVersions
......
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