commit 025046f11d129cd11d7127519f90a52ed3d68504
Author: Panagiotis Kanavos <pkanavos@gmail.com>
Date:   Fri Jan 27 15:15:15 2012 +0200

    Added a DeletedIconOverlay.cs
    Added synch status in the file properties
    Modified the splash screen to use the out-of-the-box splash functionality of WPF
    In NetworkAgent.cs, moved the delay call at the end of each poll. Waiting at the start of each poll is inappropriate when the polling frequency is large

diff --git a/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesView.xaml b/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesView.xaml
index a4a975c..0ccaf27 100644
--- a/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesView.xaml
+++ b/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesView.xaml
@@ -36,6 +36,11 @@
                         <TextBlock Text="Container: " />
                         <TextBlock x:Name="Container" Text="Container" />
                     </StackPanel>
+                    <StackPanel Orientation="Horizontal" Grid.Row="1">
+                        <TextBlock Text="Synch Status: " />
+                        <TextBlock x:Name="SynchStatus" Text="Normal" />
+                    </StackPanel>
+
                 </StackPanel>
                 <TextBlock x:Name="ShortSize" Text="345 KB" FontWeight="Bold" FontSize="14" Grid.Column="2" HorizontalAlignment="Left" Margin="5"/>
             </Grid>
diff --git a/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs b/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs
index 2efd787..c9efec3 100644
--- a/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs
+++ b/trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs
@@ -52,6 +52,7 @@ using System.Windows.Media.Imaging;
 using Caliburn.Micro;
 using Pithos.Client.WPF.FileProperties;
 using Pithos.Client.WPF.Properties;
+using Pithos.Core;
 using Pithos.Interfaces;
 using Pithos.Network;
 
@@ -257,6 +258,17 @@ namespace Pithos.Client.WPF
             }
         }
 
+        private string _synchStatus;
+        public string SynchStatus
+        {
+            get { return _synchStatus; }
+            set
+            {
+                _synchStatus = value;
+                NotifyOfPropertyChange(()=>SynchStatus);
+            }
+        }
+
         public bool TagsChanged { get; private set; }
         public bool PermissionsChanged { get; private set; }
 
@@ -301,7 +313,8 @@ namespace Pithos.Client.WPF
                 }
                 else
                     Execute.OnUIThread(() => PithosFile = t.Result);
-            });                        
+            });       
+                 
         }
 
         private void ShowError(AggregateException exception)
@@ -368,6 +381,11 @@ namespace Pithos.Client.WPF
                                                                        BitmapSizeOptions.FromEmptyOptions());
                     }
                 }
+
+                var status=Shell.GetFileStatus(LocalFileName);
+                SynchStatus = Enum.GetName(typeof (FileStatus), status);
+
+
                 NotifyOfPropertyChange(()=>PithosFile);
                 IsBusy = false;
             }
diff --git a/trunk/Pithos.Client.WPF/Images/logo.png b/trunk/Pithos.Client.WPF/Images/logo.png
index 3ad9f03..58ac3ea 100644
Binary files a/trunk/Pithos.Client.WPF/Images/logo.png and b/trunk/Pithos.Client.WPF/Images/logo.png differ
diff --git a/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj b/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj
index 555f5ae..430dd80 100644
--- a/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj
+++ b/trunk/Pithos.Client.WPF/Pithos.Client.WPF.csproj
@@ -400,7 +400,9 @@
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     </EmbeddedResource>
-    <None Include="app.config" />
+    <None Include="app.config">
+      <SubType>Designer</SubType>
+    </None>
     <None Include="packages.config" />
     <None Include="pithos.snk" />
     <None Include="Properties\Settings.settings">
@@ -472,7 +474,7 @@
     <Resource Include="Images\SmallLogo.png" />
   </ItemGroup>
   <ItemGroup>
