[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdesdk/kate/plugins/externaltools [POSSIBLY UNSAFE]
From: Dominik Haumann <dhdev () gmx ! de>
Date: 2008-03-31 23:04:24
Message-ID: 1207004664.898648.9868.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 792390 by dhaumann:
* add better parent window
* remove a fixme (better idea how to fix it?)
M +13 -5 kateexternaltools.cpp [POSSIBLY UNSAFE: KRun::runCommand]
--- trunk/KDE/kdesdk/kate/plugins/externaltools/kateexternaltools.cpp #792389:792390
@@ -299,7 +299,7 @@
Kate::MainWindow *mw = qobject_cast<Kate::MainWindow*>(parent()->parent());
if ( ! expandMacrosShellQuote( cmd ) )
{
- KMessageBox::sorry( 0,
+ KMessageBox::sorry( mw->window(),
i18n("Failed to expand the command '%1'.", cmd ),
i18n( "Kate External Tools") );
return;
@@ -309,11 +309,19 @@
// save documents if requested
if ( tool->save == 1 )
mw->activeView()->document()->save();
-// FIXME
-// else if ( tool->save == 2 )
-// mw->actionCollection()->action("file_save_all")->trigger();
+ else if ( tool->save == 2 )
+ {
+ foreach (KXMLGUIClient *client, mw->guiFactory()->clients())
+ {
+ if (QAction *a = client->actionCollection()->action("file_save_all"))
+ {
+ a->trigger();
+ break;
+ }
+ }
+ }
- KRun::runCommand( cmd, tool->tryexec, tool->icon, 0 );
+ KRun::runCommand( cmd, tool->tryexec, tool->icon, mw->window() );
}
//END KateExternalToolAction
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic