]> err.no Git - scalable-opengroupware.org/commitdiff
work on the mailer
authorhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 26 Sep 2004 21:17:02 +0000 (21:17 +0000)
committerhelge <helge@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Sun, 26 Sep 2004 21:17:02 +0000 (21:17 +0000)
git-svn-id: http://svn.opengroupware.org/SOGo/trunk@318 d1b88da0-ebda-0310-925b-ed51d893ca5b

25 files changed:
SOGo/Main/ChangeLog
SOGo/Main/Version
SOGo/Main/sogod.m
SOGo/README
SOGo/SOGo.xcode/helge.pbxuser
SOGo/SOGo.xcode/project.pbxproj
SOGo/SoObjects/Mailer/ChangeLog
SOGo/SoObjects/Mailer/GNUmakefile
SOGo/SoObjects/Mailer/SOGoMailAccount.h
SOGo/SoObjects/Mailer/SOGoMailAccount.m
SOGo/SoObjects/Mailer/SOGoMailAccounts.h
SOGo/SoObjects/Mailer/SOGoMailAccounts.m
SOGo/SoObjects/Mailer/SOGoMailBaseObject.h [new file with mode: 0644]
SOGo/SoObjects/Mailer/SOGoMailBaseObject.m [new file with mode: 0644]
SOGo/SoObjects/Mailer/SOGoMailFolder.h
SOGo/SoObjects/Mailer/SOGoMailFolder.m
SOGo/SoObjects/Mailer/SOGoMailObject.h
SOGo/SoObjects/Mailer/SOGoMailObject.m
SOGo/SoObjects/Mailer/Version
SOGo/SoObjects/Mailer/product.plist
SOGo/UI/Mailer/UIxMailListView.wox
SOGo/UI/Mailer/UIxMailMainFrame.wox
SOGo/UI/SOGoUI/ChangeLog
SOGo/UI/SOGoUI/UIxComponent.m
SOGo/UI/SOGoUI/Version

index d265c4c5bcfbba6226ad0cfbe35d9815eba413c5..bf03fa09ecf3df00e81030a49483997469c1eca3 100644 (file)
@@ -1,5 +1,7 @@
 2004-09-26  Helge Hess  <helge.hess@opengroupware.org>
 
+       * sogod.m: return 404 for favicon.ico queries (v0.9.13)
+
        * fixed title bindings to const: in .wox (should be label:?) (v0.9.12)
 
 2004-09-25  Helge Hess  <helge.hess@opengroupware.org>
index 9cef79939ea704d51f0e6725b9964991d0cafe31..92c8fa08c38f073a34665a077f87e34ece0ab9e3 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=12
+SUBMINOR_VERSION:=13
index 8088e2dc2c0d85a916e40ada471669777204cf0a..03dc26e639dc1a8ffb6b508c82a752c3b53b4dd1 100644 (file)
@@ -93,7 +93,7 @@ static BOOL doCrashOnSessionCreate = NO;
 - (BOOL)isUserName:(NSString *)_key inContext:(id)_ctx {
   if ([_key length] < 1)
     return NO;
-
+  
   if (isdigit([_key characterAtIndex:0]))
     return NO;
 
@@ -132,15 +132,14 @@ static BOOL doCrashOnSessionCreate = NO;
   /* 
      The problem is, that at this point we still get request for resources,
      eg 'favicon.ico'.
-     The hack here is to check for a dot in the key, but we should find a way
-     to catch that in a more sensible way.
-     
-     One way to check for a valid key would be to check whether the key is a
-     valid hostname, but I would like to avoid that for performance reasons.
      
      Addition: we also get queries for various other methods, like "GET" if
                no method was provided in the query path.
   */
+  
+  if ([_key isEqualToString:@"favicon.ico"])
+    return nil;
+
   if ([self isUserName:_key inContext:_ctx])
     return [self lookupUser:_key inContext:_ctx];
   
index 83fb015c82f8502ee8eb0fbda4fa7fa5c4fe64f9..0383ac1c6ecbee27e0f9aa60262247067ff18135 100644 (file)
@@ -22,3 +22,5 @@ NOTES
 mapping email <-> logins
 usermanager -> part of SOGoLogic
 
+Default to enable debugging output in the page:
+  SOGoUIxDebugEnabled YES|NO
index 14e87cb49755609fd86051045dc0d440e10bd976..64f50e92eb7553d4a837c4cef74843e1f01c9a20 100644 (file)
@@ -1,5 +1,25 @@
 // !$*UTF8*$!
 {
+       E82F8A4207075D7100CDD2CA = {
+               fRef = E87205F40692E3D00099CBBD;
+               isa = PBXTextBookmark;
+               name = "README: 4";
+               rLen = 0;
+               rLoc = 17;
+               rType = 0;
+               vrLen = 404;
+               vrLoc = 0;
+       };
+       E82F8A4607075D7100CDD2CA = {
+               fRef = E87205F40692E3D00099CBBD;
+               isa = PBXTextBookmark;
+               name = "README: 3";
+               rLen = 0;
+               rLoc = 12;
+               rType = 0;
+               vrLen = 404;
+               vrLoc = 0;
+       };
        E87205890692E3B40099CBBD = {
                activeBuildStyle = E87205870692E3B40099CBBD;
                activeTarget = E8720A7A0692E5010099CBBD;
@@ -12,9 +32,9 @@
                                PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
                                PBXFileTableDataSourceColumnWidthsKey = (
                                        20,
-                                       294,
+                                       273,
                                        20,
-                                       57,
+                                       53,
                                        43,
                                        43,
                                        20,
                                        PBXFileDataSource_Target_ColumnID,
                                );
                        };
-                       PBXPerProjectTemplateStateSaveDate = 110289844;
+                       PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
+                               PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
+                               PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
+                               PBXFileTableDataSourceColumnWidthsKey = (
+                                       20,
+                                       215,
+                                       50,
+                                       20,
+                                       50,
+                                       43,
+                                       43,
+                               );
+                               PBXFileTableDataSourceColumnsKey = (
+                                       PBXFileDataSource_FiletypeID,
+                                       PBXFileDataSource_Filename_ColumnID,
+                                       PBXTargetDataSource_PrimaryAttribute,
+                                       PBXFileDataSource_Built_ColumnID,
+                                       PBXFileDataSource_ObjectSize_ColumnID,
+                                       PBXFileDataSource_Errors_ColumnID,
+                                       PBXFileDataSource_Warnings_ColumnID,
+                               );
+                       };
+                       PBXPerProjectTemplateStateSaveDate = 117923177;
                        PBXPrepackagedSmartGroups_v2 = (
                                {
                                        PBXTransientLocationAtTop = bottom;
                                                root = "<PROJECT>";
                                        };
                                },
+                               {
+                                       PBXTransientLocationAtTop = bottom;
+                                       clz = XDDesignSmartGroup;
+                                       description = "Displays Xdesign models";
+                                       globalID = 2E4A936305E6979E00701470;
+                                       name = Design;
+                                       preferences = {
+                                               image = Design;
+                                               isLeaf = 0;
+                                       };
+                               },
                        );
                        PBXWorkspaceContents = (
                                {
                                };
                                RubberWindowFrame = "114 92 779 734 0 0 1280 832 ";
                        };