-    <Resource Include="Images\logo.png" />
+    <SplashScreen Include="Images\logo.png" />
   </ItemGroup>
   <ItemGroup>
     <Resource Include="Images\Folder.ico" />
diff --git a/trunk/Pithos.Client.WPF/Preferences/ProxyAccountView.xaml b/trunk/Pithos.Client.WPF/Preferences/ProxyAccountView.xaml
index b3144f7..9c52518 100644
--- a/trunk/Pithos.Client.WPF/Preferences/ProxyAccountView.xaml
+++ b/trunk/Pithos.Client.WPF/Preferences/ProxyAccountView.xaml
@@ -1,7 +1,7 @@
 ﻿<Window x:Class="Pithos.Client.WPF.Preferences.ProxyAccountView"
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:Converters="clr-namespace:Pithos.Client.WPF.Converters" Title="ProxyAccountView" Height="300" Width="400">
+        xmlns:Converters="clr-namespace:Pithos.Client.WPF.Converters" Title="ProxyAccountView" Height="300" Width="400" Topmost="True">
     <Window.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
diff --git a/trunk/Pithos.Client.WPF/Shell/ShellView.xaml b/trunk/Pithos.Client.WPF/Shell/ShellView.xaml
index b94e7bc..65abe31 100644
--- a/trunk/Pithos.Client.WPF/Shell/ShellView.xaml
+++ b/trunk/Pithos.Client.WPF/Shell/ShellView.xaml
@@ -4,14 +4,17 @@
         xmlns:tb="clr-namespace:Hardcodet.Wpf.TaskbarNotification;assembly=Hardcodet.Wpf.TaskbarNotification" 
         xmlns:cal="http://www.caliburnproject.org"
         x:Name="TheView" WindowStartupLocation="CenterScreen" WindowStyle="None"
-        Width="700" Height="200" SizeToContent="Width">
+        Visibility="Collapsed"
+        Width="700" Height="200" SizeToContent="Width" WindowState="Minimized">
 
+<!--
     <Window.Background>
         <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
             <GradientStop Color="#4085A5" Offset="0"/>
             <GradientStop Color="#D7E8F0" Offset="1"/>
         </LinearGradientBrush>
     </Window.Background>    
+-->
     <Window.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
@@ -111,6 +114,8 @@
                 </ContextMenu>
             </tb:TaskbarIcon.ContextMenu>
         </tb:TaskbarIcon>
+<!--
         <Image Margin="0,0,10,5" Source="/Pithos.Client.WPF;component/Images/logo.png" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="None"/>
+-->
     </Grid>
 </Window>
diff --git a/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs b/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
index aa03f23..551d1fa 100644
--- a/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
+++ b/trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs
@@ -743,6 +743,11 @@ namespace Pithos.Client.WPF {
 		}
 
 
+        //SMELL: Doing so much work for notifications in the shell is wrong
+        //The notifications should be moved to their own view/viewmodel pair
+        //and different templates should be used for different message types
+        //This will also allow the addition of extra functionality, eg. actions
+        //to perform when clicking on a balloon
 		public void Handle(Notification notification)
 		{
 			if (!Settings.ShowDesktopNotifications)
@@ -806,5 +811,15 @@ namespace Pithos.Client.WPF {
 	        return matchingFolders.Any();
 	    }
 
+	    public FileStatus GetFileStatus(string localFileName)
+	    {
+            if (String.IsNullOrWhiteSpace(localFileName))
+                throw new ArgumentNullException("localFileName");
+            Contract.EndContractBlock();
+            
+	        var statusKeeper = IoC.Get<IStatusKeeper>();
+	        var status=statusKeeper.GetFileStatus(localFileName);
+	        return status;
+	    }
 	}
 }
diff --git a/trunk/Pithos.Client.WPF/app.config b/trunk/Pithos.Client.WPF/app.config
index 93124a0..5ba4c02 100644
--- a/trunk/Pithos.Client.WPF/app.config
+++ b/trunk/Pithos.Client.WPF/app.config
@@ -126,6 +126,10 @@
         <acceptOnMatch value="false" />
       </filter>
       <filter type="log4net.Filter.LoggerMatchFilter">
