Merge branch 'master' of \\\pk2010\Pithos\
authorPanagiotis Kanavos <pkanavos@gmail.com>
Mon, 6 Feb 2012 18:40:26 +0000 (20:40 +0200)
committerPanagiotis Kanavos <pkanavos@gmail.com>
Mon, 6 Feb 2012 18:40:26 +0000 (20:40 +0200)
Conflicts:
trunk/Pithos.Client.WPF/Shell/BalloonIconConverter.cs

35 files changed:
1  2 
trunk/Pithos.Client.WPF/Caliburn/Micro/Logging/DebugLogger.cs
trunk/Pithos.Client.WPF/Caliburn/Micro/Logging/log4netLogger.cs
trunk/Pithos.Client.WPF/Configuration/PithosSettings.cs
trunk/Pithos.Client.WPF/FileProperties/FilePropertiesViewModel.cs
trunk/Pithos.Client.WPF/PithosAccount.cs
trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
trunk/Pithos.Client.WPF/Services/StatusService.cs
trunk/Pithos.Client.WPF/Shell/AboutViewModel.cs
trunk/Pithos.Client.WPF/Shell/BalloonIconConverter.cs
trunk/Pithos.Client.WPF/Shell/FeedbackViewModel.cs
trunk/Pithos.Core.Test/ExtensionTests.cs
trunk/Pithos.Core/Agents/BlockExtensions.cs
trunk/Pithos.Core/Agents/CollectionExtensions.cs
trunk/Pithos.Core/Agents/FileSystemWatcherAdapter.cs
trunk/Pithos.Core/Agents/MovedEventArgs.cs
trunk/Pithos.Core/Agents/NetworkAgent.cs
trunk/Pithos.Core/Agents/WorkflowAgent.cs
trunk/Pithos.Core/FileState.cs
trunk/Pithos.Core/IStatusService.cs
trunk/Pithos.Core/JobQueue.cs
trunk/Pithos.Core/NetworkGate.cs
trunk/Pithos.Interfaces/AccountSettings.cs
trunk/Pithos.Interfaces/PithosSettingsData.cs
trunk/Pithos.Network/CloudFilesClient.cs
trunk/Pithos.Network/RestClient.cs
trunk/Pithos.ShellExtensions/FileContext.cs
trunk/Pithos.ShellExtensions/IoC.cs
trunk/Pithos.ShellExtensions/LogCategories.cs
trunk/Pithos.ShellExtensions/Menus/DisplayFlags.cs
trunk/Pithos.ShellExtensions/Menus/FileContextMenu.cs
trunk/Pithos.ShellExtensions/Overlays/AddedIcodOverlay.cs
trunk/Pithos.ShellExtensions/Overlays/UnversionedIconOverlay.cs
trunk/Pithos.ShellExtensions/PithosHost.cs
trunk/Pithos.ShellExtensions/ShellSettings.cs
trunk/Pithos.ShellExtensions/ShellStatusChecker.cs

@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="DebugLogger.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="log4netLogger.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="PithosSettings.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="FilePropertiesViewModel.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="PithosAccount.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="PreferencesViewModel.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="StatusService.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="AboutViewModel.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,5 -1,9 +1,43 @@@
- using System;\r
 -// -----------------------------------------------------------------------\r
 -// <copyright file="BalloonIconConverter.cs" company="Microsoft">\r
 -// TODO: Update copyright text.\r
++// -----------------------------------------------------------------------\r
++// <copyright file="NetworkAgent.cs" company="GRNET">\r
++// Copyright 2011-2012 GRNET S.A. All rights reserved.\r
++// \r
++// Redistribution and use in source and binary forms, with or\r
++// without modification, are permitted provided that the following\r
++// conditions are met:\r
++// \r
++//   1. Redistributions of source code must retain the above\r
++//      copyright notice, this list of conditions and the following\r
++//      disclaimer.\r
++// \r
++//   2. Redistributions in binary form must reproduce the above\r
++//      copyright notice, this list of conditions and the following\r
++//      disclaimer in the documentation and/or other materials\r
++//      provided with the distribution.\r
++// \r
++// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS\r
++// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\r
++// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
++// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR\r
++// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
++// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
++// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF\r
++// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\r
++// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r
++// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\r
++// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
++// POSSIBILITY OF SUCH DAMAGE.\r
++// \r
++// The views and conclusions contained in the software and\r
++// documentation are those of the authors and should not be\r
++// interpreted as representing official policies, either expressed\r
++// or implied, of GRNET S.A.\r
+ // </copyright>\r
+ // -----------------------------------------------------------------------\r
\r
++\r
++using System;\r
 +using System.Collections.Generic;\r
  using System.Globalization;\r
  using System.Windows.Data;\r
  using System.Windows.Media.Imaging;\r
