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

Commit 9af0497

Browse files
Changing the size of the PublishView and displaying the error after the button
1 parent fa9cc6f commit 9af0497

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

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

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace GitHub.Unity
99
{
1010
class PublishView : Subview
1111
{
12-
private static readonly Vector2 viewSize = new Vector2(300, 250);
12+
private static readonly Vector2 viewSize = new Vector2(400, 350);
1313

1414
private const string WindowTitle = "Publish";
1515
private const string Header = "Publish this repository to GitHub";
@@ -211,11 +211,6 @@ public override void OnGUI()
211211

212212
GUILayout.Space(Styles.PublishViewSpacingHeight);
213213

214-
if (error != null)
215-
GUILayout.Label(error, Styles.ErrorLabel);
216-
217-
GUILayout.FlexibleSpace();
218-
219214
GUILayout.BeginHorizontal();
220215
{
221216
GUILayout.FlexibleSpace();
@@ -240,7 +235,7 @@ public override void OnGUI()
240235
{
241236
Logger.Error(ex, "Repository Create Error Type:{0}", ex.GetType().ToString());
242237

243-
error = GetPublishErrorMessage(ex);
238+
error = ex.Message;
244239
isBusy = false;
245240
return;
246241
}
@@ -264,18 +259,13 @@ public override void OnGUI()
264259
}
265260
GUILayout.EndHorizontal();
266261
GUILayout.Space(10);
267-
}
268-
EditorGUI.EndDisabledGroup();
269-
}
270262

271-
private string GetPublishErrorMessage(Exception ex)
272-
{
273-
if (ex.Message.StartsWith(PublishLimtPrivateRepositoriesError))
274-
{
275-
return PublishLimtPrivateRepositoriesError;
276-
}
263+
if (error != null)
264+
GUILayout.Label(error, Styles.ErrorLabel);
277265

278-
return ex.Message;
266+
GUILayout.FlexibleSpace();
267+
}
268+
EditorGUI.EndDisabledGroup();
279269
}
280270

281271
public override bool IsBusy

0 commit comments

Comments
 (0)