mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-27 02:20:05 +00:00
Introjucer: misc internal refactoring.
This commit is contained in:
parent
1f2b26a30b
commit
c65c7dd4a4
13 changed files with 158 additions and 138 deletions
|
|
@ -35,7 +35,7 @@ ScopedPointer<ApplicationCommandManager> 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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue