From 9086e4fd02c4e5231d99102a08fa27bee6e215fc Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 21 Aug 2007 19:42:16 +0000 Subject: [PATCH] Monotone-Parent: fc8e6bbe0cff3fd2f022a39f28fc8c57fac144e9 Monotone-Revision: 896895232d25506e19bd733d08a718ef9692eecd Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-08-21T19:42:16 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 +++ UI/GNUmakefile | 1 + UI/SOGoElements/GNUmakefile | 24 ++++++++++++ UI/SOGoElements/GNUmakefile.postamble | 9 +++++ UI/SOGoElements/SOGoElementsBuilder.h | 31 ++++++++++++++++ UI/SOGoElements/SOGoElementsBuilder.m | 50 +++++++++++++++++++++++++ UI/SOGoElements/SOGoElementsBundle.m | 29 +++++++++++++++ UI/SOGoElements/SOGoIEConditional.h | 42 +++++++++++++++++++++ UI/SOGoElements/SOGoIEConditional.m | 53 +++++++++++++++++++++++++++ UI/SOGoElements/bundle-info.plist | 23 ++++++++++++ 10 files changed, 268 insertions(+) create mode 100644 UI/SOGoElements/GNUmakefile create mode 100644 UI/SOGoElements/GNUmakefile.postamble create mode 100644 UI/SOGoElements/SOGoElementsBuilder.h create mode 100644 UI/SOGoElements/SOGoElementsBuilder.m create mode 100644 UI/SOGoElements/SOGoElementsBundle.m create mode 100644 UI/SOGoElements/SOGoIEConditional.h create mode 100644 UI/SOGoElements/SOGoIEConditional.m create mode 100644 UI/SOGoElements/bundle-info.plist diff --git a/ChangeLog b/ChangeLog index 13206cb89..4c51a0287 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-08-21 Wolfgang Sourdeau + * UI/SOGoElements/SOGoIEConditional.m: new extension module class + to handle "" template tags. + + * UI/SOGoElements: new extension bundle containing sogo-specific + dynamic elements. + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor -takeValuesFromRequest:_rqinContext:_ctx]): save the category selected in the dialog. diff --git a/UI/GNUmakefile b/UI/GNUmakefile index c91abddf6..3570614b0 100644 --- a/UI/GNUmakefile +++ b/UI/GNUmakefile @@ -5,6 +5,7 @@ include $(GNUSTEP_MAKEFILES)/common.make SUBPROJECTS += \ SOGoUI \ + SOGoElements \ Common \ Contacts \ MailerUI \ diff --git a/UI/SOGoElements/GNUmakefile b/UI/SOGoElements/GNUmakefile new file mode 100644 index 000000000..b389d94fc --- /dev/null +++ b/UI/SOGoElements/GNUmakefile @@ -0,0 +1,24 @@ +# GNUstep makefile + +-include ../../config.make +include $(GNUSTEP_MAKEFILES)/common.make + +SOPE_VERSION = 4.7 + +BUNDLE_NAME = SOGoElements +BUNDLE_EXTENSION = .wox +BUNDLE_INSTALL_DIR = $(GNUSTEP_INSTALLATION_DIR)/Library/WOxElemBuilders-$(SOPE_VERSION)/ + +SOGoElements_PRINCIPAL_CLASS = SOGoElementsBundle + +SOGoElements_OBJC_FILES = \ + SOGoElementsBundle.m \ + SOGoElementsBuilder.m \ + SOGoIEConditional.m + +# building + +-include GNUmakefile.preamble +include $(GNUSTEP_MAKEFILES)/bundle.make +-include GNUmakefile.postamble +-include fhs.make diff --git a/UI/SOGoElements/GNUmakefile.postamble b/UI/SOGoElements/GNUmakefile.postamble new file mode 100644 index 000000000..cd11e6807 --- /dev/null +++ b/UI/SOGoElements/GNUmakefile.postamble @@ -0,0 +1,9 @@ +ifneq ($(GNUSTEP_BUILD_DIR),) +after-SOGoElements-all :: + @(cp bundle-info.plist \ + $(GNUSTEP_BUILD_DIR)/$(BUNDLE_NAME)$(BUNDLE_EXTENSION)) +else +after-SOGoElements-all :: + @(cd $(BUNDLE_NAME)$(BUNDLE_EXTENSION);\ + cp ../bundle-info.plist .) +endif diff --git a/UI/SOGoElements/SOGoElementsBuilder.h b/UI/SOGoElements/SOGoElementsBuilder.h new file mode 100644 index 000000000..8326e6f2f --- /dev/null +++ b/UI/SOGoElements/SOGoElementsBuilder.h @@ -0,0 +1,31 @@ +/* SOGoElementsBuilder.h - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * 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 SOGOELEMENTSBUILDER_H +#define SOGOELEMENTSBUILDER_H + +#import + +@interface SOGoElementsBuilder : WOxTagClassElemBuilder +@end + +#endif /* SOGOELEMENTSBUILDER_H */ diff --git a/UI/SOGoElements/SOGoElementsBuilder.m b/UI/SOGoElements/SOGoElementsBuilder.m new file mode 100644 index 000000000..d3f1f1f78 --- /dev/null +++ b/UI/SOGoElements/SOGoElementsBuilder.m @@ -0,0 +1,50 @@ +/* SOGoElementsBuilder.m - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * 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 + +#import + +#import "SOGoIEConditional.h" + +#import "SOGoElementsBuilder.h" + +@implementation SOGoElementsBuilder + +- (Class) classForElement: (id) _element +{ + NSString *tagName; + Class zeClass; + + zeClass = Nil; + + if ([[_element namespaceURI] isEqualToString: XMLNS_OD_BIND]) + { + tagName = [_element tagName]; + if ([tagName isEqualToString: @"if-ie"]) + zeClass = [SOGoIEConditional class]; + } + + return zeClass; +} + +@end diff --git a/UI/SOGoElements/SOGoElementsBundle.m b/UI/SOGoElements/SOGoElementsBundle.m new file mode 100644 index 000000000..4c88fefed --- /dev/null +++ b/UI/SOGoElements/SOGoElementsBundle.m @@ -0,0 +1,29 @@ +/* SOGoElementsBundle.m - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * 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 + +@interface SOGoElementsBundle : NSObject +@end + +@implementation SOGoElementsBundle +@end diff --git a/UI/SOGoElements/SOGoIEConditional.h b/UI/SOGoElements/SOGoIEConditional.h new file mode 100644 index 000000000..6b9385eda --- /dev/null +++ b/UI/SOGoElements/SOGoIEConditional.h @@ -0,0 +1,42 @@ +/* SOGoIEConditional.h - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * 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 SOGOIECONDITIONAL_H +#define SOGOIECONDITIONAL_H + +#import + +@class WOContext; +@class WOElement; +@class WOResponse; + +@interface SOGoIEConditional : WODynamicElement +{ + WOElement *template; +} + +- (void) appendToResponse: (WOResponse *) _response + inContext: (WOContext *) _ctx; + +@end + +#endif /* SOGOIECONDITIONAL_H */ diff --git a/UI/SOGoElements/SOGoIEConditional.m b/UI/SOGoElements/SOGoIEConditional.m new file mode 100644 index 000000000..5d9cf1680 --- /dev/null +++ b/UI/SOGoElements/SOGoIEConditional.m @@ -0,0 +1,53 @@ +/* SOGoIEConditional.m - this file is part of SOGo + * + * Copyright (C) 2007 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * 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 +#import + +#import "SOGoIEConditional.h" + +@implementation SOGoIEConditional + +- (id) initWithName: (NSString *) name + associations: (NSDictionary *) associations + template: (WOElement *) newTemplate +{ + ASSIGN (template, newTemplate); + + return self; +} + +- (void) dealloc +{ + [template release]; + [super dealloc]; +} + +- (void) appendToResponse: (WOResponse *) response + inContext: (WOContext *) context +{ + [response appendContentString: @""]; +} + +@end diff --git a/UI/SOGoElements/bundle-info.plist b/UI/SOGoElements/bundle-info.plist new file mode 100644 index 000000000..142fb3ee9 --- /dev/null +++ b/UI/SOGoElements/bundle-info.plist @@ -0,0 +1,23 @@ +{ + requires = { + bundleManagerVersion = 1; + + classes = ( + { name = NSObject; } + ); + }; + + provides = { + WOxElemBuilder = ( + { name = "SOGoElementsBuilder"; }, + ); + + WODynamicElements = ( + { name = "SOGoIEConditional"; }, + ); + + classes = ( + { name = "SOGoElementsBuilder"; }, + ); + }; +}