-                       PBXWorkspaceStateSaveDate = 110289844;
+                       PBXWorkspaceStateSaveDate = 117923177;
                };
                perUserProjectItems = {
-                       E8720A070692E4930099CBBD = E8720A070692E4930099CBBD;
-                       E8720A090692E4930099CBBD = E8720A090692E4930099CBBD;
-                       E8720A110692E49A0099CBBD = E8720A110692E49A0099CBBD;
-                       E8720A130692E49A0099CBBD = E8720A130692E49A0099CBBD;
-                       E8720A170692E4A20099CBBD = E8720A170692E4A20099CBBD;
-                       E8720A190692E4A20099CBBD = E8720A190692E4A20099CBBD;
-                       E8720A1D0692E4A90099CBBD = E8720A1D0692E4A90099CBBD;
-                       E8720A1F0692E4A90099CBBD = E8720A1F0692E4A90099CBBD;
-                       E8720A220692E4A90099CBBD = E8720A220692E4A90099CBBD;
-                       E8720A240692E4A90099CBBD = E8720A240692E4A90099CBBD;
-                       E8720A300692E4BA0099CBBD = E8720A300692E4BA0099CBBD;
-                       E8720A320692E4BA0099CBBD = E8720A320692E4BA0099CBBD;
-                       E8720A360692E4C00099CBBD = E8720A360692E4C00099CBBD;
-                       E8720A380692E4C00099CBBD = E8720A380692E4C00099CBBD;
-                       E8720A440692E4CC0099CBBD = E8720A440692E4CC0099CBBD;
-                       E8720A460692E4CC0099CBBD = E8720A460692E4CC0099CBBD;
-                       E8720A4E0692E4DB0099CBBD = E8720A4E0692E4DB0099CBBD;
-                       E8720A500692E4DB0099CBBD = E8720A500692E4DB0099CBBD;
-                       E8720A5C0692E4E40099CBBD = E8720A5C0692E4E40099CBBD;
-                       E8720A5E0692E4E40099CBBD = E8720A5E0692E4E40099CBBD;
-                       E8720A620692E4E70099CBBD = E8720A620692E4E70099CBBD;
-                       E8720A640692E4E70099CBBD = E8720A640692E4E70099CBBD;
-                       E8720A700692E4F20099CBBD = E8720A700692E4F20099CBBD;
-                       E8720A720692E4F20099CBBD = E8720A720692E4F20099CBBD;
-                       E8720A7E0692E5020099CBBD = E8720A7E0692E5020099CBBD;
-                       E8720A7F0692E5020099CBBD = E8720A7F0692E5020099CBBD;
-                       E8720A800692E5020099CBBD = E8720A800692E5020099CBBD;
-                       E8720A820692E50C0099CBBD = E8720A820692E50C0099CBBD;
+                       E82F8A4207075D7100CDD2CA = E82F8A4207075D7100CDD2CA;
+                       E82F8A4607075D7100CDD2CA = E82F8A4607075D7100CDD2CA;
+                       E8E5318507075AF1002E3166 = E8E5318507075AF1002E3166;
+                       E8E5318707075AF1002E3166 = E8E5318707075AF1002E3166;
                };
                sourceControlManager = E872058A0692E3B40099CBBD;
                userBuildSettings = {
                };
        };
        E872058A0692E3B40099CBBD = {
+               fallbackIsa = XCSourceControlManager;
+               isSCMEnabled = 0;
                isa = PBXSourceControlManager;
                scmConfiguration = {
                };
                isa = PBXCodeSenseManager;
                usesDefaults = 1;
                wantsCodeCompletion = 1;
-               wantsCodeCompletionAutoPopup = 0;
                wantsCodeCompletionAutoSuggestions = 0;
                wantsCodeCompletionCaseSensitivity = 1;
+               wantsCodeCompletionListAlways = 1;
                wantsCodeCompletionOnlyMatchingItems = 1;
                wantsCodeCompletionParametersIncluded = 1;
                wantsCodeCompletionPlaceholdersInserted = 1;
                wantsCodeCompletionTabCompletes = 1;
                wantsIndex = 1;
        };
+       E87205F40692E3D00099CBBD = {
+               uiCtxt = {
+                       sepNavIntBoundsRect = "{{0, 0}, {470, 448}}";
+                       sepNavSelRange = "{12, 0}";
+                       sepNavVisRect = "{{0, 0}, {470, 448}}";
+               };
+       };
        E872064C0692E3D00099CBBD = {
                uiCtxt = {
                        sepNavIntBoundsRect = "{{0, 0}, {493, 311}}";
                        sepNavVisRect = "{{0, 0}, {493, 311}}";
                };
        };
-       E87207D40692E3D20099CBBD = {
-               uiCtxt = {
-                       sepNavIntBoundsRect = "{{0, 0}, {493, 311}}";
-                       sepNavSelRange = "{0, 0}";
-                       sepNavVisRect = "{{0, 0}, {493, 311}}";
-               };
-       };
-       E87207DC0692E3D20099CBBD = {
-               uiCtxt = {
-                       sepNavIntBoundsRect = "{{0, 0}, {493, 783}}";
-                       sepNavSelRange = "{0, 0}";
-                       sepNavVisRect = "{{0, 0}, {493, 311}}";
-               };
-       };
        E87207E70692E3D20099CBBD = {
                uiCtxt = {
                        sepNavIntBoundsRect = "{{0, 0}, {493, 2799}}";
                        sepNavVisRect = "{{0, 0}, {493, 311}}";
                };
        };
-       E8720A070692E4930099CBBD = {
-               fRef = E872064C0692E3D00099CBBD;
-               isa = PBXTextBookmark;
-               name = "GNUmakefile: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 136;
-               vrLoc = 0;
-       };
-       E8720A090692E4930099CBBD = {
-               fRef = E872064C0692E3D00099CBBD;
-               isa = PBXTextBookmark;
-               name = "GNUmakefile: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 136;
-               vrLoc = 0;
-       };
-       E8720A110692E49A0099CBBD = {
-               fRef = E87208930692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "GNUmakefile: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 547;
-               vrLoc = 0;
-       };
-       E8720A130692E49A0099CBBD = {
-               fRef = E87208930692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "GNUmakefile: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 547;
-               vrLoc = 0;
-       };
-       E8720A170692E4A20099CBBD = {
-               fRef = E87208D30692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "NOTES: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 389;
-               vrLoc = 0;
-       };
-       E8720A190692E4A20099CBBD = {
-               fRef = E87208D30692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "NOTES: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 389;
-               vrLoc = 0;
-       };
-       E8720A1D0692E4A90099CBBD = {
-               fRef = E87208F50692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppointmentFormatter.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 896;
-               vrLoc = 0;
-       };
-       E8720A1F0692E4A90099CBBD = {
-               fRef = E87208F50692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppointmentFormatter.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 896;
-               vrLoc = 0;
-       };
-       E8720A220692E4A90099CBBD = {
-               fRef = E87208F60692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppointmentFormatter.m: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 895;
-               vrLoc = 0;
-       };
-       E8720A240692E4A90099CBBD = {
-               fRef = E87208F60692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppointmentFormatter.m: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 895;
-               vrLoc = 0;
-       };
-       E8720A300692E4BA0099CBBD = {
-               fRef = E87208F80692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppointmentView.m: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 440;
-               vrLoc = 0;
-       };
-       E8720A320692E4BA0099CBBD = {
-               fRef = E87208F80692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppointmentView.m: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 440;
-               vrLoc = 0;
-       };
-       E8720A360692E4C00099CBBD = {
-               fRef = E87209020692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxCalMonthView.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 437;
-               vrLoc = 0;
-       };
-       E8720A380692E4C00099CBBD = {
-               fRef = E87209020692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxCalMonthView.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 437;
-               vrLoc = 0;
-       };
-       E8720A440692E4CC0099CBBD = {
-               fRef = E87208900692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "common.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 882;
-               vrLoc = 0;
-       };
-       E8720A460692E4CC0099CBBD = {
-               fRef = E87208900692E3D30099CBBD;
-               isa = PBXTextBookmark;
-               name = "common.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 882;
-               vrLoc = 0;
-       };
-       E8720A4E0692E4DB0099CBBD = {
-               fRef = E872074D0692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "GNUmakefile: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 462;
-               vrLoc = 0;
-       };
-       E8720A500692E4DB0099CBBD = {
-               fRef = E872074D0692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "GNUmakefile: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 462;
-               vrLoc = 0;
-       };
-       E8720A5C0692E4E40099CBBD = {
-               fRef = E87207D40692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppFrame.m: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 204;
-               vrLoc = 0;
-       };
-       E8720A5E0692E4E40099CBBD = {
-               fRef = E87207D40692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxAppFrame.m: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 204;
-               vrLoc = 0;
-       };
-       E8720A620692E4E70099CBBD = {
-               fRef = E87207DC0692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxComponent.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 833;
-               vrLoc = 0;
-       };
-       E8720A640692E4E70099CBBD = {
-               fRef = E87207DC0692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "UIxComponent.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 833;
-               vrLoc = 0;
-       };
-       E8720A700692E4F20099CBBD = {
-               fRef = E872074A0692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "common.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 877;
-               vrLoc = 0;
-       };
-       E8720A720692E4F20099CBBD = {
-               fRef = E872074A0692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "common.h: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 877;
-               vrLoc = 0;
-       };
        E8720A7A0692E5010099CBBD = {
                activeExec = 0;
        };
