[PATCH] winebrowser: Don't put the default mailers or browsers into the registry.

Ken Thomases ken at codeweavers.com
Fri Apr 27 12:26:21 CDT 2007


The registry should only have the user's overrides of the defaults.  Otherwise,
when the set of defaults changes in the code, they won't be picked up because
they'll be overridden by the old defaults in the registry.
---
  programs/winebrowser/main.c |   10 ----------
  1 files changed, 0 insertions(+), 10 deletions(-)
-------------- next part --------------
diff --git a/programs/winebrowser/main.c b/programs/winebrowser/main.c
index 7bea32c..cee8279 100644
--- a/programs/winebrowser/main.c
+++ b/programs/winebrowser/main.c
@@ -92,12 +92,7 @@ static int open_http_url( const char *url )
 
     r = RegQueryValueExA( key, "Browsers", 0, &type, (LPBYTE)browsers, &length );
     if (r != ERROR_SUCCESS)
-    {
-        /* set value to the default */
-        RegSetValueExA( key, "Browsers", 0, REG_SZ, (const BYTE *)defaultbrowsers,
-                        lstrlen( defaultbrowsers ) + 1 );
         strcpy( browsers, defaultbrowsers );
-    }
     RegCloseKey( key );
 
     return launch_app( browsers, url );
@@ -124,12 +119,7 @@ static int open_mailto_url( const char *url )
 
     r = RegQueryValueExA( key, "Mailers", 0, &type, (LPBYTE)mailers, &length );
     if (r != ERROR_SUCCESS)
-    {
-        /* set value to the default */
-        RegSetValueExA( key, "Mailers", 0, REG_SZ, (const BYTE *)defaultmailers,
-                        lstrlen( defaultmailers ) + 1 );
         strcpy( mailers, defaultmailers );
-    }
     RegCloseKey( key );
 
     return launch_app( mailers, url );


More information about the wine-patches mailing list