From 0ef8354c30fd741e55dd5fc3583c3ce4c8542973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 16 Sep 2003 19:32:34 +0000 Subject: [PATCH] Merging back the process killing helper from kwin_iii to HEAD. svn path=/trunk/kdebase/kwin/; revision=251615 --- killer/Makefile.am | 9 ++++ killer/killer.cpp | 108 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 killer/Makefile.am create mode 100644 killer/killer.cpp diff --git a/killer/Makefile.am b/killer/Makefile.am new file mode 100644 index 0000000000..acbf5e77db --- /dev/null +++ b/killer/Makefile.am @@ -0,0 +1,9 @@ +INCLUDES = $(all_includes) + +bin_PROGRAMS = kwin_killer_helper + +kwin_killer_helper_SOURCES = killer.cpp +kwin_killer_helper_LDADD = $(LIB_KDEUI) +kwin_killer_helper_LDFLAGS = $(all_libraries) $(KDE_RPATH) + +METASOURCES = AUTO diff --git a/killer/killer.cpp b/killer/killer.cpp new file mode 100644 index 0000000000..134173c832 --- /dev/null +++ b/killer/killer.cpp @@ -0,0 +1,108 @@ +/**************************************************************************** + + Copyright (C) 2003 Lubos Lunak + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +****************************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include + +static const KCmdLineOptions options[] = +{ + { "pid ", I18N_NOOP("PID of the application to terminate."), 0 }, + { "hostname ", I18N_NOOP("Hostname on which the application is running."), 0 }, + { "windowname ", I18N_NOOP("Caption of the window to be terminated."), 0 }, + { "applicationname ", I18N_NOOP("Name of the application to be terminated."), 0 }, + { "wid ", I18N_NOOP("ID of resource belonging to the application."), 0 }, + { "timestamp