[Wine-patches] [eterhack] Reimplement Etersoft Authors and output Etersoft informations (eterbug #6494). Reworked.
grosso
grosso на etersoft.ru
Пн Янв 24 19:26:32 MSK 2011
----------- следующая часть -----------
From ee8bdc0f841b8ae456a022ae9f2c82e1f0f640fa Mon Sep 17 00:00:00 2001
From: grosso <grosso на etersoft.ru>
Date: Mon, 24 Jan 2011 16:53:12 +0300
Subject: [PATCH 2/2] Reimplement Etersoft Authors and output Etersoft informations (eterbug #6494).
---
.gitignore | 1 +
AUTHORS_ETERSOFT | 22 +++
Makefile.in | 1 +
configure.ac | 1 +
dlls/shell32/Makefile.in | 1 +
dlls/shell32/etersoft_about.c | 282 +++++++++++++++++++++++++++++++++++++++++
dlls/shell32/etersoft_about.h | 9 ++
dlls/shell32/shell32_En.rc | 39 +++++--
dlls/shell32/shell32_Ru.rc | 58 +++++++--
dlls/shell32/shell32_main.c | 69 +++++++++-
dlls/shell32/shres.rc | 3 +
tools/make_makefiles | 1 +
12 files changed, 461 insertions(+), 26 deletions(-)
create mode 100644 AUTHORS_ETERSOFT
create mode 100644 dlls/shell32/etersoft_about.c
create mode 100644 dlls/shell32/etersoft_about.h
diff --git a/.gitignore b/.gitignore
index 72df6cf..b872aa6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -143,6 +143,7 @@ dlls/rpcrt4/tests/server_c.c
dlls/rpcrt4/tests/server_s.c
dlls/shdocvw/shdocvw_v1.tlb
dlls/shell32/AUTHORS
+dlls/shell32/AUTHORS_ETERSOFT
dlls/stdole2.tlb/std_ole_v2.tlb
dlls/stdole32.tlb/std_ole_v1.tlb
dlls/sti/sti_wia.h
diff --git a/AUTHORS_ETERSOFT b/AUTHORS_ETERSOFT
new file mode 100644
index 0000000..88c55d7
--- /dev/null
+++ b/AUTHORS_ETERSOFT
@@ -0,0 +1,22 @@
+WINE на Etersoft is available thanks to the work of:
+
+Denis Baranov
+Alexander Demakin
+Andrei Derevyanko
+Petr Glushkov
+Eugeny Gorelov
+Daniil Kruchinin
+Konstantin Kondratyuk
+Nikolay Lezzhov
+Vitaly Lipatov
+Anatoly Lyutin
+Alexey Markachev
+Alexander Morozov
+Vitaly Perov
+Konstantin Podrubny
+Anton Rudnev
+Boris Savelev
+Ivan Sinitsin
+Ilya Shpigor
+Yaroslav Skorokhodov
+Pavel Vainerman
diff --git a/Makefile.in b/Makefile.in
index 943d442..6f209c6 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -75,6 +75,7 @@ tools/widl tools/wmc tools/wrc: libs/wpp
etersoft: programs tools
dlls/shell32/Makefile dlls/shell32/__depend__: dlls/shell32/AUTHORS
+dlls/shell32/Makefile dlls/shell32/__depend__: dlls/shell32/AUTHORS_ETERSOFT
$(MAKEDEP): include/config.h tools/Makefile
@cd $(TOOLSDIR)/tools && $(MAKE) makedep$(TOOLSEXT)
diff --git a/configure.ac b/configure.ac
index 814b4e5..f81869b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2342,6 +2342,7 @@ AH_BOTTOM([#endif /* WINE_CROSSTEST */])
AC_CONFIG_COMMANDS([include/stamp-h], [echo timestamp > include/stamp-h])
WINE_CONFIG_SYMLINK(dlls/shell32/AUTHORS,AUTHORS)
+WINE_CONFIG_SYMLINK(dlls/shell32/AUTHORS_ETERSOFT,AUTHORS_ETERSOFT)
WINE_CONFIG_SYMLINK(dlls/wineps.drv/generic.ppd)
WINE_CONFIG_SYMLINK(fonts/marlett.ttf,,enable_fonts)
WINE_CONFIG_SYMLINK(fonts/symbol.ttf,,enable_fonts)
diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in
index 47fc3aa..2823369 100644
--- a/dlls/shell32/Makefile.in
+++ b/dlls/shell32/Makefile.in
@@ -21,6 +21,7 @@ C_SRCS = \
dragdrophelper.c \
ebrowser.c \
enumidlist.c \
+ etersoft_about.c \
folders.c \
iconcache.c \
pidl.c \
diff --git a/dlls/shell32/etersoft_about.c b/dlls/shell32/etersoft_about.c
new file mode 100644
index 0000000..c6a9a3a
--- /dev/null
+++ b/dlls/shell32/etersoft_about.c
@@ -0,0 +1,282 @@
+#include "config.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#define COBJMACROS
+
+#include "windef.h"
+#include "winbase.h"
+#include "winerror.h"
+#include "winreg.h"
+#include "dlgs.h"
+#include "shellapi.h"
+#include "winuser.h"
+#include "wingdi.h"
+#include "shlobj.h"
+#include "shlwapi.h"
+#include "olectl.h"
+#include "propsys.h"
+
+#include "undocshell.h"
+#include "pidl.h"
+#include "shell32_main.h"
+#include "version.h"
+#include "shresdef.h"
+
+#include "richedit.h"
+
+#include "wine/debug.h"
+#include "wine/unicode.h"
+#include "wine/etersoft.h"
+#include "etersoft_about.h"
+#include <sys/stat.h>
+
+DEFETER_FUNC(etersoft_getlicense);
+DEFETER_FUNC(etersoft_getversion);
+
+
+WINE_DEFAULT_DEBUG_CHANNEL(shell);
+
+/*
+ *This function was copy from standart adding authors.List authors define inside function
+ */
+static void add_etersoft_authors(HWND list)
+{
+ static const WCHAR eol[] = {'\r','\n',0};
+ static const WCHAR authors_etersoft[] = {'A','U','T','H','O','R','S','_','E','T','E','R','S','O','F','T',0};
+ WCHAR *strW, *start, *end;
+ HRSRC rsrc = FindResourceW( shell32_hInstance, authors_etersoft, (LPCWSTR)RT_RCDATA );
+ char *strA = LockResource( LoadResource(shell32_hInstance, rsrc ));
+ DWORD sizeW, sizeA = SizeofResource( shell32_hInstance, rsrc );
+ if (!strA) return;
+ sizeW = MultiByteToWideChar( CP_UTF8, 0, strA, sizeA, NULL, 0 ) + 1;
+ if (!(strW = HeapAlloc( GetProcessHeap(), 0, sizeW * sizeof(WCHAR) ))) return;
+ MultiByteToWideChar( CP_UTF8, 0, strA, sizeA, strW, sizeW );
+ strW[sizeW - 1] = 0;
+
+ start = strpbrkW( strW, eol ); /* skip the header line */
+ while (start)
+ {
+ while (*start && strchrW( eol, *start )) start++;
+ if (!*start) break;
+ end = strpbrkW( start, eol );
+ if (end) *end++ = 0;
+ SendMessageW( list, LB_ADDSTRING, -1, (LPARAM)start );
+ start = end;
+ }
+ HeapFree( GetProcessHeap(), 0, strW );
+}
+
+/*************************************************************************
+ * RichEditCallBackFunction
+ */
+DWORD CALLBACK RichEditCallBackFunction(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)
+{
+ static char *t;
+
+ if ((*(BOOL *)dwCookie) == FALSE)
+ {
+ t = etersoft_getlicense(ETERSOFT_LICENSE_RTFTEXT, 0);
+ *(BOOL *)dwCookie = TRUE;
+ }
+
+ *pcb = strlen(t);
+ if (*pcb > cb)
+ *pcb = cb;
+ memcpy(pbBuff, t, *pcb);
+
+ if (*pcb)
+ {
+ t += *pcb;
+ return 0;
+ }
+ else
+ return 1;
+}
+
+/*************************************************************************
+ * EtersoftLicenseDialog
+ */
+BOOL CALLBACK EtersoftLicenseDlgProc(HWND hDlg,UINT Message,WPARAM wParam,LPARAM lParam)
+{
+ static HINSTANCE hLib;
+ static HWND hREC;
+ BOOL beg = FALSE;
+ EDITSTREAM es;
+ RECT rec;
+ //HINSTANCE hInst;
+
+ switch(Message){
+ case WM_INITDIALOG:
+ hLib = LoadLibraryA("riched20.dll");
+ GetClientRect(hDlg, &rec);
+ hREC = CreateWindowA("RichEdit20A",NULL, WS_CHILD|WS_VISIBLE|
+ WS_VSCROLL|WS_BORDER|ES_LEFT|ES_MULTILINE|
+ ES_AUTOVSCROLL|ES_READONLY,
+ rec.left,rec.top,rec.right,rec.bottom,
+ hDlg, NULL, NULL, NULL);
+
+
+ es.dwCookie = (DWORD)&beg;
+ es.dwError = 0;
+ es.pfnCallback = (EDITSTREAMCALLBACK)RichEditCallBackFunction;
+ SendMessageA(hREC, EM_STREAMIN, (WPARAM)SF_RTF,(LPARAM)&es);
+ break;
+ case WM_CLOSE:
+ EndDialog(hDlg,0);
+ break;
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+void etersoft_text_info(HWND hWnd, LPCWSTR szApp)
+{
+ TCITEMW item;
+ CHAR nversion[512];
+ WCHAR template[512], buffer[512], version[512], product[512];
+ WCHAR url[512], regnum[64], owner[256], responsible[256];
+ WCHAR templ2[] = {'%','s',':',' ','%','s',0};
+ WCHAR loadstr[512];
+ HWND hWndCtl;
+
+ //Create TabControl an title for them
+ if (LoadStringW( shell32_hInstance, IDS_ABOUT_WINEDVL, loadstr, 512 ))
+ item.pszText = loadstr;
+ TabCtrl_InsertItemW( GetDlgItem(hWnd, IDC_ABOUT_TABDVL), 0, &item );
+
+ if (LoadStringW( shell32_hInstance, IDS_ABOUT_ETERDVL, loadstr, 512 ))
+ item.pszText = loadstr;
+ TabCtrl_InsertItemW( GetDlgItem(hWnd, IDC_ABOUT_TABDVL), 1, &item );
+
+ //load etersoft's license agreement an wine license
+ LOADETER_FUNC(etersoft_getlicense);
+ LOADETER_FUNC(etersoft_getversion);
+
+ /*
+ * Out text informatioun
+ */
+ etersoft_getversion(ETERSOFT_VERSION_FULL, nversion);
+ MultiByteToWideChar( CP_UTF8, 0, nversion, -1, version, sizeof(version)/sizeof(WCHAR) );
+ MultiByteToWideChar( CP_UTF8, 0, etersoft_getlicense(ETERSOFT_LICENSE_OWNER, 0), -1,owner, sizeof(owner)/sizeof(WCHAR) );
+ MultiByteToWideChar( CP_UTF8, 0, etersoft_getlicense(ETERSOFT_LICENSE_RESPONSIBLE, 0), -1, responsible, sizeof(responsible)/sizeof(WCHAR) );
+ MultiByteToWideChar( CP_UTF8, 0, etersoft_getlicense(ETERSOFT_LICENSE_REGNUM, 0), -1,regnum, sizeof(regnum)/sizeof(WCHAR) );
+ MultiByteToWideChar( CP_UTF8, 0, etersoft_getlicense(ETERSOFT_LICENSE_URL, 0), -1,url, sizeof(url)/sizeof(WCHAR) );
+ MultiByteToWideChar( CP_UTF8, 0, etersoft_getlicense(ETERSOFT_LICENSE_PRODUCT, 0), -1,product, sizeof(url)/sizeof(WCHAR) );
+ GetWindowTextW( hWnd, template, sizeof(template)/sizeof(WCHAR) );
+ sprintfW( buffer, template, szApp );
+ SetWindowTextW( hWnd, buffer );
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT1), szApp );
+ GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT2),template, sizeof(template)/sizeof(WCHAR) );
+ sprintfW( buffer, template, version);
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT2), buffer );
+ GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_PRODUCT),template, sizeof(template)/sizeof(WCHAR) );
+ sprintfW( buffer, template, product);
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_PRODUCT), buffer );
+ GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_OWNER),template, sizeof(template)/sizeof(WCHAR) );
+ /*
+ * out etersoft info (organizatioun, reg nuber , help info)
+ */
+ if (LoadStringW(shell32_hInstance,IDS_LICENSE_ORGANIZATION, loadstr, 512))
+ sprintfW( buffer, templ2, loadstr, owner);
+ else
+ sprintfW( buffer, template, owner);
+
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_OWNER), buffer );
+ GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_RESPONSIBLE),template, sizeof(template)/sizeof(WCHAR) );
+
+ if (LoadStringW(shell32_hInstance, IDS_LICENSE_PERSON, loadstr, 512))
+ sprintfW( buffer, templ2, loadstr, responsible);
+ else
+ sprintfW( buffer, template, responsible);
+
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_RESPONSIBLE), buffer );
+ GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_REGNUM),template, sizeof(template)/sizeof(WCHAR) );
+
+ if (LoadStringW(shell32_hInstance, IDS_LICENSE_REGNUM, loadstr, 512))
+ sprintfW( buffer, templ2, loadstr, regnum);
+ else
+ sprintfW( buffer, template, regnum);
+
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_REGNUM), buffer );
+
+ if (LoadStringW(shell32_hInstance, IDS_LICENSE_CHECKING, loadstr, 512))
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3), loadstr );
+
+ SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_LINK), url );
+ /*
+ * add etersoft_authors
+ */
+ hWndCtl = GetDlgItem(hWnd, IDC_ABOUT_LISTETER);
+ add_etersoft_authors(hWndCtl);
+ ShowWindow( hWndCtl, SW_HIDE );
+
+
+}
+
+
+static IPicture *pPicture;
+
+void etersoft_picture_load()
+{
+ struct stat buf_info; //contain fil info
+ int hFile;
+ char buf[1024];
+ char fn[1024];
+ IStream *pStream = 0;
+ HRESULT hRes;
+ HGLOBAL hMem;
+
+ /* Load bitmap logo */
+ if (wine_get_data_dir()!=NULL)
+ {
+
+ lstrcpyA(fn,wine_get_data_dir());
+ lstrcatA(fn,"/logo.bmp");
+ }
+ else
+ {
+
+ lstrcpyA(fn,wine_get_build_dir());
+ lstrcatA(fn,"/etersoft/desktop/logo.bmp");
+ }
+
+ hFile = open(fn, O_RDONLY);
+ fstat(hFile, &buf_info);
+ read(hFile,buf,1024);
+ hMem = GlobalAlloc(GHND,buf_info.st_size);
+ if (hMem==NULL)
+ exit;
+ if (hMem!=NULL)
+ {
+ LPVOID pMem = GlobalLock(hMem);
+ lseek(hFile,0,0);
+ read(hFile,(char*)pMem,1429992);
+ GlobalUnlock(hMem);
+ hRes = CreateStreamOnHGlobal(hMem,FALSE, &pStream);
+ if (SUCCEEDED(hRes))
+ hRes = OleLoadPicture(pStream, buf_info.st_size, TRUE, &IID_IPicture, (void**)&pPicture);
+ }
+ close(hFile);
+}
+
+
+void etersoft_paint_picture(HDC hDC, HWND hWnd)
+{
+ RECT Rec;
+ int width=0,
+ height=0;
+ if (pPicture == NULL)
+ return;
+ IPicture_get_Width(pPicture,&width);
+ IPicture_get_Height(pPicture,&height);
+ GetClientRect(hWnd, &Rec);
+ IPicture_Render(pPicture,hDC,Rec.left,Rec.top,Rec.right-Rec.left,170,0,height,width,-height,NULL);
+
+}
diff --git a/dlls/shell32/etersoft_about.h b/dlls/shell32/etersoft_about.h
new file mode 100644
index 0000000..325c920
--- /dev/null
+++ b/dlls/shell32/etersoft_about.h
@@ -0,0 +1,9 @@
+
+static void add_etersoft_authors(HWND list);
+BOOL CALLBACK EtersoftLicenseDlgProc(HWND hDlg,UINT Message,WPARAM wParam,LPARAM lParam);
+DWORD CALLBACK RichEditCallBackFunction(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb);
+void etersoft_text_info(HWND hWnd, LPCWSTR szApp);
+void etersoft_picture_load(void);
+void etersoft_paint_picture(HDC hDC, HWND hWnd);
+void etersoft_init_picture( WPARAM wParam, LPARAM lParam );
+
diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc
index d752f77..21d2fd8 100644
--- a/dlls/shell32/shell32_En.rc
+++ b/dlls/shell32/shell32_En.rc
@@ -160,19 +160,28 @@ FONT 8, "MS Shell Dlg"
LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0
}
-SHELL_ABOUT_MSGBOX DIALOG 15, 40, 220, 152
+SHELL_ABOUT_MSGBOX DIALOG 15, 40, 335, 216
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About %s"
FONT 10, "MS Shell Dlg"
{
- DEFPUSHBUTTON "OK", IDOK, 153, 133, 60, 12, WS_TABSTOP
- PUSHBUTTON "Wine &license...", IDC_ABOUT_LICENSE, 153, 113, 60, 12, WS_TABSTOP
- LISTBOX IDC_ABOUT_LISTBOX, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
- ICON "", stc1, 10, 10, 30, 30
- LTEXT "", IDC_ABOUT_STATIC_TEXT1, 42, 10, 170, 10
- LTEXT "", IDC_ABOUT_STATIC_TEXT2, 42, 22, 170, 10
- LTEXT "Running on %s", IDC_ABOUT_STATIC_TEXT3, 42, 34, 170, 10
- LTEXT "Wine was brought to you by:", IDC_ABOUT_WINE_TEXT, 8, 54, 204, 10
+ CONTROL "", IDC_ABOUT_LOGO_ETERSOFT, "Static", SS_BITMAP, 0, 0, 60, 60
+ DEFPUSHBUTTON "OK", IDOK, 256, 194, 70, 16, WS_TABSTOP
+ PUSHBUTTON "Wine &license...", IDC_ABOUT_LICENSE, 165, 194, 70, 16, WS_TABSTOP
+ PUSHBUTTON "Etersoft &license", IDC_ABOUT_LICENSE_ETERSOFT, 165, 174, 70, 16, WS_TABSTOP
+ LISTBOX IDC_ABOUT_LISTBOX, 13, 123, 137, 87, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ LISTBOX IDC_ABOUT_LISTETER, 13, 123, 137, 87, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+ LTEXT "", IDC_ABOUT_STATIC_TEXT1, 35, 65, 137, 8
+ LTEXT "Version %s", IDC_ABOUT_STATIC_TEXT2, 35, 73, 290, 8
+ LTEXT "%s", IDC_ABOUT_STATIC_PRODUCT, 35, 89, 290, 8
+ LTEXT "%s", IDC_ABOUT_STATIC_OWNER, 163, 114, 174, 10
+ LTEXT "%s", IDC_ABOUT_STATIC_RESPONSIBLE, 163, 126, 174, 10
+ LTEXT "%s", IDC_ABOUT_STATIC_REGNUM, 163, 138, 174, 10
+ LTEXT "", IDC_ABOUT_STATIC_TEXT3, 163, 150, 137, 8
+ LTEXT "", IDC_ABOUT_STATIC_LINK, 163, 158, 160, 8, SS_NOTIFY
+ LTEXT "", IDC_ABOUT_WINE_TEXT, 8, 107, 147, 1
+ CONTROL "", IDC_ABOUT_TABDVL, "SysTabControl32", 0x0, 8, 108, 147, 102
+
}
SHELL_RUN_DLG DIALOG 0, 0, 227, 95
@@ -188,6 +197,12 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Cancel", IDCANCEL, 116, 63, 50, 14, WS_TABSTOP
PUSHBUTTON "&Browse...", IDC_RUNDLG_BROWSE, 170, 63, 50, 14, WS_TABSTOP
}
+EtersoftLicenseDlg DIALOG 50,50,470,400
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "License agreement"
+FONT 8, "MS Sans Serif"
+{
+}
STRINGTABLE
{
@@ -315,6 +330,12 @@ STRINGTABLE
STRINGTABLE
{
+IDS_ABOUT_WINEDVL, "Wine developers"
+IDS_ABOUT_ETERDVL, "Etersoft team"
+IDS_LICENSE_CHECKING, "Legality check is available on the page"
+IDS_LICENSE_ORGANIZATION, "Organization"
+IDS_LICENSE_PERSON, "Person"
+IDS_LICENSE_REGNUM, "Reg. number"
IDS_LICENSE_CAPTION, "Wine License"
IDS_LICENSE,
"Wine is free software; you can redistribute it and/or \
diff --git a/dlls/shell32/shell32_Ru.rc b/dlls/shell32/shell32_Ru.rc
index d32621e..d7fb38a 100644
--- a/dlls/shell32/shell32_Ru.rc
+++ b/dlls/shell32/shell32_Ru.rc
@@ -164,19 +164,29 @@ FONT 8, "MS Shell Dlg"
LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0
}
-SHELL_ABOUT_MSGBOX DIALOG 15, 40, 220, 152
+SHELL_ABOUT_MSGBOX DIALOG 15, 40, 335, 216
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "О %s"
FONT 10, "MS Shell Dlg"
{
- DEFPUSHBUTTON "OK", IDOK, 153, 133, 60, 12, WS_TABSTOP
- PUSHBUTTON "&Лицензия Wine...", IDC_ABOUT_LICENSE, 153, 113, 60, 12, WS_TABSTOP
- LISTBOX IDC_ABOUT_LISTBOX, 8, 65, 137, 82, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
- ICON "", stc1, 10, 10, 30, 30
- LTEXT "", IDC_ABOUT_STATIC_TEXT1, 40, 10, 137, 10
- LTEXT "", IDC_ABOUT_STATIC_TEXT2, 40, 22, 137, 10
- LTEXT "Версия Wine %s", IDC_ABOUT_STATIC_TEXT3, 42, 34, 170, 10
- LTEXT "Разработчики Wine:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10
+/*ICON "", stc1, 10, 10, 30, 30*/
+CONTROL "", IDC_ABOUT_LOGO_ETERSOFT, "Static", SS_BITMAP, 0, 0, 60, 60
+DEFPUSHBUTTON "OK", IDOK, 256, 194, 70, 16, WS_TABSTOP
+PUSHBUTTON "&Лицензия Wine...", IDC_ABOUT_LICENSE, 165, 194, 70, 16, WS_TABSTOP
+PUSHBUTTON "&Лицензия Etersoft", IDC_ABOUT_LICENSE_ETERSOFT, 165, 174, 70, 16, WS_TABSTOP
+LISTBOX IDC_ABOUT_LISTBOX, 13, 123, 137, 87, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+LISTBOX IDC_ABOUT_LISTETER, 13, 123, 137, 87, LBS_NOTIFY | WS_VSCROLL | WS_BORDER
+LTEXT "", IDC_ABOUT_STATIC_TEXT1, 35, 65, 137, 8
+LTEXT "Версия %s", IDC_ABOUT_STATIC_TEXT2, 35, 73, 290, 8
+LTEXT "%s", IDC_ABOUT_STATIC_PRODUCT, 35, 89, 290, 8
+LTEXT "%s", IDC_ABOUT_STATIC_OWNER, 163, 114, 174, 10
+LTEXT "%s", IDC_ABOUT_STATIC_RESPONSIBLE, 163, 126, 174, 10
+LTEXT "%s", IDC_ABOUT_STATIC_REGNUM, 163, 138, 174, 10
+LTEXT "", IDC_ABOUT_STATIC_TEXT3, 163, 150, 137, 8
+LTEXT "", IDC_ABOUT_STATIC_LINK, 163, 158, 161, 12, SS_NOTIFY
+/*LTEXT "Разработчики Wine:", IDC_ABOUT_WINE_TEXT, 8, 114, 137, 8*/
+LTEXT "", IDC_ABOUT_WINE_TEXT, 8, 107, 147, 1
+CONTROL "", IDC_ABOUT_TABDVL, "SysTabControl32", 0x0, 8, 108, 147, 102
}
SHELL_RUN_DLG DIALOG 0, 0, 227, 95
@@ -193,6 +203,13 @@ FONT 8, "MS Shell Dlg"
PUSHBUTTON "Об&зор...", 12288, 170, 63, 50, 14, WS_TABSTOP
}
+EtersoftLicenseDlg DIALOG 50,50,470,400
+STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
+CAPTION "Лицензионное соглашение"
+FONT 8, "MS Sans Serif"
+{
+}
+
STRINGTABLE
{
/* columns in the shellview */
@@ -294,3 +311,26 @@ STRINGTABLE
IDS_CPANEL_DESCRIPTION "Описание"
IDS_SHLEXEC_NOASSOC "Программы для открытия файлов этого типа не сконфигурировано."
}
+
+STRINGTABLE
+{
+IDS_ABOUT_WINEDVL, "Разработчики Wine"
+IDS_ABOUT_ETERDVL, "Etersoft"
+IDS_LICENSE_CHECKING, "Проверка подлинности доступна на странице"
+IDS_LICENSE_ORGANIZATION, "Организация"
+IDS_LICENSE_PERSON, "Отв. лицо"
+IDS_LICENSE_REGNUM, "Рег. номер"
+IDS_LICENSE_CAPTION, "Wine License"
+IDS_LICENSE,
+"Wine 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.\n\n\
+Wine is distributed in the hope that it will be useful, \
+but WITHOUT ANY WARRANTY; without even the implied warranty of \
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU \
+Lesser General Public License for more details.\n\n\
+You should have received a copy of the GNU Lesser General Public \
+License along with Wine; if not, write to the Free Software \
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA."
+}
diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c
index af0cb4b..c9fc54a 100644
--- a/dlls/shell32/shell32_main.c
+++ b/dlls/shell32/shell32_main.c
@@ -48,6 +48,7 @@
#include "wine/debug.h"
#include "wine/unicode.h"
+#include "etersoft_about.h"
WINE_DEFAULT_DEBUG_CHANNEL(shell);
@@ -938,7 +939,6 @@ static void add_authors( HWND list )
HRSRC rsrc = FindResourceW( shell32_hInstance, authors, (LPCWSTR)RT_RCDATA );
char *strA = LockResource( LoadResource( shell32_hInstance, rsrc ));
DWORD sizeW, sizeA = SizeofResource( shell32_hInstance, rsrc );
-
if (!strA) return;
sizeW = MultiByteToWideChar( CP_UTF8, 0, strA, sizeA, NULL, 0 ) + 1;
if (!(strW = HeapAlloc( GetProcessHeap(), 0, sizeW * sizeof(WCHAR) ))) return;
@@ -973,11 +973,13 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
case WM_INITDIALOG:
{
ABOUT_INFO *info = (ABOUT_INFO *)lParam;
+ #if 0
WCHAR template[512], buffer[512], version[64];
extern const char *wine_get_build_id(void);
-
+ #endif
if (info)
{
+ #if 0
SendDlgItemMessageW(hWnd, stc1, STM_SETICON,(WPARAM)info->hIcon, 0);
GetWindowTextW( hWnd, template, sizeof(template)/sizeof(WCHAR) );
sprintfW( buffer, template, info->szApp );
@@ -986,27 +988,64 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT2), info->szOtherStuff );
GetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3),
template, sizeof(template)/sizeof(WCHAR) );
- MultiByteToWideChar( CP_UTF8, 0, wine_get_build_id(), -1,
- version, sizeof(version)/sizeof(WCHAR) );
+ MultiByteToWideChar( CP_UTF8, 0, wine_get_build_id(), -1, version, sizeof(version)/sizeof(WCHAR) );
sprintfW( buffer, template, version );
SetWindowTextW( GetDlgItem(hWnd, IDC_ABOUT_STATIC_TEXT3), buffer );
+ #endif
+ etersoft_picture_load();
+ etersoft_text_info(hWnd, info->szApp);
+
hWndCtl = GetDlgItem(hWnd, IDC_ABOUT_LISTBOX);
- SendMessageW( hWndCtl, WM_SETREDRAW, 0, 0 );
- SendMessageW( hWndCtl, WM_SETFONT, (WPARAM)info->hFont, 0 );
add_authors( hWndCtl );
SendMessageW( hWndCtl, WM_SETREDRAW, 1, 0 );
- }
+ }
}
return 1;
+
+ case WM_CTLCOLORSTATIC:
+ {
+ int ID=(int)GetDlgCtrlID((HWND)lParam);
+ if (ID==IDC_ABOUT_STATIC_LINK)
+ {
+ SetTextColor((HDC)wParam,RGB(0,0,255));
+ SetBkColor((HDC)wParam,GetSysColor(COLOR_BTNFACE));
+ return (LRESULT)GetSysColorBrush(COLOR_BTNFACE);
+ } else
+ if ((ID==IDC_ABOUT_STATIC_TEXT1 )||(ID==IDC_ABOUT_STATIC_TEXT2 ))
+ {
+ SetBkColor((HDC)wParam,RGB(255,255,255));
+ return (LRESULT)(HBRUSH) GetStockObject (WHITE_BRUSH) ;
+ }
+
+ }
+ break;
case WM_PAINT:
- {
+ {
PAINTSTRUCT ps;
HDC hDC = BeginPaint( hWnd, &ps );
paint_dropline( hDC, hWnd );
+ etersoft_paint_picture(hDC, hWnd);
EndPaint( hWnd, &ps );
}
break;
+ case WM_NOTIFY:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case (TCN_SELCHANGE):
+ if (SendMessageA(GetDlgItem( hWnd, IDC_ABOUT_TABDVL), TCM_GETCURSEL, 0, 0 ))
+ {
+ ShowWindow( GetDlgItem( hWnd, IDC_ABOUT_LISTBOX ), SW_HIDE );
+ ShowWindow( GetDlgItem( hWnd, IDC_ABOUT_LISTETER ), SW_SHOW );
+ }
+ else
+ {
+ ShowWindow( GetDlgItem( hWnd, IDC_ABOUT_LISTETER ), SW_HIDE );
+ ShowWindow( GetDlgItem( hWnd, IDC_ABOUT_LISTBOX ), SW_SHOW );
+ }
+ break;
+ }
+ break;
case WM_COMMAND:
if (wParam == IDOK || wParam == IDCANCEL)
@@ -1030,6 +1069,20 @@ static INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
params.dwLanguageId = LANG_NEUTRAL;
MessageBoxIndirectW( ¶ms );
}
+ if (wParam==IDC_ABOUT_LICENSE_ETERSOFT)
+ {
+ HINSTANCE hInst = shell32_hInstance;
+ DialogBoxA(hInst, "EtersoftLicenseDlg", hWnd, (DLGPROC)(int(__stdcall*)())EtersoftLicenseDlgProc);
+
+ }
+ if (wParam == IDC_ABOUT_STATIC_LINK)
+ {
+ WCHAR link_buffer[1024];
+ /* TODO: run with external browser */
+ WCHAR iexplore[]= {'i','e','x','p','l','o','r','e','.','e','x','e','\0'};
+ GetWindowTextW( GetDlgItem(hWnd,wParam), link_buffer, sizeof(link_buffer)/sizeof(WCHAR) );
+ ShellExecuteW(0, 0, iexplore, link_buffer, 0, SW_SHOWNORMAL);
+ }
break;
case WM_CLOSE:
EndDialog(hWnd, TRUE);
diff --git a/dlls/shell32/shres.rc b/dlls/shell32/shres.rc
index 1b0cc6d..fbac986 100644
--- a/dlls/shell32/shres.rc
+++ b/dlls/shell32/shres.rc
@@ -131,3 +131,6 @@ IDR_AVI_FILEDELETE AVI searching.avi
/* @makedep: AUTHORS */
AUTHORS RCDATA AUTHORS
+
+/* @makedep: AUTHORS_ETERSOFT */
+AUTHORS_ETERSOFT RCDATA AUTHORS_ETERSOFT
\ No newline at end of file
diff --git a/tools/make_makefiles b/tools/make_makefiles
index 9bd5ab3..a63c929 100755
--- a/tools/make_makefiles
+++ b/tools/make_makefiles
@@ -92,6 +92,7 @@ my @ignores = (
"dlldata.c",
"dlls/*/*.def",
"dlls/shell32/AUTHORS",
+ "dlls/shell32/AUTHORS_ETERSOFT",
"*/*/tests/*crosstest.exe",
"*/*/tests/testlist.c",
"include/config.h",
--
1.7.3.4
Подробная информация о списке рассылки Wine-patches