@@ -24,8 +24,8 @@ class BranchesView : Subview
2424 private const string WarningCheckoutBranchExistsOK = "Ok" ;
2525 private const string NewBranchCancelButton = "x" ;
2626 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 " ;
2929 private const string CreateBranchTitle = "Create Branch" ;
3030 private const string LocalTitle = "Local branches" ;
3131 private const string RemoteTitle = "Remote branches" ;
@@ -38,12 +38,12 @@ class BranchesView : Subview
3838 private bool showLocalBranches = true ;
3939 private bool showRemoteBranches = true ;
4040
41- [ NonSerialized ] private List < BranchTreeNode > favourites = new List < BranchTreeNode > ( ) ;
41+ [ NonSerialized ] private List < BranchTreeNode > favorites = new List < BranchTreeNode > ( ) ;
4242 [ NonSerialized ] private int listID = - 1 ;
4343 [ NonSerialized ] private List < GitBranch > newLocalBranches ;
4444 [ NonSerialized ] private BranchTreeNode newNodeSelection ;
4545 [ NonSerialized ] private BranchesMode targetMode ;
46- [ NonSerialized ] private bool favouritesHasChanged ;
46+ [ NonSerialized ] private bool favoritesHasChanged ;
4747
4848 [ SerializeField ] private BranchTreeNode activeBranchNode ;
4949 [ SerializeField ] private BranchTreeNode localRoot ;
@@ -52,7 +52,7 @@ class BranchesView : Subview
5252 [ SerializeField ] private List < Remote > remotes = new List < Remote > ( ) ;
5353 [ SerializeField ] private Vector2 scroll ;
5454 [ SerializeField ] private BranchTreeNode selectedNode ;
55- private List < string > favouritesList ;
55+ private List < string > favoritesList ;
5656
5757 public override void InitializeView ( IView parent )
5858 {
@@ -64,7 +64,7 @@ public override void OnEnable()
6464 {
6565 base . OnEnable ( ) ;
6666 AttachHandlers ( Repository ) ;
67- favouritesHasChanged = true ;
67+ favoritesHasChanged = true ;
6868 }
6969
7070 public override void OnDisable ( )
@@ -81,10 +81,10 @@ public override void OnDataUpdate()
8181
8282 private void MaybeUpdateData ( )
8383 {
84- if ( favouritesHasChanged )
84+ if ( favoritesHasChanged )
8585 {
86- favouritesList = Manager . LocalSettings . Get ( FavoritesSetting , new List < string > ( ) ) ;
87- favouritesHasChanged = false ;
86+ favoritesList = Manager . LocalSettings . Get ( FavoritesSetting , new List < string > ( ) ) ;
87+ favoritesHasChanged = false ;
8888 }
8989 }
9090
@@ -182,17 +182,17 @@ public void OnEmbeddedGUI()
182182
183183 GUILayout . BeginVertical ( Styles . CommitFileAreaStyle ) ;
184184 {
185- // Favourites list
186- if ( favourites . Count > 0 )
185+ // Favorites list
186+ if ( favorites . Count > 0 )
187187 {
188188 GUILayout . Label ( FavoritesTitle ) ;
189189 GUILayout . BeginHorizontal ( ) ;
190190 {
191191 GUILayout . BeginVertical ( ) ;
192192 {
193- for ( var index = 0 ; index < favourites . Count ; ++ index )
193+ for ( var index = 0 ; index < favorites . Count ; ++ index )
194194 {
195- OnTreeNodeGUI ( favourites [ index ] ) ;
195+ OnTreeNodeGUI ( favorites [ index ] ) ;
196196 }
197197 }
198198
@@ -286,12 +286,12 @@ public void OnEmbeddedGUI()
286286
287287 private int CompareBranches ( GitBranch a , GitBranch b )
288288 {
289- if ( IsFavourite ( a . Name ) )
289+ if ( IsFavorite ( a . Name ) )
290290 {
291291 return - 1 ;
292292 }
293293
294- if ( IsFavourite ( b . Name ) )
294+ if ( IsFavorite ( b . Name ) )
295295 {
296296 return 1 ;
297297 }
@@ -309,19 +309,19 @@ private int CompareBranches(GitBranch a, GitBranch b)
309309 return 0 ;
310310 }
311311
312- private bool IsFavourite ( BranchTreeNode branch )
312+ private bool IsFavorite ( BranchTreeNode branch )
313313 {
314- return IsFavourite ( branch . Name ) ;
314+ return IsFavorite ( branch . Name ) ;
315315 }
316316
317- private bool IsFavourite ( string branchName )
317+ private bool IsFavorite ( string branchName )
318318 {
319319 if ( string . IsNullOrEmpty ( branchName ) )
320320 {
321321 return false ;
322322 }
323323
324- return favouritesList . Contains ( branchName ) ;
324+ return favoritesList . Contains ( branchName ) ;
325325 }
326326
327327 private void OnLocalBranchesUpdate ( IEnumerable < GitBranch > list )
@@ -350,8 +350,8 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
350350 var tracking = new List < KeyValuePair < int , int > > ( ) ;
351351 var localBranchNodes = new List < BranchTreeNode > ( ) ;
352352
353- // Prepare for updated favourites listing
354- favourites . Clear ( ) ;
353+ // Prepare for updated favorites listing
354+ favorites . Clear ( ) ;
355355
356356 // Just build directly on the local root, keep track of active branch
357357 localRoot = new BranchTreeNode ( "" , NodeType . Folder , false ) ;
@@ -380,10 +380,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
380380 }
381381 }
382382
383- // Add to favourites
384- if ( favouritesList . Contains ( branch . Name ) )
383+ // Add to favorites
384+ if ( favoritesList . Contains ( branch . Name ) )
385385 {
386- favourites . Add ( node ) ;
386+ favorites . Add ( node ) ;
387387 }
388388
389389 // Build into tree
@@ -424,10 +424,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
424424 }
425425 }
426426
427- // Add to favourites
428- if ( favouritesList . Contains ( branch . Name ) )
427+ // Add to favorites
428+ if ( favoritesList . Contains ( branch . Name ) )
429429 {
430- favourites . Add ( node ) ;
430+ favorites . Add ( node ) ;
431431 }
432432
433433 // Build on the root of the remote, just like with locals
@@ -462,23 +462,23 @@ private void BuildTree(BranchTreeNode parent, BranchTreeNode child)
462462 BuildTree ( folder , child ) ;
463463 }
464464
465- private void SetFavourite ( BranchTreeNode branch , bool favourite )
465+ private void SetFavorite ( BranchTreeNode branch , bool favorite )
466466 {
467467 if ( string . IsNullOrEmpty ( branch . Name ) )
468468 {
469469 return ;
470470 }
471471
472- if ( ! favourite )
472+ if ( ! favorite )
473473 {
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 ( ) ) ;
476476 }
477477 else
478478 {
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 ( ) ) ;
482482 }
483483 }
484484
@@ -621,12 +621,12 @@ private void OnTreeNodeGUI(BranchTreeNode node)
621621 var style = node . Active ? Styles . BoldLabel : Styles . Label ;
622622 var rect = GUILayoutUtility . GetRect ( content , style , GUILayout . MaxHeight ( EditorGUIUtility . singleLineHeight ) ) ;
623623 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 ) ;
625625
626626 var selected = selectedNode == node ;
627627 var keyboardFocus = GUIUtility . keyboardControl == listID ;
628628
629- // Selection highlight and favourite toggle
629+ // Selection highlight and favorite toggle
630630 if ( selected )
631631 {
632632 if ( Event . current . type == EventType . Repaint )
@@ -636,22 +636,22 @@ private void OnTreeNodeGUI(BranchTreeNode node)
636636
637637 if ( node . Type != NodeType . Folder )
638638 {
639- var favourite = IsFavourite ( node ) ;
639+ var favorite = IsFavorite ( node ) ;
640640 if ( Event . current . type == EventType . Repaint )
641641 {
642- GUI . DrawTexture ( favouriteRect , favourite ? Styles . FavouriteIconOn : Styles . FavouriteIconOff ) ;
642+ GUI . DrawTexture ( favoriteRect , favorite ? Styles . FavoriteIconOn : Styles . FavoriteIconOff ) ;
643643 }
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 ) )
645645 {
646- SetFavourite ( node , ! favourite ) ;
646+ SetFavorite ( node , ! favorite ) ;
647647 Event . current . Use ( ) ;
648648 }
649649 }
650650 }
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 ) )
653653 {
654- GUI . DrawTexture ( favouriteRect , Styles . FavouriteIconOn ) ;
654+ GUI . DrawTexture ( favoriteRect , Styles . FavoriteIconOn ) ;
655655 }
656656
657657 // The actual icon and label
0 commit comments