Commit a2c7a994 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

msctf: Implement ITfKeystrokeMgr::UnpreserveKey.

parent 45c3ff2f
......@@ -430,7 +430,7 @@ static void test_KeystrokeMgr(void)
if (hr == S_FALSE) todo_wine ok(preserved == FALSE,"misreporting preserved key\n");
hr = ITfKeystrokeMgr_UnpreserveKey(keymgr, &CLSID_PreservedKey,&tfpk);
todo_wine ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
ok(hr==CONNECT_E_NOCONNECTION,"ITfKeystrokeMgr_UnpreserveKey inproperly succeeded\n");
hr = ITfKeystrokeMgr_UnadviseKeyEventSink(keymgr,tid);
todo_wine ok(SUCCEEDED(hr),"ITfKeystrokeMgr_UnadviseKeyEventSink failed\n");
......
......@@ -598,8 +598,29 @@ static HRESULT WINAPI KeystrokeMgr_UnpreserveKey(ITfKeystrokeMgr *iface,
REFGUID rguid, const TF_PRESERVEDKEY *pprekey)
{
ThreadMgr *This = impl_from_ITfKeystrokeMgrVtbl(iface);
FIXME("STUB:(%p)\n",This);
return E_NOTIMPL;
PreservedKey* key = NULL;
struct list *cursor;
TRACE("(%p) %s (%x %x)\n",This,debugstr_guid(rguid),(pprekey)?pprekey->uVKey:0, (pprekey)?pprekey->uModifiers:0);
if (!pprekey || !rguid)
return E_INVALIDARG;
LIST_FOR_EACH(cursor, &This->CurrentPreservedKeys)
{
key = LIST_ENTRY(cursor,PreservedKey,entry);
if (IsEqualGUID(rguid,&key->guid) && pprekey->uVKey == key->prekey.uVKey && pprekey->uModifiers == key->prekey.uModifiers)
break;
key = NULL;
}
if (!key)
return CONNECT_E_NOCONNECTION;
list_remove(&key->entry);
HeapFree(GetProcessHeap(),0,key->description);
HeapFree(GetProcessHeap(),0,key);
return S_OK;
}
static HRESULT WINAPI KeystrokeMgr_SetPreservedKeyDescription(ITfKeystrokeMgr *iface,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment