deTABified
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -529,7 +529,7 @@ void wxDocument::UpdateAllViews(wxView *sender, wxObject *hint)
|
|||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
wxView *view = (wxView *)node->GetData();
|
wxView *view = (wxView *)node->GetData();
|
||||||
if (view != sender)
|
if (view != sender)
|
||||||
view->OnUpdate(sender, hint);
|
view->OnUpdate(sender, hint);
|
||||||
node = node->GetNext();
|
node = node->GetNext();
|
||||||
}
|
}
|
||||||
@@ -1527,28 +1527,6 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
|
|||||||
}
|
}
|
||||||
|
|
||||||
return theTemplate;
|
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,
|
wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
|
||||||
@@ -1559,46 +1537,46 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
|
|||||||
int i;
|
int i;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
|
||||||
for (i = 0; i < noTemplates; i++)
|
for (i = 0; i < noTemplates; i++)
|
||||||
{
|
{
|
||||||
if (templates[i]->IsVisible())
|
if (templates[i]->IsVisible())
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
bool want = TRUE;
|
bool want = TRUE;
|
||||||
for (j = 0; j < n; j++)
|
for (j = 0; j < n; j++)
|
||||||
{
|
{
|
||||||
//filter out NOT unique documents + view combinations
|
//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
|
templates[i]->m_viewTypeName == data[j]->m_viewTypeName
|
||||||
)
|
)
|
||||||
want = FALSE;
|
want = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( want )
|
if ( want )
|
||||||
{
|
{
|
||||||
strings.Add(templates[i]->m_description);
|
strings.Add(templates[i]->m_description);
|
||||||
|
|
||||||
data[n] = templates[i];
|
data[n] = templates[i];
|
||||||
n ++;
|
n ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // for
|
} // for
|
||||||
|
|
||||||
if (sort)
|
if (sort)
|
||||||
{
|
{
|
||||||
// Yes, this will be slow, but template lists
|
// Yes, this will be slow, but template lists
|
||||||
// are typically short.
|
// are typically short.
|
||||||
int j;
|
int j;
|
||||||
n = strings.Count();
|
n = strings.Count();
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < noTemplates; j++)
|
for (j = 0; j < noTemplates; j++)
|
||||||
{
|
{
|
||||||
if (strings[i] == templates[j]->m_description)
|
if (strings[i] == templates[j]->m_description)
|
||||||
data[i] = templates[j];
|
data[i] = templates[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDocTemplate *theTemplate;
|
wxDocTemplate *theTemplate;
|
||||||
|
|
||||||
@@ -1644,39 +1622,39 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
|
|||||||
wxDocTemplate *templ = templates[i];
|
wxDocTemplate *templ = templates[i];
|
||||||
if ( templ->IsVisible() && !templ->GetViewName().empty() )
|
if ( templ->IsVisible() && !templ->GetViewName().empty() )
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
bool want = TRUE;
|
bool want = TRUE;
|
||||||
for (j = 0; j < n; j++)
|
for (j = 0; j < n; j++)
|
||||||
{
|
{
|
||||||
//filter out NOT unique views
|
//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;
|
want = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( want )
|
if ( want )
|
||||||
{
|
{
|
||||||
strings.Add(templ->m_viewTypeName);
|
strings.Add(templ->m_viewTypeName);
|
||||||
data[n] = templ;
|
data[n] = templ;
|
||||||
n ++;
|
n ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sort)
|
if (sort)
|
||||||
{
|
{
|
||||||
// Yes, this will be slow, but template lists
|
// Yes, this will be slow, but template lists
|
||||||
// are typically short.
|
// are typically short.
|
||||||
int j;
|
int j;
|
||||||
n = strings.Count();
|
n = strings.Count();
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < noTemplates; j++)
|
for (j = 0; j < noTemplates; j++)
|
||||||
{
|
{
|
||||||
if (strings[i] == templates[j]->m_viewTypeName)
|
if (strings[i] == templates[j]->m_viewTypeName)
|
||||||
data[i] = templates[j];
|
data[i] = templates[j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDocTemplate *theTemplate;
|
wxDocTemplate *theTemplate;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user