Merge branch 'master' of ssh://github.com/hbons/SparkleShare

This commit is contained in:
Hylke Bons 2011-10-13 15:05:42 +01:00
commit ca8cd89c8b
7 changed files with 3213 additions and 32 deletions

View file

@ -166,13 +166,6 @@ namespace SparkleShare {
PathEntry = new SparkleEntry ();
AddressEntry = new SparkleEntry ();
Controller.SelectListPluginEvent += delegate (int index) {
Application.Invoke (delegate {
TreeSelection selection = tree.Selection;
TreePath path = new TreePath (index.ToString ());
selection.SelectPath (path);
});
};
// Select the first plugin by default
TreeSelection default_selection = tree.Selection;
@ -182,14 +175,20 @@ namespace SparkleShare {
Controller.ChangeAddressFieldEvent += delegate (string text,
string example_text, FieldState state) {
Console.WriteLine ("> " + text);
Application.Invoke (delegate {
AddressEntry.Text = text;
AddressEntry.Sensitive = (state == FieldState.Enabled);
AddressEntry.ExampleText = example_text;
if (!string.IsNullOrEmpty (text))
if (string.IsNullOrEmpty (example_text))
AddressEntry.ExampleText = null;
else
AddressEntry.ExampleText = example_text;
if (string.IsNullOrEmpty (text))
AddressEntry.ExampleTextActive = true;
else
AddressEntry.ExampleTextActive = false;
});
};
@ -199,10 +198,16 @@ namespace SparkleShare {
Application.Invoke (delegate {
PathEntry.Text = text;
PathEntry.Sensitive = (state == FieldState.Enabled);
PathEntry.ExampleText = example_text;
if (!string.IsNullOrEmpty (text))
if (string.IsNullOrEmpty (example_text))
PathEntry.ExampleText = null;
else
PathEntry.ExampleText = example_text;
if (string.IsNullOrEmpty (text))
PathEntry.ExampleTextActive = true;
else
PathEntry.ExampleTextActive = false;
});
};
@ -235,7 +240,7 @@ namespace SparkleShare {
}
if (!string.IsNullOrEmpty (address) &&
address.Equals (Controller.PreviousServer)) {
address.Equals (Controller.PreviousAddress)) {
tree.SetCursor (path, service_column, false);
SparklePlugin plugin = (SparklePlugin) model.GetValue (iter, 2);

View file

@ -282,24 +282,6 @@ namespace SparkleShare {
if (ChangePathFieldEvent != null)
ChangePathFieldEvent ("", "", FieldState.Enabled);
}
// TODO: previous server/folder doesn't work yet
/*
if (!string.IsNullOrEmpty (PreviousServer) && SelectedPlugin.Address == null) {
if (ChangeAddressFieldEvent != null) {
ChangeAddressFieldEvent (this.previous_server,
SelectedPlugin.AddressExample, FieldState.Enabled);
}
}
if (!string.IsNullOrEmpty (PreviousFolder) && SelectedPlugin.Path == null) {
if (ChangePathFieldEvent != null) {
ChangeAddressFieldEvent (this.previous_folder,
SelectedPlugin.PathExample, FieldState.Enabled);
}
}
*/
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 928 KiB

View file

@ -7,7 +7,6 @@ data/plugins/github.xml.in
data/plugins/gitorious.xml.in
data/plugins/gnome.xml.in
data/plugins/own-server.xml.in
data/plugins/redhat.xml.in
SparkleShare/Mac/SparkleStatusIcon.cs
SparkleShare/Mac/SparkleUI.cs
SparkleShare/Nautilus/sparkleshare-nautilus-extension.py.in