Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Introjucer: some refactoring, new icon.

  • Loading branch information...
commit ebb7b6db74e63499ebc0207b5e3348a240ffc6df 1 parent d6848d3
jules authored
View
2  extras/Introjucer/Source/Application/jucer_AppearanceSettings.cpp
@@ -187,7 +187,7 @@ StringArray AppearanceSettings::getColourNames() const
void AppearanceSettings::updateColourScheme()
{
applyToLookAndFeel (LookAndFeel::getDefaultLookAndFeel());
- JucerApplication::getApp().mainWindowList.sendLookAndFeelChange();
+ IntrojucerApp::getApp().mainWindowList.sendLookAndFeelChange();
}
void AppearanceSettings::applyToLookAndFeel (LookAndFeel& lf) const
View
12 extras/Introjucer/Source/Application/jucer_Application.h
@@ -34,12 +34,12 @@
//==============================================================================
-class JucerApplication : public JUCEApplication
+class IntrojucerApp : public JUCEApplication
{
public:
//==============================================================================
- JucerApplication() {}
- ~JucerApplication() {}
+ IntrojucerApp() {}
+ ~IntrojucerApp() {}
//==============================================================================
void initialise (const String& commandLine)
@@ -146,9 +146,9 @@ class JucerApplication : public JUCEApplication
openFile (commandLine.unquoted());
}
- static JucerApplication& getApp()
+ static IntrojucerApp& getApp()
{
- JucerApplication* const app = dynamic_cast<JucerApplication*> (JUCEApplication::getInstance());
+ IntrojucerApp* const app = dynamic_cast<IntrojucerApp*> (JUCEApplication::getInstance());
jassert (app != nullptr);
return *app;
}
@@ -416,6 +416,8 @@ class JucerApplication : public JUCEApplication
}
}
+ virtual void updateNewlyOpenedProject (Project&) {}
+
void askUserToOpenFile()
{
FileChooser fc ("Open File");
View
4 extras/Introjucer/Source/Application/jucer_DocumentEditorComponent.cpp
@@ -32,12 +32,12 @@
DocumentEditorComponent::DocumentEditorComponent (OpenDocumentManager::Document* document_)
: document (document_)
{
- JucerApplication::getApp().openDocumentManager.addListener (this);
+ IntrojucerApp::getApp().openDocumentManager.addListener (this);
}
DocumentEditorComponent::~DocumentEditorComponent()
{
- JucerApplication::getApp().openDocumentManager.removeListener (this);
+ IntrojucerApp::getApp().openDocumentManager.removeListener (this);
}
void DocumentEditorComponent::documentAboutToClose (OpenDocumentManager::Document* closingDoc)
View
2  extras/Introjucer/Source/Application/jucer_Main.cpp
@@ -25,4 +25,4 @@
#include "jucer_Application.h"
-START_JUCE_APPLICATION(JucerApplication)
+START_JUCE_APPLICATION (IntrojucerApp)
View
16 extras/Introjucer/Source/Application/jucer_MainWindow.cpp
@@ -35,7 +35,7 @@ ScopedPointer<ApplicationCommandManager> commandManager;
//==============================================================================
MainWindow::MainWindow()
- : DocumentWindow (JucerApplication::getApp().getApplicationName(),
+ : DocumentWindow (IntrojucerApp::getApp().getApplicationName(),
Colour::greyLevel (0.6f),
DocumentWindow::allButtons,
false)
@@ -44,7 +44,7 @@ MainWindow::MainWindow()
createProjectContentCompIfNeeded();
#if ! JUCE_MAC
- setMenuBar (JucerApplication::getApp().menuModel);
+ setMenuBar (IntrojucerApp::getApp().menuModel);
#endif
setResizable (true, false);
@@ -93,7 +93,7 @@ void MainWindow::createProjectContentCompIfNeeded()
if (getProjectContentComponent() == nullptr)
{
clearContentComponent();
- setContentOwned (JucerApplication::getApp().createProjectContentComponent(), false);
+ setContentOwned (IntrojucerApp::getApp().createProjectContentComponent(), false);
jassert (getProjectContentComponent() != nullptr);
}
}
@@ -115,7 +115,7 @@ ProjectContentComponent* MainWindow::getProjectContentComponent() const
void MainWindow::closeButtonPressed()
{
- JucerApplication::getApp().mainWindowList.closeWindow (this);
+ IntrojucerApp::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 (! IntrojucerApp::getApp().openDocumentManager.closeAllDocumentsUsingProject (*project, true))
return false;
FileBasedDocument::SaveResult r = project->saveIfNeededAndUserAgrees();
@@ -180,7 +180,7 @@ void MainWindow::restoreWindowPosition()
bool MainWindow::canOpenFile (const File& file) const
{
return file.hasFileExtension (Project::projectFileExtension)
- || JucerApplication::getApp().openDocumentManager.canOpenFile (file);
+ || IntrojucerApp::getApp().openDocumentManager.canOpenFile (file);
}
bool MainWindow::openFile (const File& file)
@@ -233,12 +233,12 @@ void MainWindow::activeWindowStatusChanged()
if (getProjectContentComponent() != nullptr)
getProjectContentComponent()->updateMissingFileStatuses();
- JucerApplication::getApp().openDocumentManager.reloadModifiedFiles();
+ IntrojucerApp::getApp().openDocumentManager.reloadModifiedFiles();
}
void MainWindow::updateTitle (const String& documentName)
{
- String name (JucerApplication::getApp().getApplicationName());
+ String name (IntrojucerApp::getApp().getApplicationName());
if (currentProject != nullptr)
name << " - " << currentProject->getDocumentTitle();
View
6 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);
+ IntrojucerApp::getApp().openDocumentManager.addListener (this);
}
RecentDocumentList::~RecentDocumentList()
{
- JucerApplication::getApp().openDocumentManager.removeListener (this);
+ IntrojucerApp::getApp().openDocumentManager.removeListener (this);
}
void RecentDocumentList::clear()
@@ -378,7 +378,7 @@ static void restoreDocList (Project& project, Array <OpenDocumentManager::Docume
{
if (xml != nullptr)
{
- OpenDocumentManager& odm = JucerApplication::getApp().openDocumentManager;
+ OpenDocumentManager& odm = IntrojucerApp::getApp().openDocumentManager;
forEachXmlChildElementWithTagName (*xml, e, "DOC")
{
View
2  extras/Introjucer/Source/Project/jucer_ConfigPage.cpp
@@ -358,7 +358,7 @@ namespace ProjectSettingsTreeClasses
void addSubItems()
{
addSubItem (new ModulesItem (project));
- JucerApplication::getApp().addExtraConfigItems (project, *this);
+ IntrojucerApp::getApp().addExtraConfigItems (project, *this);
int i = 0;
for (Project::ExporterIterator exporter (project); exporter.next(); ++i)
View
2  extras/Introjucer/Source/Project/jucer_NewProjectWizard.cpp
@@ -496,7 +496,7 @@ class NewProjectWizard::WizardComp : public Component,
MainWindow* mw = dynamic_cast<MainWindow*> (getTopLevelComponent());
jassert (mw != nullptr);
- JucerApplication::getApp().mainWindowList.closeWindow (mw);
+ IntrojucerApp::getApp().mainWindowList.closeWindow (mw);
}
}
View
6 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);
+ IntrojucerApp::getApp().openDocumentManager.closeAllDocumentsUsingProject (*this, false);
}
//==============================================================================
@@ -126,6 +126,8 @@ void Project::setMissingDefaultValues()
if (getBundleIdentifier().toString().isEmpty())
getBundleIdentifier() = getDefaultBundleIdentifier();
+
+ IntrojucerApp::getApp().updateNewlyOpenedProject (*this);
}
void Project::updateOldStyleConfigList()
@@ -540,7 +542,7 @@ bool Project::Item::renameFile (const File& newFile)
|| (newFile.exists() && ! oldFile.exists()))
{
setFile (newFile);
- JucerApplication::getApp().openDocumentManager.fileHasBeenRenamed (oldFile, newFile);
+ IntrojucerApp::getApp().openDocumentManager.fileHasBeenRenamed (oldFile, newFile);
return true;
}
View
8 extras/Introjucer/Source/Project/jucer_ProjectContentComponent.cpp
@@ -122,12 +122,12 @@ ProjectContentComponent::ProjectContentComponent()
treeViewTabs.setOutline (0);
treeViewTabs.getTabbedButtonBar().setMinimumTabScaleFactor (0.3);
- JucerApplication::getApp().openDocumentManager.addListener (this);
+ IntrojucerApp::getApp().openDocumentManager.addListener (this);
}
ProjectContentComponent::~ProjectContentComponent()
{
- JucerApplication::getApp().openDocumentManager.removeListener (this);
+ IntrojucerApp::getApp().openDocumentManager.removeListener (this);
logo = nullptr;
setProject (nullptr);
@@ -324,7 +324,7 @@ void ProjectContentComponent::updateMissingFileStatuses()
bool ProjectContentComponent::showEditorForFile (const File& f, bool grabFocus)
{
return getCurrentFile() == f
- || showDocument (JucerApplication::getApp().openDocumentManager.openFile (project, f), grabFocus);
+ || showDocument (IntrojucerApp::getApp().openDocumentManager.openFile (project, f), grabFocus);
}
File ProjectContentComponent::getCurrentFile() const
@@ -405,7 +405,7 @@ bool ProjectContentComponent::setEditorComponent (Component* editor,
void ProjectContentComponent::closeDocument()
{
if (currentDocument != nullptr)
- JucerApplication::getApp().openDocumentManager.closeDocument (currentDocument, true);
+ IntrojucerApp::getApp().openDocumentManager.closeDocument (currentDocument, true);
else if (contentView != nullptr)
if (! goToPreviousFile())
hideEditor();
View
2  extras/Introjucer/Source/Project/jucer_ProjectTreeViewBase.cpp
@@ -220,7 +220,7 @@ void ProjectTreeViewBase::deleteAllSelectedItems()
if (treeRootItem != nullptr)
{
- OpenDocumentManager& om = JucerApplication::getApp().openDocumentManager;
+ OpenDocumentManager& om = IntrojucerApp::getApp().openDocumentManager;
for (int i = filesToTrash.size(); --i >= 0;)
{
View
824 extras/Introjucer/Source/Utility/jucer_Icons.cpp
802 additions, 22 deletions not shown
View
2  extras/Introjucer/Source/Utility/jucer_StoredSettings.cpp
@@ -30,7 +30,7 @@
//==============================================================================
StoredSettings& getAppSettings()
{
- return *JucerApplication::getApp().settings;
+ return *IntrojucerApp::getApp().settings;
}
PropertiesFile& getGlobalProperties()
Please sign in to comment.
Something went wrong with that request. Please try again.