@@ -24,8 +24,8 @@ class BranchesView : Subview
24
24
private const string WarningCheckoutBranchExistsOK = "Ok" ;
25
25
private const string NewBranchCancelButton = "x" ;
26
26
private const string NewBranchConfirmButton = "Create" ;
27
- private const string FavoritesSetting = "Favourites " ;
28
- private const string FavoritesTitle = "Favourites " ;
27
+ private const string FavoritesSetting = "Favorites " ;
28
+ private const string FavoritesTitle = "Favorites " ;
29
29
private const string CreateBranchTitle = "Create Branch" ;
30
30
private const string LocalTitle = "Local branches" ;
31
31
private const string RemoteTitle = "Remote branches" ;
@@ -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
@@ -182,17 +182,17 @@ public void OnEmbeddedGUI()
182
182
183
183
GUILayout . BeginVertical ( Styles . CommitFileAreaStyle ) ;
184
184
{
185
- // Favourites list
186
- if ( favourites . Count > 0 )
185
+ // Favorites list
186
+ if ( favorites . Count > 0 )
187
187
{
188
188
GUILayout . Label ( FavoritesTitle ) ;
189
189
GUILayout . BeginHorizontal ( ) ;
190
190
{
191
191
GUILayout . BeginVertical ( ) ;
192
192
{
193
- for ( var index = 0 ; index < favourites . Count ; ++ index )
193
+ for ( var index = 0 ; index < favorites . Count ; ++ index )
194
194
{
195
- OnTreeNodeGUI ( favourites [ index ] ) ;
195
+ OnTreeNodeGUI ( favorites [ index ] ) ;
196
196
}
197
197
}
198
198
@@ -286,12 +286,12 @@ public void OnEmbeddedGUI()
286
286
287
287
private int CompareBranches ( GitBranch a , GitBranch b )
288
288
{
289
- if ( IsFavourite ( a . Name ) )
289
+ if ( IsFavorite ( a . Name ) )
290
290
{
291
291
return - 1 ;
292
292
}
293
293
294
- if ( IsFavourite ( b . Name ) )
294
+ if ( IsFavorite ( b . Name ) )
295
295
{
296
296
return 1 ;
297
297
}
@@ -309,19 +309,19 @@ private int CompareBranches(GitBranch a, GitBranch b)
309
309
return 0 ;
310
310
}
311
311
312
- private bool IsFavourite ( BranchTreeNode branch )
312
+ private bool IsFavorite ( BranchTreeNode branch )
313
313
{
314
- return IsFavourite ( branch . Name ) ;
314
+ return IsFavorite ( branch . Name ) ;
315
315
}
316
316
317
- private bool IsFavourite ( string branchName )
317
+ private bool IsFavorite ( string branchName )
318
318
{
319
319
if ( string . IsNullOrEmpty ( branchName ) )
320
320
{
321
321
return false ;
322
322
}
323
323
324
- return favouritesList . Contains ( branchName ) ;
324
+ return favoritesList . Contains ( branchName ) ;
325
325
}
326
326
327
327
private void OnLocalBranchesUpdate ( IEnumerable < GitBranch > list )
@@ -350,8 +350,8 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
350
350
var tracking = new List < KeyValuePair < int , int > > ( ) ;
351
351
var localBranchNodes = new List < BranchTreeNode > ( ) ;
352
352
353
- // Prepare for updated favourites listing
354
- favourites . Clear ( ) ;
353
+ // Prepare for updated favorites listing
354
+ favorites . Clear ( ) ;
355
355
356
356
// Just build directly on the local root, keep track of active branch
357
357
localRoot = new BranchTreeNode ( "" , NodeType . Folder , false ) ;
@@ -380,10 +380,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
380
380
}
381
381
}
382
382
383
- // Add to favourites
384
- if ( favouritesList . Contains ( branch . Name ) )
383
+ // Add to favorites
384
+ if ( favoritesList . Contains ( branch . Name ) )
385
385
{
386
- favourites . Add ( node ) ;
386
+ favorites . Add ( node ) ;
387
387
}
388
388
389
389
// Build into tree
@@ -424,10 +424,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
424
424
}
425
425
}
426
426
427
- // Add to favourites
428
- if ( favouritesList . Contains ( branch . Name ) )
427
+ // Add to favorites
428
+ if ( favoritesList . Contains ( branch . Name ) )
429
429
{
430
- favourites . Add ( node ) ;
430
+ favorites . Add ( node ) ;
431
431
}
432
432
433
433
// Build on the root of the remote, just like with locals
@@ -462,23 +462,23 @@ private void BuildTree(BranchTreeNode parent, BranchTreeNode child)
462
462
BuildTree ( folder , child ) ;
463
463
}
464
464
465
- private void SetFavourite ( BranchTreeNode branch , bool favourite )
465
+ private void SetFavorite ( BranchTreeNode branch , bool favorite )
466
466
{
467
467
if ( string . IsNullOrEmpty ( branch . Name ) )
468
468
{
469
469
return ;
470
470
}
471
471
472
- if ( ! favourite )
472
+ if ( ! favorite )
473
473
{
474
- favourites . Remove ( branch ) ;
475
- Manager . LocalSettings . Set ( FavoritesSetting , favourites . Select ( x => x . Name ) . ToList ( ) ) ;
474
+ favorites . Remove ( branch ) ;
475
+ Manager . LocalSettings . Set ( FavoritesSetting , favorites . Select ( x => x . Name ) . ToList ( ) ) ;
476
476
}
477
477
else
478
478
{
479
- favourites . Remove ( branch ) ;
480
- favourites . Add ( branch ) ;
481
- Manager . LocalSettings . Set ( FavoritesSetting , favourites . Select ( x => x . Name ) . ToList ( ) ) ;
479
+ favorites . Remove ( branch ) ;
480
+ favorites . Add ( branch ) ;
481
+ Manager . LocalSettings . Set ( FavoritesSetting , favorites . Select ( x => x . Name ) . ToList ( ) ) ;
482
482
}
483
483
}
484
484
@@ -621,12 +621,12 @@ private void OnTreeNodeGUI(BranchTreeNode node)
621
621
var style = node . Active ? Styles . BoldLabel : Styles . Label ;
622
622
var rect = GUILayoutUtility . GetRect ( content , style , GUILayout . MaxHeight ( EditorGUIUtility . singleLineHeight ) ) ;
623
623
var clickRect = new Rect ( 0f , rect . y , Position . width , rect . height ) ;
624
- var favouriteRect = new Rect ( clickRect . xMax - clickRect . height * 2f , clickRect . y , clickRect . height , clickRect . height ) ;
624
+ var favoriteRect = new Rect ( clickRect . xMax - clickRect . height * 2f , clickRect . y , clickRect . height , clickRect . height ) ;
625
625
626
626
var selected = selectedNode == node ;
627
627
var keyboardFocus = GUIUtility . keyboardControl == listID ;
628
628
629
- // Selection highlight and favourite toggle
629
+ // Selection highlight and favorite toggle
630
630
if ( selected )
631
631
{
632
632
if ( Event . current . type == EventType . Repaint )
@@ -636,22 +636,22 @@ private void OnTreeNodeGUI(BranchTreeNode node)
636
636
637
637
if ( node . Type != NodeType . Folder )
638
638
{
639
- var favourite = IsFavourite ( node ) ;
639
+ var favorite = IsFavorite ( node ) ;
640
640
if ( Event . current . type == EventType . Repaint )
641
641
{
642
- GUI . DrawTexture ( favouriteRect , favourite ? Styles . FavouriteIconOn : Styles . FavouriteIconOff ) ;
642
+ GUI . DrawTexture ( favoriteRect , favorite ? Styles . FavoriteIconOn : Styles . FavoriteIconOff ) ;
643
643
}
644
- else if ( Event . current . type == EventType . MouseDown && favouriteRect . Contains ( Event . current . mousePosition ) )
644
+ else if ( Event . current . type == EventType . MouseDown && favoriteRect . Contains ( Event . current . mousePosition ) )
645
645
{
646
- SetFavourite ( node , ! favourite ) ;
646
+ SetFavorite ( node , ! favorite ) ;
647
647
Event . current . Use ( ) ;
648
648
}
649
649
}
650
650
}
651
- // Favourite status
652
- else if ( Event . current . type == EventType . Repaint && node . Type != NodeType . Folder && IsFavourite ( node . Name ) )
651
+ // Favorite status
652
+ else if ( Event . current . type == EventType . Repaint && node . Type != NodeType . Folder && IsFavorite ( node . Name ) )
653
653
{
654
- GUI . DrawTexture ( favouriteRect , Styles . FavouriteIconOn ) ;
654
+ GUI . DrawTexture ( favoriteRect , Styles . FavoriteIconOn ) ;
655
655
}
656
656
657
657
// The actual icon and label
0 commit comments