-       E8720A7E0692E5020099CBBD = {
-               fRef = E87207E70692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "zidestoreui.css: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 511;
-               vrLoc = 0;
-       };
-       E8720A7F0692E5020099CBBD = {
+       E8E5318507075AF1002E3166 = {
                isa = PBXTargetBookmark;
                trg = E8720A7A0692E5010099CBBD;
        };
-       E8720A800692E5020099CBBD = {
-               fRef = E87207E70692E3D20099CBBD;
-               isa = PBXTextBookmark;
-               name = "zidestoreui.css: 1";
-               rLen = 0;
-               rLoc = 0;
-               rType = 0;
-               vrLen = 511;
-               vrLoc = 0;
-       };
-       E8720A820692E50C0099CBBD = {
+       E8E5318707075AF1002E3166 = {
                isa = PBXTargetBookmark;
                trg = E8720A7A0692E5010099CBBD;
-               uiCtxt = {
-                       TOCViewDetailVisibleRect = "{{0, 160}, {361, 279}}";
-                       TOCViewExpandedItems = (
-                               "com.apple.target-editor-pane.settings",
-                       );
-                       TOCViewMasterVisibleRect = "{{0, 0}, {140, 279}}";
-                       TOCViewSelectedItems = (
-                               "com.apple.target-editor-pane.settings",
-                       );
-               };
        };
 }
index 8e9599686b378d5ddd11f55d8f557a645ff87039..d48109fb378f9b0683069404984bb349183eb6ff 100644 (file)
                        sourceTree = "<group>";
                };
                E8720A7A0692E5010099CBBD = {
-                       buildArgumentsString = "$(ACTION)";
+                       buildArgumentsString = "$(ACTION) GNUSTEP_SYSTEM_ROOT=$(HOME)/GNUstep";
                        buildPhases = (
                        );
                        buildSettings = {
index 3ab5e637925f13b82fa48655151ee76bc6fbd4fe..a499dfd91e33e130b029eb6aa8805379ebfa35a9 100644 (file)
@@ -1,3 +1,13 @@
+2004-09-26  Helge Hess  <helge.hess@opengroupware.org>
+
+       * v0.9.5
+
+       * added SOGoMailBaseObject as a base object for the other mailer
+         SoObjects
+
+       * added -imapURL method to the mail SoObjects (the imapURL is used to
+         locate the object in the IMAP4 server, just like in Thunderbird)
+
 2004-09-25  Helge Hess  <helge.hess@opengroupware.org>
 
        * fixed compilation on MacOSX (v0.9.4)
index 99c8af81a2956face15184be33ce562fc367ef62..b14a2948dc41661b2a57827b24f9a05dfcc96fab 100644 (file)
@@ -9,6 +9,7 @@ Mailer_PRINCIPAL_CLASS = SOGoMailerProduct
 Mailer_OBJC_FILES += \
        Product.m               \
                                \
+       SOGoMailBaseObject.m    \
        SOGoMailAccounts.m      \
        SOGoMailAccount.m       \
        SOGoMailFolder.m        \
index b889536f096d4ce827064c1f77af49eb59c850e2..9d17b5e6b1b77512e0c8aa072becf35386c0e05e 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __Mailer_SOGoMailAccount_H__
 #define __Mailer_SOGoMailAccount_H__
 
-#include <SOGo/SOGoObject.h>
+#include <SOGo/SoObjects/Mailer/SOGoMailBaseObject.h>
 
 /*
   SOGoMailAccount
@@ -34,9 +34,7 @@
   password, etc)
 */
 
-@class NSString, NSArray, NSCalendarDate, NSException;
-
-@interface SOGoMailAccount : SOGoObject
+@interface SOGoMailAccount : SOGoMailBaseObject
 {
 }
 
index 92babab1c77840c0577371c4fcd5f23e49086d6f..95a857a06b56cb760fc6f7fab8cf20b89da1a64b 100644 (file)
 // $Id: SOGoMailAccount.m 274 2004-08-26 13:10:49Z znek $
 
 #include "SOGoMailAccount.h"
+#include "SOGoMailFolder.h"
 #include "common.h"
 
 @implementation SOGoMailAccount
 
+/* IMAP4 */
+
+- (BOOL)useSSL {
+  return NO;
+}
+
+- (NSURL *)imap4URL {
+  /* imap://agenortest@mail.opengroupware.org/INBOX/withsubdirs/subdir1 */
+  NSString *s;
+  NSRange  r;
+
+  if (self->imap4URL != nil)
+    return self->imap4URL;
+  
+  s = [self nameInContainer];
+  r = [s rangeOfString:@"@"];
+  if (r.length == 0) {
+    [self logWithFormat:@"ERROR: missing login in account folder name: %@", s];
+    return nil;
+  }
+
+  s = [([self useSSL] ? @"imaps://" : @"imap://") stringByAppendingString:s];
+  s = [s stringByAppendingString:@"/"];
+  
+  self->imap4URL = [[NSURL alloc] initWithString:s];
+  return self->imap4URL;
+}
+
+/* name lookup */
+
+- (id)lookupImap4Folder:(NSString *)_key inContext:(id)_ctx {
+  return [[[SOGoMailFolder alloc] initWithName:_key 
+                                 inContainer:self] autorelease];
+}
+
+- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
+  id obj;
+  
+  /* first check attributes directly bound to the application */
+  if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]) != nil)
+    return obj;
+  
+  if ((obj = [self lookupImap4Folder:_key inContext:_ctx]) != nil)
+    return obj;
+  
+  /* return 404 to stop acquisition */
+  return [NSException exceptionWithHTTPStatus:404 /* Not Found */];
+}
+
 @end /* SOGoMailAccount */
index e862475470a4534bea212510271c576dc1763915..fd4ac2231363eeb3164156974d57c586f20c3bd2 100644 (file)
     
   The SOGoMailAccounts folder contains the mail accounts which are associated
   with a user.
-*/
 
-@class NSString, NSArray, NSCalendarDate, NSException;
+  Note: this is not yet an IMAP4 object. Its a wrapper which contains the root
+        IMAP4 objects.
+*/
 
 @interface SOGoMailAccounts : SOGoObject
 {
index 2856feb090cd1ce3ae83e147d5d7670d2528cf15..1f27e1d9be05258b0700e22f1db31741597fe70e 100644 (file)
@@ -28,9 +28,9 @@
 /* listing the available mailboxes */
 
 - (NSArray *)toManyRelationshipKeys {
-  // TODO: hardcoded
+  // TODO: hardcoded, need to implement the Agenor Anais LDAP query?
   return [NSArray arrayWithObjects:
-                   @"mail.opengroupware.org",
+                   @"agenortest@mail.opengroupware.org",
                  nil];
 }
 
diff --git a/SOGo/SoObjects/Mailer/SOGoMailBaseObject.h b/SOGo/SoObjects/Mailer/SOGoMailBaseObject.h
new file mode 100644 (file)
index 0000000..b78c0a2
--- /dev/null
@@ -0,0 +1,49 @@
+/*
+  Copyright (C) 2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo 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 Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+// $Id$
+
+#ifndef __Mailer_SOGoMailBaseObject_H__
+#define __Mailer_SOGoMailBaseObject_H__
+
+#include <SOGo/SOGoObject.h>
+
+/*
+  SOGoMailBaseObject
+  
+  Common base class for mailer SoObjects.
+*/
+
+@class NSURL;
+
+@interface SOGoMailBaseObject : SOGoObject
+{
+  NSURL *imap4URL;
+}
+
+- (id)initWithImap4URL:(NSURL *)_url inContainer:(id)_container;
+
+/* IMAP4 */
+
+- (NSURL *)imap4URL;
+
+@end
+
+#endif /* __Mailer_SOGoMailBaseObject_H__ */
diff --git a/SOGo/SoObjects/Mailer/SOGoMailBaseObject.m b/SOGo/SoObjects/Mailer/SOGoMailBaseObject.m
new file mode 100644 (file)
index 0000000..847445b
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+  Copyright (C) 2004 SKYRIX Software AG
+
+  This file is part of OpenGroupware.org.
+
+  OGo is free software; you can redistribute it and/or modify it under
+  the terms of the GNU Lesser General Public License as published by the
+  Free Software Foundation; either version 2, or (at your option) any
+  later version.
+
+  OGo 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 Lesser General Public
+  License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with OGo; see the file COPYING.  If not, write to the
+  Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+  02111-1307, USA.
+*/
+// $Id$
+
+#include "SOGoMailBaseObject.h"
+#include "common.h"
+
+@implementation SOGoMailBaseObject
+
+- (id)initWithImap4URL:(NSURL *)_url inContainer:(id)_container {
+  NSString *n;
+  
+  n = [[_url path] lastPathComponent];
+  if ((self = [self initWithName:n inContainer:_container])) {
+    self->imap4URL = [_url retain];
+  }
+  return self;
+}
+
+- (void)dealloc {
+  [self->imap4URL release];
+  [super dealloc];
+}
+
+/* IMAP4 */
+
+- (NSString *)relativeImap4Name {
+  [self logWithFormat:@"WARNING: subclass should override %@", 
+         NSStringFromSelector(_cmd)];
+  return nil;
+}
+- (NSURL *)imap4URL {
+  NSString *sn;
+  
+  if (self->imap4URL != nil) 
+    return self->imap4URL;
+  
+  if ((sn = [self relativeImap4Name]) == nil)
+    return nil;
+  
+  if (![[self container] respondsToSelector:_cmd]) {
+    [self logWithFormat:@"WARNING: container does not implement -imap4URL!"];
+    return nil;
+  }
+  
+  self->imap4URL = [[NSURL alloc] initWithString:[self nameInContainer] 
+                                 relativeToURL:[[self container] imap4URL]];
+  return self->imap4URL;
+}
+
+@end /* SOGoMailBaseObject */
index f93bcb74e2020d5c81cdc11c433ef5e491306b60..373fbd7d13c911c88b13a8c66d979049adf8b93a 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __Mailer_SOGoMailFolder_H__
 #define __Mailer_SOGoMailFolder_H__
 
-#include <SOGo/SOGoObject.h>
+#include <SOGo/SoObjects/Mailer/SOGoMailBaseObject.h>
 
 /*
   SOGoMailFolder
@@ -33,9 +33,7 @@
   The SOGoMailFolder maps to an IMAP4 folder from NGImap4.
 */
 
-@class NSString, NSArray, NSCalendarDate, NSException;
-
-@interface SOGoMailFolder : SOGoObject
+@interface SOGoMailFolder : SOGoMailBaseObject
 {
 }
 
index 772c873ff493f0cc834d5c27e51beb0c00f2abe9..fd993a6264c511daf4cac602eba05e0352f87467 100644 (file)
 // $Id$
 
 #include "SOGoMailFolder.h"
+#include "SOGoMailObject.h"
 #include "common.h"
 
 @implementation SOGoMailFolder
 
+/* IMAP4 */
+
+- (NSString *)relativeImap4Name {
+  return [self nameInContainer];
+}
+
+/* name lookup */
+
+- (BOOL)isMessageKey:(NSString *)_key inContext:(id)_ctx {
+  /*
+    Every key starting with a digit is consider an IMAP4 message key. This is
+    not entirely correct since folders could also start with a number.
+    
+    If we want to support folders beginning with numbers, we would need to
+    scan the folder list for the _key, which would make everything quite a bit
+    slower.
+    TODO: support this mode using a default.
+  */
+  if ([_key length] == 0)
+    return NO;
+  
+  if (isdigit([_key characterAtIndex:0]))
+    return YES;
+  
+  return NO;
+}
+
+- (id)lookupImap4Folder:(NSString *)_key inContext:(id)_ctx {
+  // TODO: we might want to check for existence prior controller creation
+  return [[[SOGoMailFolder alloc] initWithName:_key 
+                                 inContainer:self] autorelease];
+}
+- (id)lookupImap4Message:(NSString *)_key inContext:(id)_ctx {
+  // TODO: we might want to check for existence prior controller creation
+  return [[[SOGoMailObject alloc] initWithName:_key 
+                                 inContainer:self] autorelease];
+}
+
+- (id)lookupName:(NSString *)_key inContext:(id)_ctx acquire:(BOOL)_flag {
+  id obj;
+  
+  /* first check attributes directly bound to the application */
+  if ((obj = [super lookupName:_key inContext:_ctx acquire:NO]) != nil)
+    return obj;
+  
+  obj = [self isMessageKey:_key inContext:_ctx]
+    ? [self lookupImap4Message:_key inContext:_ctx]
+    : [self lookupImap4Folder:_key  inContext:_ctx];
+  if (obj != nil)
+    return obj;
+  
+  /* return 404 to stop acquisition */
+  return [NSException exceptionWithHTTPStatus:404 /* Not Found */];
+}
+
 @end /* SOGoMailFolder */
index 351017e2089023abed12449b8b8551624b2c8e6f..5aca122cbe9c63121f73be402e5f8e0e5e3cc9b2 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef __Mailer_SOGoMailObject_H__
 #define __Mailer_SOGoMailObject_H__
 
-#include <SOGo/SOGoContentObject.h>
+#include <SOGo/SoObjects/Mailer/SOGoMailBaseObject.h>
 
 /*
   SOGoMailObject
@@ -33,9 +33,7 @@
   Represents a single mail as retrieved using NGImap4.
 */
 
-@class NSString, NSArray, NSException;
-
-@interface SOGoMailObject : SOGoObject
+@interface SOGoMailObject : SOGoMailBaseObject
 {
 }
 
index 4fc947c6c3152dfa777b46f7e3544ce8ea979817..608841d5ab8bc5bef938b77cb4bedf8941e25103 100644 (file)
 
 @implementation SOGoMailObject
 
+/* IMAP4 */
+
+- (NSString *)relativeImap4Name {
+  return [self nameInContainer];
+}
+
 @end /* SOGoMailObject */
index 749d66dc7109fb3f49932aae8e0c044ad7d4e6c0..6b227f7e3b266ef9cc7a5dc1fd384537da8702c7 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=4
+SUBMINOR_VERSION:=5
index 9e7adb65893e7b13de8ac1be6f9bee1b9f6d7284..539c0e8c078964550a10c9a525cd989bd653bc8b 100644 (file)
@@ -8,20 +8,24 @@
   };
   
   classes = {
-    SOGoMailAccounts = {
+    SOGoMailBaseObject = {
       superclass    = "SOGoObject";
     };
 
+    SOGoMailAccounts = {
+      superclass    = "SOGoMailBaseObject";
+    };
+
     SOGoMailAccount = {
-      superclass    = "SOGoObject";
+      superclass    = "SOGoMailBaseObject";
     };
 
     SOGoMailFolder = {
-      superclass    = "SOGoObject";
+      superclass    = "SOGoMailBaseObject";
     };
 
     SOGoMailObject = {
-      superclass    = "SOGoObject";
+      superclass    = "SOGoMailBaseObject";
     };
   };
 }
