From dab2b3cc43ab5dd49d41fb70e42b3d54276fa454 Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 29 Jun 2007 09:54:03 +0000 Subject: [PATCH] --- .../application/juce_ApplicationProperties.cpp | 15 ++++++++++++--- .../gui/components/mouse/juce_MouseCursor.cpp | 4 ++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/juce_appframework/application/juce_ApplicationProperties.cpp b/src/juce_appframework/application/juce_ApplicationProperties.cpp index 015d87a23c..aa6737f584 100644 --- a/src/juce_appframework/application/juce_ApplicationProperties.cpp +++ b/src/juce_appframework/application/juce_ApplicationProperties.cpp @@ -77,8 +77,7 @@ bool ApplicationProperties::testWriteAccess (const bool testUserSettings, { const bool userOk = (! testUserSettings) || getUserSettings()->save(); const bool commonOk = (! testCommonSettings) - || ((userProps == getCommonSettings()) ? false - : getCommonSettings()->save()); + || (userProps != getCommonSettings() && getCommonSettings()->save()); if (! (userOk && commonOk)) { @@ -90,7 +89,17 @@ bool ApplicationProperties::testWriteAccess (const bool testUserSettings, filenames << "\n" << getUserSettings()->getFile().getFullPathName(); if (! commonOk) - filenames << "\n" << getCommonSettings()->getFile().getFullPathName(); + { + PropertiesFile* const realCommonProps + = PropertiesFile::createDefaultAppPropertiesFile (appName, fileSuffix, folderName, + true, msBeforeSaving, options); + + if (realCommonProps != 0) + { + filenames << "\n" << realCommonProps->getFile().getFullPathName(); + delete realCommonProps; + } + } AlertWindow::showMessageBox (AlertWindow::WarningIcon, appName + TRANS(" - Unable to save settings"), diff --git a/src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp b/src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp index 325848c695..7440b969c8 100644 --- a/src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp +++ b/src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp @@ -185,7 +185,7 @@ void* MouseCursor::getHandle() const throw() void MouseCursor::showWaitCursor() throw() { - MouseCursor mc (MouseCursor::WaitCursor); + const MouseCursor mc (MouseCursor::WaitCursor); mc.showInAllWindows(); } @@ -197,7 +197,7 @@ void MouseCursor::hideWaitCursor() throw() } else { - MouseCursor mc (MouseCursor::NormalCursor); + const MouseCursor mc (MouseCursor::NormalCursor); mc.showInAllWindows(); } }