remove Add dialog and change welcome message

This commit is contained in:
Hylke Bons 2010-05-16 12:15:17 +01:00
parent ea79a02e94
commit 4b37ff93ed

View file

@ -35,7 +35,6 @@ namespace SparkleShare {
private TreeView ReposView; private TreeView ReposView;
private ListStore ReposStore; private ListStore ReposStore;
private SparkleRepo [] Repositories; private SparkleRepo [] Repositories;
private SparkleDialog SparkleDialog;
public SparkleWindow (SparkleRepo [] R) : base ("SparkleShare") { public SparkleWindow (SparkleRepo [] R) : base ("SparkleShare") {
@ -47,14 +46,19 @@ namespace SparkleShare {
SparkleBubble NoFoldersBubble; SparkleBubble NoFoldersBubble;
NoFoldersBubble = new SparkleBubble ("Welcome to SparkleShare!", NoFoldersBubble = new SparkleBubble ("Welcome to SparkleShare!",
"You don't have any " + "You don't have any " +
"folders set up yet."); "folders set up yet.\n" +
"Please create some in " +
"the SparkleShare folder.");
NoFoldersBubble.IconName = "folder-sparkleshare"; NoFoldersBubble.IconName = "folder-sparkleshare";
NoFoldersBubble.AddAction ("", "Set up a folder", NoFoldersBubble.AddAction ("", "Open Folder",
delegate { delegate {
SparkleDialog = Process Process = new Process ();
new SparkleDialog (this); Process.StartInfo.FileName =
SparkleDialog.ShowAll (); "xdg-open";
Process.StartInfo.Arguments =
SparklePaths.SparklePath;
Process.Start();
} ); } );
} else CreateWindow (); } else CreateWindow ();
@ -193,18 +197,10 @@ namespace SparkleShare {
}; };
Button AddButton = new Button ("Add a Folder…");
AddButton.Clicked += delegate {
SparkleDialog = new SparkleDialog (this);
SparkleDialog.ShowAll ();
};
ScrolledWindow.AddWithViewport (ReposView); ScrolledWindow.AddWithViewport (ReposView);
ScrolledWindow.WidthRequest = 200; ScrolledWindow.WidthRequest = 200;
VBox VBox = new VBox (false, 6); VBox VBox = new VBox (false, 6);
VBox.PackStart (ScrolledWindow, true, true, 0); VBox.PackStart (ScrolledWindow, true, true, 0);
VBox.PackStart (AddButton, false, false, 0);
return VBox; return VBox;
@ -474,7 +470,7 @@ namespace SparkleShare {
} else { } else {
ShowAll (); ShowAll ();
} }
} else SparkleDialog = new SparkleDialog (this); }
} }
} }