Merge commit '99bc3ef21c3c972f39c141f7a21613537dc8a5e4' into eterhack
authorVitaly Perov <vitperov@etersoft.ru>
Fri, 25 Jun 2010 16:16:30 +0000 (20:16 +0400)
committerVitaly Perov <vitperov@etersoft.ru>
Fri, 25 Jun 2010 16:16:30 +0000 (20:16 +0400)
Conflicts:
VERSION
configure
dlls/msi/action.c
programs/winecfg/En.rc
programs/winecfg/Ru.rc
programs/winecfg/about.c
programs/winecfg/resource.h

15 files changed:
1  2 
VERSION
configure
configure.ac
dlls/comctl32/treeview.c
dlls/msi/action.c
dlls/msi/dialog.c
dlls/msi/files.c
dlls/ntdll/file.c
programs/winecfg/En.rc
programs/winecfg/Makefile.in
programs/winecfg/Ru.rc
programs/winecfg/about.c
programs/winecfg/resource.h
server/window.c
tools/wine.inf.in

diff --cc VERSION
index 20bdb772c3239f1644052001411f0870ad27bbe5,82c0b12988effbb086130f902be5d4cca48c1036..ccc22dd691eb9879cd61f433f7f8e4738e1c2360
+++ b/VERSION
@@@ -1,1 -1,1 +1,2 @@@
- WINE@Etersoft version 1.1.44-eter1.3
 -Wine version 1.2-rc3
++WINE@Etersoft version 1.2-rc3
++
diff --cc configure
index 0addc3bc52e54a3dda46e58d9be8f9dc7f74fc1a,e91a948b6f290610da7025ea51a996598a2c0c61..a70b2e9df27c274897903b96c22763d0ae43bb14
+++ b/configure
@@@ -1,8 -1,8 +1,8 @@@
  #! /bin/sh
  # Guess values for system-dependent variables and create Makefiles.
- # Generated by GNU Autoconf 2.65 for WINE@Etersoft 1.1.44-eter1.3.
 -# Generated by GNU Autoconf 2.65 for Wine 1.2-rc3.
++# Generated by GNU Autoconf 2.65 for WINE@Etersoft 1.2-rc3.
  #
 -# Report bugs to <wine-devel@winehq.org>.
 +# Report bugs to <wine@etersoft.ruwine>.
  #
  #
  # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@@ -550,12 -550,12 +550,12 @@@ MFLAGS
  MAKEFLAGS=
  
  # Identity of this package.
 -PACKAGE_NAME='Wine'
 -PACKAGE_TARNAME='wine'
 +PACKAGE_NAME='WINE@Etersoft'
 +PACKAGE_TARNAME='http://www.etersoft.ru'
- PACKAGE_VERSION='1.1.44-eter1.3'
- PACKAGE_STRING='WINE@Etersoft 1.1.44-eter1.3'
+ PACKAGE_VERSION='1.2-rc3'
 -PACKAGE_STRING='Wine 1.2-rc3'
 -PACKAGE_BUGREPORT='wine-devel@winehq.org'
 -PACKAGE_URL='http://www.winehq.org'
++PACKAGE_STRING='WINE@Etersoft 1.2-rc3'
 +PACKAGE_BUGREPORT='wine@etersoft.ruwine'
 +PACKAGE_URL=''
  
  ac_unique_file="server/atom.c"
  # Factoring default headers for most tests.
@@@ -1370,7 -1365,7 +1370,7 @@@ if test "$ac_init_help" = "long"; the
    # Omit some internal or obsolete options to make the list less imposing.
    # This message is too long to be a string in the A/UX 3.1 sh.
    cat <<_ACEOF
