From c12f38c52866b12e1e588f80265ab3b4c09d72b9 Mon Sep 17 00:00:00 2001 From: Elvio Basello Date: Thu, 17 Sep 2009 17:01:03 +0000 Subject: reworked addon system: - ported to the new way of handling wizard; - added automagic functions; modified file extensions; This new addon system is far to be complete and does NOT create any package yet. Please test the new GUI git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3502 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/addon/managementdialog.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'src/modules/addon/managementdialog.cpp') diff --git a/src/modules/addon/managementdialog.cpp b/src/modules/addon/managementdialog.cpp index b5e57554b..513eeef30 100644 --- a/src/modules/addon/managementdialog.cpp +++ b/src/modules/addon/managementdialog.cpp @@ -253,8 +253,11 @@ void KviScriptManagementDialog::uninstallScript() txt += __tr2qs("Do you really want to uninstall the addon \"%1\" ?").arg(it->addon()->visibleName()); txt += "

"; - if(QMessageBox::question(this, - __tr2qs("Confirm addon uninstallation"),txt,__tr2qs("&Yes"),__tr2qs("&No"),0,1) != 0)return; + if(QMessageBox::question( + this, + __tr2qs("Confirm addon uninstallation"), + txt, __tr2qs("&Yes"), __tr2qs("&No"),0,1 + ) != 0) return; KviKvsScriptAddonManager::instance()->unregisterAddon(it->addon()->name(),g_pActiveWindow); @@ -271,7 +274,11 @@ void KviScriptManagementDialog::installScript() { QString szFileName, szError; - if(!KviFileDialog::askForOpenFileName(szFileName,__tr2qs("Please select the addon installation file"),QString(),KVI_FILTER_SCRIPTS,false,true))return; + if(!KviFileDialog::askForOpenFileName( + szFileName, + __tr2qs("Please select the addon installation file"), + QString(),KVI_FILTER_SCRIPTS,false,true + )) return; szFileName.replace("\\","\\\\"); @@ -288,14 +295,28 @@ void KviScriptManagementDialog::installScript() qDebug("Addon file .kva"); if(!KviAddonFunctions::installAddonPackage(szFileName,szError,this)) { - QMessageBox::critical(this,__tr2qs_ctx("Install Addon - KVIrc","addon"),szError,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + QMessageBox::critical( + this, + __tr2qs_ctx("Install Addon - KVIrc","addon"), + szError, + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton + ); return; } } else { // Just for sanity check. We should NEVER enter here qDebug("Entered sanity check"); KviAddonFunctions::notAValidAddonPackage(szError); - QMessageBox::critical(this,__tr2qs_ctx("Install Addon - KVIrc","addon"),szError,QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton); + QMessageBox::critical( + this, + __tr2qs_ctx("Install Addon - KVIrc","addon"), + szError, + QMessageBox::Ok, + QMessageBox::NoButton, + QMessageBox::NoButton + ); } fillListView(); -- cgit v1.3.1-10-gc9f91