aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/addon/managementdialog.cpp
diff options
context:
space:
mode:
authorGravatar Elvio Basello2009-09-17 17:01:03 +0000
committerGravatar Elvio Basello2009-09-17 17:01:03 +0000
commitc12f38c52866b12e1e588f80265ab3b4c09d72b9 (patch)
tree3360e05236ebdec287887466d21609084283d8c9 /src/modules/addon/managementdialog.cpp
parentsuppressed gcc warning (diff)
downloadKVIrc-c12f38c52866b12e1e588f80265ab3b4c09d72b9.tar.gz
KVIrc-c12f38c52866b12e1e588f80265ab3b4c09d72b9.tar.bz2
KVIrc-c12f38c52866b12e1e588f80265ab3b4c09d72b9.zip
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
Diffstat (limited to 'src/modules/addon/managementdialog.cpp')
-rw-r--r--src/modules/addon/managementdialog.cpp31
1 files changed, 26 insertions, 5 deletions
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 += "</p>";
- 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();