[linux] Keep setup dialog in memory
This commit is contained in:
parent
0dfac3279f
commit
0c4fb6d4f9
|
@ -61,7 +61,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
VBox layout_vertical = new VBox (false, 0);
|
VBox layout_vertical = new VBox (false, 0);
|
||||||
|
|
||||||
DeleteEvent += PreventClose;
|
Deletable = false;
|
||||||
|
|
||||||
Label header = new Label ("<span size='x-large'><b>" +
|
Label header = new Label ("<span size='x-large'><b>" +
|
||||||
_("Welcome to SparkleShare!") +
|
_("Welcome to SparkleShare!") +
|
||||||
|
@ -131,7 +131,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
SparkleShare.Controller.FirstRun = false;
|
SparkleShare.Controller.FirstRun = false;
|
||||||
|
|
||||||
DeleteEvent += PreventClose;
|
Deletable = false;
|
||||||
ShowServerForm ();
|
ShowServerForm ();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -152,16 +152,6 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void PreventClose (object o, DeleteEventArgs args)
|
|
||||||
{
|
|
||||||
|
|
||||||
// Cancel closing when the "Close"
|
|
||||||
// button of the window is pressed
|
|
||||||
args.RetVal = true;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void ShowServerForm (bool server_form_only)
|
public void ShowServerForm (bool server_form_only)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -364,13 +354,13 @@ namespace SparkleShare {
|
||||||
string canonical_name = System.IO.Path.GetFileNameWithoutExtension (name);
|
string canonical_name = System.IO.Path.GetFileNameWithoutExtension (name);
|
||||||
|
|
||||||
|
|
||||||
DeleteEvent += PreventClose;
|
Deletable = false;
|
||||||
ShowSyncingPage (canonical_name);
|
ShowSyncingPage (canonical_name);
|
||||||
|
|
||||||
|
|
||||||
SparkleShare.Controller.FolderFetched += delegate {
|
SparkleShare.Controller.FolderFetched += delegate {
|
||||||
|
|
||||||
DeleteEvent -= PreventClose;
|
Deletable = true;
|
||||||
|
|
||||||
Application.Invoke (delegate {
|
Application.Invoke (delegate {
|
||||||
ShowSuccessPage (name);
|
ShowSuccessPage (name);
|
||||||
|
@ -380,7 +370,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
SparkleShare.Controller.FolderFetchError += delegate {
|
SparkleShare.Controller.FolderFetchError += delegate {
|
||||||
|
|
||||||
DeleteEvent -= PreventClose;
|
Deletable = true;
|
||||||
|
|
||||||
Application.Invoke (delegate { ShowErrorPage (); });
|
Application.Invoke (delegate { ShowErrorPage (); });
|
||||||
|
|
||||||
|
@ -397,7 +387,7 @@ namespace SparkleShare {
|
||||||
Button cancel_button = new Button (_("Cancel"));
|
Button cancel_button = new Button (_("Cancel"));
|
||||||
|
|
||||||
cancel_button.Clicked += delegate {
|
cancel_button.Clicked += delegate {
|
||||||
Destroy ();
|
Close ();
|
||||||
};
|
};
|
||||||
|
|
||||||
AddButton (cancel_button);
|
AddButton (cancel_button);
|
||||||
|
@ -485,9 +475,7 @@ namespace SparkleShare {
|
||||||
Button accept_button = new Button (_("Accept and Sync"));
|
Button accept_button = new Button (_("Accept and Sync"));
|
||||||
|
|
||||||
reject_button.Clicked += delegate {
|
reject_button.Clicked += delegate {
|
||||||
|
Close ();
|
||||||
Destroy ();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
accept_button.Clicked += delegate {
|
accept_button.Clicked += delegate {
|
||||||
|
@ -599,7 +587,7 @@ namespace SparkleShare {
|
||||||
Button finish_button = new Button (_("Finish"));
|
Button finish_button = new Button (_("Finish"));
|
||||||
|
|
||||||
finish_button.Clicked += delegate (object o, EventArgs args) {
|
finish_button.Clicked += delegate (object o, EventArgs args) {
|
||||||
Destroy ();
|
Close ();
|
||||||
};
|
};
|
||||||
|
|
||||||
AddButton (open_folder_button);
|
AddButton (open_folder_button);
|
||||||
|
@ -644,7 +632,7 @@ namespace SparkleShare {
|
||||||
};
|
};
|
||||||
|
|
||||||
button.Clicked += delegate {
|
button.Clicked += delegate {
|
||||||
Destroy ();
|
Close ();
|
||||||
};
|
};
|
||||||
|
|
||||||
AddButton (button);
|
AddButton (button);
|
||||||
|
@ -664,22 +652,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
box.PackStart (table, false, false, 0);
|
box.PackStart (table, false, false, 0);
|
||||||
|
|
||||||
ProgressBar progress_bar = new ProgressBar () {
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
Timer timer = new Timer () {
|
|
||||||
Interval = 100
|
|
||||||
};
|
|
||||||
|
|
||||||
timer.Elapsed += delegate {
|
|
||||||
progress_bar.Pulse ();
|
|
||||||
};
|
|
||||||
|
|
||||||
layout_vertical.PackStart (box, false, false, 0);
|
layout_vertical.PackStart (box, false, false, 0);
|
||||||
layout_vertical.PackStart (progress_bar, true, false, 0);
|
|
||||||
|
|
||||||
timer.Start ();
|
|
||||||
|
|
||||||
Add (layout_vertical);
|
Add (layout_vertical);
|
||||||
|
|
||||||
|
@ -725,7 +698,7 @@ namespace SparkleShare {
|
||||||
Button finish_button = new Button (_("Finish"));
|
Button finish_button = new Button (_("Finish"));
|
||||||
|
|
||||||
finish_button.Clicked += delegate (object o, EventArgs args) {
|
finish_button.Clicked += delegate (object o, EventArgs args) {
|
||||||
Destroy ();
|
Close ();
|
||||||
};
|
};
|
||||||
|
|
||||||
AddButton (finish_button);
|
AddButton (finish_button);
|
||||||
|
|
|
@ -203,8 +203,18 @@ namespace SparkleShare {
|
||||||
sync_item.Activated += delegate {
|
sync_item.Activated += delegate {
|
||||||
Application.Invoke (delegate {
|
Application.Invoke (delegate {
|
||||||
|
|
||||||
SparkleIntro intro = new SparkleIntro ();
|
if (SparkleUI.Intro == null) {
|
||||||
intro.ShowServerForm (true);
|
|
||||||
|
SparkleUI.Intro = new SparkleIntro ();
|
||||||
|
SparkleUI.Intro.ShowServerForm (true);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!SparkleUI.Intro.Visible)
|
||||||
|
SparkleUI.Intro.ShowServerForm (true);
|
||||||
|
|
||||||
|
SparkleUI.Intro.ShowAll ();
|
||||||
|
SparkleUI.Intro.Present ();
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,6 +34,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
public static SparkleStatusIcon StatusIcon;
|
public static SparkleStatusIcon StatusIcon;
|
||||||
public static List <SparkleLog> OpenLogs;
|
public static List <SparkleLog> OpenLogs;
|
||||||
|
public static SparkleIntro Intro;
|
||||||
|
|
||||||
|
|
||||||
// Short alias for the translations
|
// Short alias for the translations
|
||||||
|
@ -57,8 +58,8 @@ namespace SparkleShare {
|
||||||
|
|
||||||
if (SparkleShare.Controller.FirstRun) {
|
if (SparkleShare.Controller.FirstRun) {
|
||||||
|
|
||||||
SparkleIntro intro = new SparkleIntro ();
|
Intro = new SparkleIntro ();
|
||||||
intro.ShowAccountForm ();
|
Intro.ShowAccountForm ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,10 +39,17 @@ namespace SparkleShare {
|
||||||
|
|
||||||
BorderWidth = 0;
|
BorderWidth = 0;
|
||||||
IconName = "folder-sparkleshare";
|
IconName = "folder-sparkleshare";
|
||||||
Resizable = true;
|
Resizable = false;
|
||||||
WindowPosition = WindowPosition.Center;
|
WindowPosition = WindowPosition.Center; // FIXME: seems to have broken
|
||||||
|
|
||||||
SetDefaultSize (640, 425);
|
SetSizeRequest (680, 440);
|
||||||
|
|
||||||
|
DeleteEvent += delegate (object o, DeleteEventArgs args) {
|
||||||
|
|
||||||
|
args.RetVal = true;
|
||||||
|
Close ();
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
HBox = new HBox (false, 6);
|
HBox = new HBox (false, 6);
|
||||||
|
|
||||||
|
@ -71,7 +78,7 @@ namespace SparkleShare {
|
||||||
|
|
||||||
box.Add (side_splash);
|
box.Add (side_splash);
|
||||||
|
|
||||||
HBox.PackStart (box, true, true, 0);
|
HBox.PackStart (box, false, false, 0);
|
||||||
HBox.PackStart (VBox, true, true, 0);
|
HBox.PackStart (VBox, true, true, 0);
|
||||||
|
|
||||||
base.Add (HBox);
|
base.Add (HBox);
|
||||||
|
@ -130,6 +137,13 @@ namespace SparkleShare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Close ()
|
||||||
|
{
|
||||||
|
|
||||||
|
HideAll ();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue