mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-08 11:59:44 +00:00
Various improvements to the Preferences module
Monotone-Parent: f5af4bb05528ecf5545e12a51e343876ffad7270 Monotone-Revision: 997781056d484980738b11e151b8156a66f0998b Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-08-06T19:07:25 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -87,6 +87,7 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
ASSIGN (daysOfWeek,
|
||||
[locale objectForKey: NSWeekDayNameArray]);
|
||||
hasChanged = NO;
|
||||
composeMessageTypeHasChanged = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
@@ -633,7 +634,11 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
|
||||
- (void) setUserComposeMessagesType: (NSString *) newType
|
||||
{
|
||||
[userDefaults setObject: newType forKey: @"ComposeMessagesType"];
|
||||
if (![[self userComposeMessagesType] isEqualToString: newType])
|
||||
{
|
||||
composeMessageTypeHasChanged = YES;
|
||||
[userDefaults setObject: newType forKey: @"ComposeMessagesType"];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -652,11 +657,18 @@ static BOOL defaultShowSubscribedFoldersOnly = NO;
|
||||
if ([[request method] isEqualToString: @"POST"])
|
||||
{
|
||||
[userDefaults synchronize];
|
||||
if (hasChanged)
|
||||
method = @"window.location.reload()";
|
||||
if (composeMessageTypeHasChanged)
|
||||
// Due to a limitation of CKEDITOR, we reload the page when the user
|
||||
// changes the composition mode to avoid Javascript errors.
|
||||
results = self;
|
||||
else
|
||||
method = nil;
|
||||
results = [self jsCloseWithRefreshMethod: method];
|
||||
{
|
||||
if (hasChanged)
|
||||
method = @"window.location.reload()";
|
||||
else
|
||||
method = nil;
|
||||
results = [self jsCloseWithRefreshMethod: method];
|
||||
}
|
||||
}
|
||||
else
|
||||
results = self;
|
||||
|
||||
Reference in New Issue
Block a user