mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
add nspopupbutton to nsmenu conditional to get itemArray
This commit is contained in:
parent
3d373f450a
commit
14e64ef759
1 changed files with 20 additions and 16 deletions
|
@ -3343,25 +3343,29 @@ static void _real_close(GormDocument *self,
|
|||
if ([obj respondsToSelector: @selector(title)])
|
||||
{
|
||||
NSString *title = [obj title];
|
||||
NSXMLElement *transunit = [NSXMLNode elementWithName: @"trans-unit"];
|
||||
NSString *objId = [NSString stringWithFormat: @"%@.title", name];
|
||||
|
||||
attr = [NSXMLNode attributeWithName: @"ib:key-path-category"
|
||||
stringValue: @"string"];
|
||||
[transunit addAttribute: attr];
|
||||
attr = [NSXMLNode attributeWithName: @"ib:key-path" stringValue: @"title"];
|
||||
[transunit addAttribute: attr];
|
||||
attr = [NSXMLNode attributeWithName: @"id" stringValue: objId];
|
||||
[transunit addAttribute: attr];
|
||||
[group addChild: transunit];
|
||||
|
||||
NSXMLElement *source = [NSXMLNode elementWithName: @"source"];
|
||||
[source setStringValue: title];
|
||||
[transunit addChild: source];
|
||||
if (title != nil)
|
||||
{
|
||||
NSXMLElement *transunit = [NSXMLNode elementWithName: @"trans-unit"];
|
||||
NSString *objId = [NSString stringWithFormat: @"%@.title", name];
|
||||
|
||||
attr = [NSXMLNode attributeWithName: @"ib:key-path-category"
|
||||
stringValue: @"string"];
|
||||
[transunit addAttribute: attr];
|
||||
attr = [NSXMLNode attributeWithName: @"ib:key-path" stringValue: @"title"];
|
||||
[transunit addAttribute: attr];
|
||||
attr = [NSXMLNode attributeWithName: @"id" stringValue: objId];
|
||||
[transunit addAttribute: attr];
|
||||
[group addChild: transunit];
|
||||
|
||||
NSXMLElement *source = [NSXMLNode elementWithName: @"source"];
|
||||
[source setStringValue: title];
|
||||
[transunit addChild: source];
|
||||
}
|
||||
}
|
||||
|
||||
// For each different class, recurse through the structure as needed.
|
||||
if ([obj isKindOfClass: [NSMenu class]])
|
||||
if ([obj isKindOfClass: [NSMenu class]] ||
|
||||
[obj isKindOfClass: [NSPopUpButton class]])
|
||||
{
|
||||
NSArray *items = [obj itemArray];
|
||||
NSEnumerator *en = [items objectEnumerator];
|
||||
|
|
Loading…
Reference in a new issue