index cebf5060781645df925960387d4f972bdc5ed684..d07c5e15a309a4bacaa1c4716fb2492789d53876 100644 (file)
@@ -1,11 +1,14 @@
 <?xml version='1.0' standalone='yes'?>
-<var:component xmlns="http://www.w3.org/1999/xhtml"
-               xmlns:var="http://www.skyrix.com/od/binding"
-               xmlns:const="http://www.skyrix.com/od/constant"
-               xmlns:uix="OGo:uix"
-               xmlns:label="OGo:label"
-               className="UIxPageFrame"
-               title="name"
+<var:component
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:var="http://www.skyrix.com/od/binding"
+  xmlns:const="http://www.skyrix.com/od/constant"
+  xmlns:uix="OGo:uix"
+  xmlns:rsrc="OGo:url"
+  xmlns:label="OGo:label"
+  className="UIxMailMainFrame"
+  title="name"
 >
-
-</var:component>
\ No newline at end of file
+  <h4>Mail Folder Page</h4>
+  <a rsrc:href="tbird_073_mailwelcome.png">screenshot</a>
+</var:component>
index 6d8f9f3b3b89ab21a64179758b8925f8dca92770..778ef8f71e3a87d94c0db96c5268909c1382d21b 100644 (file)
                 <td valign="top">clientObject:</td>
                 <td valign="top"><var:string value="clientObject" /></td>
               </tr>
+              <tr>
+                <td valign="top">IMAP4-URL:</td>
+                <td valign="top"><var:string
+                    value="clientObject.imap4URL.absoluteString" /></td>
+              </tr>
               <tr>
                 <td valign="top">traversal stack:</td>
                 <td valign="top">
index f9aac34ea41146d83a4b58450a25c036355a773d..891f60ecf466fb0aeb242a32e855e371b7a1e9be 100644 (file)
@@ -1,3 +1,7 @@
+2004-09-26  Helge Hess  <helge.hess@opengroupware.org>
+
+       * UIxComponent.m: minor code cleanups (v0.9.13)
+
 2004-09-25  Helge Hess  <helge.hess@opengroupware.org>
 
        * v0.9.12
index d9b6abff4a803688fefcb6c625138db1dcd2a0f1..905fcd793f3bf3ab1aec7dd42e5e9c29fa633e69 100644 (file)
 */
 // $Id$
 
-
 #include "UIxComponent.h"
 #include "common.h"
 #include <NGObjWeb/SoHTTPAuthenticator.h>
 
-
 @interface UIxComponent (PrivateAPI)
 - (void)_parseQueryString:(NSString *)_s;
 @end
 
-
 @implementation UIxComponent
 
 static NSTimeZone *MET = nil;
 static NSTimeZone *GMT = nil;
 
-static NSMutableArray *dayLabelKeys = nil;
-static NSMutableArray *abbrDayLabelKeys = nil;
-static NSMutableArray *monthLabelKeys = nil;
+static NSMutableArray *dayLabelKeys       = nil;
+static NSMutableArray *abbrDayLabelKeys   = nil;
+static NSMutableArray *monthLabelKeys     = nil;
 static NSMutableArray *abbrMonthLabelKeys = nil;
 
 static BOOL uixDebugEnabled = NO;
 
 + (void)initialize {
-    NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
+  NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
     
-    uixDebugEnabled = [ud boolForKey:@"SOGoUIxDebugEnabled"];
+  uixDebugEnabled = [ud boolForKey:@"SOGoUIxDebugEnabled"];
 
-    if (MET == nil) {
-        MET = [[NSTimeZone timeZoneWithAbbreviation:@"MET"] retain];
-        GMT = [[NSTimeZone timeZoneWithAbbreviation:@"GMT"] retain];
-    }
-    if (dayLabelKeys == nil) {
-        dayLabelKeys = [[NSMutableArray alloc] initWithCapacity:7];
-        [dayLabelKeys addObject:@"Sunday"];
-        [dayLabelKeys addObject:@"Monday"];
-        [dayLabelKeys addObject:@"Tuesday"];
-        [dayLabelKeys addObject:@"Wednesday"];
-        [dayLabelKeys addObject:@"Thursday"];
-        [dayLabelKeys addObject:@"Friday"];
-        [dayLabelKeys addObject:@"Saturday"];
-
-        abbrDayLabelKeys = [[NSMutableArray alloc] initWithCapacity:7];
-        [abbrDayLabelKeys addObject:@"a2_Sunday"];
-        [abbrDayLabelKeys addObject:@"a2_Monday"];
-        [abbrDayLabelKeys addObject:@"a2_Tuesday"];
-        [abbrDayLabelKeys addObject:@"a2_Wednesday"];
-        [abbrDayLabelKeys addObject:@"a2_Thursday"];
-        [abbrDayLabelKeys addObject:@"a2_Friday"];
-        [abbrDayLabelKeys addObject:@"a2_Saturday"];
-
-        monthLabelKeys = [[NSMutableArray alloc] initWithCapacity:12];
-        [monthLabelKeys addObject:@"January"];
-        [monthLabelKeys addObject:@"February"];
-        [monthLabelKeys addObject:@"March"];
-        [monthLabelKeys addObject:@"April"];
-        [monthLabelKeys addObject:@"May"];
-        [monthLabelKeys addObject:@"June"];
-        [monthLabelKeys addObject:@"July"];
-        [monthLabelKeys addObject:@"August"];
-        [monthLabelKeys addObject:@"September"];
-        [monthLabelKeys addObject:@"October"];
-        [monthLabelKeys addObject:@"November"];
-        [monthLabelKeys addObject:@"December"];
-
-        abbrMonthLabelKeys = [[NSMutableArray alloc] initWithCapacity:12];
-        [abbrMonthLabelKeys addObject:@"a3_January"];
-        [abbrMonthLabelKeys addObject:@"a3_February"];
-        [abbrMonthLabelKeys addObject:@"a3_March"];
-        [abbrMonthLabelKeys addObject:@"a3_April"];
-        [abbrMonthLabelKeys addObject:@"a3_May"];
-        [abbrMonthLabelKeys addObject:@"a3_June"];
-        [abbrMonthLabelKeys addObject:@"a3_July"];
-        [abbrMonthLabelKeys addObject:@"a3_August"];
-        [abbrMonthLabelKeys addObject:@"a3_September"];
-        [abbrMonthLabelKeys addObject:@"a3_October"];
-        [abbrMonthLabelKeys addObject:@"a3_November"];
-        [abbrMonthLabelKeys addObject:@"a3_December"];
-    }
+  if (MET == nil) {
+    MET = [[NSTimeZone timeZoneWithAbbreviation:@"MET"] retain];
+    GMT = [[NSTimeZone timeZoneWithAbbreviation:@"GMT"] retain];
+  }
+  if (dayLabelKeys == nil) {
+    dayLabelKeys = [[NSMutableArray alloc] initWithCapacity:7];
+    [dayLabelKeys addObject:@"Sunday"];
+    [dayLabelKeys addObject:@"Monday"];
+    [dayLabelKeys addObject:@"Tuesday"];
+    [dayLabelKeys addObject:@"Wednesday"];
+    [dayLabelKeys addObject:@"Thursday"];
+    [dayLabelKeys addObject:@"Friday"];
+    [dayLabelKeys addObject:@"Saturday"];
+
+    abbrDayLabelKeys = [[NSMutableArray alloc] initWithCapacity:7];
+    [abbrDayLabelKeys addObject:@"a2_Sunday"];
+    [abbrDayLabelKeys addObject:@"a2_Monday"];
+    [abbrDayLabelKeys addObject:@"a2_Tuesday"];
+    [abbrDayLabelKeys addObject:@"a2_Wednesday"];
+    [abbrDayLabelKeys addObject:@"a2_Thursday"];
+    [abbrDayLabelKeys addObject:@"a2_Friday"];
+    [abbrDayLabelKeys addObject:@"a2_Saturday"];
+
+    monthLabelKeys = [[NSMutableArray alloc] initWithCapacity:12];
+    [monthLabelKeys addObject:@"January"];
+    [monthLabelKeys addObject:@"February"];
+    [monthLabelKeys addObject:@"March"];
+    [monthLabelKeys addObject:@"April"];
+    [monthLabelKeys addObject:@"May"];
+    [monthLabelKeys addObject:@"June"];
+    [monthLabelKeys addObject:@"July"];
+    [monthLabelKeys addObject:@"August"];
+    [monthLabelKeys addObject:@"September"];
+    [monthLabelKeys addObject:@"October"];
+    [monthLabelKeys addObject:@"November"];
+    [monthLabelKeys addObject:@"December"];
+
+    abbrMonthLabelKeys = [[NSMutableArray alloc] initWithCapacity:12];
+    [abbrMonthLabelKeys addObject:@"a3_January"];
+    [abbrMonthLabelKeys addObject:@"a3_February"];
+    [abbrMonthLabelKeys addObject:@"a3_March"];
+    [abbrMonthLabelKeys addObject:@"a3_April"];
+    [abbrMonthLabelKeys addObject:@"a3_May"];
+    [abbrMonthLabelKeys addObject:@"a3_June"];
+    [abbrMonthLabelKeys addObject:@"a3_July"];
+    [abbrMonthLabelKeys addObject:@"a3_August"];
+    [abbrMonthLabelKeys addObject:@"a3_September"];
+    [abbrMonthLabelKeys addObject:@"a3_October"];
+    [abbrMonthLabelKeys addObject:@"a3_November"];
+    [abbrMonthLabelKeys addObject:@"a3_December"];
+  }
 }
 
 - (id)init {
   if ((self = [super init])) {
-    self->queryParameters = [[NSMutableDictionary alloc] init];
+    self->queryParameters = [[NSMutableDictionary alloc] initWithCapacity:8];
   }
   return self;
 }