+        <loggerToMatch value="NHibernate.SQL" />
+        <acceptOnMatch value="true" />
+      </filter>
+      <filter type="log4net.Filter.LoggerMatchFilter">
         <loggerToMatch value="NHibernate" />
         <acceptOnMatch value="false" />
       </filter>
diff --git a/trunk/Pithos.Core/Agents/NetworkAgent.cs b/trunk/Pithos.Core/Agents/NetworkAgent.cs
index 6ce712a..32dde37 100644
--- a/trunk/Pithos.Core/Agents/NetworkAgent.cs
+++ b/trunk/Pithos.Core/Agents/NetworkAgent.cs
@@ -448,42 +448,54 @@ namespace Pithos.Core.Agents
         public async Task PollRemoteFiles(DateTime? since = null,bool repeat=true)
         {
 
-            _tcs = new TaskCompletionSource<bool>();
-            var wait = TaskEx.Delay(TimeSpan.FromSeconds(Settings.PollingInterval), _agent.CancellationToken);
-            var signaledTask=await TaskEx.WhenAny(_tcs.Task,wait);
-            //If polling is signalled by SynchNow, ignore the since tag
-            if (signaledTask is Task<bool>)
-                since = null;
 
             using (log4net.ThreadContext.Stacks["Retrieve Remote"].Push("All accounts"))
             {
-
+                //If this poll fails, we will retry with the same since value
+                var nextSince = since;
                 try
                 {
                     //Next time we will check for all changes since the current check minus 1 second
                     //This is done to ensure there are no discrepancies due to clock differences
-                    DateTime nextSince = DateTime.Now.AddSeconds(-1);
+                    DateTime current = DateTime.Now.AddSeconds(-1);
 
                     var tasks = from accountInfo in _accounts
                                 select ProcessAccountFiles(accountInfo, since);
 
                     await TaskEx.WhenAll(tasks.ToList());
-
+                                        
                     _firstPoll = false;
+                    //Reschedule the poll with the current timestamp as a "since" value
                     if (repeat)
-                        PollRemoteFiles(nextSince);
+                        nextSince = current;
+                    else
+                        return;
                 }
                 catch (Exception ex)
                 {
                     Log.ErrorFormat("Error while processing accounts\r\n{0}",ex);
-                    //In case of failure retry with the same parameter
-                    PollRemoteFiles(since);
+                    //In case of failure retry with the same "since" value
                 }
-                
+
+                //Wait for the polling interval to pass or the Manual flat to be toggled
+                nextSince = await WaitForScheduledOrManualPoll(nextSince);
+
+                PollRemoteFiles(nextSince);
 
             }
         }
 
