[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdeedu/kstars/kstars
From: Jason Harris <kstars () 30doradus ! org>
Date: 2005-07-03 1:26:35
Message-ID: 1120353995.759593.4245.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 431032 by harris:
applying patch from Mike Diehl, which makes it possible to run KStars
DCOP scripts, even when they do not look like a script built with the
Script Builder tool. The user gets a scary warning message before
executing one of these scripts.
This allows for much more elaborate scripts than the Script Builder GUI
can provide.
I added a "don't ask again" option to the warning message box.
Congratulations, Mike: you are now a KStars developer! Wear your
uniform with pride. :)
CCMAIL: kstars-devel@kde.org
M +12 -9 kstarsactions.cpp
--- trunk/KDE/kdeedu/kstars/kstars/kstarsactions.cpp #431031:431032
@@ -533,16 +533,19 @@
}
if ( ! fileOK ) {
- KMessageBox::sorry( 0, i18n( "The selected file appears to be an invalid KStars \
script." ),
- i18n( "Script Validation Failed" ) );
- } else {
- //file is OK, run it!
- KProcess p;
- p << f.name();
- p.start( KProcess::DontCare );
+ int answer;
+ answer = KMessageBox::warningYesNo( 0, i18n( "The selected script contains \
unrecognized elements," + "indicating that it was not created using the KStars \
script builder. " + "This script may not function properly, and it may even \
contain malicious code. " + "Would you like to execute it anyway?" ),
+ i18n( "Script Validation Failed" ), KStdGuiItem::yes(), KStdGuiItem::no(), \
"daExecuteScript" ); + if ( answer == KMessageBox::No ) return;
+ }
+ KProcess p;
+ p << f.name();
+ p.start( KProcess::DontCare );
- while ( p.isRunning() ) kapp->processEvents( 50 ); //otherwise tempfile may get \
deleted before script completes.
- }
+ while ( p.isRunning() ) kapp->processEvents( 50 ); //otherwise tempfile may get \
deleted before script completes. }
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic