Author: mlytwyn
Date: Fri Mar 10 19:14:37 2017
New Revision: 40378

URL: http://svn.gna.org/viewcvs/gnustep?rev=40378&view=rev
Log:
Fix segmented control/cell loading for labels/images

Modified:
    libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m

Modified: 
libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m?rev=40378&r1=40377&r2=40378&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m   
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/GSXib5KeyedUnarchiver.m   
Fri Mar 10 19:14:37 2017
@@ -325,6 +325,8 @@
                                                    @"tabStops"                 
     : @"NSMutableArray",
                                                    
@"userDefinedRuntimeAttributes"  : @"NSMutableArray",
                                                    @"resources"                
     : @"NSMutableArray",
+                                                   @"segments"                 
     : @"NSMutableArray",
+                                                   @"segment"                  
     : @"NSSegmentItem",
                                                    @"customObject"             
     : @"NSCustomObject5",
                                                    
@"userDefinedRuntimeAttribute"   : @"IBUserDefinedRuntimeAttribute5",
                                                    //@"outlet"                 
       : @"IBOutletConnection5",
@@ -389,7 +391,10 @@
                                 @"NSInsertionColor"                 : 
@"insertionPointColor",
                                 @"NSIsVertical"                     : 
@"vertical",
                                 @"NSSelectedTabViewItem"            : 
@"initialItem",
-                                @"NSControlAllowsExpansionToolTips" : 
@"allowsExpansionToolTips" };
+                                @"NSControlAllowsExpansionToolTips" : 
@"allowsExpansionToolTips",
+                                @"NSSegmentImages"                  : 
@"segments",
+                                @"NSSegmentItemLabel"               : @"label",
+                                @"NSSegmentItemImage"               : @"image" 
};
             RETAIN(XmlKeyMapTable);
             
             // These define keys that are alwasy "CONTAINED" since they 
typically are a combination of key values
@@ -491,7 +496,8 @@
                                             @"NSWhite"                    : 
@"decodeColorWhiteForElement:",
                                             @"NSRGB"                      : 
@"decodeColorRGBForElement:",
                                             @"NSColorSpace"               : 
@"decodeColorSpaceForElement:",
-                                            @"NSCYMK"                     : 
@"decodeColorCYMKForElement:" };
+                                            @"NSCYMK"                     : 
@"decodeColorCYMKForElement:",
+                                            @"NSSegmentItemImage"         : 
@"decodeSegmentItemImageForElement:"};
             RETAIN(XmlKeyToDecoderSelectorMap);
         }
     }
@@ -2471,6 +2477,22 @@
               object = [NSImage imageNamed: @"NSSwitch"];
             }
         }
+    }
+#if defined(DEBUG_XIB5)
+  NSWarnMLog(@"object: %@", object);
+#endif
+  
+  return object;
+}
+
+#pragma mark - NSegmentedControl/NSSegmentedCell...
+- (id) decodeSegmentItemImageForElement: (GSXib5Element*)element
+{
+  id object = nil;
+  
+  if ([element attributeForKey: @"image"])
+    {
+      object = [NSImage imageNamed: [element attributeForKey: @"image"]];
     }
 #if defined(DEBUG_XIB5)
   NSWarnMLog(@"object: %@", object);


_______________________________________________
Gnustep-cvs mailing list
Gnustep-cvs@gna.org
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to