]> err.no Git - scalable-opengroupware.org/commitdiff
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1122 d1b88da0-ebda-0310...
authorwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 27 Jul 2007 17:31:39 +0000 (17:31 +0000)
committerwolfgang <wolfgang@d1b88da0-ebda-0310-925b-ed51d893ca5b>
Fri, 27 Jul 2007 17:31:39 +0000 (17:31 +0000)
UI/MailerUI/GNUmakefile
UI/MailerUI/UIxMailEditorAttach.m [deleted file]
UI/MailerUI/UIxMailFilterPanel.m
UI/MailerUI/UIxMailMainFrame.m
UI/MailerUI/UIxMailView.m
UI/MailerUI/UIxMailWindowCloser.m
UI/MailerUI/UIxSubjectFormatter.m
UI/MailerUI/WOContext+UIxMailer.h
UI/MailerUI/WOContext+UIxMailer.m
UI/MailerUI/common.h [deleted file]
UI/MailerUI/product.plist

index 38ee9ab77de733d5917ad05e9df5fba4f3912b0e..0fb3d52a1d3f1c11028e3fcb585ddc39c668f90c 100644 (file)
@@ -28,15 +28,14 @@ MailerUI_OBJC_FILES += \
        UIxMailAccountActions.m         \
        UIxMailFolderActions.m          \
        UIxMailEditor.m                 \
-       UIxMailEditorAttach.m           \
        UIxMailEditorAction.m           \
        UIxMailReplyAction.m            \
        UIxMailForwardAction.m          \
        UIxMailToSelection.m            \
        UIxMailWindowCloser.m           \
        \
-       UIxFilterList.m                 \
-       \
+#      UIxFilterList.m                 \
+#      \
        UIxMailUserRightsEditor.m
 #      UIxSieveEditor.m
 
