diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-12-19 20:05:06 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-12-19 20:08:46 +0900 |
commit | ab12cfe230b06ba2a4505e681d7b8ce6ea35fb34 (patch) | |
tree | a6bb5fc600136016a2e3fd309ce6b3ad8a6c7cc9 /src | |
parent | 796d4dc1ab15ce7f898d3fc0014e4b64a0be155d (diff) | |
download | polkit-agent-tde-ab12cfe230b06ba2a4505e681d7b8ce6ea35fb34.tar.gz polkit-agent-tde-ab12cfe230b06ba2a4505e681d7b8ce6ea35fb34.zip |
Updated cmake files to allow building the package, although it is just a dummy package (not functional).
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
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(); + */ } |