Version
[pithos-ms-client] / trunk / Pithos.Client.WPF / Shell / ShellViewModel.cs
index c73c8ee..f86f46e 100644 (file)
@@ -125,6 +125,8 @@ namespace Pithos.Client.WPF {
            private readonly PollAgent _pollAgent;
            private readonly NetworkAgent _networkAgent;
 
+           [Import]
+           public Selectives Selectives { get; set; }
 
            private MiniStatusViewModel _miniStatus;
 
@@ -318,6 +320,8 @@ namespace Pithos.Client.WPF {
 
                            MigrateFolders(account);
 
+                           Selectives.SetIsSelectiveEnabled(account.AccountKey, account.SelectiveSyncEnabled);
+
                                if (Monitors.TryGetValue(account.AccountKey, out monitor))
                                {
                                        //If the account is active
@@ -418,7 +422,7 @@ namespace Pithos.Client.WPF {
         {
             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();
+            
                    var preferences = new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
                    _windowManager.ShowDialog(preferences);
                        
@@ -1012,7 +1017,7 @@ namespace Pithos.Client.WPF {
                        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);
                        }