user: nuke the other look tweaks

Dimitrie O. Paun dpaun at rogers.com
Thu Apr 1 01:25:00 CST 2004


OK,

This was a bit trickier because it wasn't crystal clear what
look to keep. I have tried to go with the 98 look where possible.
In the places where I thought the code hasn't been updated for
the Win98 case, I went with the Win95 look. I think it OK.

ChangeLog
    Remove the rest of the Tweak look hack.

Index: include/user.h
===================================================================
RCS file: /var/cvs/wine/include/user.h,v
retrieving revision 1.62
diff -u -r1.62 user.h
--- include/user.h	1 Apr 2004 04:57:12 -0000	1.62
+++ include/user.h	1 Apr 2004 06:39:39 -0000
@@ -136,16 +136,6 @@
 
 extern BOOL USER_IsExitingThread( DWORD tid );
 
-/* Wine look */
-
-typedef enum
-{
-    WIN95_LOOK,
-    WIN98_LOOK
-} WINE_LOOK;
-
-extern WINE_LOOK TWEAK_WineLook;
-
 /* gray brush cache */
 extern HBRUSH CACHE_GetPattern55AABrush(void);
 
Index: controls/edit.c
===================================================================
RCS file: /var/cvs/wine/controls/edit.c,v
retrieving revision 1.129
diff -u -r1.129 edit.c
--- controls/edit.c	1 Apr 2004 04:57:12 -0000	1.129
+++ controls/edit.c	1 Apr 2004 06:48:25 -0000
@@ -4374,13 +4374,8 @@
 		es->style |= ES_AUTOVSCROLL;
 	} else {
 		es->buffer_limit = BUFLIMIT_SINGLE;
-                if ( WIN95_LOOK == TWEAK_WineLook) {
-		        es->style &= ~ES_CENTER;
-		        es->style &= ~ES_RIGHT;
-                } else {
-			if (es->style & ES_RIGHT)
-				es->style &= ~ES_CENTER;
-                }
+		es->style &= ~ES_CENTER;
+		es->style &= ~ES_RIGHT;
 		es->style &= ~WS_HSCROLL;
 		es->style &= ~WS_VSCROLL;
 		es->style &= ~ES_AUTOVSCROLL;
Index: controls/menu.c
===================================================================
RCS file: /var/cvs/wine/controls/menu.c,v
retrieving revision 1.179
diff -u -r1.179 menu.c
--- controls/menu.c	1 Apr 2004 04:57:12 -0000	1.179
+++ controls/menu.c	1 Apr 2004 06:51:37 -0000
@@ -831,15 +831,9 @@
     /* handle fontsize > bitmap_height */
     top = (h>bm.bmHeight) ? rect->top+(h-bm.bmHeight)/2 : rect->top;
     left=rect->left;
-    if (TWEAK_WineLook == WIN95_LOOK) {
-        rop=((lpitem->fState & MF_HILITE) && !IS_MAGIC_ITEM(lpitem->text)) ? NOTSRCCOPY : SRCCOPY;
-        if ((lpitem->fState & MF_HILITE) && IS_BITMAP_ITEM(lpitem->fType))
-            SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
-    } else {
-        left++;
-        w-=2;
-        rop=((lpitem->fState & MF_HILITE) && !IS_MAGIC_ITEM(lpitem->text) && (!menuBar)) ? MERGEPAINT : SRCCOPY;
-    }
+    rop=((lpitem->fState & MF_HILITE) && !IS_MAGIC_ITEM(lpitem->text)) ? NOTSRCCOPY : SRCCOPY;
+    if ((lpitem->fState & MF_HILITE) && IS_BITMAP_ITEM(lpitem->fType))
+        SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
     BitBlt( hdc, left, top, w, h, hdcMem, bmp_xoffset, 0, rop );
     DeleteDC( hdcMem );
 }
@@ -921,12 +915,9 @@
         MENU_GetBitmapItemSize( (int)lpitem->text, lpitem->dwItemData, &size );
         lpitem->rect.right  += size.cx;
         lpitem->rect.bottom += size.cy;
-        if (TWEAK_WineLook == WIN98_LOOK)
-        {
-            /* Leave space for the sunken border */
-            lpitem->rect.right  += 2;
-            lpitem->rect.bottom += 2;
-        }
+        /* Leave space for the sunken border */
+        lpitem->rect.right  += 2;
+        lpitem->rect.bottom += 2;
     }
 
 
