Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit b8eb44f

Browse files
Merge branch 'master' into enhancements/git-install-validation
2 parents 46df8f3 + 1868d98 commit b8eb44f

16 files changed

+249
-143
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Notices
44

5-
From version 0.19 onwards, the location of the plugin has moved to `Assets/Plugins/GitHub`. If you have version 0.18 or lower, you need to delete the `Assets/Editor/GitHub` folder before you install newer versions. You should exit Unity and delete the folder from Explorer/Finder, as Unity will not unload native libraries while it's running.
5+
From version 0.19 onwards, the location of the plugin has moved to `Assets/Plugins/GitHub`. If you have version 0.18 or lower, you need to delete the `Assets/Editor/GitHub` folder before you install newer versions. You should exit Unity and delete the folder from Explorer/Finder, as Unity will not unload native libraries while it's running. Also, remember to update your `.gitignore` file.
66

77
![Build Status](https://ci.appveyor.com/api/projects/status/github/github-for-unity/Unity?branch=master&svg=true)
88

@@ -81,7 +81,11 @@ Once the extension is installed, you can open a command line with the same Git a
8181

8282
### Installation
8383

84-
To install the extension, download the latest package from [the releases page](https://github.com/github-for-unity/Unity/releases) and double click on it.
84+
This extensions needs to be installed (and updated) for each Unity project that you want to version control.
85+
First step is to download the latest package from [the releases page](https://github.com/github-for-unity/Unity/releases);
86+
it will be saved as a file with the extension `.unitypackage`.
87+
To install it, open Unity, then open the project you want to version control, and then double click on the downloaded package.
88+
Alternatively, import the package by clicking Assets, Import Package, Custom Package, then select the downloaded package.
8589

8690
#### Log files
8791

src/UnityExtension/Assets/Editor/GitHub.Unity/ApplicationCache.cs

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -126,52 +126,52 @@ public List<GitBranch> RemoteBranches
126126
}
127127

128128
[Location("views/branches.yaml", LocationAttribute.Location.LibraryFolder)]
129-
sealed class Favourites : ScriptObjectSingleton<Favourites>
129+
sealed class Favorites : ScriptObjectSingleton<Favorites>
130130
{
131-
[SerializeField] private List<string> favouriteBranches;
132-
public List<string> FavouriteBranches
131+
[SerializeField] private List<string> favoriteBranches;
132+
public List<string> FavoriteBranches
133133
{
134134
get
135135
{
136-
if (favouriteBranches == null)
137-
FavouriteBranches = new List<string>();
138-
return favouriteBranches;
136+
if (favoriteBranches == null)
137+
FavoriteBranches = new List<string>();
138+
return favoriteBranches;
139139
}
140140
set
141141
{
142-
favouriteBranches = value;
142+
favoriteBranches = value;
143143
Save(true);
144144
}
145145
}
146146

147-
public void SetFavourite(string branchName)
147+
public void SetFavorite(string branchName)
148148
{
149-
if (FavouriteBranches.Contains(branchName))
149+
if (FavoriteBranches.Contains(branchName))
150150
return;
151-
FavouriteBranches.Add(branchName);
151+
FavoriteBranches.Add(branchName);
152152
Save(true);
153153
}
154154

155-
public void UnsetFavourite(string branchName)
155+
public void UnsetFavorite(string branchName)
156156
{
157-
if (!FavouriteBranches.Contains(branchName))
157+
if (!FavoriteBranches.Contains(branchName))
158158
return;
159-
FavouriteBranches.Remove(branchName);
159+
FavoriteBranches.Remove(branchName);
160160
Save(true);
161161
}
162162

163-
public void ToggleFavourite(string branchName)
163+
public void ToggleFavorite(string branchName)
164164
{
165-
if (FavouriteBranches.Contains(branchName))
166-
FavouriteBranches.Remove(branchName);
165+
if (FavoriteBranches.Contains(branchName))
166+
FavoriteBranches.Remove(branchName);
167167
else
168-
FavouriteBranches.Add(branchName);
168+
FavoriteBranches.Add(branchName);
169169
Save(true);
170170
}
171171

172-
public bool IsFavourite(string branchName)
172+
public bool IsFavorite(string branchName)
173173
{
174-
return FavouriteBranches.Contains(branchName);
174+
return FavoriteBranches.Contains(branchName);
175175
}
176176
}
177177

src/UnityExtension/Assets/Editor/GitHub.Unity/Misc/Styles.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ class Styles
8484
private static Texture2D branchIcon,
8585
activeBranchIcon,
8686
trackingBranchIcon,
87-
favouriteIconOn,
88-
favouriteIconOff,
87+
favoriteIconOn,
88+
favoriteIconOff,
8989
smallLogoIcon,
9090
bigLogoIcon,
9191
defaultAssetIcon,
@@ -663,29 +663,29 @@ public static Texture2D TrackingBranchIcon
663663
}
664664
}
665665

