deTABified

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2003-07-10 09:28:34 +00:00
parent 2b6d8c00fc
commit 427716213f

View File

@@ -529,7 +529,7 @@ void wxDocument::UpdateAllViews(wxView *sender, wxObject *hint)
while (node)
{
wxView *view = (wxView *)node->GetData();
if (view != sender)
if (view != sender)
view->OnUpdate(sender, hint);
node = node->GetNext();
}
@@ -1527,28 +1527,6 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
}
return theTemplate;
#if 0
// In all other windowing systems, until we have more advanced
// file selectors, we must select the document type (template) first, and
// _then_ pop up the file selector.
wxDocTemplate *temp = SelectDocumentType(templates, noTemplates);
if (!temp)
return (wxDocTemplate *) NULL;
wxChar *pathTmp = wxFileSelector(_("Select a file"), wxT(""), wxT(""),
temp->GetDefaultExtension(),
temp->GetFileFilter(),
0, wxTheApp->GetTopWindow());
if (pathTmp)
{
path = pathTmp;
return temp;
}
else
return (wxDocTemplate *) NULL;
#endif // 0
}
wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
@@ -1559,46 +1537,46 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
int i;
int n = 0;
for (i = 0; i < noTemplates; i++)
{
if (templates[i]->IsVisible())
{
int j;
for (i = 0; i < noTemplates; i++)
{
if (templates[i]->IsVisible())
{
int j;
bool want = TRUE;
for (j = 0; j < n; j++)
{
for (j = 0; j < n; j++)
{
//filter out NOT unique documents + view combinations
if ( templates[i]->m_docTypeName == data[j]->m_docTypeName &&
if ( templates[i]->m_docTypeName == data[j]->m_docTypeName &&
templates[i]->m_viewTypeName == data[j]->m_viewTypeName
)
want = FALSE;
}
}
if ( want )
{
strings.Add(templates[i]->m_description);
{
strings.Add(templates[i]->m_description);
data[n] = templates[i];
n ++;
}
}
} // for
data[n] = templates[i];
n ++;
}
}
} // for
if (sort)
{
// Yes, this will be slow, but template lists
// are typically short.
int j;
n = strings.Count();
for (i = 0; i < n; i++)
{
for (j = 0; j < noTemplates; j++)
{
if (strings[i] == templates[j]->m_description)
data[i] = templates[j];
}
}
}
if (sort)
{
// Yes, this will be slow, but template lists
// are typically short.
int j;
n = strings.Count();
for (i = 0; i < n; i++)
{
for (j = 0; j < noTemplates; j++)
{
if (strings[i] == templates[j]->m_description)
data[i] = templates[j];
}
}
}
wxDocTemplate *theTemplate;
@@ -1644,39 +1622,39 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
wxDocTemplate *templ = templates[i];
if ( templ->IsVisible() && !templ->GetViewName().empty() )
{
int j;
int j;
bool want = TRUE;
for (j = 0; j < n; j++)
{
for (j = 0; j < n; j++)
{
//filter out NOT unique views
if ( templates[i]->m_viewTypeName == data[j]->m_viewTypeName )
if ( templates[i]->m_viewTypeName == data[j]->m_viewTypeName )
want = FALSE;
}
}
if ( want )
{
strings.Add(templ->m_viewTypeName);
data[n] = templ;
n ++;
}
strings.Add(templ->m_viewTypeName);
data[n] = templ;
n ++;
}
}
}
if (sort)
{
// Yes, this will be slow, but template lists
// are typically short.
int j;
n = strings.Count();
for (i = 0; i < n; i++)
{
for (j = 0; j < noTemplates; j++)
{
if (strings[i] == templates[j]->m_viewTypeName)
data[i] = templates[j];
}
}
}
if (sort)
{
// Yes, this will be slow, but template lists
// are typically short.
int j;
n = strings.Count();
for (i = 0; i < n; i++)
{
for (j = 0; j < noTemplates; j++)
{
if (strings[i] == templates[j]->m_viewTypeName)
data[i] = templates[j];
}
}
}
wxDocTemplate *theTemplate;