@@ -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
@@ -160,17 +160,17 @@ public void OnEmbeddedGUI()
160160
161161 GUILayout . BeginVertical ( Styles . CommitFileAreaStyle ) ;
162162 {
163- // Favourites list
164- if ( favourites . Count > 0 )
163+ // Favorites list
164+ if ( favorites . Count > 0 )
165165 {
166166 GUILayout . Label ( FavoritesTitle ) ;
167167 GUILayout . BeginHorizontal ( ) ;
168168 {
169169 GUILayout . BeginVertical ( ) ;
170170 {
171- for ( var index = 0 ; index < favourites . Count ; ++ index )
171+ for ( var index = 0 ; index < favorites . Count ; ++ index )
172172 {
173- OnTreeNodeGUI ( favourites [ index ] ) ;
173+ OnTreeNodeGUI ( favorites [ index ] ) ;
174174 }
175175 }
176176
@@ -264,12 +264,12 @@ public void OnEmbeddedGUI()
264264
265265 private int CompareBranches ( GitBranch a , GitBranch b )
266266 {
267- if ( IsFavourite ( a . Name ) )
267+ if ( IsFavorite ( a . Name ) )
268268 {
269269 return - 1 ;
270270 }
271271
272- if ( IsFavourite ( b . Name ) )
272+ if ( IsFavorite ( b . Name ) )
273273 {
274274 return 1 ;
275275 }
@@ -287,9 +287,9 @@ private int CompareBranches(GitBranch a, GitBranch b)
287287 return 0 ;
288288 }
289289
290- private bool IsFavourite ( string branchName )
290+ private bool IsFavorite ( string branchName )
291291 {
292- return ! String . IsNullOrEmpty ( branchName ) && favouritesList . Contains ( branchName ) ;
292+ return ! String . IsNullOrEmpty ( branchName ) && favoritesList . Contains ( branchName ) ;
293293 }
294294
295295 private void OnLocalBranchesUpdate ( IEnumerable < GitBranch > list )
@@ -318,8 +318,8 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
318318 var tracking = new List < KeyValuePair < int , int > > ( ) ;
319319 var localBranchNodes = new List < BranchTreeNode > ( ) ;
320320
321- // Prepare for updated favourites listing
322- favourites . Clear ( ) ;
321+ // Prepare for updated favorites listing
322+ favorites . Clear ( ) ;
323323
324324 // Just build directly on the local root, keep track of active branch
325325 localRoot = new BranchTreeNode ( "" , NodeType . Folder , false ) ;
@@ -348,10 +348,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
348348 }
349349 }
350350
351- // Add to favourites
352- if ( favouritesList . Contains ( branch . Name ) )
351+ // Add to favorites
352+ if ( favoritesList . Contains ( branch . Name ) )
353353 {
354- favourites . Add ( node ) ;
354+ favorites . Add ( node ) ;
355355 }
356356
357357 // Build into tree
@@ -392,10 +392,10 @@ private void BuildTree(IEnumerable<GitBranch> local, IEnumerable<GitBranch> remo
392392 }
393393 }
394394
395- // Add to favourites
396- if ( favouritesList . Contains ( branch . Name ) )
395+ // Add to favorites
396+ if ( favoritesList . Contains ( branch . Name ) )
397397 {
398- favourites . Add ( node ) ;
398+ favorites . Add ( node ) ;
399399 }
400400
401401 // Build on the root of the remote, just like with locals
@@ -430,23 +430,23 @@ private void BuildTree(BranchTreeNode parent, BranchTreeNode child)
430430 BuildTree ( folder , child ) ;
431431 }
432432
433- private void SetFavourite ( BranchTreeNode branch , bool favourite )
433+ private void SetFavorite ( BranchTreeNode branch , bool favorite )
434434 {
435435 if ( string . IsNullOrEmpty ( branch . Name ) )
436436 {
437437 return ;
438438 }
439439
440- if ( ! favourite )
440+ if ( ! favorite )
441441 {
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 ( ) ) ;
444444 }
445445 else
446446 {
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 ( ) ) ;
450450 }
451451 }
452452
@@ -589,12 +589,12 @@ private void OnTreeNodeGUI(BranchTreeNode node)
589589 var style = node . Active ? Styles . BoldLabel : Styles . Label ;
590590 var rect = GUILayoutUtility . GetRect ( content , style , GUILayout . MaxHeight ( EditorGUIUtility . singleLineHeight ) ) ;
591591 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 ) ;
593593
594594 var selected = selectedNode == node ;
595595 var keyboardFocus = GUIUtility . keyboardControl == listID ;
596596
597- // Selection highlight and favourite toggle
597+ // Selection highlight and favorite toggle
598598 if ( selected )
599599 {
600600 if ( Event . current . type == EventType . Repaint )
@@ -604,22 +604,22 @@ private void OnTreeNodeGUI(BranchTreeNode node)
604604
605605 if ( node . Type != NodeType . Folder )
606606 {
607- var favourite = IsFavourite ( node . Name ) ;
607+ var favorite = IsFavorite ( node . Name ) ;
608608 if ( Event . current . type == EventType . Repaint )
609609 {
610- GUI . DrawTexture ( favouriteRect , favourite ? Styles . FavouriteIconOn : Styles . FavouriteIconOff ) ;
610+ GUI . DrawTexture ( favoriteRect , favorite ? Styles . FavoriteIconOn : Styles . FavoriteIconOff ) ;
611611 }
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 ) )
613613 {
614- SetFavourite ( node , ! favourite ) ;
614+ SetFavorite ( node , ! favorite ) ;
615615 Event . current . Use ( ) ;
616616 }
617617 }
618618 }
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 ) )
621621 {
622- GUI . DrawTexture ( favouriteRect , Styles . FavouriteIconOn ) ;
622+ GUI . DrawTexture ( favoriteRect , Styles . FavoriteIconOn ) ;
623623 }
624624
625625 // The actual icon and label
0 commit comments