diff --git a/UI/MailerUI/UIxMailEditorAttach.m b/UI/MailerUI/UIxMailEditorAttach.m
deleted file mode 100644 (file)
index 3be38fe..0000000
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
-  Copyright (C) 2004-2005 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.
-*/
-
-#include <SOGoUI/UIxComponent.h>
-
-/*
-  UIxMailEditorAction
-  
-  An mail editor component which works on SOGoDraftObject's. This component
-  manages the attachments of a draft object.
-*/
-
-@class NSArray, NSString, NSData;
-
-@interface UIxMailEditorAttach : UIxComponent
-{
-  NSString *filePath1;
-  NSString *filePath2;
-  NSString *filePath3;
-  NSData   *fileData1;
-  NSData   *fileData2;
-  NSData   *fileData3;
-  NSString *attachmentName;
-
-  NSArray *attachmentNames;
-}
-
-@end
-
-#include <SoObjects/Mailer/SOGoDraftObject.h>
-#include "common.h"
-
-@implementation UIxMailEditorAttach
-
-- (void)dealloc {
-  [self->attachmentNames release];
-  [self->attachmentName release];
-  [self->filePath1 release];
-  [self->filePath2 release];
-  [self->filePath3 release];
-  [self->fileData1 release];
-  [self->fileData2 release];
-  [self->fileData3 release];
-  [super dealloc];
-}
-
-/* accessors */
-
-- (void)setAttachmentName:(NSString *)_value {
-  ASSIGNCOPY(self->attachmentName, _value);
-}
-- (NSString *)attachmentName {
-  return self->attachmentName;
-}
-
-- (void)setFilePath1:(NSString *)_value {
-  ASSIGNCOPY(self->filePath1, _value);
-}
-- (NSString *)filePath1 {
-  return self->filePath1;
-}
-
-- (void)setFilePath2:(NSString *)_value {
-  ASSIGNCOPY(self->filePath2, _value);
-}
-- (NSString *)filePath2 {
-  return self->filePath2;
-}
-
-- (void)setFilePath3:(NSString *)_value {
-  ASSIGNCOPY(self->filePath3, _value);
-}
-- (NSString *)filePath3 {
-  return self->filePath3;
-}
-
-- (void)setFileData1:(NSData *)_data {
-  ASSIGN(self->fileData1, _data);
-}
-- (NSData *)fileData1 {
-  return self->fileData1;
-}
-
-- (void)setFileData2:(NSData *)_data {
-  ASSIGN(self->fileData2, _data);
-}
-- (NSData *)fileData2 {
-  return self->fileData2;
-}
-
-- (void)setFileData3:(NSData *)_data {
-  ASSIGN(self->fileData3, _data);
-}
-- (NSData *)fileData3 {
-  return self->fileData3;
-}
-
-- (NSArray *)attachmentNames {
-  NSArray *a;
-
-  if (self->attachmentNames != nil)
-    return self->attachmentNames;
-  
-  a = [[self clientObject] fetchAttachmentNames];
-  a = [a sortedArrayUsingSelector:@selector(compare:)];
-  self->attachmentNames = [a copy];
-  return self->attachmentNames;
-}
-- (BOOL)hasAttachments {
-  return [[self attachmentNames] count] > 0 ? YES : NO;
-}
-
-/* requests */
-
-- (BOOL)shouldTakeValuesFromRequest:(WORequest *)_rq inContext:(WOContext*)_c{
-  return YES;
-}
-
-/* operations */
-
-- (NSString *)defaultPathExtension {
-  return @"txt";
-}
-
-- (NSString *)newAttachmentName {
-  NSArray  *usedNames;
-  unsigned i;
-  
-  usedNames = [[self clientObject] fetchAttachmentNames];
-  for (i = [usedNames count]; i < 100; i++) {
-    NSString *name;
-    
-    name = [NSString stringWithFormat:@"attachment%d", i];
-    if (![usedNames containsObject:name])
-      return name;
-  }
-  [self errorWithFormat:@"too many attachments?!"];
-  return nil;
-}
-
-- (NSString *)fixupAttachmentName:(NSString *)_name {
-  NSString *pe;
-  NSRange r;
-
-  if (_name == nil)
-    return  nil;
-  
-  pe = [_name pathExtension];
-  if ([pe length] == 0)
-    /* would be better to check the content-type, but well */
-    pe = [self defaultPathExtension];
-  
-  r = [_name rangeOfString:@"/"];
-  if (r.length > 0) _name = [_name lastPathComponent];
-  
-  r = [_name rangeOfString:@" "];
-  if (r.length > 0) 
-    _name = [_name stringByReplacingString:@" " withString:@"_"];
-  
-  if ([_name hasPrefix:@"."]) {
-    _name = [@"dotfile-" stringByAppendingString:
-               [_name substringFromIndex:1]];
-  }
-  
-  // TODO: should we need to check for umlauts?
-  
-  if ([_name length] == 0)
-    return [[self newAttachmentName] stringByAppendingPathExtension:pe];
-  
-  return _name;
-}
-
-- (BOOL)saveFileData:(NSData *)_data name:(NSString *)_name {
-  NSException *error;
-  
-  if (_data == nil)
-    return NO;
-  if ([_name length] == 0) {
-    _name = [self newAttachmentName];
-    _name = [_name stringByAppendingPathExtension:[self defaultPathExtension]];
-  }
-  
-  if ((_name = [self fixupAttachmentName:_name]) == nil)
-    return NO;
-  
-  // TODO: add size limit?
-  error = [[self clientObject] saveAttachment:_data withName:_name];
-  if (error != nil) {
-    [self logWithFormat:@"ERROR: could not save: %@", error];
-    return NO;
-  }
-  return YES;
-}
-
-/* actions */
-
-- (id)viewAttachmentsAction {
-  [self debugWithFormat:@"view attachments ..."];
-  return self;
-}
-
-- (id)attachAction {
-  BOOL ok;
-  
-  ok = YES;
-  if ([self->fileData1 length] > 0)
-    ok = [self saveFileData:self->fileData1 name:[self filePath1]];
-  if (ok && [self->fileData2 length] > 0)
-    ok = [self saveFileData:self->fileData2 name:[self filePath2]];
-  if (ok && [self->fileData3 length] > 0)
-    [self saveFileData:self->fileData3 name:[self filePath3]];
-  
-  if (!ok) {
-    // TODO: improve error handling
-    return [NSException exceptionWithHTTPStatus:500 /* server error */
-                       reason:@"failed to save attachment ..."];
-  }
-  
-  return [self redirectToLocation:@"viewAttachments"];
-}
-
-- (id)deleteAttachmentAction {
-  NSException *error;
-
-  error = [[self clientObject] deleteAttachmentWithName:[self attachmentName]];
-  
-  if (error != nil)
-    return error;
-  
-  return [self redirectToLocation:@"viewAttachments"];
-}
-
-@end /* UIxMailEditorAttach */
index a28dd8000d6f694904d4cd135bb6c6f5f9b8f401..ea38b7ed1b831b8020d310410a2a529b5392a173 100644 (file)
  02111-1307, USA.
  */
 
-#include <NGObjWeb/WOComponent.h>
+#import <NGObjWeb/WOContext.h>
+#import <NGObjWeb/WORequest.h>
+#import <EOControl/EOQualifier.h>
+#import <NGObjWeb/WOComponent.h>
 
 @interface UIxMailFilterPanel : WOComponent
 {
@@ -29,9 +32,6 @@
 
 @end
 
-#include <SOGoUI/UIxComponent.h>
-#include "common.h"
-
 @implementation UIxMailFilterPanel
 
 static NSArray *filters = nil;
index 43997a083fc4bfbd19de0008bd5c42bc8bdfb257..4c3e3bf23b0eeb2487defa74d24267c5ff3d301e 100644 (file)
   02111-1307, USA.
 */
 
+#import <Foundation/NSUserDefaults.h>
+#import <NGObjWeb/WORequest.h>
+#import <NGObjWeb/SoComponent.h>
+#import <NGExtensions/NSString+misc.h>
+
 #import <SoObjects/Mailer/SOGoMailObject.h>
 #import <SoObjects/Mailer/SOGoMailAccounts.h>
 #import <SoObjects/SOGo/NSString+Utilities.h>
 #import <SoObjects/SOGo/NSObject+Utilities.h>
 #import <SOGoUI/UIxComponent.h>
-#import "UIxMailMainFrame.h"
 
-#import "common.h"
-#import <NGObjWeb/SoComponent.h>
+#import "UIxMailMainFrame.h"
 
 @implementation UIxMailMainFrame
 
index de312aa8d6e818a9027052f77f439f3493569bd4..ecd299dbeab5daa2397d7cd5de9e4b87fa4d8a9b 100644 (file)
 */
 
 #import <Foundation/NSException.h>
+#import <Foundation/NSUserDefaults.h>
+#import <NGObjWeb/NSException+HTTP.h>
+#import <NGObjWeb/WORequest.h>
+#import <NGObjWeb/WOResponse.h>
 #import <NGExtensions/NSException+misc.h>
+#import <NGExtensions/NSString+misc.h>
+#import <NGImap4/NGImap4Envelope.h>
+#import <NGImap4/NGImap4EnvelopeAddress.h>
+#import <SoObjects/Mailer/SOGoMailObject.h>
+#import <SoObjects/Mailer/SOGoMailAccount.h>
+#import <SoObjects/Mailer/SOGoMailFolder.h>
+#import <SOGoUI/UIxComponent.h>
+#import <MailPartViewers/UIxMailRenderingContext.h> // cyclic
 
-#include <SOGoUI/UIxComponent.h>
+#import "WOContext+UIxMailer.h"
 
 @interface UIxMailView : UIxComponent
 {
 
 @end
 
-#include <UI/MailPartViewers/UIxMailRenderingContext.h> // cyclic
-#include "WOContext+UIxMailer.h"
-#include <SoObjects/Mailer/SOGoMailObject.h>
-#include <SoObjects/Mailer/SOGoMailAccount.h>
-#include <SoObjects/Mailer/SOGoMailFolder.h>
-#include <NGImap4/NGImap4Envelope.h>
-#include <NGImap4/NGImap4EnvelopeAddress.h>
-#include "common.h"
-
 @implementation UIxMailView
 
 static NSString *mailETag = nil;
index cb80f477ab669884f62c4fb20f699f4a37903011..b079dbf87ae90386402e570823d9af73d7a97c1f 100644 (file)
@@ -19,7 +19,7 @@
   02111-1307, USA.
 */
 
-#include <NGObjWeb/NGObjWeb.h>
+#import <NGObjWeb/WOComponent.h>
 
 @interface UIxMailWindowCloser : WOComponent
 {
 
 @end
 
-#include "common.h"
-
 @implementation UIxMailWindowCloser
 
 - (void)setRefreshOpener:(BOOL)_flag {
-  self->refreshOpener = _flag;
+  refreshOpener = _flag;
 }
 - (BOOL)refreshOpener {
-  return self->refreshOpener;
+  return refreshOpener;
 }
 
 - (NSString *)refreshOpenerScript {
index 683fd3ade2b59c46ff8fae39d4e16bd4cb0f2595..784c3a9377bd4370ecdae47bda114ed30262f265 100644 (file)
   02111-1307, USA.
 */
 
-#include "UIxMailFormatter.h"
-#include "common.h"
+#import <NGExtensions/NSNull+misc.h>
+#import <NGExtensions/NSObject+Logs.h>
+#import <NGMail/NGMimeMessageParser.h>
 
-#include <NGMail/NGMimeMessageParser.h>
+#import "UIxMailFormatter.h"
 
 @implementation UIxSubjectFormatter
 
index 483db2a460f51719e74cccc9c41fabbe054734f6..05e94d29f37997a9cf23625289d1162b6c133833 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __Mailer_WOContext_UIxMailer_H__
 #define __Mailer_WOContext_UIxMailer_H__
 
-#include <NGObjWeb/WOContext.h>
+#import <NGObjWeb/WOContext.h>
 
 /*
   WOContext(UIxMailer)
index 504e9be975b8581695d2968557667b991f0a159b..fbe50299711fc759169f6c85bee9de26d14f5d5e 100644 (file)
 */
 
 
+#import <NGObjWeb/WOContext+SoObjects.h>
 #import <SoObjects/SOGo/SOGoDateFormatter.h>
 #import <SoObjects/SOGo/SOGoUser.h>
 
 #import "UIxMailFormatter.h"
-#import "common.h"
 
 #import "WOContext+UIxMailer.h"
 
diff --git a/UI/MailerUI/common.h b/UI/MailerUI/common.h
deleted file mode 100644 (file)
index ca5c226..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-  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.
-*/
-
-#warning importing common is baaaad
-#import <Foundation/Foundation.h>
-
-#if LIB_FOUNDATION_LIBRARY
-#  include <Foundation/exceptions/GeneralExceptions.h>
-#elif NeXT_Foundation_LIBRARY || COCOA_Foundation_LIBRARY
-#  include <NGExtensions/NGObjectMacros.h>
-#  include <NGExtensions/NSString+Ext.h>
-#endif
-
-#include <NGExtensions/NGExtensions.h>
-#include <NGObjWeb/NGObjWeb.h>
-#include <NGObjWeb/SoObjects.h>
index 44a84862ece6f521846ca4de34e601228f74c4fb..d8418c3a938f59021fd59e4058bbaf5267dace79 100644 (file)
@@ -354,7 +354,6 @@ categories = {
         edit = {
            protectedBy = "View";
            pageName    = "UIxMailEditor";
-           actionName  = "edit";
         };
         save = {
            protectedBy = "View";