diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-06 15:56:40 -0600 |
commit | e16866e072f94410321d70daedbcb855ea878cac (patch) | |
tree | ee3f52eabde7da1a0e6ca845fb9c2813cf1558cf /tdeprint/management/kaddprinterwizard.cpp | |
parent | a58c20c1a7593631a1b50213c805507ebc16adaf (diff) | |
download | tdelibs-e16866e072f94410321d70daedbcb855ea878cac.tar.gz tdelibs-e16866e072f94410321d70daedbcb855ea878cac.zip |
Actually move the kde files that were renamed in the last commit
Diffstat (limited to 'tdeprint/management/kaddprinterwizard.cpp')
-rw-r--r-- | tdeprint/management/kaddprinterwizard.cpp | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/tdeprint/management/kaddprinterwizard.cpp b/tdeprint/management/kaddprinterwizard.cpp new file mode 100644 index 000000000..65d355a8f --- /dev/null +++ b/tdeprint/management/kaddprinterwizard.cpp @@ -0,0 +1,39 @@ +#include "kmmanager.h" +#include <kcmdlineargs.h> +#include <kapplication.h> +#include <kmessagebox.h> +#include <klocale.h> +#include <kglobal.h> + +static KCmdLineOptions options[] = +{ + { "kdeconfig", I18N_NOOP("Configure KDE Print"), 0 }, + { "serverconfig", I18N_NOOP("Configure print server"), 0 }, + KCmdLineLastOption +}; + +extern "C" KDE_EXPORT int kdemain(int argc, char *argv[]) +{ + KCmdLineArgs::init(argc, argv, "kaddprinterwizard", + I18N_NOOP("Start the add printer wizard"), + "0.1"); + KCmdLineArgs::addCmdLineOptions(options); + + KGlobal::locale()->setMainCatalogue("kdelibs"); + + KApplication app; + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + bool doConfig = args->isSet("kdeconfig"); + bool doSrvConfig = args->isSet("serverconfig"); + + if (doConfig) + KMManager::self()->invokeOptionsDialog(); + else if (doSrvConfig) + KMManager::self()->configureServer(); + else if (KMManager::self()->addPrinterWizard() == -1) + { + KMessageBox::error(0, KMManager::self()->errorMsg().prepend("<qt>").append("</qt>")); + } + + return 0; +} |