@@ -1170,18 +1161,10 @@
     {
 	if (lpitem->fState & MF_HILITE)
 	{
-	    if(TWEAK_WineLook == WIN98_LOOK)
-	    {
-		if(menuBar)
-		    DrawEdge(hdc, &rect, BDR_SUNKENOUTER, BF_RECT);
-		else
-		    FillRect(hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT));
-	    }
-	    else /* Not Win98 Look */
-	    {
-		if(!IS_BITMAP_ITEM(lpitem->fType))
-		    FillRect(hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT));
-	    }
+	     if(menuBar)
+		DrawEdge(hdc, &rect, BDR_SUNKENOUTER, BF_RECT);
+	     else
+		FillRect(hdc, &rect, GetSysColorBrush(COLOR_HIGHLIGHT));
 	}
         else
 	    FillRect( hdc, &rect, GetSysColorBrush(COLOR_MENU) );
@@ -1216,24 +1199,15 @@
 
     if (lpitem->fState & MF_HILITE)
     {
-	if(TWEAK_WineLook == WIN98_LOOK)
-	{
-            if(menuBar) {
-		SetTextColor(hdc, GetSysColor(COLOR_MENUTEXT));
-                SetBkColor(hdc, GetSysColor(COLOR_MENU));
-	    } else {
-		if(lpitem->fState & MF_GRAYED)
-		    SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
-		else
-		    SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
-                SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
-	    }
-	}
-	else /* Not Win98 Look */
-	{
-	    SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
-	    if(!IS_BITMAP_ITEM(lpitem->fType))
-		SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
+        if(menuBar) {
+	    SetTextColor(hdc, GetSysColor(COLOR_MENUTEXT));
+            SetBkColor(hdc, GetSysColor(COLOR_MENU));
+	} else {
+	    if(lpitem->fState & MF_GRAYED)
+		SetTextColor(hdc, GetSysColor(COLOR_GRAYTEXT));
+	    else
+		SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHTTEXT));
+            SetBkColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
 	}
     }
     else
@@ -3186,23 +3160,22 @@
     oldflags = item->fState & (MF_GRAYED | MF_DISABLED);
     item->fState ^= (oldflags ^ wFlags) & (MF_GRAYED | MF_DISABLED);
 
-    /* In win95 if the close item in the system menu change update the close button */
-    if (TWEAK_WineLook == WIN95_LOOK)
-	if((item->wID == SC_CLOSE) && (oldflags != wFlags))
+    /* If the close item in the system menu change update the close button */
+    if((item->wID == SC_CLOSE) && (oldflags != wFlags))
+    {
+	if (menu->hSysMenuOwner != 0)
 	{
-	    if (menu->hSysMenuOwner != 0)
-	    {
-		POPUPMENU* parentMenu;
+	    POPUPMENU* parentMenu;
 
-		/* Get the parent menu to access*/
-		if (!(parentMenu = MENU_GetMenu(menu->hSysMenuOwner)))
-		    return (UINT)-1;
-
-		/* Refresh the frame to reflect the change*/
-		SetWindowPos(parentMenu->hWnd, 0, 0, 0, 0, 0,
-			     SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
-	    }
+	    /* Get the parent menu to access*/
+	    if (!(parentMenu = MENU_GetMenu(menu->hSysMenuOwner)))
+		return (UINT)-1;
+
+	    /* Refresh the frame to reflect the change*/
+	    SetWindowPos(parentMenu->hWnd, 0, 0, 0, 0, 0,
+		         SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER);
 	}
+    }
 
     return oldflags;
 }
Index: controls/uitools.c
===================================================================
RCS file: /var/cvs/wine/controls/uitools.c,v
retrieving revision 1.32
diff -u -r1.32 uitools.c
--- controls/uitools.c	5 Sep 2003 23:15:45 -0000	1.32
+++ controls/uitools.c	1 Apr 2004 06:47:01 -0000
@@ -466,15 +466,7 @@
         LTInnerI = RBInnerI = LTRBInnerFlat[uType & (BDR_INNER|BDR_OUTER)];
         LTOuterI = RBOuterI = LTRBOuterFlat[uType & (BDR_INNER|BDR_OUTER)];
 
