Commit d4be77b4 authored by con's avatar con
Browse files

Reorder the "new" wizard categories.

parent 3061d7dc
...@@ -220,7 +220,7 @@ const char * const ICON_RESET = ":/core/images/reset.png"; ...@@ -220,7 +220,7 @@ const char * const ICON_RESET = ":/core/images/reset.png";
const char * const ICON_MAGNIFIER = ":/core/images/magnifier.png"; const char * const ICON_MAGNIFIER = ":/core/images/magnifier.png";
const char * const ICON_TOGGLE_SIDEBAR = ":/core/images/sidebaricon.png"; const char * const ICON_TOGGLE_SIDEBAR = ":/core/images/sidebaricon.png";
const char * const WIZARD_CATEGORY_QT = "M.Qt"; const char * const WIZARD_CATEGORY_QT = "R.Qt";
const char * const WIZARD_TR_CATEGORY_QT = QT_TRANSLATE_NOOP("Core", "Qt"); const char * const WIZARD_TR_CATEGORY_QT = QT_TRANSLATE_NOOP("Core", "Qt");
const char * const SETTINGS_CATEGORY_CORE = "A.Core"; const char * const SETTINGS_CATEGORY_CORE = "A.Core";
......
...@@ -207,7 +207,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess ...@@ -207,7 +207,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
CppFileWizard::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard); CppFileWizard::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setCategory(QLatin1String("C.C++")); wizardParameters.setCategory(QLatin1String("O.C++"));
wizardParameters.setDisplayCategory(tr("C++")); wizardParameters.setDisplayCategory(tr("C++"));
wizardParameters.setDisplayName(tr("C++ Class")); wizardParameters.setDisplayName(tr("C++ Class"));
wizardParameters.setId(QLatin1String("A.Class")); wizardParameters.setId(QLatin1String("A.Class"));
......
...@@ -188,8 +188,9 @@ const char * const TASK_CATEGORY_COMPILE = "Task.Category.Compile"; ...@@ -188,8 +188,9 @@ const char * const TASK_CATEGORY_COMPILE = "Task.Category.Compile";
const char * const TASK_CATEGORY_BUILDSYSTEM = "Task.Category.Buildsystem"; const char * const TASK_CATEGORY_BUILDSYSTEM = "Task.Category.Buildsystem";
// Wizard category // Wizard category
const char * const PROJECT_WIZARD_CATEGORY = "R.Projects"; // (after Qt) const char * const PROJECT_WIZARD_CATEGORY = "I.Projects"; // (after Qt)
const char * const PROJECT_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("ProjectExplorer", "Projects"); const char * const PROJECT_WIZARD_TR_SCOPE = "ProjectExplorer";
const char * const PROJECT_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("ProjectExplorer", "Other Project");
} // namespace Constants } // namespace Constants
} // namespace ProjectExplorer } // namespace ProjectExplorer
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "qmlnewprojectwizard.h" #include "qmlnewprojectwizard.h"
#include "qmlprojectconstants.h"
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h> #include <projectexplorer/projectexplorerconstants.h>
...@@ -62,8 +64,9 @@ Core::BaseFileWizardParameters QmlNewProjectWizard::parameters() ...@@ -62,8 +64,9 @@ Core::BaseFileWizardParameters QmlNewProjectWizard::parameters()
parameters.setDisplayName(tr("QML Application")); parameters.setDisplayName(tr("QML Application"));
parameters.setId(QLatin1String("QA.QML Application")); parameters.setId(QLatin1String("QA.QML Application"));
parameters.setDescription(tr("Creates a QML application.")); parameters.setDescription(tr("Creates a QML application."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY)); parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY)); parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE,
Constants::QML_WIZARD_TR_CATEGORY));
return parameters; return parameters;
} }
......
...@@ -52,6 +52,11 @@ const char *const FILES_MIMETYPE = QMLMIMETYPE; ...@@ -52,6 +52,11 @@ const char *const FILES_MIMETYPE = QMLMIMETYPE;
const char *const TASK_CATEGORY_QML = "Task.Category.Qml"; const char *const TASK_CATEGORY_QML = "Task.Category.Qml";
// Wizard category
const char * const QML_WIZARD_CATEGORY = "F.Projects"; // (after Qt)
const char * const QML_WIZARD_TR_SCOPE = "QmlProjectManager";
const char * const QML_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("QmlProjectManager", "QML Project");
} // namespace Constants } // namespace Constants
} // namespace QmlProjectManager } // namespace QmlProjectManager
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include "qmlprojectwizard.h" #include "qmlprojectwizard.h"
#include "qmlprojectconstants.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h> #include <coreplugin/mimedatabase.h>
#include <projectexplorer/projectexplorer.h> #include <projectexplorer/projectexplorer.h>
...@@ -94,8 +96,9 @@ Core::BaseFileWizardParameters QmlProjectWizard::parameters() ...@@ -94,8 +96,9 @@ Core::BaseFileWizardParameters QmlProjectWizard::parameters()
parameters.setDisplayName(tr("Import of existing QML directory")); parameters.setDisplayName(tr("Import of existing QML directory"));
parameters.setId(QLatin1String("QI.QML Import")); parameters.setId(QLatin1String("QI.QML Import"));
parameters.setDescription(tr("Creates a QML project from an existing directory of QML files.")); parameters.setDescription(tr("Creates a QML project from an existing directory of QML files."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY)); parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY)); parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE,
Constants::QML_WIZARD_TR_CATEGORY));
return parameters; return parameters;
} }
......
...@@ -34,14 +34,18 @@ ...@@ -34,14 +34,18 @@
#include "filenamingparameters.h" #include "filenamingparameters.h"
#include <cpptools/cppmodelmanagerinterface.h> #include <cpptools/cppmodelmanagerinterface.h>
#include <projectexplorer/projectexplorerconstants.h>
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
CustomWidgetWizard::CustomWidgetWizard() : CustomWidgetWizard::CustomWidgetWizard() :
QtWizard(QLatin1String("P.Qt4CustomWidget"), QtWizard(QLatin1String("P.Qt4CustomWidget"),
tr("Qt4 Designer Custom Widget"), QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
tr("Creates a Qt4 Designer Custom Widget or a Custom Widget Collection."), QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("Qt Custom Designer Widget"),
tr("Creates a Qt Custom Designer Widget or a Custom Widget Collection."),
QIcon(QLatin1String(":/wizards/images/gui.png"))) QIcon(QLatin1String(":/wizards/images/gui.png")))
{ {
} }
......
...@@ -80,6 +80,11 @@ const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectMan ...@@ -80,6 +80,11 @@ const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectMan
const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions"; const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions";
const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions"); const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions");
// Wizard categories
const char * const QT_APP_WIZARD_CATEGORY = "C.QtApplicationProjects";
const char * const QT_APP_WIZARD_TR_SCOPE = "Qt4ProjectManager";
const char * const QT_APP_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Application Project");
} // namespace Constants } // namespace Constants
} // namespace Qt4ProjectManager } // namespace Qt4ProjectManager
......
...@@ -55,9 +55,12 @@ namespace Qt4ProjectManager { ...@@ -55,9 +55,12 @@ namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
ConsoleAppWizard::ConsoleAppWizard() ConsoleAppWizard::ConsoleAppWizard()
: QtWizard(QLatin1String("D.Qt4Core"), : QtWizard(QLatin1String("E.Qt4Core"),
tr("Qt4 Console Application"), QLatin1String(Constants::QT_APP_WIZARD_CATEGORY),
tr("Creates a Qt4 console application."), QLatin1String(Constants::QT_APP_WIZARD_TR_SCOPE),
QLatin1String(Constants::QT_APP_WIZARD_TR_CATEGORY),
tr("Qt Console Application"),
tr("Creates a Qt console application."),
QIcon(QLatin1String(":/wizards/images/console.png"))) QIcon(QLatin1String(":/wizards/images/console.png")))
{ {
} }
......
...@@ -31,12 +31,17 @@ ...@@ -31,12 +31,17 @@
#include "emptyprojectwizarddialog.h" #include "emptyprojectwizarddialog.h"
#include <projectexplorer/projectexplorerconstants.h>
namespace Qt4ProjectManager { namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
EmptyProjectWizard::EmptyProjectWizard() EmptyProjectWizard::EmptyProjectWizard()
: QtWizard(QLatin1String("E.Qt4Empty"), : QtWizard(QLatin1String("U.Qt4Empty"),
tr("Empty Qt4 Project"), QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("Empty Qt Project"),
tr("Creates an empty Qt project."), tr("Creates an empty Qt project."),
QIcon(QLatin1String(":/wizards/images/gui.png"))) QIcon(QLatin1String(":/wizards/images/gui.png")))
{ {
......
...@@ -72,10 +72,13 @@ namespace Qt4ProjectManager { ...@@ -72,10 +72,13 @@ namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
GuiAppWizard::GuiAppWizard() GuiAppWizard::GuiAppWizard()
: QtWizard(QLatin1String("C.Qt4Gui"), : QtWizard(QLatin1String("C.Qt4Gui"),
tr("Qt4 Gui Application"), QLatin1String(Constants::QT_APP_WIZARD_CATEGORY),
tr("Creates a Qt4 Gui Application with one form."), QLatin1String(Constants::QT_APP_WIZARD_TR_SCOPE),
QIcon(QLatin1String(":/wizards/images/gui.png"))) QLatin1String(Constants::QT_APP_WIZARD_TR_CATEGORY),
tr("Qt Gui Application"),
tr("Creates a Qt Gui Application with one form."),
QIcon(QLatin1String(":/wizards/images/gui.png")))
{ {
} }
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <utils/codegeneration.h> #include <utils/codegeneration.h>
#include <cpptools/cppmodelmanagerinterface.h> #include <cpptools/cppmodelmanagerinterface.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QtCore/QDir> #include <QtCore/QDir>
#include <QtCore/QFileInfo> #include <QtCore/QFileInfo>
...@@ -47,9 +48,12 @@ namespace Qt4ProjectManager { ...@@ -47,9 +48,12 @@ namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
LibraryWizard::LibraryWizard() LibraryWizard::LibraryWizard()
: QtWizard(QLatin1String("Q.Qt4Library"), : QtWizard(QLatin1String("H.Qt4Library"),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("C++ Library"), tr("C++ Library"),
tr("Creates a C++ Library."), tr("Creates a Qt based C++ Library."),
QIcon(QLatin1String(":/wizards/images/lib.png"))) QIcon(QLatin1String(":/wizards/images/lib.png")))
{ {
} }
......
...@@ -50,13 +50,17 @@ using namespace Qt4ProjectManager::Internal; ...@@ -50,13 +50,17 @@ using namespace Qt4ProjectManager::Internal;
static inline Core::BaseFileWizardParameters static inline Core::BaseFileWizardParameters
wizardParameters(const QString &id, wizardParameters(const QString &id,
const QString &category,
const QString &categoryTranslationScope,
const QString &displayCategory,
const QString &name, const QString &name,
const QString &description, const QString &description,
const QIcon &icon) const QIcon &icon)
{ {
Core::BaseFileWizardParameters rc(Core::IWizard::ProjectWizard); Core::BaseFileWizardParameters rc(Core::IWizard::ProjectWizard);
rc.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY)); rc.setCategory(category);
rc.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY)); rc.setDisplayCategory(QCoreApplication::translate(categoryTranslationScope.toLatin1(),
displayCategory.toLatin1()));
rc.setIcon(icon); rc.setIcon(icon);
rc.setDisplayName(name); rc.setDisplayName(name);
rc.setId(id); rc.setId(id);
...@@ -65,9 +69,19 @@ static inline Core::BaseFileWizardParameters ...@@ -65,9 +69,19 @@ static inline Core::BaseFileWizardParameters
} }
// -------------------- QtWizard // -------------------- QtWizard
QtWizard::QtWizard(const QString &id, const QString &name, QtWizard::QtWizard(const QString &id,
const QString &category,
const QString &categoryTranslationScope,
const QString &displayCategory,
const QString &name,
const QString &description, const QIcon &icon) : const QString &description, const QIcon &icon) :
Core::BaseFileWizard(wizardParameters(id, name, description, icon)) Core::BaseFileWizard(wizardParameters(id,
category,
categoryTranslationScope,
displayCategory,
name,
description,
icon))
{ {
} }
......
...@@ -56,6 +56,9 @@ class QtWizard : public Core::BaseFileWizard ...@@ -56,6 +56,9 @@ class QtWizard : public Core::BaseFileWizard
protected: protected:
QtWizard(const QString &id, QtWizard(const QString &id,
const QString &category,
const QString &categoryTranslationScope,
const QString &displayCategory,
const QString &name, const QString &name,
const QString &description, const QString &description,
const QIcon &icon); const QIcon &icon);
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
#include "testwizard.h" #include "testwizard.h"
#include "testwizarddialog.h" #include "testwizarddialog.h"
#include <cpptools/cppmodelmanager.h> #include <cpptools/cppmodelmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h> #include <utils/qtcassert.h>
...@@ -42,9 +44,12 @@ namespace Qt4ProjectManager { ...@@ -42,9 +44,12 @@ namespace Qt4ProjectManager {
namespace Internal { namespace Internal {
TestWizard::TestWizard() : TestWizard::TestWizard() :
QtWizard(QLatin1String("E.Qt4Test"), QtWizard(QLatin1String("L.Qt4Test"),
tr("Qt4 Unit Test"), QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
tr("Creates a Qt4 Unit Test."), QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("Qt Unit Test"),
tr("Creates a Qt Unit Test."),
QIcon(QLatin1String(":/wizards/images/console.png"))) QIcon(QLatin1String(":/wizards/images/console.png")))
{ {
} }
......
...@@ -93,7 +93,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe ...@@ -93,7 +93,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard); Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setDescription(tr("Creates a text file (.txt).")); wizardParameters.setDescription(tr("Creates a text file (.txt)."));
wizardParameters.setDisplayName(tr("Text File")); wizardParameters.setDisplayName(tr("Text File"));
wizardParameters.setCategory(QLatin1String("O.General")); wizardParameters.setCategory(QLatin1String("U.General"));
wizardParameters.setDisplayCategory(tr("General")); wizardParameters.setDisplayCategory(tr("General"));
m_wizard = new TextFileWizard(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT), m_wizard = new TextFileWizard(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT),
QLatin1String(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID), QLatin1String(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID),
......
...@@ -41,7 +41,7 @@ const char * const VCS_COMMON_SETTINGS_ID = "A.Common"; ...@@ -41,7 +41,7 @@ const char * const VCS_COMMON_SETTINGS_ID = "A.Common";
const char * const VCS_COMMON_SETTINGS_NAME = QT_TRANSLATE_NOOP("VCSBase", "Common"); const char * const VCS_COMMON_SETTINGS_NAME = QT_TRANSLATE_NOOP("VCSBase", "Common");
const char * const VCS_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("VCSBase", "Version Control"); const char * const VCS_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("VCSBase", "Version Control");
const char * const VCS_WIZARD_CATEGORY = "Z.Version Control"; const char * const VCS_WIZARD_CATEGORY = "L.Version Control";
// Ids for sort order (wizards and preferences) // Ids for sort order (wizards and preferences)
const char * const VCS_ID_GIT = "G.Git"; const char * const VCS_ID_GIT = "G.Git";
......
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