Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
12ae8ff8
Commit
12ae8ff8
authored
Mar 26, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shell32: Add a license message box and a build id to the About dialog. Clean things up a little.
parent
f29b5757
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
32 deletions
+69
-32
shell32_En.rc
dlls/shell32/shell32_En.rc
+24
-5
shell32_main.c
dlls/shell32/shell32_main.c
+40
-27
shresdef.h
dlls/shell32/shresdef.h
+5
-0
No files found.
dlls/shell32/shell32_En.rc
View file @
12ae8ff8
...
...
@@ -136,17 +136,19 @@ FONT 8, "MS Shell Dlg"
LTEXT "", IDD_MESSAGE, 40, 10, 238, 52, 0
}
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 2
1
0, 152
SHELL_ABOUT_MSGBOX DIALOG LOADONCALL MOVEABLE DISCARDABLE 15, 40, 2
2
0, 152
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "About %s"
FONT 10, "MS Shell Dlg"
{
DEFPUSHBUTTON "OK", IDOK, 153, 133, 50, 12, WS_TABSTOP
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, 40, 10, 137, 10
LTEXT "", IDC_ABOUT_STATIC_TEXT2, 40, 22, 137, 10
LTEXT "Wine was brought to you by:", IDC_ABOUT_WINE_TEXT, 8, 55, 137, 10
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
}
SHELL_RUN_DLG DIALOG LOADONCALL MOVEABLE DISCARDABLE 0, 0, 227, 95
...
...
@@ -248,3 +250,20 @@ STRINGTABLE
IDS_NEWFOLDER "New Folder"
}
STRINGTABLE
{
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 this library; if not, write to the Free Software \
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA."
}
dlls/shell32/shell32_main.c
View file @
12ae8ff8
...
...
@@ -851,21 +851,19 @@ typedef struct
HFONT
hFont
;
}
ABOUT_INFO
;
#define DROP_FIELD_TOP (-15)
#define DROP_FIELD_HEIGHT 15
#define DROP_FIELD_TOP (-12)
static
BOOL
__get_dropline
(
HWND
hWnd
,
LPRECT
lprect
)
static
void
paint_dropline
(
HDC
hdc
,
HWND
hWnd
)
{
HWND
hWndCtl
=
GetDlgItem
(
hWnd
,
IDC_ABOUT_WINE_TEXT
);
if
(
hWndCtl
)
{
GetWindowRect
(
hWndCtl
,
lprect
);
MapWindowPoints
(
0
,
hWnd
,
(
LPPOINT
)
lprect
,
2
);
lprect
->
bottom
=
(
lprect
->
top
+=
DROP_FIELD_TOP
);
return
TRUE
;
}
return
FALSE
;
RECT
rect
;
if
(
!
hWndCtl
)
return
;
GetWindowRect
(
hWndCtl
,
&
rect
);
MapWindowPoints
(
0
,
hWnd
,
(
LPPOINT
)
&
rect
,
2
);
rect
.
top
+=
DROP_FIELD_TOP
;
rect
.
bottom
=
rect
.
top
+
2
;
DrawEdge
(
hdc
,
&
rect
,
BDR_SUNKENOUTER
,
BF_RECT
);
}
/*************************************************************************
...
...
@@ -979,26 +977,32 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
case
WM_INITDIALOG
:
{
ABOUT_INFO
*
info
=
(
ABOUT_INFO
*
)
lParam
;
WCHAR
Template
[
512
],
AppTitle
[
512
];
WCHAR
template
[
512
],
buffer
[
512
],
version
[
64
];
extern
const
char
*
wine_get_build_id
(
void
);
if
(
info
)
{
const
char
*
const
*
pstr
=
SHELL_Authors
;
SendDlgItemMessageW
(
hWnd
,
stc1
,
STM_SETICON
,(
WPARAM
)
info
->
hIcon
,
0
);
GetWindowTextW
(
hWnd
,
Template
,
sizeof
(
T
emplate
)
/
sizeof
(
WCHAR
)
);
sprintfW
(
AppTitle
,
T
emplate
,
info
->
szApp
);
SetWindowTextW
(
hWnd
,
AppTitle
);
GetWindowTextW
(
hWnd
,
template
,
sizeof
(
t
emplate
)
/
sizeof
(
WCHAR
)
);
sprintfW
(
buffer
,
t
emplate
,
info
->
szApp
);
SetWindowTextW
(
hWnd
,
buffer
);
SetWindowTextW
(
GetDlgItem
(
hWnd
,
IDC_ABOUT_STATIC_TEXT1
),
info
->
szApp
);
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
)
);
sprintfW
(
buffer
,
template
,
version
);
SetWindowTextW
(
GetDlgItem
(
hWnd
,
IDC_ABOUT_STATIC_TEXT3
),
buffer
);
hWndCtl
=
GetDlgItem
(
hWnd
,
IDC_ABOUT_LISTBOX
);
SendMessageW
(
hWndCtl
,
WM_SETREDRAW
,
0
,
0
);
SendMessageW
(
hWndCtl
,
WM_SETFONT
,
(
WPARAM
)
info
->
hFont
,
0
);
while
(
*
pstr
)
{
WCHAR
name
[
64
];
/* authors list is in utf-8 format */
MultiByteToWideChar
(
CP_UTF8
,
0
,
*
pstr
,
-
1
,
name
,
sizeof
(
name
)
/
sizeof
(
WCHAR
)
);
SendMessageW
(
hWndCtl
,
LB_ADDSTRING
,
(
WPARAM
)
-
1
,
(
LPARAM
)
name
);
MultiByteToWideChar
(
CP_UTF8
,
0
,
*
pstr
,
-
1
,
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
);
SendMessageW
(
hWndCtl
,
LB_ADDSTRING
,
(
WPARAM
)
-
1
,
(
LPARAM
)
buffer
);
pstr
++
;
}
SendMessageW
(
hWndCtl
,
WM_SETREDRAW
,
1
,
0
);
...
...
@@ -1008,16 +1012,9 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
case
WM_PAINT
:
{
RECT
rect
;
PAINTSTRUCT
ps
;
HDC
hDC
=
BeginPaint
(
hWnd
,
&
ps
);
if
(
__get_dropline
(
hWnd
,
&
rect
))
{
SelectObject
(
hDC
,
GetStockObject
(
BLACK_PEN
)
);
MoveToEx
(
hDC
,
rect
.
left
,
rect
.
top
,
NULL
);
LineTo
(
hDC
,
rect
.
right
,
rect
.
bottom
);
}
paint_dropline
(
hDC
,
hWnd
);
EndPaint
(
hWnd
,
&
ps
);
}
break
;
...
...
@@ -1028,6 +1025,22 @@ INT_PTR CALLBACK AboutDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
EndDialog
(
hWnd
,
TRUE
);
return
TRUE
;
}
if
(
wParam
==
IDC_ABOUT_LICENSE
)
{
MSGBOXPARAMSW
params
;
params
.
cbSize
=
sizeof
(
params
);
params
.
hwndOwner
=
hWnd
;
params
.
hInstance
=
shell32_hInstance
;
params
.
lpszText
=
MAKEINTRESOURCEW
(
IDS_LICENSE
);
params
.
lpszCaption
=
MAKEINTRESOURCEW
(
IDS_LICENSE_CAPTION
);
params
.
dwStyle
=
MB_ICONINFORMATION
|
MB_OK
;
params
.
lpszIcon
=
0
;
params
.
dwContextHelpId
=
0
;
params
.
lpfnMsgBoxCallback
=
NULL
;
params
.
dwLanguageId
=
LANG_NEUTRAL
;
MessageBoxIndirectW
(
&
params
);
}
break
;
case
WM_CLOSE
:
EndDialog
(
hWnd
,
TRUE
);
...
...
dlls/shell32/shresdef.h
View file @
12ae8ff8
...
...
@@ -96,6 +96,9 @@
#define IDS_NEWFOLDER 142
#define IDS_LICENSE 256
#define IDS_LICENSE_CAPTION 257
#define MENU_SHV_FILE 144
/* Note: this string is referenced from the registry*/
...
...
@@ -161,9 +164,11 @@ FIXME: Need to add them, but for now just let them use the same: searching.avi
#define IDR_AVI_FILEDELETE 164
/* about box */
#define IDC_ABOUT_LICENSE 97
#define IDC_ABOUT_WINE_TEXT 98
#define IDC_ABOUT_LISTBOX 99
#define IDC_ABOUT_STATIC_TEXT1 100
#define IDC_ABOUT_STATIC_TEXT2 101
#define IDC_ABOUT_STATIC_TEXT3 102
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment