1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Remove GUI Editor

This commit is contained in:
reuk 2024-06-26 12:40:05 +01:00
parent 813b01e3d8
commit 8a4ec206f2
No known key found for this signature in database
GPG key ID: FCB43929F012EE5C
103 changed files with 21 additions and 27945 deletions

View file

@ -32,11 +32,6 @@
==============================================================================
*/
PopupMenu createGUIEditorMenu();
void handleGUIEditorMenuCommand (int);
void registerGUIEditorCommands();
//==============================================================================
struct ProjucerApplication::MainMenuModel final : public MenuBarModel
{
@ -298,11 +293,7 @@ MenuBarModel* ProjucerApplication::getMenuModel()
StringArray ProjucerApplication::getMenuNames()
{
StringArray currentMenuNames { "File", "Edit", "View", "Window", "Document", "GUI Editor", "Tools", "Help" };
if (! isGUIEditorEnabled()) currentMenuNames.removeString ("GUI Editor");
return currentMenuNames;
return { "File", "Edit", "View", "Window", "Document", "Tools", "Help" };
}
PopupMenu ProjucerApplication::createMenu (const String& menuName)
@ -328,10 +319,6 @@ PopupMenu ProjucerApplication::createMenu (const String& menuName)
if (menuName == "Help")
return createHelpMenu();
if (menuName == "GUI Editor")
if (isGUIEditorEnabled())
return createGUIEditorMenu();
jassertfalse; // names have changed?
return {};
}
@ -519,8 +506,6 @@ PopupMenu ProjucerApplication::createToolsMenu()
menu.addCommandItem (commandManager.get(), CommandIDs::showUTF8Tool);
menu.addCommandItem (commandManager.get(), CommandIDs::showSVGPathTool);
menu.addCommandItem (commandManager.get(), CommandIDs::showTranslationTool);
menu.addSeparator();
menu.addCommandItem (commandManager.get(), CommandIDs::enableGUIEditor);
return menu;
}
@ -891,10 +876,6 @@ void ProjucerApplication::handleMainMenuCommand (int menuItemID)
{
findAndLaunchExample (menuItemID - examplesBaseID);
}
else
{
handleGUIEditorMenuCommand (menuItemID);
}
}
//==============================================================================
@ -914,7 +895,6 @@ void ProjucerApplication::getAllCommands (Array <CommandID>& commands)
CommandIDs::showGlobalPathsWindow,
CommandIDs::showUTF8Tool,
CommandIDs::showSVGPathTool,
CommandIDs::enableGUIEditor,
CommandIDs::showAboutWindow,
CommandIDs::checkForNewVersion,
CommandIDs::enableNewVersionCheck,
@ -989,13 +969,6 @@ void ProjucerApplication::getCommandInfo (CommandID commandID, ApplicationComman
result.setInfo ("SVG Path Converter", "Shows the SVG->Path data conversion utility", CommandCategories::general, 0);
break;
case CommandIDs::enableGUIEditor:
result.setInfo ("GUI Editor Enabled",
"Enables or disables the GUI editor functionality",
CommandCategories::general,
(isGUIEditorEnabled() ? ApplicationCommandInfo::isTicked : 0));
break;
case CommandIDs::showAboutWindow:
result.setInfo ("About Projucer", "Shows the Projucer's 'About' page.", CommandCategories::general, 0);
break;
@ -1048,7 +1021,6 @@ bool ProjucerApplication::perform (const InvocationInfo& info)
case CommandIDs::clearRecentFiles: clearRecentFiles(); break;
case CommandIDs::showUTF8Tool: showUTF8ToolWindow(); break;
case CommandIDs::showSVGPathTool: showSVGPathDataToolWindow(); break;
case CommandIDs::enableGUIEditor: enableOrDisableGUIEditor(); break;
case CommandIDs::showGlobalPathsWindow: showPathsWindow (false); break;
case CommandIDs::showAboutWindow: showAboutWindow(); break;
case CommandIDs::checkForNewVersion: LatestVersionCheckerAndUpdater::getInstance()->checkForNewVersion (false); break;
@ -1203,16 +1175,6 @@ void ProjucerApplication::showSVGPathDataToolWindow()
500, 500, 300, 300, 1000, 1000);
}
bool ProjucerApplication::isGUIEditorEnabled() const
{
return getGlobalProperties().getBoolValue (Ids::guiEditorEnabled);
}
void ProjucerApplication::enableOrDisableGUIEditor()
{
getGlobalProperties().setValue (Ids::guiEditorEnabled, ! isGUIEditorEnabled());
}
void ProjucerApplication::showAboutWindow()
{
if (aboutWindow != nullptr)
@ -1355,8 +1317,6 @@ void ProjucerApplication::initCommandManager()
CppCodeEditorComponent ed (File(), doc);
commandManager->registerAllCommandsForTarget (&ed);
}
registerGUIEditorCommands();
}
static void rescanModules (AvailableModulesList& list, const Array<File>& paths, bool async)

View file

@ -71,8 +71,6 @@ public:
void getCommandInfo (CommandID commandID, ApplicationCommandInfo&) override;
bool perform (const InvocationInfo&) override;
bool isGUIEditorEnabled() const;
//==============================================================================
void openFile (const File&, std::function<void (bool)>);
void showPathsWindow (bool highlightJUCEPath = false);
@ -166,8 +164,6 @@ private:
void launchClassesBrowser();
void launchTutorialsBrowser();
void enableOrDisableGUIEditor();
//==============================================================================
#if JUCE_MAC
class AppleMenuRebuildListener final : private MenuBarModel::Listener

View file

@ -65,7 +65,6 @@ namespace CommandIDs
showAboutWindow = 0x300024,
checkForNewVersion = 0x300025,
enableNewVersionCheck = 0x300026,
enableGUIEditor = 0x300027,
showProjectSettings = 0x300030,
showFileExplorerPanel = 0x300033,
@ -100,8 +99,6 @@ namespace CommandIDs
showAPIClasses = 0x300102,
showTutorials = 0x300103,
addNewGUIFile = 0x300200,
lastCommandIDEntry
};
}