Author: dpsimons
Date: Fri Jul 17 00:26:17 2015
New Revision: 38812

URL: http://svn.gna.org/viewcvs/gnustep?rev=38812&view=rev
Log:
add userInfo in resize notifications, as added in OSX 10.5

Modified:
    libs/gui/branches/gnustep_testplant_branch/ChangeLog
    libs/gui/branches/gnustep_testplant_branch/Source/NSSplitView.m

Modified: libs/gui/branches/gnustep_testplant_branch/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/ChangeLog?rev=38812&r1=38811&r2=38812&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/ChangeLog        (original)
+++ libs/gui/branches/gnustep_testplant_branch/ChangeLog        Fri Jul 17 
00:26:17 2015
@@ -1,3 +1,8 @@
+2015-07-16  Doug Simons <[email protected]>
+
+       * Source/NSSplitView.m: Add userInfo dictionary containing the
+       divider number in resize notifications, as added in OSX 10.5.
+
 2015-07-02  Doug Simons <[email protected]>
 
        * Source/NSTableView.m: Changed click and double-click behavior
@@ -6,7 +11,7 @@
        doubleAction if there is one, and only begin editing if there is
        no doubleAction assigned.
 
-       2015-07-01  Doug Simons <[email protected]>
+2015-07-01  Doug Simons <[email protected]>
 
        * Source/NSTextStorage.m: Fixed a bug with setting _editedRange for
        multiple edits when the first one is a delete (which results in

Modified: libs/gui/branches/gnustep_testplant_branch/Source/NSSplitView.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/gui/branches/gnustep_testplant_branch/Source/NSSplitView.m?rev=38812&r1=38811&r2=38812&view=diff
==============================================================================
--- libs/gui/branches/gnustep_testplant_branch/Source/NSSplitView.m     
(original)
+++ libs/gui/branches/gnustep_testplant_branch/Source/NSSplitView.m     Fri Jul 
17 00:26:17 2015
@@ -325,12 +325,13 @@
 - (void) _resize: (id) v withOldSplitView: (id) prev
    withFrame: (NSRect) r fromPoint: (NSPoint) p
    withBigRect: (NSRect) bigRect divHorizontal: (CGFloat) divHorizontal
-   divVertical: (CGFloat) divVertical
+   divVertical: (CGFloat) divVertical userInfo:(NSDictionary *)userInfo
 {
   NSRect r1 = NSZeroRect;
 
   [nc postNotificationName: NSSplitViewWillResizeSubviewsNotification
-                    object: self];
+                    object: self
+                                 userInfo: userInfo];
 
   /* resize the subviews accordingly */
   r = [prev frame];
@@ -387,7 +388,8 @@
              (int)NSHeight(r1));
 
   [nc postNotificationName: NSSplitViewDidResizeSubviewsNotification
-                    object: self];
+                    object: self
+                                 userInfo: userInfo];
 
 }
 
@@ -424,6 +426,7 @@
   NSRect oldRect; //only one can be dragged at a time
   BOOL lit = NO;
   NSCursor *cursor;
+  NSDictionary *userInfo = nil; // userInfo for resize notifications
 
   /*  if there are less the two subviews, there is nothing to do */
   if (count < 2)
@@ -615,6 +618,7 @@
       // Save the old position
       op = p;
     }
+  userInfo = [NSDictionary dictionaryWithObject:[NSNumber 
numberWithInt:offset] forKey:@"NSSplitViewDividerIndex"];
 
   // user is moving the knob loop until left mouse up
   while ([e type] != NSLeftMouseUp)
@@ -714,7 +718,7 @@
             {
               [self _resize: v withOldSplitView: prev withFrame: r fromPoint: 
p 
                 withBigRect: bigRect divHorizontal: divHorizontal
-                divVertical: divVertical];
+                divVertical: divVertical userInfo:userInfo];
               [_window invalidateCursorRectsForView: self];
               [self setNeedsDisplay: YES];
             }
@@ -740,7 +744,7 @@
         {
           [self _resize: v withOldSplitView: prev withFrame: r fromPoint: p 
             withBigRect: bigRect divHorizontal: divHorizontal
-            divVertical: divVertical];
+            divVertical: divVertical userInfo:userInfo];
           [_window invalidateCursorRectsForView: self];
         }
     }


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to