@@ -113,6 +110,7 @@ static BOOL uixDebugEnabled = NO;
   [super dealloc];
 }
 
+/* notifications */
 
 - (void)awake {
   WORequest *req;
@@ -133,6 +131,8 @@ static BOOL uixDebugEnabled = NO;
   }    
 }
 
+/* query parameters */
+
 - (void)_parseQueryString:(NSString *)_s {
   NSEnumerator *e;
   NSString *part;
@@ -175,7 +175,7 @@ static BOOL uixDebugEnabled = NO;
   return self->queryParameters;
 }
 
-- (NSDictionary *)queryParametersBySettingSelectedDate:(NSCalendarDate *)_date {
+- (NSDictionary *)queryParametersBySettingSelectedDate:(NSCalendarDate *)_date{
   NSMutableDictionary *qp;
     
   qp = [[self queryParameters] mutableCopy];
@@ -184,7 +184,7 @@ static BOOL uixDebugEnabled = NO;
 }
 
 - (void)setSelectedDateQueryParameter:(NSCalendarDate *)_newDate
-        inDictionary:(NSMutableDictionary *)_qp;
+                        inDictionary:(NSMutableDictionary *)_qp;
 {
   if(_newDate != nil)
     [_qp setObject:[self dateStringForDate:_newDate] forKey:@"day"];
@@ -251,14 +251,14 @@ static BOOL uixDebugEnabled = NO;
   [cdate setTimeZone:[self viewTimeZone]];
   s = [self queryParameterForKey:@"hm"];
   if([s length] == 4) {
-      unsigned hour, minute;
+    unsigned hour, minute;
       
-      hour = [[s substringToIndex:2] unsignedIntValue];
-      minute = [[s substringFromIndex:2] unsignedIntValue];
-      cdate = [cdate hour:hour minute:minute];
+    hour = [[s substringToIndex:2] unsignedIntValue];
+    minute = [[s substringFromIndex:2] unsignedIntValue];
+    cdate = [cdate hour:hour minute:minute];
   }
   else {
-      cdate = [cdate hour:12 minute:0];
+    cdate = [cdate hour:12 minute:0];
   }
   return cdate;
 }
@@ -277,123 +277,122 @@ static BOOL uixDebugEnabled = NO;
 /* SoUser */
 
 - (SoUser *)user {
-    WOContext *ctx;
-    
-    ctx = [self context];
-    return [[[self clientObject] authenticatorInContext:ctx]
-                                 userInContext:ctx];
+  WOContext *ctx;
+  
+  ctx = [self context];
+  return [[[self clientObject] authenticatorInContext:ctx] userInContext:ctx];
 }
 
 - (NSString *)shortUserNameForDisplay {
-    // TODO: better use a SoUser formatter?
-    NSString *s;
-    NSRange  r;
+  // TODO: better use a SoUser formatter?
+  NSString *s;
+  NSRange  r;
 
 #warning !! USE USER MANAGER INSTEAD!
 
-    s = [[self user] login];
-    if ([s length] < 10)
-        return s;
+  s = [[self user] login];
+  if ([s length] < 10)
+    return s;
     
-    // TODO: algorithm might be inappropriate, depends on the actual UID
+  // TODO: algorithm might be inappropriate, depends on the actual UID
     
-    r = [s rangeOfString:@"."];
-    if (r.length == 0)
-        return s;
+  r = [s rangeOfString:@"."];
+  if (r.length == 0)
+    return s;
     
-    return [s substringToIndex:r.location];
+  return [s substringToIndex:r.location];
 }
 
 /* labels */
 
 - (NSString *)labelForKey:(NSString *)_str {
-    WOResourceManager *rm;
-    NSArray           *languages;
-    WOContext         *ctx;
-    NSString          *label;
-    NSString          *lKey, *lTable, *lVal;
-    NSRange r;
-
-    if ([_str length] == 0) {
-        return nil;
-    }
+  WOResourceManager *rm;
+  NSArray           *languages;
+  WOContext         *ctx;
+  NSString          *label;
+  NSString          *lKey, *lTable, *lVal;
+  NSRange r;
+
+  if ([_str length] == 0) {
+    return nil;
+  }
     
-    /* lookup languages */
+  /* lookup languages */
     
-    ctx = [self context];
-    languages = [ctx hasSession]
-        ? [[ctx session] languages]
-        : [[ctx request] browserLanguages];
+  ctx = [self context];
+  languages = [ctx hasSession]
+    ? [[ctx session] languages]
+    : [[ctx request] browserLanguages];
     
-    /* find resource manager */
+  /* find resource manager */
     
-    if ((rm = [self resourceManager]) == nil)
-        rm = [[WOApplication application] resourceManager];
-    if (rm == nil)
-        [self debugWithFormat:@"WARNING: missing resource manager!"];
+  if ((rm = [self resourceManager]) == nil)
+    rm = [[WOApplication application] resourceManager];
+  if (rm == nil)
+    [self debugWithFormat:@"WARNING: missing resource manager!"];
     
-    /* get parameters */
+  /* get parameters */
     
-    r = [_str rangeOfString:@"/"];
-    if (r.length > 0) {
-        lTable = [_str substringToIndex:r.location];
-        lKey   = [_str substringFromIndex:(r.location + r.length)];
-    }
-    else {
-        lTable = nil;
-        lKey   = _str;
-    }
-    lVal = lKey;
+  r = [_str rangeOfString:@"/"];
+  if (r.length > 0) {
+    lTable = [_str substringToIndex:r.location];
+    lKey   = [_str substringFromIndex:(r.location + r.length)];
+  }
+  else {
+    lTable = nil;
+    lKey   = _str;
+  }
+  lVal = lKey;
 
-    if([lKey hasPrefix:@"$"]) {
-        lKey = [self valueForKeyPath:[lKey substringFromIndex:1]];
-    }
-    if([lTable hasPrefix:@"$"]) {
-        lTable = [self valueForKeyPath:[lTable substringFromIndex:1]];
-    }
+  if([lKey hasPrefix:@"$"]) {
+    lKey = [self valueForKeyPath:[lKey substringFromIndex:1]];
+  }
+  if([lTable hasPrefix:@"$"]) {
+    lTable = [self valueForKeyPath:[lTable substringFromIndex:1]];
+  }
 #if 0
-    if([lVal hasPrefix:@"$"]) {
-        lVal = [self valueForKeyPath:[lVal substringFromIndex:1]];
-    }
+  if([lVal hasPrefix:@"$"]) {
+    lVal = [self valueForKeyPath:[lVal substringFromIndex:1]];
+  }
 #endif
-    /* lookup string */
+  /* lookup string */
     
-    label = [rm stringForKey:lKey inTableNamed:lTable withDefaultValue:lVal
-                languages:languages];
-    return label;
+  label = [rm stringForKey:lKey inTableNamed:lTable withDefaultValue:lVal
+             languages:languages];
+  return label;
 }
 
 - (NSString *)localizedNameForDayOfWeek:(unsigned)_dayOfWeek {
-    NSString *key =  [dayLabelKeys objectAtIndex:_dayOfWeek % 7];
-    return [self labelForKey:key];
+  NSString *key =  [dayLabelKeys objectAtIndex:_dayOfWeek % 7];
+  return [self labelForKey:key];
 }
 
 - (NSString *)localizedAbbreviatedNameForDayOfWeek:(unsigned)_dayOfWeek {
-    NSString *key =  [abbrDayLabelKeys objectAtIndex:_dayOfWeek % 7];
-    return [self labelForKey:key];
+  NSString *key =  [abbrDayLabelKeys objectAtIndex:_dayOfWeek % 7];
+  return [self labelForKey:key];
 }
 
 - (NSString *)localizedNameForMonthOfYear:(unsigned)_monthOfYear {
-    NSString *key =  [monthLabelKeys objectAtIndex:(_monthOfYear - 1) % 12];
-    return [self labelForKey:key];
+  NSString *key =  [monthLabelKeys objectAtIndex:(_monthOfYear - 1) % 12];
+  return [self labelForKey:key];
 }
 
 - (NSString *)localizedAbbreviatedNameForMonthOfYear:(unsigned)_monthOfYear {
-    NSString *key =  [abbrMonthLabelKeys objectAtIndex:(_monthOfYear - 1) % 12];
-    return [self labelForKey:key];
+  NSString *key =  [abbrMonthLabelKeys objectAtIndex:(_monthOfYear - 1) % 12];
+  return [self labelForKey:key];
 }
 
 /* locale */
 
 - (NSDictionary *)locale {
-    /* we need no fallback here, as locale is guaranteed to be set by sogod */
-    return [[self context] valueForKey:@"locale"];
+  /* we need no fallback here, as locale is guaranteed to be set by sogod */
+  return [[self context] valueForKey:@"locale"];
 }
 
-/* Debugging */
+/* debugging */
 
 - (BOOL)isUIxDebugEnabled {
-    return uixDebugEnabled;
+  return uixDebugEnabled;
 }
 
 @end /* UIxComponent */
index c351558f441a4d159527ee99c46d76a467ff4349..92c8fa08c38f073a34665a077f87e34ece0ab9e3 100644 (file)
@@ -1,3 +1,3 @@
 # $Id$
 
-SUBMINOR_VERSION:=11
+SUBMINOR_VERSION:=13