+        private async Task<DateTime?> WaitForScheduledOrManualPoll(DateTime? since)
+        {            
+            _tcs = new TaskCompletionSource<bool>();
+            var wait = TaskEx.Delay(TimeSpan.FromSeconds(Settings.PollingInterval), _agent.CancellationToken);
+            var signaledTask = await TaskEx.WhenAny(_tcs.Task, wait);
+            //If polling is signalled by SynchNow, ignore the since tag
+            if (signaledTask is Task<bool>)
+                return null;
+            return since;
+        }
+
         public async Task ProcessAccountFiles(AccountInfo accountInfo,DateTime? since=null)
         {   
             if (accountInfo==null)
@@ -632,12 +644,32 @@ namespace Pithos.Core.Agents
             //in two steps
             //NOTE: DON'T return files that are already in conflict. The first poll would mark them as 
             //"In Conflict" but subsequent polls would delete them
+/*            var t=FileState.Find(new Guid("{cd664c9a-5f17-47c9-b27f-3bcbcb0595ff}"));
+
+            var d0 = FileState.Queryable
+                .Where(state => 
+                            state.FilePath.StartsWith(accountInfo.AccountPath)).ToList();
+            
+            var d1 = FileState.Queryable
+                .Where(state => state.Modified <= pollTime).ToList();
+            var d2= FileState.Queryable
+                .Where(state => state.Modified <= pollTime
+                            &&
+                            state.FilePath.StartsWith(accountInfo.AccountPath)).ToList();*/
+
+            var deleteCandidates = FileState.Queryable
+                .Where(state => state.Modified <= pollTime
+                            &&
+                            state.FilePath.StartsWith(accountInfo.AccountPath)
+                            && state.FileStatus != FileStatus.Conflict).ToList();
+/*
             var deleteCandidates = (from state in FileState.Queryable
                                    where 
                                         state.Modified <= pollTime 
                                         && state.FilePath.StartsWith(accountInfo.AccountPath)
                                         && state.FileStatus != FileStatus.Conflict
                                    select state).ToList();
+*/
 
             var filesToDelete = (from deleteCandidate in deleteCandidates 
                          let localFile = FileInfoExtensions.FromPath(deleteCandidate.FilePath) 
diff --git a/trunk/Pithos.Core/Agents/StatusAgent.cs b/trunk/Pithos.Core/Agents/StatusAgent.cs
index ac7f2b7..89cce58 100644
--- a/trunk/Pithos.Core/Agents/StatusAgent.cs
+++ b/trunk/Pithos.Core/Agents/StatusAgent.cs
@@ -43,6 +43,7 @@ namespace Pithos.Core.Agents
                 ActiveRecordStarter.CreateSchema();
 
             CreateTrigger();
+            
         }
 
         private void CreateTrigger()
@@ -614,8 +615,10 @@ namespace Pithos.Core.Agents
                 var command = new SQLiteCommand("select FileStatus from FileState where FilePath=:path  COLLATE NOCASE", connection);
                 command.Parameters.AddWithValue("path", path);
                 
-                var s = command.ExecuteScalar();
-                return (FileStatus)Convert.ToInt32(s);
+                var statusValue = command.ExecuteScalar();
+                if (statusValue==null)
+                    return FileStatus.Missing;
+                return (FileStatus)Convert.ToInt32(statusValue);
             }
         }
 
diff --git a/trunk/Pithos.Setup.x64/Pithos.Setup.x64.vdproj b/trunk/Pithos.Setup.x64/Pithos.Setup.x64.vdproj
index 8086629..4bb4506 100644
--- a/trunk/Pithos.Setup.x64/Pithos.Setup.x64.vdproj
+++ b/trunk/Pithos.Setup.x64/Pithos.Setup.x64.vdproj
@@ -1911,6 +1911,28 @@
                                             }
                                         }
                                     }
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5004716641E24919B137F1EBC3425C49"
+                                    {
+                                    "Name" = "8:Deleted"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                        }
+                                        "Values"
+                                        {
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_6EA88C3929B240A5940D0651BAA1F2B8"
+                                            {
+                                            "Name" = "8:Pithos"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:{11051AB4-D786-4248-BC6E-369F25EC74E4}"
+                                            }
+                                        }
+                                    }
                                     "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5F1A26A61A6941F48D1A7500DAC510CA"
                                     {
                                     "Name" = "8:Unversioned"
@@ -2387,6 +2409,50 @@
                             }
                         }
                     }
