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
89c86dd9
Commit
89c86dd9
authored
Mar 10, 2008
by
Mikołaj Zalewski
Committed by
Alexandre Julliard
Mar 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Move font style names to resources.
parent
1fd37973
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
10 deletions
+31
-10
cdlg.h
dlls/comdlg32/cdlg.h
+7
-0
cdlg_En.rc
dlls/comdlg32/cdlg_En.rc
+8
-0
cdlg_Pl.rc
dlls/comdlg32/cdlg_Pl.rc
+8
-0
fontdlg.c
dlls/comdlg32/fontdlg.c
+8
-10
No files found.
dlls/comdlg32/cdlg.h
View file @
89c86dd9
...
@@ -126,6 +126,13 @@ typedef struct {
...
@@ -126,6 +126,13 @@ typedef struct {
#define IDS_CHARSET_ISO10 223
#define IDS_CHARSET_ISO10 223
#define IDS_CHARSET_CELTIC 224
#define IDS_CHARSET_CELTIC 224
/* Font styles */
#define IDS_FONT_REGULAR 256
#define IDS_FONT_BOLD 257
#define IDS_FONT_ITALIC 258
#define IDS_FONT_BOLD_ITALIC 259
/* Color names string IDs */
/* Color names string IDs */
#define IDS_COLOR_BLACK 1040
#define IDS_COLOR_BLACK 1040
...
...
dlls/comdlg32/cdlg_En.rc
View file @
89c86dd9
...
@@ -443,6 +443,14 @@ Please install one and retry."
...
@@ -443,6 +443,14 @@ Please install one and retry."
PD32_PRINTER_STATUS_POWER_SAVE "Power save mode; "
PD32_PRINTER_STATUS_POWER_SAVE "Power save mode; "
}
}
STRINGTABLE DISCARDABLE /* Font styles */
{
IDS_FONT_REGULAR "Regular"
IDS_FONT_BOLD "Bold"
IDS_FONT_ITALIC "Italic"
IDS_FONT_BOLD_ITALIC "Bold Italic"
}
STRINGTABLE DISCARDABLE /* Color names */
STRINGTABLE DISCARDABLE /* Color names */
{
{
IDS_COLOR_BLACK "Black"
IDS_COLOR_BLACK "Black"
...
...
dlls/comdlg32/cdlg_Pl.rc
View file @
89c86dd9
...
@@ -449,6 +449,14 @@ STRINGTABLE DISCARDABLE
...
@@ -449,6 +449,14 @@ STRINGTABLE DISCARDABLE
IDS_OPEN_FILE "Otwrz plik"
IDS_OPEN_FILE "Otwrz plik"
}
}
STRINGTABLE DISCARDABLE /* Font styles */
{
IDS_FONT_REGULAR "Regularny"
IDS_FONT_BOLD "Pogrubiony"
IDS_FONT_ITALIC "Kusywa"
IDS_FONT_BOLD_ITALIC "Pogrubiona kursywa"
}
STRINGTABLE DISCARDABLE /* Color names */
STRINGTABLE DISCARDABLE /* Color names */
{
{
IDS_COLOR_BLACK "Czarny"
IDS_COLOR_BLACK "Czarny"
...
...
dlls/comdlg32/fontdlg.c
View file @
89c86dd9
...
@@ -357,17 +357,13 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
...
@@ -357,17 +357,13 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
{
{
int
italic
;
int
italic
;
int
weight
;
int
weight
;
const
WCHAR
*
stname
;
UINT
resId
;
};
};
static
const
WCHAR
strRegular
[]
=
{
'R'
,
'e'
,
'g'
,
'u'
,
'l'
,
'a'
,
'r'
,
0
};
static
const
WCHAR
strItalic
[]
=
{
'I'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
0
};
static
const
WCHAR
strBold
[]
=
{
'B'
,
'o'
,
'l'
,
'd'
,
0
};
static
const
WCHAR
strBoldItalic
[]
=
{
'B'
,
'o'
,
'l'
,
'd'
,
' '
,
'I'
,
't'
,
'a'
,
'l'
,
'i'
,
'c'
,
0
};
static
const
struct
FONTSTYLE
fontstyles
[
FSTYLES
]
=
{
static
const
struct
FONTSTYLE
fontstyles
[
FSTYLES
]
=
{
{
0
,
FW_NORMAL
,
strRegular
},
{
0
,
FW_NORMAL
,
IDS_FONT_REGULAR
},
{
1
,
FW_NORMAL
,
strItalic
},
{
1
,
FW_NORMAL
,
IDS_FONT_ITALIC
},
{
0
,
FW_BOLD
,
strBold
},
{
0
,
FW_BOLD
,
IDS_FONT_BOLD
},
{
1
,
FW_BOLD
,
strBoldItalic
}
{
1
,
FW_BOLD
,
IDS_FONT_BOLD_ITALIC
}
};
};
HFONT
hf
;
HFONT
hf
;
TEXTMETRICW
tm
;
TEXTMETRICW
tm
;
...
@@ -390,7 +386,9 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
...
@@ -390,7 +386,9 @@ static int SetFontStylesToCombo2(HWND hwnd, HDC hdc, const LOGFONTW *lplf)
(
fontstyles
[
i
].
weight
==
FW_BOLD
&&
tm
.
tmWeight
>
FW_MEDIUM
))
&&
(
fontstyles
[
i
].
weight
==
FW_BOLD
&&
tm
.
tmWeight
>
FW_MEDIUM
))
&&
((
tm
.
tmItalic
!=
0
)
==
fontstyles
[
i
].
italic
))
((
tm
.
tmItalic
!=
0
)
==
fontstyles
[
i
].
italic
))
{
{
j
=
SendMessageW
(
hwnd
,
CB_ADDSTRING
,
0
,(
LPARAM
)
fontstyles
[
i
].
stname
);
WCHAR
name
[
64
];
LoadStringW
(
COMDLG32_hInstance
,
fontstyles
[
i
].
resId
,
name
,
64
);
j
=
SendMessageW
(
hwnd
,
CB_ADDSTRING
,
0
,(
LPARAM
)
name
);
if
(
j
==
CB_ERR
)
return
1
;
if
(
j
==
CB_ERR
)
return
1
;
j
=
SendMessageW
(
hwnd
,
CB_SETITEMDATA
,
j
,
j
=
SendMessageW
(
hwnd
,
CB_SETITEMDATA
,
j
,
MAKELONG
(
tm
.
tmWeight
,
fontstyles
[
i
].
italic
));
MAKELONG
(
tm
.
tmWeight
,
fontstyles
[
i
].
italic
));
...
...
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