diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-12-28 09:48:56 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-12-28 09:59:28 +0900 |
commit | eb684d7fa3c107977074672615c957086e7e9088 (patch) | |
tree | 60a255e522fa34a81aab3a701b2859454f09175e /src/main.cpp | |
parent | ab12cfe230b06ba2a4505e681d7b8ce6ea35fb34 (diff) | |
download | polkit-agent-tde-eb684d7fa3c107977074672615c957086e7e9088.tar.gz polkit-agent-tde-eb684d7fa3c107977074672615c957086e7e9088.zip |
Conversion of package functionality.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
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(); } |