666-
public static Texture2D FavouriteIconOn
666+
public static Texture2D FavoriteIconOn
667667
{
668668
get
669669
{
670-
if (favouriteIconOn == null)
670+
if (favoriteIconOn == null)
671671
{
672-
favouriteIconOn = Utility.GetIcon("favorite-branch-indicator.png");
672+
favoriteIconOn = Utility.GetIcon("favorite-branch-indicator.png");
673673
}
674674

675-
return favouriteIconOn;
675+
return favoriteIconOn;
676676
}
677677
}
678678

679-
public static Texture2D FavouriteIconOff
679+
public static Texture2D FavoriteIconOff
680680
{
681681
get
682682
{
683-
if (favouriteIconOff == null)
683+
if (favoriteIconOff == null)
684684
{
685-
favouriteIconOff = FolderIcon;
685+
favoriteIconOff = FolderIcon;
686686
}
687687

688-
return favouriteIconOff;
688+
return favoriteIconOff;
689689
}
690690
}
691691

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/AuthenticationView.cs

Lines changed: 32 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,8 @@ class AuthenticationView : Subview
2929
[NonSerialized] private string errorMessage;
3030
[NonSerialized] private bool enterPressed;
3131
[NonSerialized] private string password = "";
32-
3332
[NonSerialized] private AuthenticationService authenticationService;
34-
private AuthenticationService AuthenticationService
35-
{
36-
get
37-
{
38-
if (authenticationService == null)
39-
{
40-
UriString host;
41-
if (Repository != null && Repository.CloneUrl != null && Repository.CloneUrl.IsValidUri)
42-
{
43-
host = new UriString(Repository.CloneUrl.ToRepositoryUri()
44-
.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
45-
}
46-
else
47-
{
48-
host = UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri);
49-
}
5033

51-
AuthenticationService = new AuthenticationService(host, Platform.Keychain);
52-
}
53-
return authenticationService;
54-
}
55-
set
56-
{
57-
authenticationService = value;
58-
}
59-
}
6034

6135
public override void InitializeView(IView parent)
6236
{
@@ -250,5 +224,37 @@ private void ShowErrorMessage()
250224
GUILayout.Label(errorMessage, Styles.ErrorLabel);
251225
}
252226
}
227+
228+
private AuthenticationService AuthenticationService
229+
{
230+
get
231+
{
232+
if (authenticationService == null)
233+
{
234+
UriString host;
235+
if (Repository != null && Repository.CloneUrl != null && Repository.CloneUrl.IsValidUri)
236+
{
237+
host = new UriString(Repository.CloneUrl.ToRepositoryUri()
238+
.GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
239+
}
240+
else
241+
{
242+
host = UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri);
243+
}
244+
245+
AuthenticationService = new AuthenticationService(host, Platform.Keychain);
246+
}
247+
return authenticationService;
248+
}
249+
set
250+
{
251+
authenticationService = value;
252+
}
253+
}
254+
255+
public override bool IsBusy
256+
{
257+
get { return isBusy; }
258+
}
253259
}
254260
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BaseWindow.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ public virtual void OnSelectionChange()
111111

112112
public Rect Position { get { return position; } }
113113
public IApplicationManager Manager { get; private set; }
114+
public abstract bool IsBusy { get; }
114115
public IRepository Repository { get { return inLayout ? cachedRepository : Environment.Repository; } }
115116
public bool HasRepository { get { return Environment.RepositoryPath != null; } }
116117

0 commit comments

Comments
 (0)