[Wine-patches] [eterhack] [eter-1.0.12] Disable file type associations export by default (eterbug #7021).

Alexander Morozov amorozov на etersoft.ru
Ср Апр 6 22:20:23 MSD 2011


----------- следующая часть -----------
From 825ee18309fb104b93143073a1c4be4b6df78713 Mon Sep 17 00:00:00 2001
From: Alexander Morozov <amorozov на etersoft.ru>
Date: Wed, 6 Apr 2011 22:02:22 +0400
Subject: [eterhack 4/4] Disable file type associations export by default (eterbug #7021).

---
 etersoft/init/config                       |    4 ++++
 programs/winemenubuilder/winemenubuilder.c |   15 ++++++++++++++-
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/etersoft/init/config b/etersoft/init/config
index 7d1569f..dfafe35 100644
--- a/etersoft/init/config
+++ b/etersoft/init/config
@@ -57,6 +57,10 @@ export WINEHOLDSERVER=1800
 # Disable automount (assign drive letters) removable devices (eterbug #4327)
 #export WINEAUTOMOUNT=no
 
+# ?????????????????? ?????????????? ???????????????? ???????????????????? ???? wine
+# Disable file type associations export from wine
+export WINEDISABLEASSOC=yes
+
 # Disable annoying fixmes
 if [ -z "$WINEDEBUG" ] ; then
 	export WINEDEBUG=fixme-mshtml
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 070a8c2..6412088 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -3347,6 +3347,18 @@ static BOOL init_xdg(void)
     return FALSE;
 }
 
+static BOOL associations_enabled(void)
+{
+    static int enabled = -1;
+
+    if (enabled < 0)
+    {
+        char *assoc = getenv("WINEDISABLEASSOC");
+        enabled = (!assoc || strcmp(assoc, "yes"));
+    }
+    return enabled;
+}
+
 /***********************************************************************
  *
  *           wWinMain
@@ -3382,7 +3394,8 @@ int PASCAL wWinMain (HINSTANCE hInstance, HINSTANCE prev, LPWSTR cmdline, int sh
 	    break;
         if( !strcmpW( token, dash_aW ) )
         {
-            RefreshFileTypeAssociations();
+            if (associations_enabled())
+                RefreshFileTypeAssociations();
             continue;
         }
         if( !strcmpW( token, dash_rW ) )
-- 
1.7.4.2



Подробная информация о списке рассылки Wine-patches