Browse Source

tags/2021-05-28
jules 18 years ago
parent
commit
dab2b3cc43
2 changed files with 14 additions and 5 deletions
  1. +12
    -3
      src/juce_appframework/application/juce_ApplicationProperties.cpp
  2. +2
    -2
      src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp

+ 12
- 3
src/juce_appframework/application/juce_ApplicationProperties.cpp View File

@@ -77,8 +77,7 @@ bool ApplicationProperties::testWriteAccess (const bool testUserSettings,
{ {
const bool userOk = (! testUserSettings) || getUserSettings()->save(); const bool userOk = (! testUserSettings) || getUserSettings()->save();
const bool commonOk = (! testCommonSettings) const bool commonOk = (! testCommonSettings)
|| ((userProps == getCommonSettings()) ? false
: getCommonSettings()->save());
|| (userProps != getCommonSettings() && getCommonSettings()->save());
if (! (userOk && commonOk)) if (! (userOk && commonOk))
{ {
@@ -90,7 +89,17 @@ bool ApplicationProperties::testWriteAccess (const bool testUserSettings,
filenames << "\n" << getUserSettings()->getFile().getFullPathName(); filenames << "\n" << getUserSettings()->getFile().getFullPathName();
if (! commonOk) 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, AlertWindow::showMessageBox (AlertWindow::WarningIcon,
appName + TRANS(" - Unable to save settings"), appName + TRANS(" - Unable to save settings"),


+ 2
- 2
src/juce_appframework/gui/components/mouse/juce_MouseCursor.cpp View File

@@ -185,7 +185,7 @@ void* MouseCursor::getHandle() const throw()
void MouseCursor::showWaitCursor() throw() void MouseCursor::showWaitCursor() throw()
{ {
MouseCursor mc (MouseCursor::WaitCursor);
const MouseCursor mc (MouseCursor::WaitCursor);
mc.showInAllWindows(); mc.showInAllWindows();
} }
@@ -197,7 +197,7 @@ void MouseCursor::hideWaitCursor() throw()
} }
else else
{ {
MouseCursor mc (MouseCursor::NormalCursor);
const MouseCursor mc (MouseCursor::NormalCursor);
mc.showInAllWindows(); mc.showInAllWindows();
} }
} }


Loading…
Cancel
Save