+                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_93AA85194A7C4BC993A3F802F8698C10"
+                    {
+                    "Name" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                    "Condition" = "8:"
+                    "AlwaysCreate" = "11:FALSE"
+                    "DeleteAtUninstall" = "11:FALSE"
+                    "Transitive" = "11:FALSE"
+                        "Keys"
+                        {
+                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D7EBDBE444D6447080D0E4548FB1594A"
+                            {
+                            "Name" = "8:CLSID"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                }
+                                "Values"
+                                {
+                                    "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_644D37D72EC548A68375806875898F76"
+                                    {
+                                    "Name" = "8:"
+                                    "Condition" = "8:"
+                                    "Transitive" = "11:FALSE"
+                                    "ValueTypes" = "3:1"
+                                    "Value" = "8:{11051AB4-D786-4248-BC6E-369F25EC74E4}"
+                                    }
+                                }
+                            }
+                        }
+                        "Values"
+                        {
+                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_E1D994BA8DDF4F2398C79D10547A0F4B"
+                            {
+                            "Name" = "8:"
+                            "Condition" = "8:"
+                            "Transitive" = "11:FALSE"
+                            "ValueTypes" = "3:1"
+                            "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                            }
+                        }
+                    }
                     "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_9704B86B3D7945719532C09F94835F03"
                     {
                     "Name" = "8:Pithos.ShellExtensions.Overlays.UnversionedIconOverlay"
@@ -3204,6 +3270,140 @@
                                     }
                                 }
                             }
