Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
81be7f78
Commit
81be7f78
authored
Sep 22, 2003
by
Mike Hearn
Committed by
Alexandre Julliard
Sep 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add screen depth option and remove "Allocated System Colors" setting.
parent
a6d37f6d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
21 deletions
+38
-21
En.rc
programs/winecfg/En.rc
+3
-6
resource.h
programs/winecfg/resource.h
+1
-0
winecfg.c
programs/winecfg/winecfg.c
+1
-0
x11drvdlg.c
programs/winecfg/x11drvdlg.c
+33
-15
No files found.
programs/winecfg/En.rc
View file @
81be7f78
...
@@ -68,14 +68,11 @@ BEGIN
...
@@ -68,14 +68,11 @@ BEGIN
BS_AUTOCHECKBOX | WS_TABSTOP,145,44,97,10
BS_AUTOCHECKBOX | WS_TABSTOP,145,44,97,10
*/
*/
LTEXT "Screen color depth: ",IDC_STATIC,8,10,60,30
COMBOBOX IDC_SCREEN_DEPTH,70,8,180,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
EDITTEXT IDC_DESKTOP_WIDTH,64,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
EDITTEXT IDC_DESKTOP_WIDTH,64,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
EDITTEXT IDC_DESKTOP_HEIGHT,117,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
EDITTEXT IDC_DESKTOP_HEIGHT,117,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
GROUPBOX " Render Settings ",IDC_STATIC,8,4,244,60
LTEXT "The driver color and render settings are used to optimise the way in which colors and applications are displayed.",
IDC_STATIC,15,17,228,22
LTEXT "Allocated system colors:",IDC_STATIC,15,43,76,8
EDITTEXT IDC_SYSCOLORS,90,41,40,14,ES_AUTOHSCROLL | ES_NUMBER
GROUPBOX " Window settings ",IDC_STATIC,8,65,244,170
GROUPBOX " Window settings ",IDC_STATIC,8,65,244,170
...
...
programs/winecfg/resource.h
View file @
81be7f78
...
@@ -103,3 +103,4 @@
...
@@ -103,3 +103,4 @@
#define IDC_ENABLE_DESKTOP 1074
#define IDC_ENABLE_DESKTOP 1074
#define IDS_DRIVE_NO_C 1075
#define IDS_DRIVE_NO_C 1075
#define IDC_ENABLE_MANAGED 1076
#define IDC_ENABLE_MANAGED 1076
#define IDC_SCREEN_DEPTH 1077
programs/winecfg/winecfg.c
View file @
81be7f78
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
* - Make a list of prefs that have been dropped from the UI/should be eliminated
* - Make a list of prefs that have been dropped from the UI/should be eliminated
* - Multimedia page
* - Multimedia page
* - Settings migration code (from old configs)
* - Settings migration code (from old configs)
* - Clean up resource.h, it's a bog
*
*
* Minor things that should be done someday:
* Minor things that should be done someday:
* - Make the desktop size UI a combo box, with a Custom option, so it's more obvious what you might want to choose here
* - Make the desktop size UI a combo box, with a Custom option, so it's more obvious what you might want to choose here
...
...
programs/winecfg/x11drvdlg.c
View file @
81be7f78
...
@@ -73,7 +73,7 @@ void updateGUIForDesktopMode(HWND hDlg) {
...
@@ -73,7 +73,7 @@ void updateGUIForDesktopMode(HWND hDlg) {
void
initX11DrvDlg
(
HWND
hDlg
)
void
initX11DrvDlg
(
HWND
hDlg
)
{
{
char
*
buf
;
char
*
buf
;
char
*
i
;
char
*
bufindex
;
updatingUI
=
TRUE
;
updatingUI
=
TRUE
;
...
@@ -81,20 +81,34 @@ void initX11DrvDlg (HWND hDlg)
...
@@ -81,20 +81,34 @@ void initX11DrvDlg (HWND hDlg)
/* desktop size */
/* desktop size */
buf
=
getConfigValue
(
"x11drv"
,
"Desktop"
,
"640x480"
);
buf
=
getConfigValue
(
"x11drv"
,
"Desktop"
,
"640x480"
);
i
=
strchr
(
buf
,
'x'
);
bufindex
=
strchr
(
buf
,
'x'
);
*
i
=
'\0'
;
*
bufindex
=
'\0'
;
i
++
;
bufindex
++
;
SetWindowText
(
GetDlgItem
(
hDlg
,
IDC_DESKTOP_WIDTH
),
buf
);
SetWindowText
(
GetDlgItem
(
hDlg
,
IDC_DESKTOP_WIDTH
),
buf
);
SetWindowText
(
GetDlgItem
(
hDlg
,
IDC_DESKTOP_HEIGHT
),
i
);
SetWindowText
(
GetDlgItem
(
hDlg
,
IDC_DESKTOP_HEIGHT
),
bufindex
);
free
(
buf
);
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"8 bit"
);
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"16 bit"
);
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"24 bit"
);
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"32 bit"
);
/* is this valid? */
buf
=
getConfigValue
(
"x11drv"
,
"ScreenDepth"
,
"24"
);
if
(
strcmp
(
buf
,
"8"
)
==
0
)
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
0
,
0
);
else
if
(
strcmp
(
buf
,
"16"
)
==
0
)
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
1
,
0
);
else
if
(
strcmp
(
buf
,
"24"
)
==
0
)
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
2
,
0
);
else
if
(
strcmp
(
buf
,
"32"
)
==
0
)
SendDlgItemMessage
(
hDlg
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
3
,
0
);
else
WINE_ERR
(
"Invalid screen depth read from registry (%s)
\n
"
,
buf
);
free
(
buf
);
free
(
buf
);
SendDlgItemMessage
(
hDlg
,
IDC_DESKTOP_WIDTH
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
SendDlgItemMessage
(
hDlg
,
IDC_DESKTOP_WIDTH
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
SendDlgItemMessage
(
hDlg
,
IDC_DESKTOP_HEIGHT
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
SendDlgItemMessage
(
hDlg
,
IDC_DESKTOP_HEIGHT
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
buf
=
getConfigValue
(
"x11drv"
,
"AllocSysColors"
,
"100"
);
SetWindowText
(
GetDlgItem
(
hDlg
,
IDC_SYSCOLORS
),
buf
);
free
(
buf
);
buf
=
getConfigValue
(
"x11drv"
,
"Managed"
,
"Y"
);
buf
=
getConfigValue
(
"x11drv"
,
"Managed"
,
"Y"
);
if
(
IS_OPTION_TRUE
(
*
buf
))
if
(
IS_OPTION_TRUE
(
*
buf
))
CheckDlgButton
(
hDlg
,
IDC_ENABLE_MANAGED
,
BST_CHECKED
);
CheckDlgButton
(
hDlg
,
IDC_ENABLE_MANAGED
,
BST_CHECKED
);
...
@@ -141,14 +155,15 @@ void onEnableDesktopClicked(HWND hDlg) {
...
@@ -141,14 +155,15 @@ void onEnableDesktopClicked(HWND hDlg) {
updateGUIForDesktopMode
(
hDlg
);
updateGUIForDesktopMode
(
hDlg
);
}
}
void
onSysColorsChange
(
HWND
hDlg
)
{
void
onScreenDepthChanged
(
HWND
hDlg
)
{
char
*
newvalue
=
getDialogItemText
(
hDlg
,
IDC_SYSCOLORS
);
char
*
newvalue
=
getDialogItemText
(
hDlg
,
IDC_SCREEN_DEPTH
);
char
*
spaceIndex
=
strchr
(
newvalue
,
' '
);
WINE_TRACE
(
"
\n
"
);
WINE_TRACE
(
"
newvalue=%s
\n
"
,
newvalue
);
if
(
updatingUI
)
return
;
if
(
updatingUI
)
return
;
if
(
!
newvalue
)
return
;
addTransaction
(
"x11drv"
,
"AllocSystemColors"
,
ACTION_SET
,
newvalue
);
*
spaceIndex
=
'\0'
;
addTransaction
(
"x11drv"
,
"ScreenDepth"
,
ACTION_SET
,
newvalue
);
free
(
newvalue
);
free
(
newvalue
);
}
}
...
@@ -171,7 +186,6 @@ X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -171,7 +186,6 @@ X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case
EN_CHANGE
:
{
case
EN_CHANGE
:
{
SendMessage
(
GetParent
(
hDlg
),
PSM_CHANGED
,
0
,
0
);
SendMessage
(
GetParent
(
hDlg
),
PSM_CHANGED
,
0
,
0
);
if
(
(
LOWORD
(
wParam
)
==
IDC_DESKTOP_WIDTH
)
||
(
LOWORD
(
wParam
)
==
IDC_DESKTOP_HEIGHT
)
)
setFromDesktopSizeEdits
(
hDlg
);
if
(
(
LOWORD
(
wParam
)
==
IDC_DESKTOP_WIDTH
)
||
(
LOWORD
(
wParam
)
==
IDC_DESKTOP_HEIGHT
)
)
setFromDesktopSizeEdits
(
hDlg
);
if
(
LOWORD
(
wParam
)
==
IDC_SYSCOLORS
)
onSysColorsChange
(
hDlg
);
break
;
break
;
}
}
case
BN_CLICKED
:
{
case
BN_CLICKED
:
{
...
@@ -182,6 +196,10 @@ X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
...
@@ -182,6 +196,10 @@ X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
};
};
break
;
break
;
}
}
case
CBN_SELCHANGE
:
{
if
(
LOWORD
(
wParam
)
==
IDC_SCREEN_DEPTH
)
onScreenDepthChanged
(
hDlg
);
break
;
}
default:
default:
break
;
break
;
...
...
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