-        /* Bertho Stultiens states above that this function exactly matches win95
-         * In win98 BF_FLAT rectangles have an inner border same color as the
-	 * middle (COLOR_BTNFACE). I believe it's the same for win95 but since
-	 * I don't know I go with Bertho and just sets it for win98 until proven
-	 * otherwise.
-	 *                                          Dennis Björklund, 10 June, 99
-	 */
-	if( TWEAK_WineLook == WIN98_LOOK && LTInnerI != -1 )
-            LTInnerI = RBInnerI = COLOR_BTNFACE;
+	if( LTInnerI != -1 ) LTInnerI = RBInnerI = COLOR_BTNFACE;
     }
     else if(uFlags & BF_SOFT)
     {
Index: dlls/user/user_main.c
===================================================================
RCS file: /var/cvs/wine/dlls/user/user_main.c,v
retrieving revision 1.65
diff -u -r1.65 user_main.c
--- dlls/user/user_main.c	1 Apr 2004 04:57:12 -0000	1.65
+++ dlls/user/user_main.c	1 Apr 2004 06:38:54 -0000
@@ -39,8 +39,6 @@
 
 USER_DRIVER USER_Driver;
 
-WINE_LOOK TWEAK_WineLook = WIN95_LOOK;
-
 WORD USER_HeapSel = 0;  /* USER heap selector */
 HMODULE user32_module = 0;
 
@@ -151,37 +149,6 @@
 
 
 /***********************************************************************
- *           tweak_init
- */
-static void tweak_init(void)
-{
-    static const char *OS = "Win95";
-    char buffer[80];
-    HKEY hkey;
-    DWORD type, count = sizeof(buffer);
-
-    if (RegOpenKeyA( HKEY_LOCAL_MACHINE, "Software\\Wine\\Wine\\Config\\Tweak.Layout", &hkey ))
-        return;
-    if (RegQueryValueExA( hkey, "WineLook", 0, &type, buffer, &count ))
-        strcpy( buffer, "Win95" );  /* default value */
-    RegCloseKey( hkey );
-
-    /* WIN31_LOOK is default */
-    if (!strncasecmp( buffer, "Win95", 5 ))
-    {
-        TWEAK_WineLook = WIN95_LOOK;
-        OS = "Win95";
-    }
-    else if (!strncasecmp( buffer, "Win98", 5 ))
-    {
-        TWEAK_WineLook = WIN98_LOOK;
-        OS = "Win98";
-    }
-    TRACE("Using %s look and feel.\n", OS);
-}
-
-
-/***********************************************************************
  *           USER initialisation routine
  */
 static BOOL process_attach(void)
@@ -197,7 +164,6 @@
     }
 
     /* Load the graphics driver */
-    tweak_init();
     if (!load_driver()) return FALSE;
 
     /* Initialize system colors and metrics */
Index: documentation/PACKAGING
===================================================================
RCS file: /var/cvs/wine/documentation/PACKAGING,v
retrieving revision 1.6
diff -u -r1.6 PACKAGING
--- documentation/PACKAGING	26 Nov 2003 03:55:01 -0000	1.6
+++ documentation/PACKAGING	1 Apr 2004 06:54:21 -0000
@@ -546,9 +546,6 @@
 	; get the stuff from the readonly installation and can write to our own.
 	Temp=t:\			(the TEMP directory)
 
-    * [Tweak.Layout]
-	WineLook=win95                (just the coolest look ;)
-
     * Possibly modify the [spooler], [serialports] and [parallelports] sections.
       FIXME: possibly more, including printer stuff.
 
Index: documentation/configuring.sgml
===================================================================
RCS file: /var/cvs/wine/documentation/configuring.sgml,v
retrieving revision 1.43
diff -u -r1.43 configuring.sgml
--- documentation/configuring.sgml	29 Mar 2004 23:07:39 -0000	1.43
+++ documentation/configuring.sgml	1 Apr 2004 06:56:52 -0000
@@ -362,11 +362,6 @@
                 <entry>Specifies locations of windows registry files</entry>
               </row>
               <row>
-                <entry>[tweak.layout]</entry>
-                <entry>recmd</entry>
-                <entry>Appearance of Wine</entry>
-              </row>
-              <row>
                 <entry>[programs]</entry>
                 <entry>no</entry>
                 <entry>Programs to be run automatically</entry>
@@ -660,7 +655,7 @@
         </sect3>
 
         <sect3 id="config-debug-etc">
-          <title>The [Debug], [Registry], [tweak.layout], and [programs] Sections</title>
+          <title>The [Debug], [Registry], and [programs] Sections</title>
           <para>
             [Debug] is used to include or exclude debug messages, and to
             output them to a file. The latter is rarely used. <emphasis>These
@@ -716,16 +711,6 @@
             The location of your old <filename>user.reg</filename> file.
           </para>
           <para>
-            [tweak.layout] is devoted to wine's look. There is only
-            one setting for it.
-          </para>
-          <para>
-            <programlisting>"WineLook" = "win31|win95|win98"</programlisting>
-            Will change the look of wine from Windows 3.1 to Windows 95.
-            The <literal>win98</literal> setting behaves
-            just like <literal>win95</literal> most of the time.
-          </para>
-          <para>
             [programs] can be used to say what programs run under
             special conditions.
           </para>
@@ -2616,37 +2601,6 @@
 &fonts;
 &printing;
 
-<sect1 id="config-win95look">
-<title>Win95/98 Look And Feel</title>
-<para>
-Instead of compiling Wine for Win3.1 vs. Win95 using
-<constant>#define</constant> switches, the code now looks in a
-special [Tweak.Layout] section of
-<filename>~/.wine/config</filename> for a
-<literal>"WineLook" = "Win95"</literal> or
-<literal>"WineLook" = "Win98"</literal> entry.
-</para>
-<para>
-A few new sections and a number of entries have been added to
-the <filename>~/.wine/config</filename> file -- these are for
-debugging the Win95 tweaks only and may be removed in a future
-release!  These entries/sections are:
-</para>
-<programlisting>
-[Tweak.Fonts]
-"System.Height" = "&lt;point size>"    # Sets the height of the system typeface
-"System.Bold" = "[true|false]"      # Whether the system font should be boldfaced
-"System.Italic" = "[true|false]"    # Whether the system font should be italicized
-"System.Underline" = "[true|false]" # Whether the system font should be underlined
-"System.StrikeOut" = "[true|false]" # Whether the system font should be struck out
-"OEMFixed.xxx"                  # Same parameters for the OEM fixed typeface
-"AnsiFixed.xxx"                 # Same parameters for the Ansi fixed typeface
-"AnsiVar.xxx"                   # Same parameters for the Ansi variable typeface
-"SystemFixed.xxx"               # Same parameters for the System fixed typeface
-
-[Tweak.Layout]
-"WineLook" = "[Win31|Win95|Win98]"  # Changes Wine's look and feel
-</programlisting>
 </sect1>
 
     <sect1 id="config-scsi-support">
Index: documentation/wine.conf.man
===================================================================
RCS file: /var/cvs/wine/documentation/wine.conf.man,v
retrieving revision 1.16
diff -u -r1.16 wine.conf.man
--- documentation/wine.conf.man	20 Mar 2004 02:28:51 -0000	1.16
+++ documentation/wine.conf.man	1 Apr 2004 06:54:55 -0000
@@ -264,14 +264,6 @@
 For Relay and Snoop <dllname>.* includes or excludes the whole dll. Exclude
 entries have priority over Include entries.
 .PP
-.B [Tweak.Layout]
-.br
-.I format: """WineLook""=""<Win31|Win95|Win98>"""
-.br
-default: "Win31"
-.br
-Use Win95-like window displays or Win3.1-like window displays.
-.PP
 .B [Registry]
 .br
 .I format: """LoadGlobalRegistryFiles""=""<boolean>"""
Index: documentation/samples/config
===================================================================
RCS file: /var/cvs/wine/documentation/samples/config,v
retrieving revision 1.60
diff -u -r1.60 config
--- documentation/samples/config	1 Apr 2004 04:57:12 -0000	1.60
+++ documentation/samples/config	1 Apr 2004 06:52:19 -0000
@@ -196,12 +196,6 @@
 ; Save only modified keys
 "SaveOnlyUpdatedKeys" = "Y"
 
-[Tweak.Layout]
-;; supported styles are 'Win95'(default), 'Win98'
-;; this has *nothing* to do with the windows version Wine returns:
-;; set the "Windows" value in the [Version] section if you want that.
-"WineLook" = "Win95"
-
 [Clipboard]
 "ClearAllSelections" = "0"
 "PersistentSelection" = "1"
Index: programs/winecfg/En.rc
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/En.rc,v
retrieving revision 1.19
diff -u -r1.19 En.rc
--- programs/winecfg/En.rc	12 Mar 2004 19:44:04 -0000	1.19
+++ programs/winecfg/En.rc	1 Apr 2004 07:19:35 -0000
@@ -52,7 +52,6 @@
     LTEXT           "Windows Look:",IDC_STATIC,17,229,58,8
     COMBOBOX        IDC_WINVER,83,190,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     COMBOBOX        IDC_DOSVER,83,208,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_WINELOOK,83,226,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
 END
 
 IDD_X11DRVCFG DIALOG DISCARDABLE  0, 0, 260, 250
Index: programs/winecfg/Es.rc
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/Es.rc,v
retrieving revision 1.7
diff -u -r1.7 Es.rc
--- programs/winecfg/Es.rc	12 Mar 2004 19:44:04 -0000	1.7
+++ programs/winecfg/Es.rc	1 Apr 2004 07:19:40 -0000
@@ -28,7 +28,6 @@
 BEGIN
     COMBOBOX        IDC_WINVER,83,153,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     COMBOBOX        IDC_DOSVER,83,172,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_WINELOOK,83,190,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     LTEXT           "Versión de Wine:",IDC_STATIC,119,17,45,8
     LTEXT           "CVS",IDC_WINEVER,169,17,56,8
     LTEXT           "Versión de Windows:",IDC_STATIC,17,155,58,8
Index: programs/winecfg/Pt.rc
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/Pt.rc,v
retrieving revision 1.8
diff -u -r1.8 Pt.rc
--- programs/winecfg/Pt.rc	12 Mar 2004 19:44:04 -0000	1.8
+++ programs/winecfg/Pt.rc	1 Apr 2004 07:19:48 -0000
@@ -28,7 +28,6 @@
 BEGIN
     COMBOBOX        IDC_WINVER,83,153,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     COMBOBOX        IDC_DOSVER,83,172,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_WINELOOK,83,190,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     LTEXT           "Versão do Wine:",IDC_STATIC,119,17,45,8
     LTEXT           "CVS",IDC_WINEVER,169,17,56,8
     LTEXT           "Versão do Windows:",IDC_STATIC,17,155,58,8
Index: programs/winecfg/Ru.rc
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/Ru.rc,v
retrieving revision 1.5
diff -u -r1.5 Ru.rc
--- programs/winecfg/Ru.rc	12 Mar 2004 19:44:04 -0000	1.5
+++ programs/winecfg/Ru.rc	1 Apr 2004 07:19:56 -0000
@@ -38,7 +38,6 @@
 BEGIN
     COMBOBOX        IDC_WINVER,83,153,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     COMBOBOX        IDC_DOSVER,83,172,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_WINELOOK,83,190,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     LTEXT           "Âåðñèÿ Wine:",IDC_STATIC,119,17,45,8
     LTEXT           "CVS",IDC_WINEVER,169,17,56,8
     LTEXT           "Âåðñèÿ Windows:",IDC_STATIC,17,155,58,8
Index: programs/winecfg/Si.rc
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/Si.rc,v
retrieving revision 1.5
diff -u -r1.5 Si.rc
--- programs/winecfg/Si.rc	7 Feb 2004 01:01:34 -0000	1.5
+++ programs/winecfg/Si.rc	1 Apr 2004 07:20:04 -0000
@@ -28,7 +28,6 @@
 BEGIN
     COMBOBOX        IDC_WINVER,83,153,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     COMBOBOX        IDC_DOSVER,83,172,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
-    COMBOBOX        IDC_WINELOOK,83,190,158,56,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
     LTEXT           "Wine Version:",IDC_STATIC,119,17,45,8
     LTEXT           "CVS",IDC_WINEVER,169,17,56,8
     LTEXT           "Windows Version:",IDC_STATIC,17,155,58,8
Index: programs/winecfg/appdefaults.c
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/appdefaults.c,v
retrieving revision 1.3
diff -u -r1.3 appdefaults.c
--- programs/winecfg/appdefaults.c	7 Feb 2004 01:01:34 -0000	1.3
+++ programs/winecfg/appdefaults.c	1 Apr 2004 07:17:43 -0000
@@ -35,18 +35,15 @@
   BOOL isGlobal;
   char* lpcApplication;
   char* lpcVersionSection;
-  char* lpcWinelookSection;
 } APPL, *LPAPPL;
 
-static LPAPPL CreateAppl(BOOL isGlobal, char* application, char* version_section, char* winelook_section)
+static LPAPPL CreateAppl(BOOL isGlobal, char* application, char* version_section)
 {
   LPAPPL out;
-  WINE_TRACE("application: '%s', version_section: '%s', winelook_section: '%s'\n", application,
-	     version_section, winelook_section);
+  WINE_TRACE("application: '%s', version_section: '%s'\n", application, version_section);
   out = HeapAlloc(GetProcessHeap(),0,sizeof(APPL));
   out->lpcApplication = strdup(application);
   out->lpcVersionSection = strdup(version_section);
-  out->lpcWinelookSection = strdup(winelook_section);
   out->isGlobal = isGlobal;
   return out;
 }
@@ -56,12 +53,11 @@
  /* The strings were strdup-ped, so we use "free" */
   if (lpAppl->lpcApplication) free(lpAppl->lpcApplication);
   if (lpAppl->lpcVersionSection) free(lpAppl->lpcVersionSection);
-  if (lpAppl->lpcWinelookSection) free(lpAppl->lpcWinelookSection);
   HeapFree(GetProcessHeap(),0,lpAppl);
 }
 
