merged in the console for MIME handlers fix from 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1528,17 +1528,18 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// no, it's a simple flag
|
// no, it's a simple flag
|
||||||
// TODO support the flags:
|
|
||||||
// 1. create an xterm for 'needsterminal'
|
|
||||||
// 2. append "| $PAGER" for 'copiousoutput'
|
|
||||||
if ( curField == wxT("needsterminal") )
|
if ( curField == wxT("needsterminal") )
|
||||||
needsterminal = TRUE;
|
needsterminal = TRUE;
|
||||||
else if ( curField == wxT("copiousoutput") )
|
else if ( curField == wxT("copiousoutput")) {
|
||||||
|
// copiousoutput impies that the
|
||||||
|
// viewer is a console program
|
||||||
|
needsterminal =
|
||||||
copiousoutput = TRUE;
|
copiousoutput = TRUE;
|
||||||
else if ( curField == wxT("textualnewlines") )
|
}
|
||||||
; // ignore
|
else {
|
||||||
else
|
// unknown flag
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
@@ -1588,6 +1589,19 @@ bool wxMimeTypesManagerImpl::ReadMailcap(const wxString& strFileName,
|
|||||||
strFileName.c_str(), nLine + 1);
|
strFileName.c_str(), nLine + 1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
// support for flags:
|
||||||
|
// 1. create an xterm for 'needsterminal'
|
||||||
|
// 2. append "| $PAGER" for 'copiousoutput'
|
||||||
|
if ( copiousoutput ) {
|
||||||
|
const wxChar *p = wxGetenv(_T("PAGER"));
|
||||||
|
strOpenCmd << _T(" | ") << (p ? p : _T("more"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( needsterminal ) {
|
||||||
|
strOpenCmd.Printf(_T("xterm -e sh -c '%s'"),
|
||||||
|
strOpenCmd.c_str());
|
||||||
|
}
|
||||||
|
|
||||||
MailCapEntry *entry = new MailCapEntry(strOpenCmd,
|
MailCapEntry *entry = new MailCapEntry(strOpenCmd,
|
||||||
strPrintCmd,
|
strPrintCmd,
|
||||||
strTest);
|
strTest);
|
||||||
|
Reference in New Issue
Block a user