+                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_7BDD6C3DBD78419DA3C16F6DBC551F1C"
+                            {
+                            "Name" = "8:{11051AB4-D786-4248-BC6E-369F25EC74E4}"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_056BA5B3933148D88E11459D5B0C83EE"
+                                    {
+                                    "Name" = "8:Implemented Categories"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_CBAA1F96E33D4C3E883132C87C710B52"
+                                            {
+                                            "Name" = "8:{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}"
+                                            "Condition" = "8:"
+                                            "AlwaysCreate" = "11:FALSE"
+                                            "DeleteAtUninstall" = "11:FALSE"
+                                            "Transitive" = "11:FALSE"
+                                                "Keys"
+                                                {
+                                                }
+                                                "Values"
+                                                {
+                                                }
+                                            }
+                                        }
+                                        "Values"
+                                        {
+                                        }
+                                    }
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_05C71F10F2E645F8B8448EC90CF7F540"
+                                    {
+                                    "Name" = "8:ProgId"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                        }
+                                        "Values"
+                                        {
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_7EEFD9EE0F2D4B688C5FBC98C5253524"
+                                            {
+                                            "Name" = "8:"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                                            }
+                                        }
+                                    }
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_97922C7E8A46448994C5855C4AF2BC35"
+                                    {
+                                    "Name" = "8:InprocServer32"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                        }
+                                        "Values"
+                                        {
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_004ACDE8A99B4AF0B0CE3E7B1B6EF3E6"
+                                            {
+                                            "Name" = "8:CodeBase"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:[TARGETDIR]\\Pithos.ShellExtensions.dll"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_CC7C253FCA0A4DB4817983C966609C97"
+                                            {
+                                            "Name" = "8:Assembly"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Pithos.ShellExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2cc55badaa91f4de"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_D89C8DF5F19D4CC5AB6734B9CB3B7D76"
+                                            {
+                                            "Name" = "8:Class"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_E132EA37A841421BACAE854339C512CD"
+                                            {
+                                            "Name" = "8:"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:mscoree.dll"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_E409F83FAB574BC6AC3730DAC0E12F63"
+                                            {
+                                            "Name" = "8:RuntimeVersion"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:v4.0.30319"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_ED712CA1A5FF4C33850858CA22E23731"
+                                            {
+                                            "Name" = "8:ThreadingModel"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Both"
+                                            }
+                                        }
+                                    }
+                                }
+                                "Values"
+                                {
+                                    "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_DDE72707F46047BA8983005622638C43"
+                                    {
+                                    "Name" = "8:"
+                                    "Condition" = "8:"
+                                    "Transitive" = "11:FALSE"
+                                    "ValueTypes" = "3:1"
+                                    "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                                    }
+                                }
+                            }
                             "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_9A1D2A7CF4D44D2A92F49560D1B5BCF2"
                             {
                             "Name" = "8:{10CF08FE-1252-4AAB-BE78-971B0C5E8AE0}"
diff --git a/trunk/Pithos.Setup.x86/Pithos.Setup.x86.vdproj b/trunk/Pithos.Setup.x86/Pithos.Setup.x86.vdproj
index 7309407..5d5960d 100644
--- a/trunk/Pithos.Setup.x86/Pithos.Setup.x86.vdproj
+++ b/trunk/Pithos.Setup.x86/Pithos.Setup.x86.vdproj
@@ -537,24 +537,6 @@
         }
         "Entry"
         {
-        "MsmKey" = "8:_F693ED58D49B3EC1892CE4184575B87B"
-        "OwnerKey" = "8:_11BDAAF760654D3792A432B5EB874364"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_F693ED58D49B3EC1892CE4184575B87B"
-        "OwnerKey" = "8:_EBAF62F0335F4918AB23EDA708507D1F"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_F693ED58D49B3EC1892CE4184575B87B"
-        "OwnerKey" = "8:_A611766CD2793378FFAB2F3063F81496"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
         "MsmKey" = "8:_FA76529F78D7D6108EDBA33F19836A6B"
         "OwnerKey" = "8:_11BDAAF760654D3792A432B5EB874364"
         "MsmSig" = "8:_UNDEFINED"
@@ -676,12 +658,6 @@
         "Entry"
         {
         "MsmKey" = "8:_UNDEFINED"
-        "OwnerKey" = "8:_F693ED58D49B3EC1892CE4184575B87B"
-        "MsmSig" = "8:_UNDEFINED"
-        }
-        "Entry"
-        {
-        "MsmKey" = "8:_UNDEFINED"
         "OwnerKey" = "8:_4C5B93BC82FE5E63E01458A8DA46B4D6"
         "MsmSig" = "8:_UNDEFINED"
         }
@@ -1540,37 +1516,6 @@
             "IsDependency" = "11:TRUE"
             "IsolateTo" = "8:"
             }
-            "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_F693ED58D49B3EC1892CE4184575B87B"
-            {
-            "AssemblyRegister" = "3:1"
-            "AssemblyIsInGAC" = "11:FALSE"
-            "AssemblyAsmDisplayName" = "8:Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, PublicKeyToken=2cc55badaa91f4de, processorArchitecture=MSIL"
-                "ScatterAssemblies"
-                {
-                    "_F693ED58D49B3EC1892CE4184575B87B"
-                    {
-                    "Name" = "8:Microsoft.WindowsAPICodePack.dll"
-                    "Attributes" = "3:512"
-                    }
-                }
-            "SourcePath" = "8:Microsoft.WindowsAPICodePack.dll"
-            "TargetName" = "8:"
-            "Tag" = "8:"
-            "Folder" = "8:_FA3E4362540D4C76A5914763C178A3BD"
-            "Condition" = "8:"
-            "Transitive" = "11:FALSE"
-            "Vital" = "11:TRUE"
-            "ReadOnly" = "11:FALSE"
-            "Hidden" = "11:FALSE"
-            "System" = "11:FALSE"
-            "Permanent" = "11:FALSE"
-            "SharedLegacy" = "11:FALSE"
-            "PackageAs" = "3:1"
-            "Register" = "3:1"
-            "Exclude" = "11:FALSE"
-            "IsDependency" = "11:TRUE"
-            "IsolateTo" = "8:"
-            }
             "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_FA76529F78D7D6108EDBA33F19836A6B"
             {
             "AssemblyRegister" = "3:1"
@@ -1773,6 +1718,28 @@
                                             }
                                         }
                                     }
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5004716641E24919B137F1EBC3425C49"
+                                    {
+                                    "Name" = "8:Deleted"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                        }
+                                        "Values"
+                                        {
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_6EA88C3929B240A5940D0651BAA1F2B8"
+                                            {
+                                            "Name" = "8:Pithos"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:{11051AB4-D786-4248-BC6E-369F25EC74E4}"
+                                            }
+                                        }
+                                    }
                                     "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5F1A26A61A6941F48D1A7500DAC510CA"
                                     {
                                     "Name" = "8:Unversioned"
@@ -2249,6 +2216,50 @@
                             }
                         }
                     }
