setup: Add UI for '[X] Add SparkleShare to startup items' on Linux

This commit is contained in:
Hylke Bons 2012-02-24 21:58:39 +01:00
parent 86ab06486a
commit 29ff2335f8
2 changed files with 29 additions and 2 deletions

View file

@ -623,9 +623,15 @@ namespace SparkleShare {
Controller.FinishPageCompleted ();
};
// TODO: Add startup item checkbox here
check_button = new CheckButton ("Add SparkleShare to startup items");
check_button.Toggled += delegate {
Controller.StartupItemChanged (check_button.Active);
};
Add (slide);
AddOption (check_button);
AddButton (finish_button);
break;

View file

@ -29,9 +29,11 @@ namespace SparkleShare {
public class SparkleSetupWindow : Window {
// TODO: caps
private HBox HBox;
private VBox VBox;
private VBox Wrapper;
private VBox OptionArea;
private HButtonBox Buttons;
public string Header;
@ -72,10 +74,22 @@ namespace SparkleShare {
BorderWidth = 0
};
OptionArea = new VBox (false, 0) {
BorderWidth = 0
};
Buttons = CreateButtonBox ();
HBox layout_horizontal = new HBox (false , 0) {
BorderWidth = 0
};
layout_horizontal.PackStart (OptionArea, true, true, 0);
layout_horizontal.PackStart (Buttons, false, false, 0);
VBox.PackStart (Wrapper, true, true, 0);
VBox.PackStart (Buttons, false, false, 15);
VBox.PackStart (layout_horizontal, false, false, 15);
EventBox box = new EventBox ();
Gdk.Color bg_color = new Gdk.Color ();
@ -111,6 +125,13 @@ namespace SparkleShare {
}
public void AddOption (Widget widget)
{
OptionArea.Add (widget);
ShowAll ();
}
new public void Add (Widget widget)
{
Label header = new Label ("<span size='large'><b>" + Header + "</b></span>") {