Add a broken 'Added' event in sparklerepo
This commit is contained in:
parent
95649fedf8
commit
1cce9ea552
|
@ -69,34 +69,37 @@ namespace SparkleShare {
|
||||||
|
|
||||||
VBox layout_vertical = new VBox (false, 0);
|
VBox layout_vertical = new VBox (false, 0);
|
||||||
|
|
||||||
Label introduction = new Label ("<span size='x-large'><b>Welcome to SparkleShare!</b></span>");
|
Label introduction = new Label ("<span size='x-large'><b>Welcome to SparkleShare!</b></span>") {
|
||||||
introduction.UseMarkup = true;
|
UseMarkup = true,
|
||||||
introduction.Xalign = 0;
|
Xalign = 0
|
||||||
|
};
|
||||||
|
|
||||||
Label information = new Label ("Before we can create a SparkleShare folder on this " +
|
Label information = new Label ("Before we can create a SparkleShare folder on this " +
|
||||||
"computer, we need a few bits of information from you.");
|
"computer, we need a few bits of information from you.") {
|
||||||
information.Xalign = 0;
|
Xalign = 0,
|
||||||
information.Wrap = true;
|
Wrap = true
|
||||||
|
};
|
||||||
|
|
||||||
Entry name_entry = new Entry ("");
|
|
||||||
Label name_label = new Label (_("<b>Full Name:</b>"));
|
|
||||||
|
|
||||||
UnixUserInfo unix_user_info = new UnixUserInfo (UnixEnvironment.UserName);
|
UnixUserInfo unix_user_info = new UnixUserInfo (UnixEnvironment.UserName);
|
||||||
|
|
||||||
name_entry.Text = unix_user_info.RealName;
|
Label name_label = new Label (_("<b>Full Name:</b>")) {
|
||||||
name_label.UseMarkup = true;
|
Text = unix_user_info.RealName,
|
||||||
name_label.Xalign = 0;
|
UseMarkup = true,
|
||||||
|
Xalign = 0
|
||||||
|
};
|
||||||
|
|
||||||
|
Entry name_entry = new Entry ("");
|
||||||
|
|
||||||
Table table = new Table (6, 2, true);
|
Table table = new Table (6, 2, true) {
|
||||||
table.RowSpacing = 6;
|
RowSpacing = 6
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
Entry email_entry = new Entry ("");
|
Entry email_entry = new Entry ("");
|
||||||
Label email_label = new Label (_("<b>Email:</b>"));
|
Label email_label = new Label (_("<b>Email:</b>")) {
|
||||||
email_label.UseMarkup = true;
|
UseMarkup = true,
|
||||||
email_label.Xalign = 0;
|
Xalign = 0
|
||||||
|
};
|
||||||
|
|
||||||
Entry server_entry = new Entry ("ssh://gitorious.org/sparkleshare");
|
Entry server_entry = new Entry ("ssh://gitorious.org/sparkleshare");
|
||||||
Label server_label = new Label (_("<b>Folder Address:</b>"));
|
Label server_label = new Label (_("<b>Folder Address:</b>"));
|
||||||
|
|
|
@ -45,6 +45,11 @@ namespace SparkleShare {
|
||||||
public string UserEmail;
|
public string UserEmail;
|
||||||
public string UserName;
|
public string UserName;
|
||||||
|
|
||||||
|
|
||||||
|
public delegate void AddedEventHandler (object o, SparkleEventArgs args);
|
||||||
|
public event AddedEventHandler Added;
|
||||||
|
|
||||||
|
|
||||||
public static string _ (string s)
|
public static string _ (string s)
|
||||||
{
|
{
|
||||||
return Catalog.GetString (s);
|
return Catalog.GetString (s);
|
||||||
|
@ -311,6 +316,10 @@ namespace SparkleShare {
|
||||||
// SparkleUI.NotificationIcon.SetSyncingState ();
|
// SparkleUI.NotificationIcon.SetSyncingState ();
|
||||||
// SparkleUI.NotificationIcon.SetIdleState ();
|
// SparkleUI.NotificationIcon.SetIdleState ();
|
||||||
|
|
||||||
|
SparkleEventArgs args = new SparkleEventArgs ("add test");
|
||||||
|
if (Added != null)
|
||||||
|
Added (this, args);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -637,4 +646,15 @@ namespace SparkleShare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,7 @@ using System.IO;
|
||||||
|
|
||||||
namespace SparkleShare {
|
namespace SparkleShare {
|
||||||
|
|
||||||
public class SparkleUI
|
public class SparkleUI {
|
||||||
{
|
|
||||||
|
|
||||||
private Process Process;
|
private Process Process;
|
||||||
|
|
||||||
|
@ -217,6 +216,10 @@ namespace SparkleShare {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void Test (object o, SparkleEventArgs args) {
|
||||||
|
Console.WriteLine ("AAAAAAAAAAAAAAAAAA");
|
||||||
|
}
|
||||||
|
|
||||||
public void UpdateRepositories ()
|
public void UpdateRepositories ()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -251,9 +254,29 @@ namespace SparkleShare {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SparkleRepo a = TmpRepos [0];
|
||||||
|
a.Added += new SparkleRepo.AddedEventHandler (Test);
|
||||||
|
|
||||||
|
|
||||||
SparkleShare.Repositories = new SparkleRepo [FolderCount];
|
SparkleShare.Repositories = new SparkleRepo [FolderCount];
|
||||||
Array.Copy (TmpRepos, SparkleShare.Repositories, FolderCount);
|
Array.Copy (TmpRepos, SparkleShare.Repositories, FolderCount);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public class SparkleEventArgs : System.EventArgs {
|
||||||
|
|
||||||
|
private string message;
|
||||||
|
|
||||||
|
|
||||||
|
public SparkleEventArgs (string s)
|
||||||
|
{
|
||||||
|
this.message = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string Message ()
|
||||||
|
{
|
||||||
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue