invites: fix some potential edge cases
This commit is contained in:
parent
b854161542
commit
17cc623027
|
@ -137,6 +137,9 @@ namespace SparkleShare {
|
|||
NSApplication.SharedApplication.AddWindowsItem (this, "SparkleShare Setup", false);
|
||||
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
|
||||
MakeKeyAndOrderFront (this);
|
||||
|
||||
if (Program.UI != null)
|
||||
Program.UI.UpdateDockIconVisibility ();
|
||||
|
||||
base.OrderFrontRegardless ();
|
||||
}
|
||||
|
|
|
@ -68,10 +68,9 @@ namespace SparkleShare {
|
|||
Setup = new SparkleSetup ();
|
||||
// About = new SparkleAbout ();
|
||||
|
||||
if (Program.Controller.FirstRun) {
|
||||
if (Program.Controller.FirstRun)
|
||||
Program.Controller.ShowSetupWindow (PageType.Setup);
|
||||
UpdateDockIconVisibility ();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ namespace SparkleShare {
|
|||
public string PreviousAddress { get; private set; }
|
||||
public string PreviousPath { get; private set; }
|
||||
public string SyncingFolder { get; private set; }
|
||||
public SparkleInvite PendingInvite;
|
||||
|
||||
|
||||
public int SelectedPluginIndex {
|
||||
|
@ -140,6 +141,13 @@ namespace SparkleShare {
|
|||
|
||||
|
||||
Program.Controller.ShowSetupWindowEvent += delegate (PageType page_type) {
|
||||
if (PendingInvite != null) {
|
||||
if (ShowWindowEvent != null)
|
||||
ShowWindowEvent ();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (ChangePageEvent != null)
|
||||
ChangePageEvent (page_type, null);
|
||||
|
||||
|
@ -154,7 +162,7 @@ namespace SparkleShare {
|
|||
|
||||
public void PageCancelled ()
|
||||
{
|
||||
// PendingInvite = null;
|
||||
PendingInvite = null;
|
||||
|
||||
if (HideWindowEvent != null)
|
||||
HideWindowEvent ();
|
||||
|
@ -299,14 +307,11 @@ namespace SparkleShare {
|
|||
}
|
||||
|
||||
|
||||
// TODO: trailing slash should work
|
||||
public SparkleInvite PendingInvite = new SparkleInvite ("ssh://git@github.com/",
|
||||
"/hbons/Stuff", "http://www.sparkleshare.org/");
|
||||
|
||||
public void InvitePageCompleted ()
|
||||
{
|
||||
SyncingFolder = Path.GetFileNameWithoutExtension (PendingInvite.RemotePath);
|
||||
PreviousAddress = PendingInvite.Address;
|
||||
// TODO: trailing slash should work
|
||||
PreviousPath = PendingInvite.RemotePath;
|
||||
|
||||
if (ChangePageEvent != null)
|
||||
|
|
Loading…
Reference in a new issue