Merge branch 'master' of https://code.grnet.gr/git/pithos-ms-client
authorpkanavos <pkanavos@gmail.com>
Tue, 8 May 2012 16:07:24 +0000 (19:07 +0300)
committerpkanavos <pkanavos@gmail.com>
Tue, 8 May 2012 16:07:24 +0000 (19:07 +0300)
Conflicts:
trunk/Pithos.Interfaces/ObjectInfo.cs

trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml
trunk/Pithos.Client.WPF/SelectiveSynch/SelectiveSynchViewModel.cs
trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
trunk/Pithos.Core/Agents/StatusAgent.cs
trunk/Pithos.Interfaces/FolderConstants.cs
trunk/Pithos.Interfaces/ObjectInfo.cs

index 60cd8c1..8df0473 100644 (file)
                     <CheckBox Content="Activate Shell Extensions" Height="16" HorizontalAlignment="Left" Margin="5" Name="ExtensionsActivated" VerticalAlignment="Top" />
                     <Button Content="Refresh Overlays" Name="RefreshOverlays" HorizontalAlignment="Left" Margin="5" Style="{StaticResource ButtonStyle}" Width="Auto" />
                     <TextBlock Text="Polling Interval (secs)" Margin="5"/>
-                    <extToolkit:IntegerUpDown x:Name="Settings_PollingInterval" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter seconds" Minimum="10" />                    
+                    <extToolkit:IntegerUpDown x:Name="Settings_PollingInterval" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter seconds" Minimum="1" />                    
                     <TextBlock Text="Hashing Parallelism" Margin="5"/>
                     <extToolkit:IntegerUpDown x:Name="Settings_HashingParallelism" HorizontalAlignment="Left" Width="100" Margin="5,0" Watermark="Enter number of tasks" Minimum="1" />                    
                     <TextBlock Text="Startup Delay (minutes)" Margin="5"/>
index e680d88..1665017 100644 (file)
@@ -148,10 +148,6 @@ namespace Pithos.Client.WPF.SelectiveSynch
                                    DisplayName = AccountName ,\r
                                    Directories = ownFolders.ToList()\r
                                };\r
-\r
-            var localFolders = SelectiveExtensions.LocalFolders(AccountName, Account.RootPath,client.StorageUrl.AbsoluteUri);\r
-\r
-            AppendToTree(localFolders, rootItem);\r
             \r
             //For each local folder that doesn't exist in the server nodes \r
             //find the best matching parent and add the folder below it.\r
index dd3999d..c73c8ee 100644 (file)
@@ -316,6 +316,8 @@ namespace Pithos.Client.WPF {
                                PithosMonitor monitor;
                                var accountName = account.AccountName;
 
+                           MigrateFolders(account);
+
                                if (Monitors.TryGetValue(account.AccountKey, out monitor))
                                {
                                        //If the account is active
@@ -365,8 +367,21 @@ namespace Pithos.Client.WPF {
                        });
                }
 
+           private void MigrateFolders(AccountSettings account)
+           {
+               var oldOthersFolder=Path.Combine(account.RootPath, FolderConstants.OldOthersFolder);
+               var newOthersFolder = Path.Combine(account.RootPath, FolderConstants.OthersFolder);
+               var oldFolder = new DirectoryInfo(oldOthersFolder);
+               var newFolder = new DirectoryInfo(newOthersFolder);
+
+            if (oldFolder.Exists && !newFolder.Exists)
+            {
+                oldFolder.MoveTo(newOthersFolder);
+            }
+           }
+
 
-               protected override void OnViewLoaded(object view)
+           protected override void OnViewLoaded(object view)
                {
                        UpdateStatus();
                        var window = (Window)view;            
index 7090f90..0f7f8a8 100644 (file)
@@ -761,7 +761,7 @@ namespace Pithos.Core.Agents
             if (!Path.IsPathRooted(path))
                 throw new ArgumentException("The path must be rooted", "path");
             Contract.EndContractBlock();
-
+            //TODO: May throw if the agent is cleared for some reason. Should never happen
             _persistenceAgent.Post(() => DeleteFolderDirect(path));   
         }
 
index d87d1cd..e7e70dc 100644 (file)
@@ -43,7 +43,8 @@ namespace Pithos.Interfaces
 {\r
     public static class FolderConstants\r
     {\r
-        public static readonly string OthersFolder="others-shared";\r
+        public static readonly string OldOthersFolder = "others-shared";\r
+        public static readonly string OthersFolder="Shared with me";\r
         public static readonly string PithosContainer = "pithos";\r
         public static readonly string TrashContainer = "trash";\r
 \r
index 9c22f7f..cccd13a 100644 (file)
@@ -381,7 +381,7 @@ namespace Pithos.Interfaces
             get
             {
                 if (Uri == null || StorageUri == null)
-                    return true;
+                    return null;
                 var isShared = !Uri.ToString().StartsWith(StorageUri.ToString());
                 return isShared;
             }