Monotone-Parent: 759f56bb9faa71b79a075866ec2f0a77d1f08bd8

Monotone-Revision: 40a3a3e82a6e149008b93190dcfd86a7e7f4d2b7

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-19T17:58:21
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau committed 2007-06-19 17:58:21 +00:00
1 parent 3ee75911b5
commit 70768d420e
13 files changed
+922

No files matched your search

@@ -0,0 +1,73 @@
/* toolbar */
"Save and Close" = "Save and Close";
"Close" = "Close";
/* tabs */
"Out of Office" = "Out of Office";
"Date and Time" = "Date and Time";
"Calendar Options" = "Calendar Options";
"Password" = "Password";
/* ooo */
"I'm currently in the office" = "I'm currently in the office";
"I'm currently out of the office" = "I'm currently out of the office";
"AutoReply only once to each sender with the following text :"
= "AutoReply only once to each sender with the following text :";
/* d & t */
"Current Time Zone :" = "Current Time Zone :";
"Short Date Format :" = "Short Date Format :";
"Long Date Format :" = "Long Date Format :";
"Time Format :" = "Time Format :";
"shortDateFmt_0" = "%m/%e/%Y";
"shortDateFmt_1" = "%m/%e/%y";
"shortDateFmt_2" = "%m/%d/%Y";
"shortDateFmt_3" = "%m/%d/%y";
"shortDateFmt_4" = "%y/%m/%d";
"shortDateFmt_5" = "%Y-%m-%d";
"shortDateFmt_6" = "%d-%b-%y";
"shortDateFmt_7" = "";
"longDateFmt_0" = "%A, %B %d, %Y";
"longDateFmt_1" = "%B %d, %Y";
"longDateFmt_2" = "%A, %d %B, %Y";
"longDateFmt_3" = "%d %B, %Y";
"longDateFmt_4" = "";
"timeFmt_0" = "%I:%M %p";
"timeFmt_1" = "%H:%M";
"timeFmt_2" = "";
/* calendar */
"Week begins on :" = "Week begins on :";
"Day start time :" = "Day start time :";
"Day end time :" = "Day end time :";
"First week of year :" = "First week of year :";
"Enable reminders for Calendar items" = "Enable reminders for Calendar items";
"Play a sound when a reminder comes due"
= "Play a sound when a reminder comes due";
"Default reminder :" = "Default reminder :";
"firstWeekOfYear_HideWeekNumbers" = "Do not display week numbers";
"firstWeekOfYear_January1" = "Starts on january 1";
"firstWeekOfYear_First4DayWeek" = "First 4-day week";
"firstWeekOfYear_FirstFullWeek" = "First full week";
"reminderTime_0000" = "0 minutes";
"reminderTime_0005" = "5 minutes";
"reminderTime_0010" = "10 minutes";
"reminderTime_0015" = "15 minutes";
"reminderTime_0030" = "30 minutes";
"reminderTime_0100" = "1 hour";
"reminderTime_0200" = "2 hours";
"reminderTime_0400" = "2 hours";
"reminderTime_0800" = "2 hours";
"reminderTime_1200" = "1/2 day";
"reminderTime_2400" = "1 day";
"reminderTime_4800" = "2 days";
/* password */
"New password:" = "New password:";
"Confirmation:" = "Confirmation:";
"Change" = "Change";
@@ -0,0 +1,70 @@
/* toolbar */
"Save and Close" = "Enregistrer et fermer";
"Close" = "Fermer";
/* tabs */
"Out of Office" = "Absence du bureau";
"Date and Time" = "Date et heure";
"Calendar Options" = "Calendrier";
"Password" = "Mot de passe";
/* ooo */
"I'm currently in the office" = "Je suis présent";
"I'm currently out of the office" = "Je suis absent";
"AutoReply only once to each sender with the following text :"
= "Répondre automatiquement avec le texte suivant, une seule fois par expéditeur :";
/* d & t */
"Current Time Zone :" = "Fuseau horaire en cours :";
"Short Date Format :" = "Style de date courte :";
"Long Date Format :" = "Style de date longue :";
"Time Format :" = "Style de l'heure :";
"shortDateFmt_0" = "%d/%m/%Y";
"shortDateFmt_1" = "%d/%m/%y";
"shortDateFmt_2" = "%d.%m.%y";
"shortDateFmt_3" = "%d-%m-%y";
"shortDateFmt_4" = "%Y-%m-%d";
"shortDateFmt_5" = "";
"longDateFmt_0" = "%A %e %B %Y";
"longDateFmt_1" = "%e %b. %Y";
"longDateFmt_2" = "%e %B %Y";
"longDateFmt_3" = "";
"timeFmt_0" = "%H:%M";
"timeFmt_1" = "%H.%M";
"timeFmt_2" = "%H h. %M";
"timeFmt_3" = "";
/* calendar */
"Week begins on :" = "Premier jour de la semaine :";
"Day start time :" = "Début de la journée :";
"Day end time :" = "Fin de la journée :";
"First week of year :" = "Première semaine de l'année :";
"Enable reminders for Calendar items" = "Activer les rappels pour les éléments du calendrier";
"Play a sound when a reminder comes due" = "Émettre un signal sonore à l'échéance du rappel";
"Default reminder :" = "Rappel par défaut :";
"firstWeekOfYear_HideWeekNumbers" = "Ne pas afficher le numéro des semaines";
"firstWeekOfYear_January1" = "Commence le 1er janvier";
"firstWeekOfYear_First4DayWeek" = "Première semaine de 4 jours";
"firstWeekOfYear_FirstFullWeek" = "Première semaine entière";
"reminderTime_0000" = "0 minutes";
"reminderTime_0005" = "5 minutes";
"reminderTime_0010" = "10 minutes";
"reminderTime_0015" = "15 minutes";
"reminderTime_0030" = "30 minutes";
"reminderTime_0100" = "1 heure";
"reminderTime_0200" = "2 heures";
"reminderTime_0400" = "2 heures";
"reminderTime_0800" = "2 heures";
"reminderTime_1200" = "1/2 journée";
"reminderTime_2400" = "1 journée";
"reminderTime_4800" = "2 journées";
/* password */
"New password:" = "Nouveau mot de passe :";
"Confirmation:" = "Confirmation :";
"Change" = "Changer";
+32
View File
@@ -0,0 +1,32 @@
# GNUstep makefile
include ../common.make
BUNDLE_NAME = PreferencesUI
PreferencesUI_PRINCIPAL_CLASS = PreferencesUIProduct
PreferencesUI_LANGUAGES = English French
PreferencesUI_OBJC_FILES = \
PreferencesUIProduct.m \
\
UIxJSONPreferences.m \
UIxPreferences.m
PreferencesUI_RESOURCE_FILES += \
Version \
product.plist
PreferencesUI_RESOURCE_FILES += \
Toolbars/UIxPreferences.toolbar
PreferencesUI_LOCALIZED_RESOURCE_FILES += \
Localizable.strings \
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/bundle.make
-include GNUmakefile.postamble
include ../../fhsbundle.make
+33
View File
@@ -0,0 +1,33 @@
/* PreferencesUIProduct.m - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSObject.h>
@interface PreferencesUIProduct : NSObject
{
}
@end
@implementation PreferencesUIProduct
@end
@@ -0,0 +1,12 @@
( /* the toolbar groups -*-cperl-*- */
( { link = "#";
label = "Save and Close";
onclick = "return savePreferences();";
image = "tb-compose-save-flat-24x24.png"; },
{ link = "#";
isSafe = NO;
label = "Close";
onclick = "window.close(); return false;";
image = "tb-mail-stop-flat-24x24.png"; }
)
)
+32
View File
@@ -0,0 +1,32 @@
/* UIxJSONPreferences.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef UIXJSONPREFERENCES_H
#define UIXJSONPREFERENCES_H
#import <NGObjWeb/WODirectAction.h>
@interface UIxJSONPreferences : WODirectAction
@end
#endif /* UIXJSONSETTINGS_H */
+52
View File
@@ -0,0 +1,52 @@
/* UIxJSONPreferences.m - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSUserDefaults.h>
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WODirectAction.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import "UIxJSONPreferences.h"
@implementation UIxJSONPreferences
- (WOResponse *) jsonDefaultsAction
{
NSUserDefaults *defaults;
defaults = [[context activeUser] userDefaults];
return [defaults jsonRepresentation];
}
- (WOResponse *) jsonSettingsAction
{
NSUserDefaults *settings;
settings = [[context activeUser] userSettings];
return [settings jsonRepresentation];
}
@end
+45
View File
@@ -0,0 +1,45 @@
/* UIxPreferences.h - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef UIXPREFERENCES_H
#define UIXPREFERENCES_H
#import <SOGoUI/UIxComponent.h>
@class NSString;
@class NSUserDefaults;
@class SOGoUser;
@interface UIxPreferences : UIxComponent
{
NSString *item;
SOGoUser *user;
NSUserDefaults *userDefaults;
NSCalendarDate *today;
NSMutableArray *hours;
NSArray *daysOfWeek;
}
@end
#endif /* UIXPREFERENCES_H */
+429
View File
@@ -0,0 +1,429 @@
/* UIxPreferences.m - this file is part of SOGo
*
* Copyright (C) 2007 Inverse groupe conseil
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This file is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#import <Foundation/NSUserDefaults.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import "UIxPreferences.h"
#warning this class is not finished
/* remaining:
default event length
default snooze length
refresh calendar every X minutes
workweek = from -> to
identities */
@implementation UIxPreferences
- (id) init
{
NSDictionary *locale;
if ((self = [super init]))
{
item = nil;
hours = nil;
ASSIGN (user, [context activeUser]);
ASSIGN (userDefaults, [user userDefaults]);
ASSIGN (today, [NSCalendarDate date]);
locale = [context valueForKey: @"locale"];
ASSIGN (daysOfWeek,
[locale objectForKey: NSWeekDayNameArray]);
}
return self;
}
- (void) dealloc
{
[today release];
[item release];
[user release];
[userDefaults release];
[hours release];
[daysOfWeek release];
[super dealloc];
}
- (void) setItem: (NSString *) newItem
{
ASSIGN (item, newItem);
}
- (NSString *) item
{
return item;
}
- (NSString *) inTheOffice
{
NSString *inTheOffice;
inTheOffice = [userDefaults objectForKey: @"InTheOffice"];
return ((!inTheOffice || [inTheOffice boolValue])
? @"YES" : @"NO");
}
- (void) setInTheOffice: (NSString *) newValue
{
[userDefaults setObject: newValue forKey: @"InTheOffice"];
}
- (void) setAutoReplyText: (NSString *) newAutoReplyText
{
[userDefaults setObject: newAutoReplyText forKey: @"AutoReplyText"];
}
- (NSString *) autoReplyText
{
return [userDefaults objectForKey: @"AutoReplyText"];
}
- (NSArray *) timeZonesList
{
return [NSTimeZone knownTimeZoneNames];
}
- (NSString *) userTimeZone
{
return [[user timeZone] timeZoneName];
}
- (void) setUserTimeZone: (NSString *) newUserTimeZone
{
[userDefaults setObject: newUserTimeZone forKey: @"TimeZone"];
}
- (NSArray *) shortDateFormatsList
{
NSMutableArray *shortDateFormatsList = nil;
NSString *key, *currentFormat;
unsigned int nbr;
BOOL done;
shortDateFormatsList = [NSMutableArray array];
nbr = 0;
done = NO;
while (!done)
{
key = [NSString stringWithFormat: @"shortDateFmt_%d", nbr];
currentFormat = [self labelForKey: key];
if ([currentFormat length] > 0)
{
[shortDateFormatsList addObject: currentFormat];
nbr++;
}
else
done = YES;
}
return shortDateFormatsList;
}
- (NSString *) itemShortDateFormatText
{
return [today descriptionWithCalendarFormat: item
locale: [context valueForKey: @"locale"]];
}
- (NSString *) userShortDateFormat
{
return [userDefaults objectForKey: @"ShortDateFormat"];
}
- (void) setUserShortDateFormat: (NSString *) newFormat
{
[userDefaults setObject: newFormat forKey: @"ShortDateFormat"];
}
- (NSArray *) longDateFormatsList
{
NSMutableArray *longDateFormatsList = nil;
NSString *key, *currentFormat;
unsigned int nbr;
BOOL done;
longDateFormatsList = [NSMutableArray array];
nbr = 0;
done = NO;
while (!done)
{
key = [NSString stringWithFormat: @"longDateFmt_%d", nbr];
currentFormat = [self labelForKey: key];
if ([currentFormat length] > 0)
{
[longDateFormatsList addObject: currentFormat];
nbr++;
}
else
done = YES;
}
return longDateFormatsList;
}
- (NSString *) itemLongDateFormatText
{
return [today descriptionWithCalendarFormat: item
locale: [context valueForKey: @"locale"]];
}
- (NSString *) userLongDateFormat
{
return [userDefaults objectForKey: @"LongDateFormat"];
}
- (void) setUserLongDateFormat: (NSString *) newFormat
{
[userDefaults setObject: newFormat forKey: @"LongDateFormat"];
}
- (NSArray *) timeFormatsList
{
NSMutableArray *timeFormatsList = nil;
NSString *key, *currentFormat;
unsigned int nbr;
BOOL done;
timeFormatsList = [NSMutableArray array];
nbr = 0;
done = NO;
while (!done)
{
key = [NSString stringWithFormat: @"timeFmt_%d", nbr];
currentFormat = [self labelForKey: key];
if ([currentFormat length] > 0)
{
[timeFormatsList addObject: currentFormat];
nbr++;
}
else
done = YES;
}
return timeFormatsList;
}
- (NSString *) itemTimeFormatText
{
return [today descriptionWithCalendarFormat: item
locale: [context valueForKey: @"locale"]];
}
- (NSString *) userTimeFormat
{
return [userDefaults objectForKey: @"TimeFormat"];
}
- (void) setUserTimeFormat: (NSString *) newFormat
{
[userDefaults setObject: newFormat forKey: @"TimeFormat"];
}
- (NSArray *) daysList
{
NSMutableArray *daysList;
unsigned int currentDay;
daysList = [NSMutableArray new];
[daysList autorelease];
for (currentDay = 0; currentDay < 7; currentDay++)
[daysList addObject: [NSString stringWithFormat: @"%d", currentDay]];
return daysList;
}
- (NSString *) itemWeekStartDay
{
return [daysOfWeek objectAtIndex: [item intValue]];
}
- (NSString *) userWeekStartDay
{
return [userDefaults objectForKey: @"WeekStartDay"];
}
- (void) setUserWeekStartDay: (NSString *) newDay
{
[userDefaults setObject: newDay forKey: @"WeekStartDay"];
}
- (NSArray *) hoursList
{
unsigned int currentHour;
if (!hours)
{
hours = [[NSMutableArray alloc] initWithCapacity: 24];
for (currentHour = 0; currentHour < 24; currentHour++)
[hours addObject: [NSString stringWithFormat: @"%.2d:00",
currentHour]];
}
return hours;
}
- (NSString *) userDayStartTime
{
NSString *time;
time = [userDefaults objectForKey: @"DayStartTime"];
if (!time)
time = @"08:00";
return time;
}
- (void) setUserDayStartTime: (NSString *) newTime
{
[userDefaults setObject: newTime forKey: @"DayStartTime"];
}
- (NSString *) userDayEndTime
{
NSString *time;
time = [userDefaults objectForKey: @"DayEndTime"];
if (!time)
time = @"18:00";
return time;
}
- (void) setUserDayEndTime: (NSString *) newTime
{
[userDefaults setObject: newTime forKey: @"DayEndTime"];
}
- (NSArray *) firstWeekList
{
return [NSArray arrayWithObjects: SOGoWeekStartHideWeekNumbers,
SOGoWeekStartJanuary1,
SOGoWeekStartFirst4DayWeek,
SOGoWeekStartFirstFullWeek, nil];
}
- (NSString *) itemFirstWeekText
{
return [self labelForKey: [NSString stringWithFormat: @"firstWeekOfYear_%@",
item]];
}
- (NSString *) userFirstWeek
{
return [userDefaults objectForKey: @"FirstWeek"];
}
- (void) setUserFirstWeek: (NSString *) newFirstWeek
{
[userDefaults setObject: newFirstWeek forKey: @"FirstWeek"];
}
- (NSString *) reminderEnabled
{
NSString *reminderEnabled;
reminderEnabled = [userDefaults objectForKey: @"ReminderEnabled"];
return ((!reminderEnabled || [reminderEnabled boolValue])
? @"YES" : @"NO");
}
- (void) setReminderEnabled: (NSString *) newValue
{
[userDefaults setObject: newValue forKey: @"ReminderEnabled"];
}
- (NSString *) remindWithASound
{
NSString *remindWithASound;
remindWithASound = [userDefaults objectForKey: @"RemindWithASound"];
return ((!remindWithASound || [remindWithASound boolValue])
? @"YES" : @"NO");
}
- (void) setRemindWithASound: (NSString *) newValue
{
[userDefaults setObject: newValue forKey: @"RemindWithASound"];
}
- (NSArray *) reminderTimesList
{
return [NSArray arrayWithObjects: @"0000", @"0005", @"0010", @"0015",
@"0030", @"0100", @"0200", @"0400", @"0800", @"1200",
@"2400", @"4800", nil];
}
- (NSString *) itemReminderTimeText
{
return [self labelForKey:
[NSString stringWithFormat: @"reminderTime_%@", item]];
}
- (NSString *) userReminderTime
{
return [userDefaults objectForKey: @"ReminderTime"];
}
- (void) setReminderTime: (NSString *) newTime
{
[userDefaults setObject: newTime forKey: @"ReminderTime"];
}
- (id <WOActionResults>) defaultAction
{
id <WOActionResults> results;
WORequest *request;
request = [context request];
if ([[request method] isEqualToString: @"POST"])
{
[userDefaults synchronize];
results = [self jsCloseWithRefreshMethod: nil];
}
else
results = self;
return results;
}
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
inContext: (WOContext*) context
{
return [[request method] isEqualToString: @"POST"];
}
@end
+1
View File
@@ -0,0 +1 @@
# nothing here
+36
View File
@@ -0,0 +1,36 @@
{ /* -*-javascript-*- */
requires = ( MAIN, MainUI, CommonUI );
publicResources = (
);
factories = {
};
categories = {
SOGoUserFolder = {
slots = {
toolbar = {
protectedBy = "View";
value = "UIxPreferences.toolbar";
};
};
methods = {
preferences = {
protectedBy = "View";
pageName = "UIxPreferences";
};
jsonDefaults = {
protectedBy = "View";
actionClass = "UIxJSONPreferences";
actionName = "jsonDefaults";
};
jsonSettings = {
protectedBy = "View";
actionClass = "UIxJSONPreferences";
actionName = "jsonSettings";
};
};
};
};
}