Skip to content

Commit

Permalink
Fix #5534.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylangisc committed Jan 24, 2011
1 parent 4cbd641 commit f44ce4f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 29 deletions.
63 changes: 35 additions & 28 deletions source/ch/cyberduck/ui/controller/BrowserController.cs
Expand Up @@ -890,7 +890,8 @@ private void View_BrowserModelDropped(ModelDropEventArgs dropargs)
foreach (TreePathReference reference in dropargs.SourceModels)
{
Path next = reference.Unique;
Path copy = PathFactory.createPath(getSession(), destination.getAbsolute(), next.getName(), next.attributes().getType());
Path copy = PathFactory.createPath(getSession(), destination.getAbsolute(), next.getName(),
next.attributes().getType());
files.Add(next, copy);
}
DuplicatePaths(files, false);
Expand Down Expand Up @@ -1269,8 +1270,8 @@ private void Disconnect()
private void View_Stop()
{
// Remove all pending actions)
foreach (BackgroundAction action in this.getActions().toArray(
new BackgroundAction[this.getActions().size()]))
foreach (BackgroundAction action in getActions().toArray(
new BackgroundAction[getActions().size()]))
{
action.cancel();
}
Expand Down Expand Up @@ -1377,7 +1378,9 @@ private void View_ToggleLogDrawer()
private void View_ShowHiddenFiles()
{
ShowHiddenFiles = !ShowHiddenFiles;
ReloadData(true);
if (IsMounted()){
ReloadData(true);
}
}

private void View_ToggleToolbar()
Expand Down Expand Up @@ -2175,7 +2178,7 @@ protected void transfer(Transfer transfer, bool useBrowserConnection, TransferPr
/// <returns>The session to be used for file transfers. Null if not mounted</returns>
protected Session getTransferSession()
{
return this.getTransferSession(false);
return getTransferSession(false);
}

protected Session getTransferSession(bool force)
Expand Down Expand Up @@ -2462,7 +2465,7 @@ public bool IsConnected()
/// <returns>true if there is any network activity running in the background</returns>
public bool IsActivityRunning()
{
BackgroundAction current = this.getActions().getCurrent();
BackgroundAction current = getActions().getCurrent();
if (null == current)
{
return false;
Expand Down Expand Up @@ -2528,24 +2531,28 @@ public bool Unmount(DialogCallbackDelegate unmountImpl, CallbackDelegate disconn
if (Preferences.instance().getBoolean("browser.confirmDisconnect"))
{
DialogResult result = CommandBox(Locale.localizedString("Disconnect"),
String.Format(Locale.localizedString("Disconnect from {0}"), _session.getHost().getHostname()),
String.Format(Locale.localizedString("Disconnect from {0}"),
_session.getHost().getHostname()),
Locale.localizedString("The connection will be closed."),
String.Format("{0}", Locale.localizedString("Disconnect")),
true,
Locale.localizedString("Don't ask again", "Configuration"), SysIcons.Question, delegate(int option, bool verificationChecked)
{
if (verificationChecked)
{
// Never show again.
Preferences.instance().setProperty("browser.confirmDisconnect", false);
}
switch (option)
{
case 0: // Disconnect
unmountImpl(DialogResult.OK);
break;
}
});
Locale.localizedString("Don't ask again", "Configuration"),
SysIcons.Question, delegate(int option, bool verificationChecked)
{
if (verificationChecked)
{
// Never show again.
Preferences.instance().setProperty(
"browser.confirmDisconnect",
false);
}
switch (option)
{
case 0: // Disconnect
unmountImpl(DialogResult.OK);
break;
}
});
return DialogResult.OK == result;
}
UnmountImpl(disconnected);
Expand All @@ -2572,7 +2579,7 @@ private void Interrupt()
{
if (IsActivityRunning())
{
BackgroundAction current = this.getActions().getCurrent();
BackgroundAction current = getActions().getCurrent();
if (null != current)
{
current.cancel();
Expand Down Expand Up @@ -2605,7 +2612,7 @@ public void UpdateStatusLabel()
switch (View.CurrentView)
{
case BrowserView.File:
BackgroundAction current = this.getActions().getCurrent();
BackgroundAction current = getActions().getCurrent();
if (null == current)
{
if (IsConnected())
Expand Down Expand Up @@ -3450,17 +3457,17 @@ public ProgessListener(BrowserController controller)
_controller = controller;
}

public string Laststatus
{
get { return _laststatus; }
}

public void message(string msg)
{
_laststatus = msg;
AsyncDelegate updateLabel = delegate { _controller.View.StatusLabel = msg; };
_controller.Invoke(updateLabel);
}

public string Laststatus
{
get { return _laststatus; }
}
}

internal class ReloadTransferAdapter : ch.cyberduck.core.TransferAdapter
Expand Down
2 changes: 1 addition & 1 deletion source/ch/cyberduck/ui/winforms/BrowserForm.cs
Expand Up @@ -345,7 +345,7 @@ protected override ContextMenu[] ContextMenuCollection

public bool HiddenFilesVisible
{
set { showHiddenFilesToolStripMenuItem.Checked = value; }
set { showHiddenFilesMainMenuItem.Checked = value; }
}

public string SearchString
Expand Down

0 comments on commit f44ce4f

Please sign in to comment.