-/* section can be "Version" or "Tweak.Layout" */
-/* key can be "Windows"/"Dos"/"WineLook" */
+/* section can be "Version" */
+/* key can be "Windows"/"Dos" */
 /* value can be appropriate values for the above keys */
 typedef struct _APPSETTING
 {
@@ -128,9 +124,8 @@
   HTREEITEM hParent;
   LPAPPSETTING lpas;
 	
-  WINE_TRACE("opening '%s' and '%s'\n", appl->lpcVersionSection, appl->lpcWinelookSection);
-  if ((RegOpenKey (configKey, appl->lpcVersionSection, &key) == ERROR_SUCCESS) ||
-      (RegOpenKey (configKey, appl->lpcWinelookSection, &key) == ERROR_SUCCESS))
+  WINE_TRACE("opening '%s'\n", appl->lpcVersionSection);
+  if (RegOpenKey (configKey, appl->lpcVersionSection, &key) == ERROR_SUCCESS)
   {
      i = 0;
      size = 255;
@@ -182,39 +177,6 @@
      {
        WINE_TRACE("no version section found\n");
      }
-
-     i = 0; /* reset i to 0 before calling RegEnumValue() again */
-
-     /* insert winelook entries */
-     if(RegOpenKey (configKey, appl->lpcWinelookSection, &key) == ERROR_SUCCESS)
-     {
-       while (RegEnumValue(key, i, name, &size, NULL, NULL, read, &readSize) == ERROR_SUCCESS)
-       {
-	 char itemtext[128];
-
-	 WINE_TRACE("Reading value %s, namely %s\n", name, read);
-			
-	 lpIt = CreateItemTag();
-	 lpas = CreateAppSetting(name, read);
-	 lpIt->lpSetting = lpas;
-	 lpIt->lpAppl = appl;
-	 tis.u.item.lParam = (LPARAM)lpIt;
-
-	 /* convert the value for 'winelook' to human readable form */
-	 description = getDescriptionFromVersion(getWinelook(), read);
-	 if(!description) description = "Not found";
-	 
-	 sprintf(itemtext, "%s - %s", name, description);
-	 tis.u.item.pszText = itemtext;
-
-	 TreeView_InsertItem(hwndTV,&tis);
-	 i++; size = 255; readSize = 255;
-       }
-       RegCloseKey(key);
-     } else
-     {
-       WINE_TRACE("no winelook section found\n");
-     }
   }
 }
 
@@ -230,14 +192,11 @@
   /* retrieve the registry values for this application */
   char *curWinVer = getConfigValue(lpAppl->lpcVersionSection, "Windows", "");
   char *curDOSVer = getConfigValue(lpAppl->lpcVersionSection, "DOS", "");
-  char *curWineLook = getConfigValue(lpAppl->lpcWinelookSection, "WineLook", "");
 
   if(curWinVer) WINE_TRACE("curWinVer is '%s'\n", curWinVer);
   else WINE_TRACE("curWinVer is null\n");
   if(curDOSVer) WINE_TRACE("curDOSVer is '%s'\n", curDOSVer);
   else WINE_TRACE("curDOSVer is null\n");
-  if(curWineLook) WINE_TRACE("curWineLook is '%s'\n", curWineLook);
-  else WINE_TRACE("curWineLook is null\n");
 
   /* normalize the version strings */
   if(strlen(curWinVer) != 0)
@@ -286,33 +245,8 @@
 			-1, 0);
   }
 
-  if(strlen(curWineLook) != 0)
-  {
-    if ((pVer = getWinelook ()))
-    {
-      WINE_TRACE("Winelook\n");
-
-      for (i = 0; *pVer->szVersion || *pVer->szDescription; i++, pVer++)
-      {
-	WINE_TRACE("pVer->szVersion == %s\n", pVer->szVersion);
-	if (!strcasecmp (pVer->szVersion, curWineLook))
-	{
-	  SendDlgItemMessage (hDlg, IDC_WINELOOK, CB_SETCURSEL,
-			      (WPARAM) i, 0);
-	  WINE_TRACE("match with %s\n", pVer->szVersion);
-	}
-      }
-    }
-  } else
-  {
-    WINE_TRACE("setting winelook to nothing\n");
-    SendDlgItemMessage (hDlg, IDC_WINELOOK, CB_SETCURSEL,
-			      -1, 0);
-  }
-
   if(curWinVer) free(curWinVer);
   if(curDOSVer) free(curDOSVer);
-  if(curWineLook) free(curWineLook);
 }
 
 void
@@ -337,14 +271,6 @@
 			  0, (LPARAM) pVer->szDescription);
     }
   }
-  if ((pVer = getWinelook ()))
-  {
-    for (i = 0; *pVer->szVersion || *pVer->szDescription; i++, pVer++)
-    {
-      SendDlgItemMessage (hDlg, IDC_WINELOOK, CB_ADDSTRING,
-			  0, (LPARAM) pVer->szDescription);
-    }
-  }
 }
 
 
@@ -357,11 +283,10 @@
   DWORD size;
   char appl [255];
   char lpcVersionKey [255];
-  char lpcWinelookKey [255];
   FILETIME ft;
 
   hwndTV = GetDlgItem(hDlg,IDC_APP_TREEVIEW);
-  lpAppl = CreateAppl(TRUE, "Global Settings", "Version", "Tweak.Layout");
+  lpAppl = CreateAppl(TRUE, "Global Settings", "Version");
   LoadAppSettings(lpAppl, hDlg, hwndTV);
 	
   /*And now the application specific stuff:*/
@@ -372,8 +297,7 @@
     while (RegEnumKeyEx(applKey, i, appl, &size, NULL, NULL, NULL, &ft) == ERROR_SUCCESS)
     {
       sprintf(lpcVersionKey, "AppDefaults\\%s\\Version", appl);
-      sprintf(lpcWinelookKey, "AppDefaults\\%s\\Tweak.Layout", appl);
-      lpAppl = CreateAppl(FALSE, appl, lpcVersionKey, lpcWinelookKey);
+      lpAppl = CreateAppl(FALSE, appl, lpcVersionKey);
       LoadAppSettings(lpAppl, hDlg, hwndTV);
       i++; size = 255;
     }
@@ -414,7 +338,6 @@
   char szFileTitle [255];
   char szFile [255];
   char lpcVersionKey [255];
-  char lpcWinelookKey [255];
 
   TVINSERTSTRUCT tis;
   LPITEMTAG lpit;
@@ -438,14 +361,12 @@
     tis.u.item.pszText = szFileTitle;
     lpit = CreateItemTag();
     sprintf(lpcVersionKey, "AppDefaults\\%s\\Version", szFileTitle);
-    sprintf(lpcWinelookKey, "AppDefaults\\%s\\Tweak.Layout", szFileTitle);
-    lpit->lpAppl = CreateAppl(FALSE, szFileTitle, lpcVersionKey, lpcWinelookKey);
+    lpit->lpAppl = CreateAppl(FALSE, szFileTitle, lpcVersionKey);
     tis.u.item.lParam = (LPARAM)lpit;
     TreeView_InsertItem(GetDlgItem(hDlg, IDC_APP_TREEVIEW), &tis);
 
-    /* add the empty entries for the Version and Winelook sections for this app */
+    /* add the empty entries for the Version section for this app */
     setConfigValue(lpcVersionKey,NULL,NULL);
-    setConfigValue(lpcWinelookKey,NULL,NULL);
   }
 }
 
@@ -465,7 +386,6 @@
     {
       /* add transactions to remove all entries for this application */
       addTransaction(lpit->lpAppl->lpcVersionSection, NULL, ACTION_REMOVE, NULL);
-      addTransaction(lpit->lpAppl->lpcWinelookSection, NULL, ACTION_REMOVE, NULL);
       TreeView_DeleteItem(hTV,ti.hItem);
     }
   }
@@ -492,7 +412,7 @@
       /* remove this applications setting */
       if((selection == CB_ERR) || !(*pVer[selection].szVersion))
       {
-	WINE_TRACE("removing section '%s'\n", lpit->lpAppl->lpcWinelookSection);
+	WINE_TRACE("removing section '%s'\n", lpit->lpAppl->lpcVersionSection);
 	addTransaction(lpit->lpAppl->lpcVersionSection, "Windows", ACTION_REMOVE, NULL); /* change registry entry */
       } else
       {
@@ -527,7 +447,7 @@
       /* remove this applications setting */
       if((selection == CB_ERR) || !(*pVer[selection].szVersion))
       {
-	WINE_TRACE("removing section '%s'\n", lpit->lpAppl->lpcWinelookSection);
+	WINE_TRACE("removing section '%s'\n", lpit->lpAppl->lpcVersionSection);
 	addTransaction(lpit->lpAppl->lpcVersionSection, "DOS", ACTION_REMOVE, NULL); /* change registry entry */
       } else
       {
@@ -541,43 +461,6 @@
   }
 }
 
