Fixed wxCheckBox on wxGTK (SetLabel called before widget creation),

wxListBox::GetSelection returning -1 now doesn't assert; wxProp improvements
for wxGTK; parser.y includes <io.h> under VC++ to eliminate 'read' warning


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@709 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-09-07 21:53:34 +00:00
parent e22036dc39
commit b8c631bb29
10 changed files with 44 additions and 56 deletions

View File

@@ -150,10 +150,13 @@ bool wxResourceManager::Initialize()
strcat(buf, "\\dialoged.ini");
m_optionsResourceFilename = buf;
#elif defined(__WXGTK__)
char buf[500];
wxGetHomeDir(buf);
strcat(buf, "/.dialogedrc");
/*
wxString buf;
wxGetHomeDir(&buf);
buf += "/.dialogedrc";
m_optionsResourceFilename = buf;
*/
m_optionsResourceFilename = ".dialoged.rc";
#else
#error "Unsupported platform."
#endif

View File

@@ -182,8 +182,11 @@ bool wxPropertyListView::UpdatePropertyDisplayInList(wxProperty *property)
// UpdatePropertyList(FALSE);
//#endif
// TODO: why is this necessary?
#ifdef __WXMSW__
if (currentlySelected > -1)
propertyScrollingList->SetSelection(currentlySelected);
#endif
return TRUE;
}
@@ -952,7 +955,7 @@ bool wxPropertyListValidator::OnDisplayValue(wxProperty *property, wxPropertyLis
// view->GetValueText()->Show(TRUE);
wxString str(property->GetValue().GetStringRepresentation());
view->GetValueText()->SetValue(str.GetData());
view->GetValueText()->SetValue(str);
return TRUE;
}
@@ -1159,8 +1162,12 @@ bool wxBoolListValidator::OnDisplayValue(wxProperty *property, wxPropertyListVie
return FALSE;
wxString str(property->GetValue().GetStringRepresentation());
view->GetValueText()->SetValue(str.GetData());
view->GetValueList()->SetStringSelection(str.GetData());
view->GetValueText()->SetValue(str);
if (view->GetValueList()->IsShown())
{
view->GetValueList()->SetStringSelection(str);
}
return TRUE;
}
@@ -1274,10 +1281,10 @@ bool wxStringListValidator::OnDisplayValue(wxProperty *property, wxPropertyListV
if (!view->GetValueText())
return FALSE;
wxString str(property->GetValue().GetStringRepresentation());
view->GetValueText()->SetValue(str.GetData());
if (strings && view->GetValueList() && view->GetValueList()->Number() > 0)
view->GetValueText()->SetValue(str);
if (strings && view->GetValueList() && view->GetValueList()->IsShown() && view->GetValueList()->Number() > 0)
{
view->GetValueList()->SetStringSelection(str.GetData());
view->GetValueList()->SetStringSelection(str);
}
return TRUE;
}
@@ -1611,7 +1618,7 @@ bool wxListOfStringsListValidator::OnDisplayValue(wxProperty *property, wxProper
if (!view->GetValueText())
return FALSE;
wxString str(property->GetValue().GetStringRepresentation());
view->GetValueText()->SetValue(str.GetData());
view->GetValueText()->SetValue(str);
return TRUE;
}