+                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_93AA85194A7C4BC993A3F802F8698C10"
+                    {
+                    "Name" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                    "Condition" = "8:"
+                    "AlwaysCreate" = "11:FALSE"
+                    "DeleteAtUninstall" = "11:FALSE"
+                    "Transitive" = "11:FALSE"
+                        "Keys"
+                        {
+                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D7EBDBE444D6447080D0E4548FB1594A"
+                            {
+                            "Name" = "8:CLSID"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                }
+                                "Values"
+                                {
+                                    "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_644D37D72EC548A68375806875898F76"
+                                    {
+                                    "Name" = "8:"
+                                    "Condition" = "8:"
+                                    "Transitive" = "11:FALSE"
+                                    "ValueTypes" = "3:1"
+                                    "Value" = "8:{11051AB4-D786-4248-BC6E-369F25EC74E4}"
+                                    }
+                                }
+                            }
+                        }
+                        "Values"
+                        {
+                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_E1D994BA8DDF4F2398C79D10547A0F4B"
+                            {
+                            "Name" = "8:"
+                            "Condition" = "8:"
+                            "Transitive" = "11:FALSE"
+                            "ValueTypes" = "3:1"
+                            "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                            }
+                        }
+                    }
                     "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_9704B86B3D7945719532C09F94835F03"
                     {
                     "Name" = "8:Pithos.ShellExtensions.Overlays.UnversionedIconOverlay"
@@ -3066,6 +3077,140 @@
                                     }
                                 }
                             }
