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
b9a79c09
Commit
b9a79c09
authored
Aug 10, 2016
by
Hugh McMaster
Committed by
Alexandre Julliard
Aug 11, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Add 'PopupColors' support to the registry.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2d7c73d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
7 deletions
+19
-7
registry.c
programs/wineconsole/registry.c
+15
-5
winecon_private.h
programs/wineconsole/winecon_private.h
+2
-1
wineconsole.c
programs/wineconsole/wineconsole.c
+2
-1
No files found.
programs/wineconsole/registry.c
View file @
b9a79c09
...
...
@@ -44,6 +44,7 @@ static const WCHAR wszHistoryBufferSize[] = {'H','i','s','t','o','r','y','B','u'
static
const
WCHAR
wszHistoryNoDup
[]
=
{
'H'
,
'i'
,
's'
,
't'
,
'o'
,
'r'
,
'y'
,
'N'
,
'o'
,
'D'
,
'u'
,
'p'
,
0
};
static
const
WCHAR
wszInsertMode
[]
=
{
'I'
,
'n'
,
's'
,
'e'
,
'r'
,
't'
,
'M'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
wszMenuMask
[]
=
{
'M'
,
'e'
,
'n'
,
'u'
,
'M'
,
'a'
,
's'
,
'k'
,
0
};
static
const
WCHAR
wszPopupColors
[]
=
{
'P'
,
'o'
,
'p'
,
'u'
,
'p'
,
'C'
,
'o'
,
'l'
,
'o'
,
'r'
,
's'
,
0
};
static
const
WCHAR
wszQuickEdit
[]
=
{
'Q'
,
'u'
,
'i'
,
'c'
,
'k'
,
'E'
,
'd'
,
'i'
,
't'
,
0
};
static
const
WCHAR
wszScreenBufferSize
[]
=
{
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'B'
,
'u'
,
'f'
,
'f'
,
'e'
,
'r'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
wszScreenColors
[]
=
{
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'C'
,
'o'
,
'l'
,
'o'
,
'r'
,
's'
,
0
};
...
...
@@ -55,12 +56,13 @@ static const WCHAR color_name_fmt[] = {'%','s','%','0','2','d',0};
void
WINECON_DumpConfig
(
const
char
*
pfx
,
const
struct
config_data
*
cfg
)
{
WINE_TRACE
(
"%s cell=(%u,%u) cursor=(%d,%d) attr=%02x font=%s/%u hist=%u/%d flags=%c%c%c msk=%08x sb=(%u,%u) win=(%u,%u)x(%u,%u) edit=%u registry=%s
\n
"
,
WINE_TRACE
(
"%s cell=(%u,%u) cursor=(%d,%d) attr=%02x pop-up=%02x font=%s/%u hist=%u/%d flags=%c%c%c "
"msk=%08x sb=(%u,%u) win=(%u,%u)x(%u,%u) edit=%u registry=%s
\n
"
,
pfx
,
cfg
->
cell_width
,
cfg
->
cell_height
,
cfg
->
cursor_size
,
cfg
->
cursor_visible
,
cfg
->
def_attr
,
wine_dbgstr_w
(
cfg
->
face_name
),
cfg
->
font_weight
,
cfg
->
history_size
,
cfg
->
history_nodup
?
1
:
2
,
cfg
->
insert_mode
?
'I'
:
'i'
,
cfg
->
quick_edit
?
'Q'
:
'q'
,
cfg
->
exit_on_die
?
'X'
:
'x
'
,
cfg
->
menu_mask
,
cfg
->
sb_width
,
cfg
->
sb_height
,
cfg
->
win_pos
.
X
,
cfg
->
win_pos
.
Y
,
cfg
->
win_width
,
cfg
->
win
_height
,
cfg
->
edition_mode
,
cfg
->
popup_attr
,
wine_dbgstr_w
(
cfg
->
face_name
),
cfg
->
font_weight
,
cfg
->
history_size
,
cfg
->
history_nodup
?
1
:
2
,
cfg
->
insert_mode
?
'I'
:
'i'
,
cfg
->
quick_edit
?
'Q'
:
'q
'
,
cfg
->
exit_on_die
?
'X'
:
'x'
,
cfg
->
menu_mask
,
cfg
->
sb_width
,
cfg
->
sb
_height
,
cfg
->
win_pos
.
X
,
cfg
->
win_pos
.
Y
,
cfg
->
win_width
,
cfg
->
win_height
,
cfg
->
edition_mode
,
wine_dbgstr_w
(
cfg
->
registry
));
}
...
...
@@ -149,6 +151,10 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg)
cfg
->
menu_mask
=
val
;
count
=
sizeof
(
val
);
if
(
!
RegQueryValueExW
(
hConKey
,
wszPopupColors
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
popup_attr
=
val
;
count
=
sizeof
(
val
);
if
(
!
RegQueryValueExW
(
hConKey
,
wszQuickEdit
,
0
,
&
type
,
(
LPBYTE
)
&
val
,
&
count
))
cfg
->
quick_edit
=
val
;
...
...
@@ -209,6 +215,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg)
cfg
->
history_nodup
=
0
;
cfg
->
insert_mode
=
1
;
cfg
->
menu_mask
=
0
;
cfg
->
popup_attr
=
0xF5
;
cfg
->
quick_edit
=
0
;
cfg
->
sb_height
=
25
;
cfg
->
sb_width
=
80
;
...
...
@@ -293,6 +300,9 @@ static void WINECON_RegSaveHelper(HKEY hConKey, const struct config_data* cfg)
val
=
cfg
->
menu_mask
;
RegSetValueExW
(
hConKey
,
wszMenuMask
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
popup_attr
;
RegSetValueExW
(
hConKey
,
wszPopupColors
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
quick_edit
;
RegSetValueExW
(
hConKey
,
wszQuickEdit
,
0
,
REG_DWORD
,
(
LPBYTE
)
&
val
,
sizeof
(
val
));
...
...
programs/wineconsole/winecon_private.h
View file @
b9a79c09
...
...
@@ -32,7 +32,8 @@ struct config_data {
unsigned
cell_height
;
/* height in pixels of a character */
int
cursor_size
;
/* in % of cell height */
int
cursor_visible
;
DWORD
def_attr
;
DWORD
def_attr
;
/* default fill attributes (screen colors) */
DWORD
popup_attr
;
/* pop-up color attributes */
WCHAR
face_name
[
32
];
/* name of font (size is LF_FACESIZE) */
DWORD
font_weight
;
DWORD
history_size
;
/* number of commands in history buffer */
...
...
programs/wineconsole/wineconsole.c
View file @
b9a79c09
...
...
@@ -214,13 +214,14 @@ static BOOL WINECON_SetEditionMode(HANDLE hConIn, int edition_mode)
/******************************************************************
* WINECON_SetColors
*
*
*
Sets ColorTable and Pop-up menu colors
*/
static
void
WINECON_SetColors
(
struct
inner_data
*
data
,
const
struct
config_data
*
cfg
)
{
size_t
color_map_size
=
sizeof
(
data
->
curcfg
.
color_map
);
memcpy
(
data
->
curcfg
.
color_map
,
cfg
->
color_map
,
color_map_size
);
data
->
curcfg
.
popup_attr
=
cfg
->
popup_attr
;
SERVER_START_REQ
(
set_console_output_info
)
{
...
...
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