- \`configure' configures WINE@Etersoft 1.1.44-eter1.3 to adapt to many kinds of systems.
 -\`configure' configures Wine 1.2-rc3 to adapt to many kinds of systems.
++\`configure' configures WINE@Etersoft 1.2-rc3 to adapt to many kinds of systems.
  
  Usage: $0 [OPTION]... [VAR=VALUE]...
  
  
  if test -n "$ac_init_help"; then
    case $ac_init_help in
-      short | recursive ) echo "Configuration of WINE@Etersoft 1.1.44-eter1.3:";;
 -     short | recursive ) echo "Configuration of Wine 1.2-rc3:";;
++     short | recursive ) echo "Configuration of WINE@Etersoft 1.2-rc3:";;
     esac
    cat <<\_ACEOF
  
  test -n "$ac_init_help" && exit $ac_status
  if $ac_init_version; then
    cat <<\_ACEOF
- WINE@Etersoft configure 1.1.44-eter1.3
 -Wine configure 1.2-rc3
++WINE@Etersoft configure 1.2-rc3
  generated by GNU Autoconf 2.65
  
  Copyright (C) 2010 Free Software Foundation, Inc.
@@@ -2134,7 -2127,7 +2134,7 @@@ cat >config.log <<_ACEO
  This file contains any messages produced by compilers while
  running configure, to aid debugging if configure makes a mistake.
  
- It was created by WINE@Etersoft $as_me 1.1.44-eter1.3, which was
 -It was created by Wine $as_me 1.2-rc3, which was
++It was created by WINE@Etersoft $as_me 1.2-rc3, which was
  generated by GNU Autoconf 2.65.  Invocation command line was
  
    $ $0 $@
@@@ -15710,7 -15469,7 +15710,7 @@@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wr
  # report actual input values of CONFIG_FILES etc. instead of their
  # values after options handling.
  ac_log="
- This file was extended by WINE@Etersoft $as_me 1.1.44-eter1.3, which was
 -This file was extended by Wine $as_me 1.2-rc3, which was
++This file was extended by WINE@Etersoft $as_me 1.2-rc3, which was
  generated by GNU Autoconf 2.65.  Invocation command line was
  
    CONFIG_FILES    = $CONFIG_FILES
@@@ -15780,7 -15540,7 +15780,7 @@@ _ACEO
  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
  ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
  ac_cs_version="\\
- WINE@Etersoft config.status 1.1.44-eter1.3
 -Wine config.status 1.2-rc3
++WINE@Etersoft config.status 1.2-rc3
  configured by $0, generated by GNU Autoconf 2.65,
    with options \\"\$ac_cs_config\\"
  
diff --cc configure.ac
Simple merge
Simple merge
index 7a6e5a4d193acdd58aae60030ec6e8187a137496,d18cf95e47e69110169759aed3c3b108d40ca258..b362d9f0f7d3fd1bffb9a03b07d1950825912679
@@@ -1003,47 -1003,6 +1003,48 @@@ static UINT ITERATE_CreateFolders(MSIRE
      return ERROR_SUCCESS;
  }
  
 +/* FIXME: probably should merge this with the above function */
 +static UINT msi_create_directory( MSIPACKAGE* package, LPCWSTR dir )
 +{
 +    UINT rc = ERROR_SUCCESS;
 +    MSIFOLDER *folder;
 +    LPWSTR install_path;
 +
 +    install_path = resolve_folder(package, dir, FALSE, FALSE, TRUE, &folder);
 +    if (!install_path)
 +        return ERROR_FUNCTION_FAILED; 
 +
 +    /* create the path */
 +    if (folder->State == 0)
 +    {
 +        create_full_pathW(install_path);
 +        folder->State = 2;
 +    }
 +    msi_free(install_path);
 +
 +    return rc;
 +}
 +
 +UINT msi_create_component_directories( MSIPACKAGE *package )
 +{
 +    MSICOMPONENT *comp;
 +
 +    /* create all the folders required by the components are going to install */
 +    LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
 +    {
 +        if (comp->ActionRequest != INSTALLSTATE_LOCAL)
 +            continue;
 +        msi_create_directory( package, comp->Directory );
 +    }
 +
 +    return ERROR_SUCCESS;
 +}
 +
 +/*
 + * Also we cannot enable/disable components either, so for now I am just going 
 + * to do all the directories for all the components.
 + */
++
  static UINT ACTION_CreateFolders(MSIPACKAGE *package)
  {
      static const WCHAR ExecSeqQuery[] =
Simple merge
index 12c9cd2b01eb26bd9d2484bbe9a77bac63f77f4c,79d78143bb4c74f5f5fd8b1194b8f8ba72141866..1703b0bdf3ceedff41588b344e6d1584f555120e
@@@ -991,15 -972,19 +980,21 @@@ UINT ACTION_RemoveFiles( MSIPACKAGE *pa
               file->Component->Installed == INSTALLSTATE_SOURCE )
              continue;
  
-         /* don't remove a file if the old file
-          * is strictly newer than the version to be installed
-          */
-         if ( msi_compare_file_version( file ) < 0 )
-             continue;
+         if (file->Version)
+         {
+             ver = msi_get_disk_file_version( file->TargetPath );
+             if (ver && msi_compare_file_versions( ver, file->Version ) > 0)
+             {
+                 TRACE("newer version detected, not removing file\n");
+                 msi_free( ver );
+                 continue;
+             }
+             msi_free( ver );
+         }
  
          TRACE("removing %s\n", debugstr_w(file->File) );
 +        if ( GetFileAttributesW( file->TargetPath ) & FILE_ATTRIBUTE_READONLY )
 +            SetFileAttributesW( file->TargetPath, FILE_ATTRIBUTE_NORMAL );
          if (!DeleteFileW( file->TargetPath ))
          {
              WARN("failed to delete %s\n",  debugstr_w(file->TargetPath));
index 00835f3c67761525f4978191a6c002f3254fc44c,1c77937d9e8a4198edefcf853851463a2f32d17a..f87527dc0e3da1ddf1488501b9c385dcf5286c81
  #include "winternl.h"
  #include "winioctl.h"
  #include "ddk/ntddser.h"
 +#include "wine/etersoft.h"
  
  WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
+ WINE_DECLARE_DEBUG_CHANNEL(winediag);
  
  mode_t FILE_umask = 0;
  
index da00411e84aea69665fefc675aa38d87c0ae4551,9fc42eaf45233849a2e4742a4e19616154da2245..ca41cd944ed4f769bb5f1cdd217a8eec1bfa3941
@@@ -39,20 -39,20 +39,21 @@@ IDD_ABOUTCFG DIALOGEX 0, 0, 260, 22
  STYLE WS_CHILD
  FONT 8, "MS Shell Dlg"
  BEGIN
 -    CONTROL         "", IDC_ABT_PANEL, "STATIC", SS_OWNERDRAW, 0, 0, 260, 140
 -    LTEXT           PACKAGE_NAME,IDC_ABT_TITLE_TEXT,105,30,55,30
 -    LTEXT           PACKAGE_VERSION,IDC_ABT_PANEL_TEXT,160,43,140,8
 -    CONTROL         "",IDC_ABT_WEB_LINK,"SysLink", LWS_TRANSPARENT, 105,53,106,8
 +    LTEXT           "http://etersoft.ru/wine",IDC_STATIC,119,51,106,8
      LTEXT           "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.",
 -                    IDC_ABT_LICENSE_TEXT,105,64,145,60
 -    GROUPBOX        " Windows Registration Information ", IDC_STATIC, 15, 155, 230, 55
 +                    IDC_STATIC,119,44,124,72
- /*    GROUPBOX        " Windows Registration Information ", IDC_STATIC, 15, 110, 230, 55
-     LTEXT           "&Owner:", IDC_STATIC, 22, 126, 40, 20
-     EDITTEXT        IDC_ABT_OWNER, 75, 126, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
-     LTEXT           "Organi&zation:", IDC_STATIC, 22, 140, 50, 20
-     EDITTEXT        IDC_ABT_ORG, 75, 140, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
++/*  GROUPBOX        " Windows Registration Information ", IDC_STATIC, 15, 155, 230, 55
+     LTEXT           "&Owner:", IDC_STATIC, 22, 171, 40, 20
+     EDITTEXT        IDC_ABT_OWNER, 75, 171, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
+     LTEXT           "Organi&zation:", IDC_STATIC, 22, 185, 50, 20
+     EDITTEXT        IDC_ABT_ORG, 75, 185, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
 +*/
 +    PUSHBUTTON      "About WINE",IDC_WINVER_LAUNCH,195,250,60,14
  END
  
 -IDD_APPCFG DIALOG DISCARDABLE  0, 0, 260, 220
 +
 +IDD_APPCFG DIALOG DISCARDABLE  0, 0, 260, 250
++
  STYLE WS_CHILD | WS_DISABLED
  FONT 8, "MS Shell Dlg"
  BEGIN
@@@ -155,36 -155,20 +156,31 @@@ BEGI
      LTEXT           "&Type:",IDC_STATIC_TYPE,15,138,21,10
      COMBOBOX        IDC_COMBO_TYPE,41,135,77,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
      
-     LTEXT           "Label and serial number",IDC_LABELSERIAL_STATIC,15,155,95,10
-     
-     PUSHBUTTON      "Show &Advanced",IDC_BUTTON_SHOW_HIDE_ADVANCED,186,136,60,13
-     CONTROL         "Autodetect &from Device:",IDC_RADIO_AUTODETECT,"Button",
-                     BS_AUTORADIOBUTTON,15,166,93,10
-     EDITTEXT        IDC_EDIT_DEVICE,27,176,174,13,ES_AUTOHSCROLL
-     PUSHBUTTON      "Bro&wse...",IDC_BUTTON_BROWSE_DEVICE,206,176,40,13
-     CONTROL         "&Manually Assign:",IDC_RADIO_ASSIGN,"Button",
-                     BS_AUTORADIOBUTTON,15,195,69,10
+     PUSHBUTTON      "Show &Advanced",IDC_BUTTON_SHOW_HIDE_ADVANCED,186,135,60,13
+     LTEXT           "De&vice:",IDC_STATIC_DEVICE,15,153,26,9
+     EDITTEXT        IDC_EDIT_DEVICE,41,150,160,13,ES_AUTOHSCROLL | WS_TABSTOP
+     PUSHBUTTON      "Bro&wse...",IDC_BUTTON_BROWSE_DEVICE,206,150,40,13
  
-     LTEXT           "&Label:",IDC_STATIC_LABEL,33,208,29,12
-     EDITTEXT        IDC_EDIT_LABEL,63,205,78,13,ES_AUTOHSCROLL | WS_TABSTOP
-     LTEXT           "S&erial:",IDC_STATIC_SERIAL,33,225,29,12
-     EDITTEXT        IDC_EDIT_SERIAL,63,221,78,13,ES_AUTOHSCROLL | WS_TABSTOP
+     LTEXT           "&Label:",IDC_STATIC_LABEL,15,168,26,12
+     EDITTEXT        IDC_EDIT_LABEL,41,165,78,13,ES_AUTOHSCROLL | WS_TABSTOP
+     LTEXT           "S&erial:",IDC_STATIC_SERIAL,15,183,26,12
+     EDITTEXT        IDC_EDIT_SERIAL,41,180,78,13,ES_AUTOHSCROLL | WS_TABSTOP
  
-     CONTROL         "Show &dot files",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,260,230,8
+     CONTROL         "Show &dot files",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,205,230,8
  END
  
- IDD_AUDIOCFG DIALOG DISCARDABLE  0, 0, 260, 250
 +IDD_DONGLECFG DIALOG DISCARDABLE  0, 0, 260, 250
 +STYLE WS_CHILD | WS_DISABLED
 +FONT 8, "MS Shell Dlg"
 +BEGIN
 +    GROUPBOX        " Loading dongles drivers ",IDC_STATIC,8,4,244,240
 +    CONTROL         "Listview",IDC_LIST_DONGLES,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT |
 +LVS_SINGLESEL | WS_BORDER | WS_TABSTOP | LVS_NOCOLUMNHEADER , 15,18,232,150
 +    PUSHBUTTON      "Load",IDC_BUTTON_LOAD,91,172,75,14
 +    PUSHBUTTON      "Do not load",IDC_BUTTON_UNLOAD,171,172,75,14
 +END
 +
+ IDD_AUDIOCFG DIALOG DISCARDABLE  0, 0, 260, 220
  STYLE WS_CHILD | WS_DISABLED
  FONT 8, "MS Shell Dlg"
  BEGIN
Simple merge
index 8cb36b4c040312d270e1add20f28957112523bc3,1673c4330a092b3a0fca96b8ff970b5834525ac9..011f6216da3c1c8653a6f053fc1fa2c82c55c83d
@@@ -41,23 -41,23 +41,24 @@@ IDD_ABOUTCFG DIALOGEX 0, 0, 260, 22
  STYLE WS_CHILD
  FONT 8, "MS Shell Dlg"
  BEGIN
 -    CONTROL         "", IDC_ABT_PANEL, "STATIC", SS_OWNERDRAW, 0, 0, 260, 140
 -    LTEXT           PACKAGE_NAME,IDC_ABT_TITLE_TEXT,105,30,55,30
 -    LTEXT           PACKAGE_VERSION,IDC_ABT_PANEL_TEXT,160,43,140,8
 -    CONTROL         "",IDC_ABT_WEB_LINK,"SysLink", LWS_TRANSPARENT, 105,53,106,8
 +    //LTEXT           PACKAGE_STRING,IDC_STATIC,119,17,120,8
 +    LTEXT           "http://etersoft.ru/wine",IDC_STATIC,119,51,106,8
 +
 +    LTEXT           "WINE@Etersoft является реализацией Windows-среды на Unix-платформах и предназначен для запуска Windows-приложений. Эта программа состоит из различных свободных и несвободных компонент, лицензируется на определённых условиях и не подлежит свободному распространению. Некоторые части доступны на условиях лицензии GNU Lesser General Public License, опубликованной Free Software Foundation; версии 2.1 лицензии или (на ваше усмотрение) любой более поздней.",
 +                      IDC_STATIC,119,44,124,142
  /*
-     GROUPBOX        " Регистрационная информация Windows ", IDC_STATIC, 15, 110, 230, 55
-     LTEXT           "Имя:", IDC_STATIC, 22, 126, 40, 20
-     EDITTEXT        IDC_ABT_OWNER, 75, 126, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
-     LTEXT           "Организация:", IDC_STATIC, 22, 140, 50, 20
-     EDITTEXT        IDC_ABT_ORG, 75, 140, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
 -    LTEXT           "Эта библиотека является свободным программным обеспечением; вы можете распространять её и/или модифицировать согласно условиям лицензии GNU Lesser General Public License, опубликованной Free Software Foundation; версии 2.1 лицензии или (на ваше усмотрение) любой более поздней.",
 -*/
 -    LTEXT           "This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.",
 -                    IDC_ABT_LICENSE_TEXT,105,64,145,60
+     GROUPBOX        " Регистрационная информация Windows ", IDC_STATIC, 15, 155, 230, 55
+     LTEXT           "Имя:", IDC_STATIC, 22, 171, 40, 20
+     EDITTEXT        IDC_ABT_OWNER, 75, 171, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
+     LTEXT           "Организация:", IDC_STATIC, 22, 185, 50, 20
+     EDITTEXT        IDC_ABT_ORG, 75, 185, 160, 13, ES_AUTOHSCROLL | WS_TABSTOP
 +*/
 +    PUSHBUTTON      "Подробнее...",IDC_WINVER_LAUNCH,195,250,60,14
  END
  
 -IDD_APPCFG DIALOG DISCARDABLE  0, 0, 260, 220
 +
 +IDD_APPCFG DIALOG DISCARDABLE  0, 0, 260, 250
++
  STYLE WS_CHILD | WS_DISABLED
  FONT 8, "MS Shell Dlg"
  BEGIN
@@@ -160,36 -160,20 +161,31 @@@ BEGI
      LTEXT           "&Тип:",IDC_STATIC_TYPE,15,138,21,10
      COMBOBOX        IDC_COMBO_TYPE,41,135,77,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
      
-     LTEXT           "Метка и серийный номер",IDC_LABELSERIAL_STATIC,15,155,95,10
-     
-     PUSHBUTTON      "Дополнительно...",IDC_BUTTON_SHOW_HIDE_ADVANCED,150,136,96,13
-     CONTROL         "Автоопределить &c устройства:",IDC_RADIO_AUTODETECT,"Button",
-                     BS_AUTORADIOBUTTON,15,166,150,10
-     EDITTEXT        IDC_EDIT_DEVICE,27,176,174,13,ES_AUTOHSCROLL
-     PUSHBUTTON      "Об&зор...",IDC_BUTTON_BROWSE_DEVICE,206,176,40,13
-     CONTROL         "&Назначить вручную:",IDC_RADIO_ASSIGN,"Button",
-                     BS_AUTORADIOBUTTON,15,195,100,10
-     LTEXT           "&Метка:",IDC_STATIC_LABEL,33,208,29,12
-     EDITTEXT        IDC_EDIT_LABEL,103,205,118,13,ES_AUTOHSCROLL | WS_TABSTOP
-     LTEXT           "Серийный номер:",IDC_STATIC_SERIAL,33,225,80,12
-     EDITTEXT        IDC_EDIT_SERIAL,103,221,118,13,ES_AUTOHSCROLL | WS_TABSTOP
-     CONTROL         "Показывать файлы, начинающиеся с точки",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,260,230,8
+     PUSHBUTTON      "Дополнительно...",IDC_BUTTON_SHOW_HIDE_ADVANCED,150,135,96,13
+     LTEXT           "De&vice:",IDC_STATIC_DEVICE,15,153,26,9
+     EDITTEXT        IDC_EDIT_DEVICE,41,150,160,13,ES_AUTOHSCROLL | WS_TABSTOP
+     PUSHBUTTON      "Об&зор...",IDC_BUTTON_BROWSE_DEVICE,206,150,40,13
+     LTEXT           "&Метка:",IDC_STATIC_LABEL,15,168,70,12
+     EDITTEXT        IDC_EDIT_LABEL,85,165,118,13,ES_AUTOHSCROLL | WS_TABSTOP
+     LTEXT           "Серийный номер:",IDC_STATIC_SERIAL,15,183,70,12
+     EDITTEXT        IDC_EDIT_SERIAL,85,180,118,13,ES_AUTOHSCROLL | WS_TABSTOP
+     CONTROL         "Показывать файлы, начинающиеся с точки",IDC_SHOW_DOT_FILES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,8,205,230,8
  END
  
- IDD_AUDIOCFG DIALOG DISCARDABLE  0, 0, 260, 250
 +IDD_DONGLECFG DIALOG DISCARDABLE  0, 0, 260, 250
 +STYLE WS_CHILD | WS_DISABLED
 +FONT 8, "MS Shell Dlg"
 +BEGIN
 +GROUPBOX        " Загрузка драйверов ключей ",IDC_STATIC,8,4,244,240
 +CONTROL         "Listview",IDC_LIST_DONGLES,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT |
 +LVS_SINGLESEL | WS_BORDER | WS_TABSTOP | LVS_NOCOLUMNHEADER, 15,18,232,150
 +PUSHBUTTON      "Загружать",IDC_BUTTON_LOAD,91,172,75,14
 +PUSHBUTTON      "Не загружать",IDC_BUTTON_UNLOAD,171,172,75,14
 +END
 +
+ IDD_AUDIOCFG DIALOG DISCARDABLE  0, 0, 260, 220
  STYLE WS_CHILD | WS_DISABLED
  FONT 8, "MS Shell Dlg"
  BEGIN
index 2c4b1d26b54f8c4e344e23d24ad045e6f009c093,b8a69644264610c4a6ba3b341d456c88c15c1fe1..5c22267348868423d3d266c3cdaee8ff6e7d03f0
   *
   */
  
+ #define COBJMACROS
  #include "config.h"
  #include <windows.h>
  #include <commctrl.h>
+ #include <shellapi.h>
  #include <wine/debug.h>
 +#include <fcntl.h>
 +
 +#define COBJMACROS
 +#include "shlobj.h"
 +#include "shlwapi.h"
 +#include "olectl.h"
  
  #include "resource.h"
  #include "winecfg.h"
  
 +#define ETERSOFT_FUNC_VERSION
 +#include <wine/etersoft.h>
 +
  WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
  
+ static HICON logo = NULL;
+ static HFONT titleFont = NULL;
  INT_PTR CALLBACK
  AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
  {
-     HDC hdc;
+     HWND hWnd;
+     HDC hDC;
+     RECT rcClient, rcRect;
++
++    HDC hdc2;
 +    PAINTSTRUCT ps;
 +    RECT rc = {17, 17, 370, 100};
 +    char version[MAX_PATH];
      char *owner, *org;
  
 -    switch (uMsg)
 -    {
 -    case WM_NOTIFY:
 -        switch(((LPNMHDR)lParam)->code)
 -        {
 -        case PSN_APPLY:
 -            /*save registration info to registry */
 -            owner = get_text(hDlg, IDC_ABT_OWNER);
 -            org   = get_text(hDlg, IDC_ABT_ORG);
 -
 -            set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion",
 -                        "RegisteredOwner", owner ? owner : "");
 -            set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion",
 -                        "RegisteredOrganization", org ? org : "");
 -            set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 -                        "RegisteredOwner", owner ? owner : "");
 -            set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 -                        "RegisteredOrganization", org ? org : "");
 -            apply();
 +    static IPicture *pPicture;
 +
 +
 +    IStream *pStream = 0;
 +    HGLOBAL hMem = NULL;
 +    HRESULT hRes;
 +    int hFile;
 +    LPVOID pMem;
 +    DWORD dwBytesRead=0, dwFileSize=0;
 +    char buf[1024];
 +    char fn[1024];
 +
 +    int height=0,width=0;
 +
 +    switch (uMsg) {
 +
 +      case WM_NOTIFY:
 +          switch(((LPNMHDR)lParam)->code)
 +          {
 +            case PSN_APPLY:
 +                /*save registration info to registry */
 +                owner = get_text(hDlg, IDC_ABT_OWNER);
 +                org   = get_text(hDlg, IDC_ABT_ORG);
 +                set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion",
 +                            "RegisteredOwner", owner ? owner : "");
 +                set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion",
 +                            "RegisteredOrganization", org ? org : "");
 +                set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 +                            "RegisteredOwner", owner ? owner : "");
 +                set_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 +                            "RegisteredOrganization", org ? org : "");
 +                apply();
 +
 +                HeapFree(GetProcessHeap(), 0, owner);
 +                HeapFree(GetProcessHeap(), 0, org);
 +                break;
 +            }
 +            break;
 +
 +/* TODO: Use static? */
 +      case WM_PAINT:
 +/* FIXME: copy (set) font from static resource or use default */
 +/*
 +            SelectObject(hDlg, part->u.text.hFont);
 +            SetTextColor(hDlg, part->u.text.color);
 +            SetBkColor(hDlg, win->info->sr_color);
 +*/
 +            LOADETER_FUNC(etersoft_getversion);
 +            if (etersoft_getversion) {
 +                etersoft_getversion(ETERSOFT_VERSION_NAME, version);
 +                strcat(version, " ");
 +                etersoft_getversion(ETERSOFT_VERSION_FULL, &version[strlen(version)]);
 +            } else
 +                strcpy(version, PACKAGE_STRING);
-             hdc = BeginPaint(hDlg, &ps);
-             DrawText(hdc, version, -1, &rc, DT_LEFT);
++            hdc2 = BeginPaint(hDlg, &ps);
++            DrawText(hdc2, version, -1, &rc, DT_LEFT);
 +
 +            if (pPicture!=NULL)
 +            {
 +               IPicture_get_Width(pPicture,&width);
 +               IPicture_get_Height(pPicture,&height);
-                IPicture_Render(pPicture,hdc,22,59,144,164,0,height,width,-height,NULL);
++               IPicture_Render(pPicture,hdc2,22,59,144,164,0,height,width,-height,NULL);
 +            }
 +
 +            EndPaint(hDlg, &ps);
 +            break;
 +
 +        case WM_INITDIALOG:
 +            /* read owner and organization info from registry, load it into text box */
 +            owner = get_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 +                                "RegisteredOwner", "");
 +            org =   get_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 +                                "RegisteredOrganization", "");
 +
 +            SetDlgItemText(hDlg, IDC_ABT_OWNER, owner);
 +            SetDlgItemText(hDlg, IDC_ABT_ORG, org);
 +
 +            SendMessage(GetParent(hDlg), PSM_UNCHANGED, 0, 0);
  
              HeapFree(GetProcessHeap(), 0, owner);
              HeapFree(GetProcessHeap(), 0, org);
 -            break;
  
 -        case NM_CLICK:
 -        case NM_RETURN:
 -            if(wParam == IDC_ABT_WEB_LINK)
 -                ShellExecuteA(NULL, "open", PACKAGE_URL, NULL, NULL, SW_SHOW);
 -            break;
 -        }
 -        break;
 -
 -    case WM_INITDIALOG:
 -
 -        hDC = GetDC(hDlg);
 -
 -        /* read owner and organization info from registry, load it into text box */
 -        owner = get_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 -                            "RegisteredOwner", "");
 -        org =   get_reg_key(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows NT\\CurrentVersion",
 -                            "RegisteredOrganization", "");
 -
 -        SetDlgItemText(hDlg, IDC_ABT_OWNER, owner);
 -        SetDlgItemText(hDlg, IDC_ABT_ORG, org);
 -
 -        SendMessage(GetParent(hDlg), PSM_UNCHANGED, 0, 0);
 -
 -        HeapFree(GetProcessHeap(), 0, owner);
 -        HeapFree(GetProcessHeap(), 0, org);
 -
 -        /* prepare the panel */
 -        hWnd = GetDlgItem(hDlg, IDC_ABT_PANEL);
 -        if(hWnd)
 -        {
 -            GetClientRect(hDlg, &rcClient);
 -            GetClientRect(hWnd, &rcRect);
 -            MoveWindow(hWnd, 0, 0, rcClient.right, rcRect.bottom, FALSE);
 -
 -            logo = LoadImageW((HINSTANCE)GetWindowLongPtrW(hDlg, GWLP_HINSTANCE),
 -                MAKEINTRESOURCEW(IDI_LOGO), IMAGE_ICON, 0, 0, LR_SHARED);
 -        }
 -
 -        /* prepare the title text */
 -        hWnd = GetDlgItem(hDlg, IDC_ABT_TITLE_TEXT);
 -        if(hWnd)
 -        {
 -            titleFont = CreateFont(
 -                -MulDiv(24, GetDeviceCaps(hDC, LOGPIXELSY), 72),
 -                0, 0, 0, 0, FALSE, 0, 0, 0, 0, 0, 0, 0,
 -                "Tahoma");
 -            SendMessage(hWnd, WM_SETFONT, (WPARAM)titleFont, TRUE);
 -        }
 -
 -        /* prepare the web link */
 -        hWnd = GetDlgItem(hDlg, IDC_ABT_WEB_LINK);
 -        if(hWnd)
 -            SetWindowTextA(hWnd, "<a href=\"" PACKAGE_URL "\">" PACKAGE_URL "</a>");
 -
 -        ReleaseDC(hDlg, hDC);
 -
 -        break;
 -
 -    case WM_DESTROY:
 -        if(logo)
 -        {
 -            DestroyIcon(logo);
 -            logo = NULL;
 -        }
 -
 -        if(titleFont)
 -        {
 -            DeleteObject(titleFont);
 -            titleFont = NULL;
 -        }
 -
 -        break;
 -
 -    case WM_COMMAND:
 -        switch(HIWORD(wParam))
 -        {
 -        case EN_CHANGE:
 -            /* enable apply button */
 -            SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
 +
 +            /*load bitmap*/
 +            if (wine_get_data_dir()!=NULL) {
 +                 lstrcpyA(fn,wine_get_data_dir());
 +                 lstrcatA(fn,"/companylogo.bmp");
 +            }
 +            else {
 +                 lstrcpyA(fn,wine_get_build_dir());
 +                 lstrcatA(fn,"/etersoft/desktop/companylogo.bmp");
 +            }
 +
 +            if((hFile = open(fn,O_RDONLY))!= -1) 
 +            {
 +               while ((dwBytesRead = read(hFile,buf,1024))!=0) dwFileSize=dwFileSize+dwBytesRead;
 +               hMem = GlobalAlloc(GHND,dwFileSize);
 +               if (hMem!=NULL)
 +               {
 +                  pMem = GlobalLock(hMem);
 +                  dwFileSize = 0;
 +                  lseek(hFile,0,0);
 +                  while ((dwBytesRead = read(hFile,(char*)pMem+dwFileSize,1024))!=0) dwFileSize = dwFileSize + dwBytesRead;
 +                  GlobalUnlock(hMem);
 +                  hRes = CreateStreamOnHGlobal(hMem,FALSE, &pStream);
 +                  if (SUCCEEDED(hRes))
 +                     hRes = OleLoadPicture(pStream, dwFileSize, TRUE, &IID_IPicture, (void**)&pPicture);
 +               }
 +            }
 +            close(hFile);
 +            return 1;
 +
 +      case WM_COMMAND:
 +            if (wParam == IDC_WINVER_LAUNCH)
 +            {
 +                ShellAboutA(hDlg, "WINE@Etersoft", NULL, NULL);
 +                break;
 +            }
 +            switch(HIWORD(wParam))
 +            {
 +            case EN_CHANGE:
 +              /* enable apply button */
 +                SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
 +                break;
 +            }
              break;
 -        }
 -        break;
 -
 -    case WM_DRAWITEM:
 -        if(wParam == IDC_ABT_PANEL)
 -        {
 -            LPDRAWITEMSTRUCT pDIS = (LPDRAWITEMSTRUCT)lParam;
 -            FillRect(pDIS->hDC, &pDIS->rcItem, (HBRUSH) (COLOR_WINDOW+1));
 -            DrawIconEx(pDIS->hDC, 0, 0, logo, 0, 0, 0, 0, DI_IMAGE);
 -            DrawEdge(pDIS->hDC, &pDIS->rcItem, EDGE_SUNKEN, BF_BOTTOM);
 -        }
 -        break;
 -
 -    case WM_CTLCOLORSTATIC:
 -        switch(GetDlgCtrlID((HWND)lParam))
 -        {
 -        case IDC_ABT_TITLE_TEXT:
 -            /* set the title to a wine color */
 -            SetTextColor((HDC)wParam, 0x0000007F);
 -        case IDC_ABT_PANEL_TEXT:
 -        case IDC_ABT_LICENSE_TEXT:
 -            return (BOOL)CreateSolidBrush(GetSysColor(COLOR_WINDOW));
 -        }
 -        break;
      }
      return FALSE;
  }
index 0803124994ffd252aa539bcd8b8e5fd5b8472e87,43651d8e82d8e3a36683af8c13cdf7ce4d2492c7..6c94e05688e3be0886f98cb112c5eb80b89a9aab
  /* About tab */
  #define IDC_ABT_OWNER                8432
  #define IDC_ABT_ORG                  8433
- #define IDC_WINVER_LAUNCH            8434
+ #define IDC_ABT_PANEL                8434
+ #define IDC_ABT_PANEL_TEXT           8435
+ #define IDC_ABT_TITLE_TEXT           8436
+ #define IDC_ABT_WEB_LINK             8437
+ #define IDC_ABT_LICENSE_TEXT         8438
++
++#define IDC_WINVER_LAUNCH            8439
 +
 +/* Dongles tab */
- #define IDS_TAB_DONGLES              8435
- #define IDD_DONGLECFG                8436
- #define IDC_LIST_DONGLES             8437
- #define IDC_DONGLE_LOAD              8438
- #define IDC_DONGLE_UNLOAD            8439
- #define IDC_BUTTON_LOAD              8440
- #define IDC_BUTTON_UNLOAD            8441
- #define IDC_DONGLE_OK                8442
- #define IDC_DONGLE_NOTFOUND          8443
++#define IDS_TAB_DONGLES              8440
++#define IDD_DONGLECFG                8441
++#define IDC_LIST_DONGLES             8442
++#define IDC_DONGLE_LOAD              8443
++#define IDC_DONGLE_UNLOAD            8444
++#define IDC_BUTTON_LOAD              8445
++#define IDC_BUTTON_UNLOAD            8446
++#define IDC_DONGLE_OK                8447
++#define IDC_DONGLE_NOTFOUND          8448
diff --cc server/window.c
Simple merge
Simple merge