projects
/
pithos-ms-client
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added synchronization of newly added selective paths instead of polling all files
[pithos-ms-client]
/
trunk
/
Pithos.Client.WPF
/
Shell
/
ShellViewModel.cs
diff --git
a/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
b/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
index
c73c8ee
..
c23928a
100644
(file)
--- a/
trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
+++ b/
trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
@@
-125,6
+125,8
@@
namespace Pithos.Client.WPF {
private readonly PollAgent _pollAgent;
private readonly NetworkAgent _networkAgent;
private readonly PollAgent _pollAgent;
private readonly NetworkAgent _networkAgent;
+ [Import]
+ public Selectives Selectives { get; set; }
private MiniStatusViewModel _miniStatus;
private MiniStatusViewModel _miniStatus;
@@
-318,6
+320,8
@@
namespace Pithos.Client.WPF {
MigrateFolders(account);
MigrateFolders(account);
+ Selectives.SetIsSelectiveEnabled(account.AccountKey, account.SelectiveSyncEnabled);
+
if (Monitors.TryGetValue(account.AccountKey, out monitor))
{
//If the account is active
if (Monitors.TryGetValue(account.AccountKey, out monitor))
{
//If the account is active
@@
-418,7
+422,7
@@
namespace Pithos.Client.WPF {
{
get
{
{
get
{
- return String.Format("{0}\r\n{1}", "Status Window", "Enable / Dissable the stuatus window");
+ return String.Format("{0}\r\n{1}", "Status Window", "Enable / Disable the status window");
}
}
}
}
@@
-499,6
+503,7
@@
namespace Pithos.Client.WPF {
public void ShowPreferences(string currentTab)
{
//Settings.Reload();
public void ShowPreferences(string currentTab)
{
//Settings.Reload();
+
var preferences = new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
_windowManager.ShowDialog(preferences);
var preferences = new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
_windowManager.ShowDialog(preferences);
@@
-1012,14
+1017,16
@@
namespace Pithos.Client.WPF {
PithosMonitor monitor;
if (Monitors.TryGetValue(message.Account.AccountKey, out monitor))
{
PithosMonitor monitor;
if (Monitors.TryGetValue(message.Account.AccountKey, out monitor))
{
- monitor.Selectives.SetIsSelectiveEnabled(message.Account.AccountKey, message.Enabled);
+ Selectives.SetIsSelectiveEnabled(message.Account.AccountKey, message.Enabled);
monitor.SetSelectivePaths(message.Uris, message.Added, message.Removed);
}
var account = Accounts.FirstOrDefault(acc => acc.AccountKey == message.Account.AccountKey);
if (account != null)
{
monitor.SetSelectivePaths(message.Uris, message.Added, message.Removed);
}
var account = Accounts.FirstOrDefault(acc => acc.AccountKey == message.Account.AccountKey);
if (account != null)
{
- this._pollAgent.SetSelectivePaths(account, message.Added, message.Removed);
+ _pollAgent.SetSelectivePaths(account, message.Added, message.Removed);
+ var added=monitor.UrisToFilePaths(message.Added);
+ _pollAgent.SynchNow(added);
}
});
}
});