From 8a375139528531d2a8f9ef06a27e9043c3d61d3b Mon Sep 17 00:00:00 2001 From: dickelbeck Date: Tue, 1 Jan 2008 07:51:54 +0000 Subject: [PATCH] const strings --- common/gestfich.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/gestfich.cpp b/common/gestfich.cpp index 3119c8b266..e4c1e9472d 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -672,7 +672,8 @@ void OpenPDF( const wxString& file ) { AddDelimiterString( filename ); command.Empty(); - wxString tries[] = + + const static wxString tries[] = { wxT( "/usr/bin/evince" ), wxT( "/usr/bin/xpdf" ), @@ -680,10 +681,12 @@ void OpenPDF( const wxString& file ) wxT( "/usr/bin/gpdf" ), wxT( "" ), }; + for( int i = 0; ; i++ ) { if( tries[i].IsEmpty() ) break; + if( wxFileExists( tries[i] ) ) { command = tries[i] + wxT( " " ) + filename;