diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 32 | ||||
-rw-r--r-- | src/main.cpp | 58 |
2 files changed, 66 insertions, 24 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..0f1b794 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,32 @@ +################################################# +# +# (C) 2021 Michele Calgaro +# Michele (DOT) Calgaro (AT) yahoo.it +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + + +include_directories( + ${CMAKE_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### executables ######################### + +tde_add_executable( polkit-agent-tde AUTOMOC + SOURCES main.cpp + LINK tdecore-shared tdeui-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/src/main.cpp b/src/main.cpp index 414275d..11a62c5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,4 @@ -/* This file is part of the KDE project +/* This file is part of the TDE project Copyright (C) 2009 Jaroslav Reznik <jreznik@redhat.com> This program is free software; you can redistribute it and/or @@ -18,31 +18,41 @@ */ -#include <TDECmdLineArgs> -#include <TDEAboutData> -#include <TDELocale> -#include <TDECrash> +#include <tdeaboutdata.h> +#include <tdecmdlineargs.h> +#include <tdelocale.h> -#include "policykitkde.h" +#include <tqpushbutton.h> +#include <tdeapplication.h> +//#include "policykitkde.h" int main(int argc, char *argv[]) { - TDEAboutData aboutData("Polkit1AuthAgent", "polkit-kde-authentication-agent-1", ki18n("PolicyKit1-KDE"), "0.99.0", - ki18n("PolicyKit1-KDE"), TDEAboutData::License_GPL, - ki18n("(c) 2009 Red Hat, Inc.")); - aboutData.addAuthor(ki18n("Jaroslav Reznik"), ki18n("Maintainer"), "jreznik@redhat.com"); - aboutData.setProductName("policykit-kde/polkit-kde-authentication-agent-1"); - - TDECmdLineArgs::init(argc, argv, &aboutData); - - 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); + 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(); + */ } |