Fix for multiple preferences windows
authorpkanavos <pkanavos@gmail.com>
Mon, 2 Jul 2012 10:40:05 +0000 (13:40 +0300)
committerpkanavos <pkanavos@gmail.com>
Mon, 2 Jul 2012 10:40:05 +0000 (13:40 +0300)
trunk/Pithos.Client.WPF/Preferences/PreferencesView.xaml
trunk/Pithos.Client.WPF/Preferences/PreferencesViewModel.cs
trunk/Pithos.Client.WPF/Shell/ShellViewModel.cs

index 2115f04..bfde0a9 100644 (file)
@@ -9,7 +9,8 @@
         ShowInTaskbar="true"
         WindowStartupLocation="CenterScreen"
         Icon="/PithosPlus;component/Images/PithosTaskbar.png"
-        WindowStyle="ToolWindow"
+        WindowStyle="ToolWindow"        
+        Topmost="True"
         ResizeMode="NoResize"
         Background="White">
         
index be62c07..469ea54 100644 (file)
@@ -115,6 +115,7 @@ namespace Pithos.Client.WPF.Preferences
         public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings)\r
             :this(windowManager,events,shell,settings,null)\r
         {\r
+            this.DisplayName = "Pithos+ Preferences";\r
         }\r
 \r
         public PreferencesViewModel(IWindowManager windowManager, IEventAggregator events, ShellViewModel shell, PithosSettings settings, string currentTab)\r
index 78dc503..4fab311 100644 (file)
@@ -538,8 +538,8 @@ namespace Pithos.Client.WPF {
                    var preferences = IoC.Get<PreferencesViewModel>();//??new PreferencesViewModel(_windowManager, _events, this, Settings,currentTab);
             if (!String.IsNullOrWhiteSpace(currentTab))
                 preferences.SelectedTab = currentTab;
-
-                   _windowManager.ShowDialog(preferences);
+            if (!preferences.IsActive)
+                       _windowManager.ShowDialog(preferences);
                        
                }