+                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_7BDD6C3DBD78419DA3C16F6DBC551F1C"
+                            {
+                            "Name" = "8:{11051AB4-D786-4248-BC6E-369F25EC74E4}"
+                            "Condition" = "8:"
+                            "AlwaysCreate" = "11:FALSE"
+                            "DeleteAtUninstall" = "11:FALSE"
+                            "Transitive" = "11:FALSE"
+                                "Keys"
+                                {
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_056BA5B3933148D88E11459D5B0C83EE"
+                                    {
+                                    "Name" = "8:Implemented Categories"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                            "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_CBAA1F96E33D4C3E883132C87C710B52"
+                                            {
+                                            "Name" = "8:{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}"
+                                            "Condition" = "8:"
+                                            "AlwaysCreate" = "11:FALSE"
+                                            "DeleteAtUninstall" = "11:FALSE"
+                                            "Transitive" = "11:FALSE"
+                                                "Keys"
+                                                {
+                                                }
+                                                "Values"
+                                                {
+                                                }
+                                            }
+                                        }
+                                        "Values"
+                                        {
+                                        }
+                                    }
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_05C71F10F2E645F8B8448EC90CF7F540"
+                                    {
+                                    "Name" = "8:ProgId"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                        }
+                                        "Values"
+                                        {
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_7EEFD9EE0F2D4B688C5FBC98C5253524"
+                                            {
+                                            "Name" = "8:"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                                            }
+                                        }
+                                    }
+                                    "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_97922C7E8A46448994C5855C4AF2BC35"
+                                    {
+                                    "Name" = "8:InprocServer32"
+                                    "Condition" = "8:"
+                                    "AlwaysCreate" = "11:FALSE"
+                                    "DeleteAtUninstall" = "11:FALSE"
+                                    "Transitive" = "11:FALSE"
+                                        "Keys"
+                                        {
+                                        }
+                                        "Values"
+                                        {
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_004ACDE8A99B4AF0B0CE3E7B1B6EF3E6"
+                                            {
+                                            "Name" = "8:CodeBase"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:[TARGETDIR]\\Pithos.ShellExtensions.dll"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_CC7C253FCA0A4DB4817983C966609C97"
+                                            {
+                                            "Name" = "8:Assembly"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Pithos.ShellExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2cc55badaa91f4de"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_D89C8DF5F19D4CC5AB6734B9CB3B7D76"
+                                            {
+                                            "Name" = "8:Class"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_E132EA37A841421BACAE854339C512CD"
+                                            {
+                                            "Name" = "8:"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:mscoree.dll"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_E409F83FAB574BC6AC3730DAC0E12F63"
+                                            {
+                                            "Name" = "8:RuntimeVersion"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:v4.0.30319"
+                                            }
+                                            "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_ED712CA1A5FF4C33850858CA22E23731"
+                                            {
+                                            "Name" = "8:ThreadingModel"
+                                            "Condition" = "8:"
+                                            "Transitive" = "11:FALSE"
+                                            "ValueTypes" = "3:1"
+                                            "Value" = "8:Both"
+                                            }
+                                        }
+                                    }
+                                }
+                                "Values"
+                                {
+                                    "{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_DDE72707F46047BA8983005622638C43"
+                                    {
+                                    "Name" = "8:"
+                                    "Condition" = "8:"
+                                    "Transitive" = "11:FALSE"
+                                    "ValueTypes" = "3:1"
+                                    "Value" = "8:Pithos.ShellExtensions.Overlays.DeletedIconOverlay"
+                                    }
+                                }
+                            }
                             "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_9A1D2A7CF4D44D2A92F49560D1B5BCF2"
                             {
                             "Name" = "8:{10CF08FE-1252-4AAB-BE78-971B0C5E8AE0}"
diff --git a/trunk/Pithos.ShellExtensions/Overlays/DeletedIconOverlay.cs b/trunk/Pithos.ShellExtensions/Overlays/DeletedIconOverlay.cs
new file mode 100644
index 0000000..8bfdf9f
--- /dev/null
+++ b/trunk/Pithos.ShellExtensions/Overlays/DeletedIconOverlay.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Runtime.InteropServices;
+
+namespace Pithos.ShellExtensions.Overlays
+{
+    [ClassInterface(ClassInterfaceType.None), ComVisible(true)]
+    [Guid("11051AB4-D786-4248-BC6E-369F25EC74E4")]
+    public class DeletedIconOverlay: IconOverlayBase
+    {
+
+        private static string _iconName = "Deleted";
+
+        public DeletedIconOverlay()
+            : base(_iconName)
+        {
+            
+        }
+
+        #region Shell Extension Registration
+        [ComRegisterFunction()]
+        public static void Register(Type t)
+        {
+            RegisterOverlay(t,_iconName);
+        }
+
+        [ComUnregisterFunction]
+        public static void Unregister(Type t)
+        {
+            UnregisterOverlay(t,_iconName);
+        }
+
+        #endregion
+
+
+    }
+}
\ No newline at end of file
diff --git a/trunk/Pithos.ShellExtensions/Pithos.ShellExtensions.csproj b/trunk/Pithos.ShellExtensions/Pithos.ShellExtensions.csproj
index dbdddd0..43a5589 100644
--- a/trunk/Pithos.ShellExtensions/Pithos.ShellExtensions.csproj
+++ b/trunk/Pithos.ShellExtensions/Pithos.ShellExtensions.csproj
@@ -148,6 +148,7 @@
     <Compile Include="Menus\MenuItem.cs" />
     <Compile Include="Overlays\AddedIcodOverlay.cs" />
     <Compile Include="Overlays\ConflictIconOverlay.cs" />
+    <Compile Include="Overlays\DeletedIconOverlay.cs" />
     <Compile Include="Overlays\IconOverlayBase.cs" />
     <Compile Include="Overlays\ModifiedIconOverlay.cs" />
     <Compile Include="Overlays\NormalIconOverlay.cs" />
