@@ -38,12 +38,12 @@ class BranchesView : Subview
38
38
private bool showLocalBranches = true ;
39
39
private bool showRemoteBranches = true ;
40
40
41
- [ NonSerialized ] private List < BranchTreeNode > favourites = new List < BranchTreeNode > ( ) ;
41
+ [ NonSerialized ] private List < BranchTreeNode > favorites = new List < BranchTreeNode > ( ) ;
42
42
[ NonSerialized ] private int listID = - 1 ;
43
43
[ NonSerialized ] private List < GitBranch > newLocalBranches ;
44
44
[ NonSerialized ] private BranchTreeNode newNodeSelection ;
45
45
[ NonSerialized ] private BranchesMode targetMode ;
46
- [ NonSerialized ] private bool favouritesHasChanged ;
46
+ [ NonSerialized ] private bool favoritesHasChanged ;
47
47
48
48
[ SerializeField ] private BranchTreeNode activeBranchNode ;
49
49
[ SerializeField ] private BranchTreeNode localRoot ;
@@ -52,7 +52,7 @@ class BranchesView : Subview
52
52
[ SerializeField ] private List < Remote > remotes = new List < Remote > ( ) ;
53
53
[ SerializeField ] private Vector2 scroll ;
54
54
[ SerializeField ] private BranchTreeNode selectedNode ;
55
- private List < string > favouritesList ;
55
+ private List < string > favoritesList ;
56
56
57
57
public override void InitializeView ( IView parent )
58
58
{
@@ -64,7 +64,7 @@ public override void OnEnable()
64
64
{
65
65
base . OnEnable ( ) ;
66
66
AttachHandlers ( Repository ) ;
67
- favouritesHasChanged = true ;
67
+ favoritesHasChanged = true ;
68
68
}
69
69
70
70
public override void OnDisable ( )
@@ -81,10 +81,10 @@ public override void OnDataUpdate()
81
81
82
82
private void MaybeUpdateData ( )
83
83
{
84
- if ( favouritesHasChanged )
84
+ if ( favoritesHasChanged )
85
85
{
86
- favouritesList = Manager . LocalSettings . Get ( FavoritesSetting , new List < string > ( ) ) ;
87
- favouritesHasChanged = false ;
86
+ favoritesList = Manager . LocalSettings . Get ( FavoritesSetting , new List < string > ( ) ) ;
87
+ favoritesHasChanged = false ;
88
88
}
89
89
}
90
90
@@ -160,17 +160,17 @@ public void OnEmbeddedGUI()
160
160
161
161
GUILayout . BeginVertical ( Styles . CommitFileAreaStyle ) ;
162
162
{
163
- // Favourites list
164
- if ( favourites . Count > 0 )
163
+ // Favorites list
164
+ if ( favorites . Count > 0 )
165
165
{
166
166
GUILayout . Label ( FavoritesTitle ) ;
167
167
GUILayout . BeginHorizontal ( ) ;
168
168
{
169
169
GUILayout . BeginVertical ( ) ;
170
170
{
171
- for ( var index = 0 ; index < favourites . Count ; ++ index )
171
+ for ( var index = 0 ; index < favorites . Count ; ++ index )
172
172
{
173
- OnTreeNodeGUI ( favourites [ index ] ) ;
173
+ OnTreeNodeGUI ( favorites [ index ] ) ;
174
174
}
175
175
}
176
176
@@ -264,12 +264,12 @@ public void OnEmbeddedGUI()
264
264
265
265
private int CompareBranches ( GitBranch a , GitBranch b )
266
266
{
267
- if ( IsFavourite ( a . Name ) )
267
+ if ( IsFavorite ( a . Name ) )
268
268
{
269
269
return - 1 ;
270
270
}
271
271
272
- if ( IsFavourite ( b . Name ) )
272
+ if ( IsFavorite ( b . Name ) )
273
273
{
274
274
return 1 ;
275
275
}
@@ -287,9 +287,9 @@ private int CompareBranches(GitBranch a, GitBranch b)
287
287
return 0 ;
288
288
}
289
289
290
- private bool IsFavourite ( string branchName )
290
+ private bool IsFavorite ( string branchName )
291
291
{
292
- return ! String . IsNullOrEmpty ( branchName ) && favouritesList . Contains ( branchName ) ;
292
+ return ! String . IsNullOrEmpty ( branchName ) && favoritesList . Contains ( branchName ) ;
293
293
}
294
294
295
295
private void OnLocalBranchesUpdate ( IEnumerable < GitBranch > list )
@@ -318,8 +318,8 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
318
318
var tracking = new List < KeyValuePair < int , int > > ( ) ;
319
319
var localBranchNodes = new List < BranchTreeNode > ( ) ;
320
320
321
- // Prepare for updated favourites listing
322
- favourites . Clear ( ) ;
321
+ // Prepare for updated favorites listing
322
+ favorites . Clear ( ) ;
323
323
324
324
// Just build directly on the local root, keep track of active branch
325
325
localRoot = new BranchTreeNode ( "" , NodeType . Folder , false ) ;
@@ -348,10 +348,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
348
348
}
349
349
}
350
350
351
- // Add to favourites
352
- if ( favouritesList . Contains ( branch . Name ) )
351
+ // Add to favorites
352
+ if ( favoritesList . Contains ( branch . Name ) )
353
353
{
354
- favourites . Add ( node ) ;
354
+ favorites . Add ( node ) ;
355
355
}
356
356
357
357
// Build into tree
@@ -392,10 +392,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
392
392
}
393
393
}
394
394
395
- // Add to favourites
396
- if ( favouritesList . Contains ( branch . Name ) )
395
+ // Add to favorites
396
+ if ( favoritesList . Contains ( branch . Name ) )
397
397
{
398
- favourites . Add ( node ) ;
398
+ favorites . Add ( node ) ;
399
399
}
400
400
401
401
// Build on the root of the remote, just like with locals
@@ -430,23 +430,23 @@ private void BuildTree(BranchTreeNode parent, BranchTreeNode child)
430
430
BuildTree ( folder , child ) ;
431
431
}
432
432
433
- private void SetFavourite ( BranchTreeNode branch , bool favourite )
433
+ private void SetFavorite ( BranchTreeNode branch , bool favorite )
434
434
{
435
435
if ( string . IsNullOrEmpty ( branch . Name ) )
436
436
{
437
437
return ;
438
438
}
439
439
440
- if ( ! favourite )
440
+ if ( ! favorite )
441
441
{
442
- favourites . Remove ( branch ) ;
443
- Manager . LocalSettings . Set ( FavoritesSetting , favourites . Select ( x => x . Name ) . ToList ( ) ) ;
442
+ favorites . Remove ( branch ) ;
443
+ Manager . LocalSettings . Set ( FavoritesSetting , favorites . Select ( x => x . Name ) . ToList ( ) ) ;
444
444
}
445
445
else
446
446
{
447
- favourites . Remove ( branch ) ;
448
- favourites . Add ( branch ) ;
449
- Manager . LocalSettings . Set ( FavoritesSetting , favourites . Select ( x => x . Name ) . ToList ( ) ) ;
447
+ favorites . Remove ( branch ) ;
448
+ favorites . Add ( branch ) ;
449
+ Manager . LocalSettings . Set ( FavoritesSetting , favorites . Select ( x => x . Name ) . ToList ( ) ) ;
450
450
}
451
451
}
452
452
@@ -589,12 +589,12 @@ private void OnTreeNodeGUI(BranchTreeNode node)
589
589
var style = node . Active ? Styles . BoldLabel : Styles . Label ;
590
590
var rect = GUILayoutUtility . GetRect ( content , style , GUILayout . MaxHeight ( EditorGUIUtility . singleLineHeight ) ) ;
591
591
var clickRect = new Rect ( 0f , rect . y , Position . width , rect . height ) ;
592
- var favouriteRect = new Rect ( clickRect . xMax - clickRect . height * 2f , clickRect . y , clickRect . height , clickRect . height ) ;
592
+ var favoriteRect = new Rect ( clickRect . xMax - clickRect . height * 2f , clickRect . y , clickRect . height , clickRect . height ) ;
593
593
594
594
var selected = selectedNode == node ;
595
595
var keyboardFocus = GUIUtility . keyboardControl == listID ;
596
596
597
- // Selection highlight and favourite toggle
597
+ // Selection highlight and favorite toggle
598
598
if ( selected )
599
599
{
600
600
if ( Event . current . type == EventType . Repaint )
@@ -604,22 +604,22 @@ private void OnTreeNodeGUI(BranchTreeNode node)
604
604
605
605
if ( node . Type != NodeType . Folder )
606
606
{
607
- var favourite = IsFavourite ( node . Name ) ;
607
+ var favorite = IsFavorite ( node . Name ) ;
608
608
if ( Event . current . type == EventType . Repaint )
609
609
{
610
- GUI . DrawTexture ( favouriteRect , favourite ? Styles . FavouriteIconOn : Styles . FavouriteIconOff ) ;
610
+ GUI . DrawTexture ( favoriteRect , favorite ? Styles . FavoriteIconOn : Styles . FavoriteIconOff ) ;
611
611
}
612
- else if ( Event . current . type == EventType . MouseDown && favouriteRect . Contains ( Event . current . mousePosition ) )
612
+ else if ( Event . current . type == EventType . MouseDown && favoriteRect . Contains ( Event . current . mousePosition ) )
613
613
{
614
- SetFavourite ( node , ! favourite ) ;
614
+ SetFavorite ( node , ! favorite ) ;
615
615
Event . current . Use ( ) ;
616
616
}
617
617
}
618
618
}
619
- // Favourite status
620
- else if ( Event . current . type == EventType . Repaint && node . Type != NodeType . Folder && IsFavourite ( node . Name ) )
619
+ // Favorite status
620
+ else if ( Event . current . type == EventType . Repaint && node . Type != NodeType . Folder && IsFavorite ( node . Name ) )
621
621
{
622
- GUI . DrawTexture ( favouriteRect , Styles . FavouriteIconOn ) ;
622
+ GUI . DrawTexture ( favoriteRect , Styles . FavoriteIconOn ) ;
623
623
}
624
624
625
625
// The actual icon and label
0 commit comments