@@@ -7,28 -11,24 +45,27 @@@ using Hardcodet.Wpf.TaskbarNotification
  \r
  namespace Pithos.Client.WPF.Shell\r
  {\r
 -    using System;\r
 -    using System.Collections.Generic;\r
 -    using System.Linq;\r
 -    using System.Text;\r
 -\r
 -    /// <summary>\r
 -    /// Convert a BalloonIcon value to an Image\r
 -    /// </summary>\r
 -    public class BalloonIconConverter:IValueConverter\r
 +    class BalloonIconConverter:IValueConverter\r
      {\r
 +\r
 +        Dictionary<BalloonIcon,BitmapImage> _iconCache=new Dictionary<BalloonIcon,BitmapImage>();\r
 +\r
          public object Convert(object value, Type targetType, object parameter, CultureInfo culture)\r
          {\r
 +            BitmapImage image;\r
 +            \r
 +            var icon = (BalloonIcon) value;\r
 +            if (icon == BalloonIcon.None)\r
 +                return null;\r
  \r
 -            var balloon = (BalloonIcon) value;\r
 -            var balloonName = Enum.GetName(typeof (BalloonIcon), balloon);\r
 -            var imageUrl = new Uri(String.Format("/Pithos.Client.WPF;component:/{0}.png", balloonName),UriKind.Relative);\r
 -            var image = new BitmapImage(imageUrl);\r
 +            if (!_iconCache.TryGetValue(icon, out image))\r
 +            {\r
 +                var imagePath = String.Format("/Pithos.Client.WPF;component/Images/{0}.png", Enum.GetName(typeof(BalloonIcon), value));\r
 +                var uri = new Uri(imagePath, UriKind.Relative);\r
 +                image=new BitmapImage(uri);\r
 +                _iconCache[icon] = image;\r
 +            }\r
              return image;\r
\r
          }\r
  \r
          public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)\r
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="FeedbackViewModel.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------\r
  // <copyright file="ExtensionTests.cs" company="GRNet">\r
--// Copyright 2011 GRNET S.A. All rights reserved.\r
++// Copyright 2011-2012 GRNET S.A. All rights reserved.\r
  // \r
  // Redistribution and use in source and binary forms, with or\r
  // without modification, are permitted provided that the following\r
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="FileInfoExtensions.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------\r
  // <copyright file="CollectionExtensions.cs" company="GRNET">\r
--// Copyright 2011 GRNET S.A. All rights reserved.\r
++// Copyright 2011-2012 GRNET S.A. All rights reserved.\r
  // \r
  // Redistribution and use in source and binary forms, with or\r
  // without modification, are permitted provided that the following\r
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------\r
  // <copyright file="FileInfoExtensions.cs" company="GRNET">\r
--// Copyright 2011 GRNET S.A. All rights reserved.\r
++// Copyright 2011-2012 GRNET S.A. All rights reserved.\r
  // \r
  // Redistribution and use in source and binary forms, with or\r
  // without modification, are permitted provided that the following\r
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------\r
  // <copyright file="FileInfoExtensions.cs" company="GRNET">\r
--// Copyright 2011 GRNET S.A. All rights reserved.\r
++// Copyright 2011-2012 GRNET S.A. All rights reserved.\r
  // \r
  // Redistribution and use in source and binary forms, with or\r
  // without modification, are permitted provided that the following\r
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="NetworkAgent.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="WorkflowAgent.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="FileState.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="IStatusService.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="JobQueue.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="NetworkGate.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="AccountSettings.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="PithosSettingsData.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="CloudFilesClient.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="RestClient.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="FileContext.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="IoC.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="LogCategories.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="DisplayFlags.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="FileContextMenu.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="AddedIcodOverlay.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="UnversionedIconOverlay.cs" company="GRNET">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="PithosHost.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="ShellSettings.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following
@@@ -1,6 -1,6 +1,6 @@@
  // -----------------------------------------------------------------------
  // <copyright file="ShellStatusChecker.cs" company="GRNet">
--// Copyright 2011 GRNET S.A. All rights reserved.
++// Copyright 2011-2012 GRNET S.A. All rights reserved.
  // 
  // Redistribution and use in source and binary forms, with or
  // without modification, are permitted provided that the following