diff --git a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp index 3bccffd116..8c5482fe06 100644 --- a/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp +++ b/extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp @@ -209,7 +209,7 @@ struct AppearanceEditor void closeButtonPressed() { - JucerApplication::getApp()->appearanceEditorWindow = nullptr; + JucerApplication::getApp().appearanceEditorWindow = nullptr; } private: diff --git a/extras/Introjucer/Source/Application/jucer_Application.h b/extras/Introjucer/Source/Application/jucer_Application.h index ee4c0f7ff0..25a370f6be 100644 --- a/extras/Introjucer/Source/Application/jucer_Application.h +++ b/extras/Introjucer/Source/Application/jucer_Application.h @@ -132,9 +132,11 @@ public: openFile (commandLine.unquoted()); } - static JucerApplication* getApp() + static JucerApplication& getApp() { - return dynamic_cast (JUCEApplication::getInstance()); + JucerApplication* const app = dynamic_cast (JUCEApplication::getInstance()); + jassert (app != nullptr); + return *app; } //============================================================================== @@ -148,126 +150,131 @@ public: StringArray getMenuBarNames() { - const char* const names[] = { "File", "Edit", "View", "Window", "Tools", 0 }; - return StringArray ((const char**) names); + return getApp().getMenuNames(); } - PopupMenu getMenuForIndex (int topLevelMenuIndex, const String& /*menuName*/) + PopupMenu getMenuForIndex (int /*topLevelMenuIndex*/, const String& menuName) { PopupMenu menu; + getApp().createMenu (menu, menuName); + return menu; + } - if (topLevelMenuIndex == 0) // "File" menu + void menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/) + { + if (menuItemID >= 100 && menuItemID < 200) { - menu.addCommandItem (commandManager, CommandIDs::newProject); - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::open); - - PopupMenu recentFiles; - getAppSettings().recentFiles.createPopupMenuItems (recentFiles, 100, true, true); - menu.addSubMenu ("Open recent file", recentFiles); - - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::closeDocument); - menu.addCommandItem (commandManager, CommandIDs::saveDocument); - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::closeProject); - menu.addCommandItem (commandManager, CommandIDs::saveProject); - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::openInIDE); - menu.addCommandItem (commandManager, CommandIDs::saveAndOpenInIDE); - - #if ! JUCE_MAC - menu.addSeparator(); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit); - #endif + // open a file from the "recent files" menu + getApp().openFile (getAppSettings().recentFiles.getFile (menuItemID - 100)); } - else if (topLevelMenuIndex == 1) // "Edit" menu + else if (menuItemID >= 300 && menuItemID < 400) { - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::undo); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::redo); - menu.addSeparator(); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::cut); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::copy); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::paste); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::del); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::selectAll); - menu.addCommandItem (commandManager, StandardApplicationCommandIDs::deselectAll); - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::toFront); - menu.addCommandItem (commandManager, CommandIDs::toBack); - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::group); - menu.addCommandItem (commandManager, CommandIDs::ungroup); - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::bringBackLostItems); + OpenDocumentManager::Document* doc = getApp().openDocumentManager.getOpenDocument (menuItemID - 300); + jassert (doc != nullptr); + + getApp().mainWindowList.openDocument (doc); } - else if (topLevelMenuIndex == 2) // "View" menu - { - menu.addCommandItem (commandManager, CommandIDs::showProjectSettings); - menu.addSeparator(); + } + }; - menu.addCommandItem (commandManager, CommandIDs::showAppearanceSettings); - menu.addSeparator(); + virtual StringArray getMenuNames() + { + const char* const names[] = { "File", "Edit", "View", "Window", "Tools", nullptr }; + return StringArray (names); + } - menu.addCommandItem (commandManager, CommandIDs::showGrid); - menu.addCommandItem (commandManager, CommandIDs::enableSnapToGrid); + virtual void createMenu (PopupMenu& menu, const String& menuName) + { + if (menuName == "File") createFileMenu (menu); + else if (menuName == "Edit") createEditMenu (menu); + else if (menuName == "View") createViewMenu (menu); + else if (menuName == "Window") createWindowMenu (menu); + else if (menuName == "Tools") createToolsMenu (menu); + else jassertfalse; // names have changed? + } - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::zoomIn); - menu.addCommandItem (commandManager, CommandIDs::zoomOut); - menu.addCommandItem (commandManager, CommandIDs::zoomNormal); + virtual void createFileMenu (PopupMenu& menu) + { + menu.addCommandItem (commandManager, CommandIDs::newProject); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::open); + + PopupMenu recentFiles; + getAppSettings().recentFiles.createPopupMenuItems (recentFiles, 100, true, true); + menu.addSubMenu ("Open recent file", recentFiles); + + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::closeDocument); + menu.addCommandItem (commandManager, CommandIDs::saveDocument); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::closeProject); + menu.addCommandItem (commandManager, CommandIDs::saveProject); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::openInIDE); + menu.addCommandItem (commandManager, CommandIDs::saveAndOpenInIDE); + + #if ! JUCE_MAC + menu.addSeparator(); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::quit); + #endif + } - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::useTabbedWindows); - } - else if (topLevelMenuIndex == 3) // "Window" menu - { - menu.addCommandItem (commandManager, CommandIDs::closeWindow); - menu.addSeparator(); + virtual void createEditMenu (PopupMenu& menu) + { + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::undo); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::redo); + menu.addSeparator(); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::cut); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::copy); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::paste); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::del); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::selectAll); + menu.addCommandItem (commandManager, StandardApplicationCommandIDs::deselectAll); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::toFront); + menu.addCommandItem (commandManager, CommandIDs::toBack); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::group); + menu.addCommandItem (commandManager, CommandIDs::ungroup); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::bringBackLostItems); + } - menu.addCommandItem (commandManager, CommandIDs::goToPreviousDoc); - menu.addCommandItem (commandManager, CommandIDs::goToNextDoc); - menu.addSeparator(); + virtual void createViewMenu (PopupMenu& menu) + { + menu.addCommandItem (commandManager, CommandIDs::showFilePanel); + menu.addCommandItem (commandManager, CommandIDs::showConfigPanel); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::showAppearanceSettings); + } - const int numDocs = jmin (50, getApp()->openDocumentManager.getNumOpenDocuments()); + virtual void createWindowMenu (PopupMenu& menu) + { + menu.addCommandItem (commandManager, CommandIDs::closeWindow); + menu.addSeparator(); - for (int i = 0; i < numDocs; ++i) - { - OpenDocumentManager::Document* doc = getApp()->openDocumentManager.getOpenDocument(i); + menu.addCommandItem (commandManager, CommandIDs::goToPreviousDoc); + menu.addCommandItem (commandManager, CommandIDs::goToNextDoc); + menu.addSeparator(); - menu.addItem (300 + i, doc->getName()); - } + const int numDocs = jmin (50, getApp().openDocumentManager.getNumOpenDocuments()); - menu.addSeparator(); - menu.addCommandItem (commandManager, CommandIDs::closeAllDocuments); - } - else if (topLevelMenuIndex == 4) // "Tools" menu - { - menu.addCommandItem (commandManager, CommandIDs::updateModules); - menu.addCommandItem (commandManager, CommandIDs::showUTF8Tool); - } + for (int i = 0; i < numDocs; ++i) + { + OpenDocumentManager::Document* doc = getApp().openDocumentManager.getOpenDocument(i); - return menu; + menu.addItem (300 + i, doc->getName()); } - void menuItemSelected (int menuItemID, int /*topLevelMenuIndex*/) - { - if (menuItemID >= 100 && menuItemID < 200) - { - // open a file from the "recent files" menu - const File file (getAppSettings().recentFiles.getFile (menuItemID - 100)); - - getApp()->openFile (file); - } - else if (menuItemID >= 300 && menuItemID < 400) - { - OpenDocumentManager::Document* doc = getApp()->openDocumentManager.getOpenDocument (menuItemID - 300); - jassert (doc != nullptr); + menu.addSeparator(); + menu.addCommandItem (commandManager, CommandIDs::closeAllDocuments); + } - getApp()->mainWindowList.openDocument (doc); - } - } - }; + virtual void createToolsMenu (PopupMenu& menu) + { + menu.addCommandItem (commandManager, CommandIDs::updateModules); + menu.addCommandItem (commandManager, CommandIDs::showUTF8Tool); + } //============================================================================== void getAllCommands (Array & commands) @@ -345,9 +352,7 @@ public: case CommandIDs::showUTF8Tool: showUTF8ToolWindow(); break; case CommandIDs::showAppearanceSettings: showAppearanceEditorWindow(); break; case CommandIDs::updateModules: runModuleUpdate (String::empty); break; - - default: - return JUCEApplication::perform (info); + default: return JUCEApplication::perform (info); } return true; @@ -455,8 +460,9 @@ private: stopTimer(); delete this; - if (getApp() != nullptr) - getApp()->systemRequestedQuit(); + JUCEApplication* app = JUCEApplication::getInstance(); + if (app != nullptr) + app->systemRequestedQuit(); } JUCE_DECLARE_NON_COPYABLE (AsyncQuitRetrier); diff --git a/extras/Introjucer/Source/Application/jucer_CommandIDs.h b/extras/Introjucer/Source/Application/jucer_CommandIDs.h index 79eca1cf74..7988c233a3 100644 --- a/extras/Introjucer/Source/Application/jucer_CommandIDs.h +++ b/extras/Introjucer/Source/Application/jucer_CommandIDs.h @@ -37,10 +37,11 @@ namespace CommandIDs static const int saveProject = 0x200060; static const int openInIDE = 0x200072; static const int saveAndOpenInIDE = 0x200073; - static const int showProjectSettings = 0x200074; static const int updateModules = 0x200075; static const int showUTF8Tool = 0x200076; static const int showAppearanceSettings = 0x200077; + static const int showConfigPanel = 0x200074; + static const int showFilePanel = 0x200078; static const int saveAll = 0x200080; diff --git a/extras/Introjucer/Source/Application/jucer_DocumentEditorComponent.cpp b/extras/Introjucer/Source/Application/jucer_DocumentEditorComponent.cpp index 7a545e788a..987b60b857 100644 --- a/extras/Introjucer/Source/Application/jucer_DocumentEditorComponent.cpp +++ b/extras/Introjucer/Source/Application/jucer_DocumentEditorComponent.cpp @@ -32,12 +32,12 @@ DocumentEditorComponent::DocumentEditorComponent (OpenDocumentManager::Document* document_) : document (document_) { - JucerApplication::getApp()->openDocumentManager.addListener (this); + JucerApplication::getApp().openDocumentManager.addListener (this); } DocumentEditorComponent::~DocumentEditorComponent() { - JucerApplication::getApp()->openDocumentManager.removeListener (this); + JucerApplication::getApp().openDocumentManager.removeListener (this); } void DocumentEditorComponent::documentAboutToClose (OpenDocumentManager::Document* closingDoc) diff --git a/extras/Introjucer/Source/Application/jucer_MainWindow.cpp b/extras/Introjucer/Source/Application/jucer_MainWindow.cpp index 565e4e10aa..721cebaaa4 100644 --- a/extras/Introjucer/Source/Application/jucer_MainWindow.cpp +++ b/extras/Introjucer/Source/Application/jucer_MainWindow.cpp @@ -35,7 +35,7 @@ ScopedPointer commandManager; //============================================================================== MainWindow::MainWindow() - : DocumentWindow (JucerApplication::getApp()->getApplicationName(), + : DocumentWindow (JucerApplication::getApp().getApplicationName(), Colour::greyLevel (0.6f), DocumentWindow::allButtons, false) @@ -44,7 +44,7 @@ MainWindow::MainWindow() createProjectContentCompIfNeeded(); #if ! JUCE_MAC - setMenuBar (JucerApplication::getApp()->menuModel); + setMenuBar (JucerApplication::getApp().menuModel); #endif setResizable (true, false); @@ -93,7 +93,7 @@ void MainWindow::createProjectContentCompIfNeeded() if (getProjectContentComponent() == nullptr) { clearContentComponent(); - setContentOwned (JucerApplication::getApp()->createProjectContentComponent(), false); + setContentOwned (JucerApplication::getApp().createProjectContentComponent(), false); jassert (getProjectContentComponent() != nullptr); } } @@ -115,7 +115,7 @@ ProjectContentComponent* MainWindow::getProjectContentComponent() const void MainWindow::closeButtonPressed() { - JucerApplication::getApp()->mainWindowList.closeWindow (this); + JucerApplication::getApp().mainWindowList.closeWindow (this); } bool MainWindow::closeProject (Project* project) @@ -136,7 +136,7 @@ bool MainWindow::closeProject (Project* project) pcc->hideEditor(); } - if (! JucerApplication::getApp()->openDocumentManager.closeAllDocumentsUsingProject (*project, true)) + if (! JucerApplication::getApp().openDocumentManager.closeAllDocumentsUsingProject (*project, true)) return false; FileBasedDocument::SaveResult r = project->saveIfNeededAndUserAgrees(); @@ -179,7 +179,7 @@ void MainWindow::restoreWindowPosition() bool MainWindow::canOpenFile (const File& file) const { return file.hasFileExtension (Project::projectFileExtension) - || JucerApplication::getApp()->openDocumentManager.canOpenFile (file); + || JucerApplication::getApp().openDocumentManager.canOpenFile (file); } bool MainWindow::openFile (const File& file) @@ -232,12 +232,12 @@ void MainWindow::activeWindowStatusChanged() if (getProjectContentComponent() != nullptr) getProjectContentComponent()->updateMissingFileStatuses(); - JucerApplication::getApp()->openDocumentManager.reloadModifiedFiles(); + JucerApplication::getApp().openDocumentManager.reloadModifiedFiles(); } void MainWindow::updateTitle (const String& documentName) { - String name (JucerApplication::getApp()->getApplicationName()); + String name (JucerApplication::getApp().getApplicationName()); if (currentProject != nullptr) name = currentProject->getDocumentTitle() + " - " + name; diff --git a/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp b/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp index e43acf8d67..39960c79ff 100644 --- a/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp +++ b/extras/Introjucer/Source/Application/jucer_OpenDocumentManager.cpp @@ -304,12 +304,12 @@ void OpenDocumentManager::fileHasBeenRenamed (const File& oldFile, const File& n //============================================================================== RecentDocumentList::RecentDocumentList() { - JucerApplication::getApp()->openDocumentManager.addListener (this); + JucerApplication::getApp().openDocumentManager.addListener (this); } RecentDocumentList::~RecentDocumentList() { - JucerApplication::getApp()->openDocumentManager.removeListener (this); + JucerApplication::getApp().openDocumentManager.removeListener (this); } void RecentDocumentList::clear() @@ -378,7 +378,7 @@ static void restoreDocList (Project& project, Array openDocumentManager; + OpenDocumentManager& odm = JucerApplication::getApp().openDocumentManager; forEachXmlChildElementWithTagName (*xml, e, "DOC") { diff --git a/extras/Introjucer/Source/Project/jucer_ConfigPage.cpp b/extras/Introjucer/Source/Project/jucer_ConfigPage.cpp index df5a390842..9f2097823b 100644 --- a/extras/Introjucer/Source/Project/jucer_ConfigPage.cpp +++ b/extras/Introjucer/Source/Project/jucer_ConfigPage.cpp @@ -358,7 +358,7 @@ namespace ProjectSettingsTreeClasses void addSubItems() { addSubItem (new ModulesItem (project)); - JucerApplication::getApp()->addExtraConfigItems (project, *this); + JucerApplication::getApp().addExtraConfigItems (project, *this); int i = 0; for (Project::ExporterIterator exporter (project); exporter.next(); ++i) diff --git a/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp b/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp index 22527c3e18..5451e0031f 100644 --- a/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp +++ b/extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp @@ -495,7 +495,7 @@ public: MainWindow* mw = dynamic_cast (getTopLevelComponent()); jassert (mw != nullptr); - JucerApplication::getApp()->mainWindowList.closeWindow (mw); + JucerApplication::getApp().mainWindowList.closeWindow (mw); } } diff --git a/extras/Introjucer/Source/Project/jucer_Project.cpp b/extras/Introjucer/Source/Project/jucer_Project.cpp index 5b5f7f2a58..6c140cd5fb 100644 --- a/extras/Introjucer/Source/Project/jucer_Project.cpp +++ b/extras/Introjucer/Source/Project/jucer_Project.cpp @@ -66,7 +66,7 @@ Project::Project (const File& file_) Project::~Project() { projectRoot.removeListener (this); - JucerApplication::getApp()->openDocumentManager.closeAllDocumentsUsingProject (*this, false); + JucerApplication::getApp().openDocumentManager.closeAllDocumentsUsingProject (*this, false); } //============================================================================== @@ -537,7 +537,7 @@ bool Project::Item::renameFile (const File& newFile) || (newFile.exists() && ! oldFile.exists())) { setFile (newFile); - JucerApplication::getApp()->openDocumentManager.fileHasBeenRenamed (oldFile, newFile); + JucerApplication::getApp().openDocumentManager.fileHasBeenRenamed (oldFile, newFile); return true; } diff --git a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp index 6e1e0877c9..9bc7f227f2 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp @@ -259,7 +259,7 @@ void ProjectContentComponent::updateMissingFileStatuses() bool ProjectContentComponent::showEditorForFile (const File& f) { return getCurrentFile() == f - || showDocument (JucerApplication::getApp()->openDocumentManager.openFile (project, f)); + || showDocument (JucerApplication::getApp().openDocumentManager.openFile (project, f)); } File ProjectContentComponent::getCurrentFile() const @@ -375,7 +375,8 @@ void ProjectContentComponent::getAllCommands (Array & commands) CommandIDs::closeProject, CommandIDs::openInIDE, CommandIDs::saveAndOpenInIDE, - CommandIDs::showProjectSettings, + CommandIDs::showFilePanel, + CommandIDs::showConfigPanel, CommandIDs::goToPreviousDoc, CommandIDs::goToNextDoc, StandardApplicationCommandIDs::del }; @@ -472,16 +473,24 @@ void ProjectContentComponent::getCommandInfo (const CommandID commandID, Applica result.defaultKeypresses.add (KeyPress ('l', ModifierKeys::commandModifier, 0)); break; - case CommandIDs::showProjectSettings: - result.setInfo ("Show Project Build Settings", + case CommandIDs::showFilePanel: + result.setInfo ("Show File Panel", + "Shows the tree of files for this project", + CommandCategories::general, 0); + result.setActive (project != nullptr); + result.defaultKeypresses.add (KeyPress ('p', ModifierKeys::commandModifier, 0)); + break; + + case CommandIDs::showConfigPanel: + result.setInfo ("Show Config Panel", "Shows the build options for the project", CommandCategories::general, 0); result.setActive (project != nullptr); - result.defaultKeypresses.add (KeyPress ('i', ModifierKeys::commandModifier | ModifierKeys::shiftModifier, 0)); + result.defaultKeypresses.add (KeyPress ('i', ModifierKeys::commandModifier, 0)); break; case StandardApplicationCommandIDs::del: - result.setInfo ("Delete", String::empty, CommandCategories::general, 0); + result.setInfo ("Delete Selected File", String::empty, CommandCategories::general, 0); result.defaultKeypresses.add (KeyPress (KeyPress::deleteKey, 0, 0)); result.defaultKeypresses.add (KeyPress (KeyPress::backspaceKey, 0, 0)); result.setActive (dynamic_cast (treeViewTabs.getCurrentContentComponent()) != nullptr); @@ -530,7 +539,7 @@ bool ProjectContentComponent::perform (const InvocationInfo& info) case CommandIDs::closeDocument: if (currentDocument != nullptr) - JucerApplication::getApp()->openDocumentManager.closeDocument (currentDocument, true); + JucerApplication::getApp().openDocumentManager.closeDocument (currentDocument, true); break; case CommandIDs::goToPreviousDoc: @@ -567,7 +576,11 @@ bool ProjectContentComponent::perform (const InvocationInfo& info) } break; - case CommandIDs::showProjectSettings: + case CommandIDs::showFilePanel: + treeViewTabs.setCurrentTabIndex (0); + break; + + case CommandIDs::showConfigPanel: treeViewTabs.setCurrentTabIndex (1); break; diff --git a/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp b/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp index fda82243b6..ba243de9f0 100644 --- a/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp +++ b/extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp @@ -220,7 +220,7 @@ void ProjectTreeViewBase::deleteAllSelectedItems() if (treeRootItem != nullptr) { - OpenDocumentManager& om = JucerApplication::getApp()->openDocumentManager; + OpenDocumentManager& om = JucerApplication::getApp().openDocumentManager; for (int i = filesToTrash.size(); --i >= 0;) { diff --git a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h index 7f91a9a1c5..94efd50798 100644 --- a/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h +++ b/extras/Introjucer/Source/Utility/jucer_JucerTreeViewBase.h @@ -191,7 +191,7 @@ public: void resized() { - item.textX = item.getIconSize() + 8; + item.textX = (int) item.getIconSize() + 8; } JucerTreeViewBase& item; diff --git a/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp b/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp index add5c5655d..3b0ce5319a 100644 --- a/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp +++ b/extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp @@ -30,7 +30,7 @@ //============================================================================== StoredSettings& getAppSettings() { - return JucerApplication::getApp()->settings; + return JucerApplication::getApp().settings; } PropertiesFile& getAppProperties() @@ -211,7 +211,7 @@ File StoredSettings::getSchemesFolder() //============================================================================== const Icons& getIcons() { - return JucerApplication::getApp()->icons; + return JucerApplication::getApp().icons; } Icons::Icons()