Monotone-Parent: 2ad8b0c019808014c990f51cc69c4457fdb537c6

Monotone-Revision: 61fac9029e457f9cc05094b5b33563346e02db6b

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-07-28T23:25:34
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-07-28 23:25:34 +00:00
parent 39228fb130
commit f3fecadaa3
3 changed files with 123 additions and 0 deletions

View File

@@ -1,5 +1,9 @@
2006-07-28 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MailerUI/UIxMailFolderMenu.m: a descendent of UIxMailTree
which returns the nodes for the parent specified in "parentMenu".
Used to generate the javascript code for the folder dtree.
* UI/Templates/MailerUI/UIxMailPanelFrame.wox: the components
using that container-template are now using UIxMailMainFrame
since UIxMailPanelFrame had no real interest. File removed.

View File

@@ -0,0 +1,46 @@
/* UIxMailFolderMenu.h - this file is part of SOGo
*
* Copyright (C) 2006 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 UIXMAILFOLDERMENU_H
#define UIXMAILFOLDERMENU_H
#import "UIxMailTree.h"
@class NSArray;
@interface UIxMailFolderMenu : UIxMailTree
{
NSString *menuId;
NSString *parentMenu;
}
- (void) setMenuId: (NSString *) newMenuId;
- (NSString *) menuId;
- (void) setParentMenu: (NSString *) newParentMenu;
- (NSString *) parentMenu;
- (NSArray *) levelledNodes;
@end
#endif /* UIXMAILFOLDERMENU_H */

View File

@@ -0,0 +1,73 @@
/* UIxMailFolderMenu.m - this file is part of SOGo
*
* Copyright (C) 2006 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/NSArray.h>
#import <Foundation/NSString.h>
#import "UIxMailTreeBlock.h"
#import "UIxMailFolderMenu.h"
@implementation UIxMailFolderMenu
- (void) setMenuId: (NSString *) newMenuId
{
menuId = newMenuId;
}
- (NSString *) menuId
{
return menuId;
}
- (void) setParentMenu: (NSString *) newParentMenu
{
parentMenu = newParentMenu;
}
- (NSString *) parentMenu
{
return parentMenu;
}
- (NSArray *) levelledNodes
{
NSEnumerator *nodes;
NSMutableArray *levelledNodes;
UIxMailTreeBlock *block;
levelledNodes = [NSMutableArray new];
[levelledNodes autorelease];
nodes = [[self flattenedNodes] objectEnumerator];
block = [nodes nextObject];
while (block)
{
if ([block parent] == [parentMenu intValue])
[levelledNodes addObject: block];
block = [nodes nextObject];
}
return levelledNodes;
}
@end