mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-05 05:18:51 +00:00
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:
@@ -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.
|
||||
|
||||
46
UI/MailerUI/UIxMailFolderMenu.h
Normal file
46
UI/MailerUI/UIxMailFolderMenu.h
Normal 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 */
|
||||
73
UI/MailerUI/UIxMailFolderMenu.m
Normal file
73
UI/MailerUI/UIxMailFolderMenu.m
Normal 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
|
||||
Reference in New Issue
Block a user