Revert "Add support for reading multi string values to wxRegKey."
Reverts r78136 (see #15727) because the multi-string values in Windows registry are actually not "name=value" pairs at all but just NUL-separated strings and the API provided for reading them was inappropriate. Also see #16719. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -105,7 +105,6 @@ public:
|
||||
|
||||
// information
|
||||
bool IsKeySelected() const;
|
||||
static const char *ValueTypeName(wxRegKey::ValueType type);
|
||||
|
||||
private:
|
||||
// structure describing a registry key/value
|
||||
@@ -1055,6 +1054,7 @@ bool RegTreeCtrl::TreeNode::OnExpand()
|
||||
{
|
||||
case wxRegKey::Type_String:
|
||||
case wxRegKey::Type_Expand_String:
|
||||
case wxRegKey::Type_Multi_String:
|
||||
{
|
||||
wxString strValue;
|
||||
icon = RegImageList::TextValue;
|
||||
@@ -1063,22 +1063,6 @@ bool RegTreeCtrl::TreeNode::OnExpand()
|
||||
}
|
||||
break;
|
||||
|
||||
case wxRegKey::Type_Multi_String:
|
||||
{
|
||||
wxArrayString names, values;
|
||||
m_pKey->QueryValue(str, names, values);
|
||||
strItem += "(multi string) ";
|
||||
for ( size_t i = 0; i < names.GetCount(); i++ )
|
||||
{
|
||||
if ( i > 0 )
|
||||
strItem += wxT (", ");
|
||||
strItem += names[i] + wxT ("=") + values[i];
|
||||
}
|
||||
|
||||
icon = RegImageList::TextValue;
|
||||
}
|
||||
break;
|
||||
|
||||
case wxRegKey::Type_None:
|
||||
// @@ handle the error...
|
||||
icon = RegImageList::BinaryValue;
|
||||
@@ -1383,37 +1367,6 @@ void RegTreeCtrl::SetRegistryView(wxRegKey::WOW64ViewMode viewMode)
|
||||
m_pRoot->Refresh();
|
||||
}
|
||||
|
||||
const char *RegTreeCtrl::ValueTypeName(wxRegKey::ValueType type)
|
||||
{
|
||||
switch ( type )
|
||||
{
|
||||
case wxRegKey::Type_None:
|
||||
return "none";
|
||||
case wxRegKey::Type_String:
|
||||
return "string";
|
||||
case wxRegKey::Type_Expand_String:
|
||||
return "expand_string";
|
||||
case wxRegKey::Type_Binary:
|
||||
return "binary";
|
||||
case wxRegKey::Type_Dword:
|
||||
return "number";
|
||||
case wxRegKey::Type_Dword_big_endian:
|
||||
return "big endian number";
|
||||
case wxRegKey::Type_Link:
|
||||
return "symbolic link";
|
||||
case wxRegKey::Type_Multi_String:
|
||||
return "multiple strings";
|
||||
case wxRegKey::Type_Resource_list:
|
||||
return "resource list in the resource map";
|
||||
case wxRegKey::Type_Full_resource_descriptor:
|
||||
return "resource list in the hardware description";
|
||||
case wxRegKey::Type_Resource_requirements_list:
|
||||
return "resource requirements list";
|
||||
default:
|
||||
return "unrecognized";
|
||||
}
|
||||
}
|
||||
|
||||
void RegTreeCtrl::ShowProperties()
|
||||
{
|
||||
wxTreeItemId lCurrent = GetSelection();
|
||||
@@ -1452,7 +1405,8 @@ void RegTreeCtrl::ShowProperties()
|
||||
value,
|
||||
parent->m_strName.c_str(),
|
||||
key.GetValueType(value),
|
||||
ValueTypeName(key.GetValueType (value)));
|
||||
key.IsNumericValue(value) ? wxT("numeric") : wxT("string"));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user