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
4fb6c014
Commit
4fb6c014
authored
Feb 23, 2009
by
Aric Stewart
Committed by
Alexandre Julliard
Feb 27, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msctf: Use ITfCategoryMgr::FindClosestCategory to set catid when enuming language profiles.
parent
d2647356
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
inputprocessor.c
dlls/msctf/inputprocessor.c
+17
-1
inputprocessor.c
dlls/msctf/tests/inputprocessor.c
+1
-1
No files found.
dlls/msctf/inputprocessor.c
View file @
4fb6c014
...
@@ -72,6 +72,7 @@ typedef struct tagEnumTfLanguageProfiles {
...
@@ -72,6 +72,7 @@ typedef struct tagEnumTfLanguageProfiles {
DWORD
lang_index
;
DWORD
lang_index
;
LANGID
langid
;
LANGID
langid
;
ITfCategoryMgr
*
catmgr
;
}
EnumTfLanguageProfiles
;
}
EnumTfLanguageProfiles
;
static
HRESULT
ProfilesEnumGuid_Constructor
(
IEnumGUID
**
ppOut
);
static
HRESULT
ProfilesEnumGuid_Constructor
(
IEnumGUID
**
ppOut
);
...
@@ -670,6 +671,7 @@ static void EnumTfLanguageProfiles_Destructor(EnumTfLanguageProfiles *This)
...
@@ -670,6 +671,7 @@ static void EnumTfLanguageProfiles_Destructor(EnumTfLanguageProfiles *This)
RegCloseKey
(
This
->
tipkey
);
RegCloseKey
(
This
->
tipkey
);
if
(
This
->
langkey
)
if
(
This
->
langkey
)
RegCloseKey
(
This
->
langkey
);
RegCloseKey
(
This
->
langkey
);
ITfCategoryMgr_Release
(
This
->
catmgr
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
}
}
...
@@ -746,6 +748,9 @@ static INT next_LanguageProfile(EnumTfLanguageProfiles *This, CLSID clsid, TF_LA
...
@@ -746,6 +748,9 @@ static INT next_LanguageProfile(EnumTfLanguageProfiles *This, CLSID clsid, TF_LA
if
(
tflp
)
if
(
tflp
)
{
{
static
const
GUID
*
tipcats
[
3
]
=
{
&
GUID_TFCAT_TIP_KEYBOARD
,
&
GUID_TFCAT_TIP_SPEECH
,
&
GUID_TFCAT_TIP_HANDWRITING
};
res
=
CLSIDFromString
(
profileid
,
&
profile
);
res
=
CLSIDFromString
(
profileid
,
&
profile
);
if
(
FAILED
(
res
))
return
0
;
if
(
FAILED
(
res
))
return
0
;
...
@@ -754,7 +759,10 @@ static INT next_LanguageProfile(EnumTfLanguageProfiles *This, CLSID clsid, TF_LA
...
@@ -754,7 +759,10 @@ static INT next_LanguageProfile(EnumTfLanguageProfiles *This, CLSID clsid, TF_LA
/* FIXME */
/* FIXME */
tflp
->
fActive
=
FALSE
;
tflp
->
fActive
=
FALSE
;
tflp
->
guidProfile
=
profile
;
tflp
->
guidProfile
=
profile
;
/* FIXME set catid */
if
(
ITfCategoryMgr_FindClosestCategory
(
This
->
catmgr
,
&
clsid
,
&
tflp
->
catid
,
tipcats
,
3
)
!=
S_OK
)
ITfCategoryMgr_FindClosestCategory
(
This
->
catmgr
,
&
clsid
,
&
tflp
->
catid
,
NULL
,
0
);
}
}
return
1
;
return
1
;
...
@@ -865,6 +873,7 @@ static const IEnumTfLanguageProfilesVtbl IEnumTfLanguageProfiles_Vtbl ={
...
@@ -865,6 +873,7 @@ static const IEnumTfLanguageProfilesVtbl IEnumTfLanguageProfiles_Vtbl ={
static
HRESULT
EnumTfLanguageProfiles_Constructor
(
LANGID
langid
,
IEnumTfLanguageProfiles
**
ppOut
)
static
HRESULT
EnumTfLanguageProfiles_Constructor
(
LANGID
langid
,
IEnumTfLanguageProfiles
**
ppOut
)
{
{
HRESULT
hr
;
EnumTfLanguageProfiles
*
This
;
EnumTfLanguageProfiles
*
This
;
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
EnumTfLanguageProfiles
));
This
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
EnumTfLanguageProfiles
));
...
@@ -875,6 +884,13 @@ static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguage
...
@@ -875,6 +884,13 @@ static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguage
This
->
refCount
=
1
;
This
->
refCount
=
1
;
This
->
langid
=
langid
;
This
->
langid
=
langid
;
hr
=
CategoryMgr_Constructor
(
NULL
,(
IUnknown
**
)
&
This
->
catmgr
);
if
(
FAILED
(
hr
))
{
HeapFree
(
GetProcessHeap
(),
0
,
This
);
return
hr
;
}
if
(
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
szwSystemTIPKey
,
0
,
NULL
,
0
,
if
(
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
szwSystemTIPKey
,
0
,
NULL
,
0
,
KEY_READ
|
KEY_WRITE
,
NULL
,
&
This
->
tipkey
,
NULL
)
!=
ERROR_SUCCESS
)
KEY_READ
|
KEY_WRITE
,
NULL
,
&
This
->
tipkey
,
NULL
)
!=
ERROR_SUCCESS
)
return
E_FAIL
;
return
E_FAIL
;
...
...
dlls/msctf/tests/inputprocessor.c
View file @
4fb6c014
...
@@ -115,7 +115,7 @@ static void test_EnumLanguageProfiles(void)
...
@@ -115,7 +115,7 @@ static void test_EnumLanguageProfiles(void)
{
{
found
=
TRUE
;
found
=
TRUE
;
ok
(
profile
.
langid
==
gLangid
,
"LangId Incorrect
\n
"
);
ok
(
profile
.
langid
==
gLangid
,
"LangId Incorrect
\n
"
);
todo_wine
ok
(
IsEqualGUID
(
&
profile
.
catid
,
&
GUID_TFCAT_TIP_KEYBOARD
),
"CatId Incorrect
\n
"
);
ok
(
IsEqualGUID
(
&
profile
.
catid
,
&
GUID_TFCAT_TIP_KEYBOARD
),
"CatId Incorrect
\n
"
);
ok
(
IsEqualGUID
(
&
profile
.
guidProfile
,
&
CLSID_FakeService
),
"guidProfile Incorrect
\n
"
);
ok
(
IsEqualGUID
(
&
profile
.
guidProfile
,
&
CLSID_FakeService
),
"guidProfile Incorrect
\n
"
);
}
}
}
}
...
...
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