Skip to content

Instantly share code, notes, and snippets.

@crafterm
Created August 23, 2009 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crafterm/173078 to your computer and use it in GitHub Desktop.
Save crafterm/173078 to your computer and use it in GitHub Desktop.
Index: MGScopeBar.h
===================================================================
--- MGScopeBar.h (revision 42)
+++ MGScopeBar.h (working copy)
@@ -18,7 +18,7 @@
NSMutableDictionary *_identifiers; // map of identifiers to items.
NSMutableArray *_selectedItems; // all selected items in all groups; see note below.
float _lastWidth; // previous width of view from when we last resized.
- int _firstCollapsedGroup; // index of first group collapsed into a popup.
+ NSInteger _firstCollapsedGroup; // index of first group collapsed into a popup.
float _totalGroupsWidthForPopups; // total width needed to show all groups expanded (excluding padding and accessory).
float _totalGroupsWidth; // total width needed to show all groups as native-width popups (excluding padding and accessory).
BOOL _smartResizeEnabled; // whether to do our clever collapsing/expanding of buttons when resizing (Smart Resizing).
Index: MGScopeBar.m
===================================================================
--- MGScopeBar.m (revision 42)
+++ MGScopeBar.m (working copy)
@@ -358,7 +358,7 @@
}
BOOL shouldAdjustPopups = (availableWidth < _totalGroupsWidthForPopups);
- int oldFirstCollapsedGroup = _firstCollapsedGroup;
+ NSInteger oldFirstCollapsedGroup = _firstCollapsedGroup;
// Work out which groups we should now check for collapsibility/expandability.
NSEnumerator *groupsEnumerator = nil;
@@ -490,7 +490,7 @@
// If a change is required, ensure that each group is expanded or contracted as appropriate.
if (adjusting || shouldAdjustPopups) {
//NSLog(@"Got %@ - modifying groups %@", ((narrower) ? @"narrower" : @"wider"), NSStringFromRange(changedRange));
- int nextXCoord = NSNotFound;
+ NSInteger nextXCoord = NSNotFound;
if (adjusting) {
for (int i = changedRange.location; i < NSMaxRange(changedRange); i++) {
NSMutableDictionary *groupInfo = [_groups objectAtIndex:i];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment