Ver código fonte

Disabled temporarily associations and pixi double click on Steam

Krzysztof Krysiński 2 anos atrás
pai
commit
c340a80868

+ 2 - 0
src/PixiEditor/App.xaml.cs

@@ -42,10 +42,12 @@ internal partial class App : Application
             return;
             return;
         }
         }
 
 
+        #if !STEAM
         if (!HandleNewInstance())
         if (!HandleNewInstance())
         {
         {
             return;
             return;
         }
         }
+        #endif
 
 
         AddNativeAssets();
         AddNativeAssets();
         
         

+ 2 - 2
src/PixiEditor/Properties/AssemblyInfo.cs

@@ -50,5 +50,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.1.1.0")]
-[assembly: AssemblyFileVersion("1.1.1.0")]
+[assembly: AssemblyVersion("1.1.3.0")]
+[assembly: AssemblyFileVersion("1.1.3.0")]

+ 1 - 28
src/PixiEditor/ViewModels/SubViewModels/Main/RegistryViewModel.cs

@@ -16,43 +16,16 @@ internal class RegistryViewModel : SubViewModel<ViewModelMain>
 
 
     private void OwnerOnStartupEvent(object sender, EventArgs e)
     private void OwnerOnStartupEvent(object sender, EventArgs e)
     {
     {
+#if !STEAM // Something is wrong with Steam version of PixiEditor, so we disable this feature for now. Steam will have native association soon.
         // Check if lospec-palette is associated in registry
         // Check if lospec-palette is associated in registry
-
         if (!LospecPaletteIsAssociated())
         if (!LospecPaletteIsAssociated())
         {
         {
             // Associate lospec-palette URL protocol
             // Associate lospec-palette URL protocol
             RegistryHelpers.TryAssociate(AssociateLospecPaletteInRegistry, "FAILED_ASSOCIATE_LOSPEC");
             RegistryHelpers.TryAssociate(AssociateLospecPaletteInRegistry, "FAILED_ASSOCIATE_LOSPEC");
         }
         }
-
-#if STEAM // Only associate .pixi file if it's a steam version, other versions handle it during installation
-        if(!PixiFileIsAssociated())
-        {
-            RegistryHelpers.TryAssociate(AssociatePixiFileInRegistry, "FAILED_ASSOCIATE_PIXI");
-        }
 #endif
 #endif
     }
     }
 
 
-    private bool PixiFileIsAssociated()
-    {
-        // Check if HKEY_CLASSES_ROOT\.pixi is present
-        return RegistryHelpers.IsKeyPresentInRoot(".pixi");
-    }
-
-    private void AssociatePixiFileInRegistry()
-    {
-        try
-        {
-            using RegistryKey key = Registry.ClassesRoot.CreateSubKey(".pixi");
-            key.SetValue("", "PixiEditor");
-
-            using RegistryKey shellKey = key.CreateSubKey("OpenWithProgids");
-        }
-        catch
-        {
-            NoticeDialog.Show("FAILED_ASSOCIATE_PIXI", "ERROR");
-        }
-    }
-
     private void AssociateLospecPaletteInRegistry()
     private void AssociateLospecPaletteInRegistry()
     {
     {
         try
         try