-static void UpdateWinelookSelection(HWND hDlg, int selection)
-{
-  TVITEM ti;
-  LPITEMTAG lpit;
-  VERSION_DESC *pVer = NULL;
-  HWND hTV = GetDlgItem(hDlg, IDC_APP_TREEVIEW);
-
-  ti.mask = TVIF_PARAM;
-  ti.hItem = TreeView_GetSelection(hTV);
-  if (TreeView_GetItem (hTV, &ti))
-  {
-    lpit = (LPITEMTAG) ti.lParam;
-
-    if(lpit->lpAppl)
-    {
-      pVer = getWinelook();
-
-      /* if no item is selected OR if our version string is null */
-      /* remove this applications setting */
-      if((selection == CB_ERR) || !(*pVer[selection].szVersion))
-      {
-	WINE_TRACE("removing section '%s'\n", lpit->lpAppl->lpcWinelookSection);
-	addTransaction(lpit->lpAppl->lpcWinelookSection, "WineLook", ACTION_REMOVE, NULL); /* change registry entry */
-      } else
-      {
-	WINE_TRACE("setting section '%s', key '%s', value '%s'\n", lpit->lpAppl->lpcWinelookSection, "WineLook", pVer[selection].szVersion);
-	addTransaction(lpit->lpAppl->lpcWinelookSection, "WineLook", ACTION_SET, pVer[selection].szVersion); /* change registry entry */
-      }
-
-      TreeView_DeleteAllItems(hTV); /* delete all items from the treeview */
-      OnInitAppDlg(hDlg);
-    }
-  }
-}
-
-
-
 INT_PTR CALLBACK
 AppDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
@@ -614,10 +497,6 @@
       case IDC_DOSVER:
 	selection = SendDlgItemMessage( hDlg, IDC_DOSVER, CB_GETCURSEL, 0, 0);
 	UpdateDosverSelection(hDlg, selection);
-	break;
-      case IDC_WINELOOK:
-	selection = SendDlgItemMessage( hDlg, IDC_WINELOOK, CB_GETCURSEL, 0, 0);
-	UpdateWinelookSelection(hDlg, selection);
 	break;
       }
     case BN_CLICKED:
Index: programs/winecfg/properties.c
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/properties.c,v
retrieving revision 1.7
diff -u -r1.7 properties.c
--- programs/winecfg/properties.c	7 Feb 2004 01:01:34 -0000	1.7
+++ programs/winecfg/properties.c	1 Apr 2004 07:18:44 -0000
@@ -46,14 +46,6 @@
     {"", ""}
 };
 
-static VERSION_DESC sWineLook[] = {
-    {"", "Use default(Global setting)"},
-    {"win31", "Windows 3.1"},
-    {"win95", "Windows 95"},
-    {"win98", "Windows 98"},
-    {"", ""}
-};
-
 #if 0
 static VERSION_DESC sWineDrivers[] = {
     {"x11drv", "X11 Interface"},
@@ -106,14 +98,6 @@
 VERSION_DESC* getDOSVersions(void)
 {
     return sDOSVersions;
-}
-
-
-/*****************************************************************************
- */
-VERSION_DESC* getWinelook(void)
-{
-    return sWineLook;
 }
 
 
Index: programs/winecfg/properties.h
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/properties.h,v
retrieving revision 1.10
diff -u -r1.10 properties.h
--- programs/winecfg/properties.h	7 Feb 2004 01:01:34 -0000	1.10
+++ programs/winecfg/properties.h	1 Apr 2004 07:18:15 -0000
@@ -89,7 +89,6 @@
 
 VERSION_DESC *getWinVersions(void);
 VERSION_DESC *getDOSVersions(void);
-VERSION_DESC *getWinelook(void);
 DLL_DESC *getDLLDefaults(void);
 AUDIO_DRIVER *getAudioDrivers(void);
 char* getVersionFromDescription(VERSION_DESC *pVer, char *desc);
Index: programs/winecfg/resource.h
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/resource.h,v
retrieving revision 1.14
diff -u -r1.14 resource.h
--- programs/winecfg/resource.h	12 Mar 2004 19:44:04 -0000	1.14
+++ programs/winecfg/resource.h	1 Apr 2004 07:19:01 -0000
@@ -41,7 +41,6 @@
 #define IDC_APPLYBTN                    1002
 #define IDC_WINEVER                     1011
 #define IDC_WINVER                      1012
-#define IDC_WINELOOK                    1013
 #define IDC_DOSVER                      1014
 #define IDC_SYSCOLORS                   1017
 #define IDC_PRIVATEMAP                  1018
Index: programs/winecfg/winecfg.c
===================================================================
RCS file: /var/cvs/wine/programs/winecfg/winecfg.c,v
retrieving revision 1.18
diff -u -r1.18 winecfg.c
--- programs/winecfg/winecfg.c	7 Jan 2004 00:43:40 -0000	1.18
+++ programs/winecfg/winecfg.c	1 Apr 2004 07:19:17 -0000
@@ -34,7 +34,6 @@
  *   - Make the desktop size UI a combo box, with a Custom option, so it's more obvious what you might want to choose here
  *
  * BUGS:
- *   - WineLook default fallback doesn't work
  *   - x11drv page triggers key writes on entry
  *
  */


-- 
Dimi.




More information about the wine-patches mailing list