# HG changeset patch # User thomas_-_s # Date 1211804296 0 # Node ID 0babe9272732e2f2de545d30ff67dbaea79dab5c # Parent eb09281af924c33bcd9b7b04c91db56bb7e9b441 - Created indenter shell scripts now automatically have the executable flag set to true. - The by each indenter supported programming languages, written in braces, are removed from the created shell scripts name. git-svn-id: svn://svn.code.sf.net/p/universalindent/code/trunk@703 59b1889a-e5ac-428c-b0c7-476e01d41282 diff -r eb09281af924 -r 0babe9272732 CHANGELOG.txt --- a/CHANGELOG.txt Mon May 26 10:19:01 2008 +0000 +++ b/CHANGELOG.txt Mon May 26 12:18:16 2008 +0000 @@ -7,6 +7,7 @@ [add] Extended the created batch/shell script so it is able to indent only one file given as parameter or a whole directory recursively with a defined file suffix. [add] Feature Request ID 1885911 : Added the possibility to open a file on applications start, that is handed over as parameter on the command line. [add] Feature Request ID 1729429 : Added the possibility to drag'n drop in any source code file for opening it. +[change] Created indenter shell scripts now automatically have the executable flag set to true. [change] Completed the support for all perl tidy parameters. [change] Updated to uncrustify version 0.46. [fix] Bug ID 1933074 : On Unix systems the user config files were stored in his home dir in the subfolder ".config". Now they are directly stored in ".universalindentgui". diff -r eb09281af924 -r 0babe9272732 src/mainwindow.cpp --- a/src/mainwindow.cpp Mon May 26 10:19:01 2008 +0000 +++ b/src/mainwindow.cpp Mon May 26 12:18:16 2008 +0000 @@ -1396,6 +1396,11 @@ QString fileExtensions = tr("Shell Script")+" (*."+shellScriptExtension+");;"+tr("All files")+" (*.*)"; QString currentIndenterName = toolBarWidget->cmbBoxIndenters->currentText(); + // Remove the supported programming languages from indenters name, which are set in braces. + if ( currentIndenterName.indexOf("(") > 0 ) { + // Using index-1 to also leave out the blank before the brace. + currentIndenterName = currentIndenterName.left( currentIndenterName.indexOf("(")-1 ); + } currentIndenterName = currentIndenterName.replace(" ", "_"); //QString openedSourceFileContent = openFileDialog( tr("Choose source code file"), "./", fileExtensions ); @@ -1410,6 +1415,10 @@ QFile outSrcFile(fileName); outSrcFile.open( QFile::ReadWrite | QFile::Text ); outSrcFile.write( indenterCallShellScript.toAscii() ); +#if !defined(Q_OS_WIN32) +// For none Windows systems the files executable flag + outSrcFile.setPermissions( outSrcFile.permissions() | QFile::ExeOwner | QFile::ExeUser| QFile::ExeGroup ); +#endif outSrcFile.close(); }