wimh / SparkleShare

SparkleShare is a file sharing and collaboration tool inspired by Dropbox.
http://www.sparkleshare.org/
GNU General Public License v3.0
39 stars 6 forks source link

List with icons when choosing remote project #24

Closed kvaggelakos closed 12 years ago

kvaggelakos commented 13 years ago

I've implemented a new choose remote project screen. Let me know what you guys think about it.

Remeber that this is only a first draft, as I haven't had time to test it properly.

wimh commented 13 years ago

Looks good to me. The most notable which is missing is disabling the server textbox for other selections than "on your own server".

Edit:

When the selection in the listbox is changed and moved back to own server, the (example) text in the server textbox does not change, it stays as it was on the last selection.

When the window is resized, the listbox does not grow. It would be nice if it would (but that's not important).

kvaggelakos commented 13 years ago

The size of the setup window was adjusted to the image to the left which I changed. I think that this window should be static to a size that feels good. I will push that in its own commit so that you can decide what you want

hbons commented 12 years ago

Fixed window size is fine.

wimh commented 12 years ago

@kozze89 I tried the new version, but I am not able to enter anything in the "Remote Path" when selecting anything else than own server.

kvaggelakos commented 12 years ago

Hmm, weird. I will look into this again. But as I remember it worked fine last time I tried!

On Dec 3, 2011, at 10:58 PM, wimh wrote:

@kozze89 I tried the new version, but I am not able to enter anything in the "Remote Path" when selecting anything else than own server.


Reply to this email directly or view it on GitHub: https://github.com/wimh/SparkleShare/pull/24#issuecomment-3003358

wimh commented 12 years ago

SparkleSetup.Designer.cs#L215:

        this.FolderEntry.TextChanged += new System.EventHandler (this.CheckAddPage);

SparkleSetup.cs#L146:

    private void CheckAddPage (object sender, EventArgs e) {
        // If the "own server" choice is selected, allow input to the server entry box
        if (treeView.SelectedNode.Index == 0) { 
            ServerEntry.Enabled = true;
            ServerEntry.ExampleText = Controller.Plugins [treeView.SelectedNode.Index].AddressExample;
        } else {
            ServerEntry.Text = ""; //Clear any previous input data so that exampletext can show
            FolderEntry.Text = "";
            ServerEntry.ExampleText = Controller.Plugins [treeView.SelectedNode.Index].Address;
            ServerEntry.Enabled = false;
        }

So when the text of FolderEntry is changed, CheckAddPage is called, in CheckAddPage the FolderEntry is cleared.

btw, I am not sure treeView.SelectedNode.Index==0 should be used to determine OwnServer is selected. If I delete own-server.xml it is not working as it should.

hbons commented 12 years ago

it's probably best to rebase this on master. a lot has changed there logic wise and it's likely easier as well.

kvaggelakos commented 12 years ago

Everything should work now. I changed the part where it checks for the index == 0. It now looks for a tag with the string "On my own server". I couldn't figure out a better way to do it! If you guys have any suggestion please change it.

wimh commented 12 years ago

I think I found a new problem.

Steps to reproduce:

  1. start SparkleShare and select "Add remote folder..."
  2. enter address=localhost, remote path=/does/not/exist
  3. press sync
  4. press try again, after it has failed
  5. now the address stays localhost, even if I select bitbucket, github, ...
kvaggelakos commented 12 years ago

Thanks wimh, your testing skills are clearly better than mine! I will look into this as soon as possible.

On Dec 6, 2011, at 8:27 PM, wimh wrote:

I think I found a new problem.

Steps to reproduce:

  1. start SparkleShare and select "Add remote folder..."
  2. enter address=localhost, remote path=/does/not/exist
  3. press sync
  4. press try again, after it has failed
  5. now the address stays localhost, even if I select bitbucket, github, ...

Reply to this email directly or view it on GitHub: https://github.com/wimh/SparkleShare/pull/24#issuecomment-3037290

wimh commented 12 years ago

and, instead of

if (treeView.SelectedNode.Tag.ToString () == "On my own server")

or

if (treeView.SelectedNode.Index == 0)

can you use

if (String.IsNullOrEmpty (Controller.Plugins [treeView.SelectedNode.Index].Address))

It does not fix the bug, but there will not be a problem any more if someone chosed to delete own-server.xml or rename own-server.xml to z-server.xml.

wimh commented 12 years ago

@kozze89 :) I have been beta tester for a while in my company. So I learned to find this kind of bugs ;)

kvaggelakos commented 12 years ago

Alright, now I hope i works. I've tried to follow through a "sync" with wrong information and the said bug doesn't appear any more for me.

wimh commented 12 years ago

can you try

  1. start SparkleShare and select "Add remote folder..."
  2. press cancel
  3. select "Add remote folder..."
kvaggelakos commented 12 years ago

Okey second attempt in place. If this one doesn't work I think I'll have to rethink the whole process of the treeview. I might be over my head a bit. Anyway I really appreciate that you are helpful.

wimh commented 12 years ago

Can't find any problems any more.

I made one modification, see 2f7aeb4a446f7920495f018f1d613dc91e2263bd