diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 48 |
1 files changed, 18 insertions, 30 deletions
diff --git a/src/main.cpp b/src/main.cpp index 11a62c5..041413b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -22,37 +22,25 @@ #include <tdecmdlineargs.h> #include <tdelocale.h> -#include <tqpushbutton.h> -#include <tdeapplication.h> -//#include "policykitkde.h" +#include "polkit-agent-tde.h" int main(int argc, char *argv[]) { - TDEAboutData aboutData("polkit-agent-tde", I18N_NOOP("Polkit-Agent-TDE"), "0.99.1", - I18N_NOOP("A Polkit authentication agent for TDE"), TDEAboutData::License_GPL, - I18N_NOOP("(c) 2009 Red Hat, Inc.")); - aboutData.addAuthor(I18N_NOOP("Jaroslav Reznik"), I18N_NOOP("Maintainer"), "jreznik@redhat.com"); - aboutData.setProductName("policykit-agent-tde"); - - TDECmdLineArgs::init(argc, argv, &aboutData); - TDEApplication app; - TQPushButton *pbQuit = new TQPushButton("Quit", 0); - app.setMainWidget(pbQuit); - app.connect(&app, TQT_SIGNAL(lastWindowClosed()), TQT_SLOT(quit())); - app.connect(pbQuit, TQT_SIGNAL(clicked()), &app, TQT_SLOT(quit())); - pbQuit->show(); - return app.exec(); - - /* - if (!PolicyKitKDE::start()) { - tqWarning("PolicyKitKDE is already running!\n"); - return 0; - } - - TDECrash::setFlags(TDECrash::AutoRestart); - - PolicyKitKDE agent; - agent.disableSessionManagement(); - agent.exec(); - */ + TDEAboutData aboutData("polkit-agent-tde", I18N_NOOP("Polkit-Agent-TDE"), "0.99.1", + I18N_NOOP("A Polkit authentication agent for TDE"), TDEAboutData::License_GPL, + I18N_NOOP("(c) 2009 Red Hat, Inc.")); + aboutData.addAuthor(I18N_NOOP("Jaroslav Reznik"), I18N_NOOP("Maintainer"), "jreznik@redhat.com"); + aboutData.setProductName("policykit-agent-tde"); + + TDECmdLineArgs::init(argc, argv, &aboutData); + + if (!PolkitAgentTDE::start()) + { + tqWarning("PolkitAgentTDE is already running!\n"); + return 0; + } + + PolkitAgentTDE agent; + agent.disableSessionManagement(); + return agent.exec(); } |