From 59fb1e660d133f94b48e839a714d966822b7dd3b Mon Sep 17 00:00:00 2001 From: Mavridis Philippe Date: Fri, 9 Aug 2024 16:00:49 +0300 Subject: [PATCH] Port to CMake, rename to TDEAlternatives (alternatives) Signed-off-by: Mavridis Philippe --- CMakeLists.txt | 53 ++++++ ConfigureChecks.cmake | 32 ++++ INSTALL | 16 -- Makefile.am | 22 --- Makefile.cvs | 10 -- config.h.cmake | 12 ++ configure.in.in | 11 -- debian/changelog | 12 -- debian/control | 14 -- debian/rules | 12 -- kalternatives.kdevelop | 152 ------------------ kalternatives.kdevelop.pcs | Bin 53020 -> 0 bytes kalternatives.kdevses | 39 ----- kalternatives.pro | 11 -- src/CMakeLists.txt | 62 +++++++ src/Makefile.am | 21 --- src/addalternatives.cpp | 10 +- src/addalternatives.h | 8 +- src/addslaves.h | 2 +- src/alternatives.desktop | 16 ++ src/altitemelement.cpp | 12 +- src/altitemelement.h | 2 +- ...tives.png => hi16-app-tdealternatives.png} | Bin ...tives.png => hi32-app-tdealternatives.png} | Bin src/kalternatives.desktop | 37 ----- src/kalternatives.lsm | 16 -- ...{kalternatives.cpp => tdealternatives.cpp} | 90 ++++++----- src/{kalternatives.h => tdealternatives.h} | 16 +- ...alternativesui.rc => tdealternativesui.rc} | 0 29 files changed, 245 insertions(+), 443 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 ConfigureChecks.cmake delete mode 100644 INSTALL delete mode 100644 Makefile.am delete mode 100644 Makefile.cvs create mode 100644 config.h.cmake delete mode 100644 configure.in.in delete mode 100644 debian/changelog delete mode 100644 debian/control delete mode 100755 debian/rules delete mode 100644 kalternatives.kdevelop delete mode 100644 kalternatives.kdevelop.pcs delete mode 100644 kalternatives.kdevses delete mode 100644 kalternatives.pro create mode 100644 src/CMakeLists.txt delete mode 100644 src/Makefile.am create mode 100644 src/alternatives.desktop rename src/{hi16-app-kalternatives.png => hi16-app-tdealternatives.png} (100%) rename src/{hi32-app-kalternatives.png => hi32-app-tdealternatives.png} (100%) delete mode 100644 src/kalternatives.desktop delete mode 100644 src/kalternatives.lsm rename src/{kalternatives.cpp => tdealternatives.cpp} (81%) rename src/{kalternatives.h => tdealternatives.h} (90%) rename src/{kalternativesui.rc => tdealternativesui.rc} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..9476e27 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,53 @@ +################################################################################ +# TDEAlternatives - alternatives configuration module for TDE # +# # +# Improvements and feedback are welcome! # +# This software is licensed under the terms of the GNU GPL v3 license. # +################################################################################ + +cmake_minimum_required( VERSION 3.1 ) + +project( kcm_alternatives ) + +### Required modules ########################################################### +include( FindPkgConfig ) +include( CheckFunctionExists ) +include( CheckSymbolExists ) +include( CheckIncludeFile ) +include( CheckLibraryExists ) +include( CheckCSourceCompiles ) +include( CheckCXXSourceCompiles ) + +### TDE macros ################################################################# +include( TDEMacros ) +tde_set_project_version( ) + +include( TDESetupPaths ) +tde_setup_paths( ) + +### Optional support ########################################################### +option( WITH_DISTRIBUTION_DPKG "Enable support for DPKG package manager" OFF ) +option( WITH_DISTRIBUTION_RPM "Enable support for RPM package manager" OFF ) + +### Modules to build ########################################################### +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + +### Configure checks ########################################################### +include( ConfigureChecks.cmake ) + +### Compiler settings ########################################################## +add_definitions( -DHAVE_CONFIG_H ) + +set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) +set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) +set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) + +### Add subdirectories ######################################################### +add_subdirectory( src ) +tde_conditional_add_project_docs( BUILD_DOC ) +tde_conditional_add_project_translations( BUILD_TRANSLATIONS ) + +### Write configuration ######################################################## +configure_file( config.h.cmake config.h @ONLY ) \ No newline at end of file diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..7555a11 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,32 @@ +################################################################################ +# TDEAlternatives - alternatives configuration module for TDE # +# # +# Improvements and feedback are welcome! # +# This software is licensed under the terms of the GNU GPL v3 license. # +################################################################################ + +find_package( TQt ) +find_package( TDE ) + +tde_setup_architecture_flags( ) + +include( TestBigEndian ) +test_big_endian( WORDS_BIGENDIAN ) + +tde_setup_largefiles( ) + + +if( WITH_GCC_VISIBILITY ) + tde_setup_gcc_visibility( ) +endif( WITH_GCC_VISIBILITY ) + + +# Distribution + +if( NOT WITH_DISTRIBUTION_DPKG AND NOT WITH_DISTRIBUTION_RPM ) + tde_message_fatal("No distribution selected, please select one of: dpkg, rpm") +endif( ) + +if( WITH_DISTRIBUTION_DPKG AND WITH_DISTRIBUTION_RPM ) + tde_message_fatal("Multiple distributions selected. You should select only one distribution.") +endif( ) \ No newline at end of file diff --git a/INSTALL b/INSTALL deleted file mode 100644 index 3909ce9..0000000 --- a/INSTALL +++ /dev/null @@ -1,16 +0,0 @@ -What you need: - -- KDE >= 3.2 -- Qt -- All development packages for KDE (kdelibs & qt) - -To install configure the program with the correct prefix for -your KDE installation (like /usr or /opt/kde3 or similar) - -./configure --prefix=... - -And finally: - -make install - -Now you should be able to run the "kalternatives" command. diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 3e2cd4f..0000000 --- a/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -SUBDIRS = src doc - -$(top_srcdir)/configure.in: configure.in.in $(top_srcdir)/subdirs - cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common configure.in ; - -$(top_srcdir)/subdirs: - cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common subdirs - -$(top_srcdir)/acinclude.m4: $(top_srcdir)/admin/acinclude.m4.in $(top_srcdir)/admin/libtool.m4.in - @cd $(top_srcdir) && cat admin/acinclude.m4.in admin/libtool.m4.in > acinclude.m4 - -MAINTAINERCLEANFILES = subdirs configure.in acinclude.m4 configure.files - -package-messages: - cd $(top_srcdir) && $(MAKE) -f admin/Makefile.common package-messages - $(MAKE) -C po merge - -EXTRA_DIST = admin COPYING configure.in.in - -dist-hook: - cd $(top_distdir) && perl admin/am_edit -padmin - cd $(top_distdir) && $(MAKE) -f admin/Makefile.common subdirs diff --git a/Makefile.cvs b/Makefile.cvs deleted file mode 100644 index 4c0afd1..0000000 --- a/Makefile.cvs +++ /dev/null @@ -1,10 +0,0 @@ -all: - @echo "This Makefile is only for the CVS repository" - @echo "This will be deleted before making the distribution" - @echo "" - $(MAKE) -f admin/Makefile.common cvs - -dist: - $(MAKE) -f admin/Makefile.common dist - -.SILENT: diff --git a/config.h.cmake b/config.h.cmake new file mode 100644 index 0000000..3ac4cb3 --- /dev/null +++ b/config.h.cmake @@ -0,0 +1,12 @@ +#define VERSION "@VERSION@" + +// Defined if you have fvisibility and fvisibility-inlines-hidden support. +#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1 + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ + +/* Distributions */ +#cmakedefine WITH_DISTRIBUTION_DPKG @WITH_DISTRIBUTION_DPKG@ +#cmakedefine WITH_DISTRIBUTION_RPM @WITH_DISTRIBUTION_RPM@ \ No newline at end of file diff --git a/configure.in.in b/configure.in.in deleted file mode 100644 index 4f9eb42..0000000 --- a/configure.in.in +++ /dev/null @@ -1,11 +0,0 @@ -#MIN_CONFIG(3.0.0) - -AM_INIT_AUTOMAKE(kalternatives, 0.10) -AC_C_BIGENDIAN -AC_CHECK_KDEMAXPATHLEN - -AC_CHECK_FILE(/etc/debian_version, [AC_DEFINE([DEBIAN], [], [debian]) AC_MSG_NOTICE(it is a debian)], -[AC_CHECK_FILE(/etc/mandrakelinux-release, -[AC_DEFINE([MANDRAKE], [], [mandrake]) AC_MSG_NOTICE(it is a mandrake)], -[AC_MSG_NOTICE(it is an other distribution)])]) - diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index 8fba3fa..0000000 --- a/debian/changelog +++ /dev/null @@ -1,12 +0,0 @@ -kalternatives (0.12-1) unstable; urgency=low - - * Initial release. - - -- > Tue, 14 Oct 2004 13:07:14 +0100 - -kalternatives (0.10-1) unstable; urgency=low - - * Initial release. - - -- > Tue, 30 Dec 2003 22:40:14 +0100 - diff --git a/debian/control b/debian/control deleted file mode 100644 index 89395d7..0000000 --- a/debian/control +++ /dev/null @@ -1,14 +0,0 @@ -Source: kalternatives -Section: admin -Priority: optional -Maintainer: Mario Bensi -Build-Depends: automake1.7, debhelper (>> 4.0.18), gettext, kdelibs4-dev -Standards-Version: 3.2.1 - -Package: kalternatives -Architecture: any -Depends: ${shlibs:Depends} -Description: KDE GUI for configuring the Debian alternatives system - This program lets you configure the Debian/Mandrake alternatives system (a - system that allows you to select one alternative file for many in the - filesystem) using an easy KDE GUI. diff --git a/debian/rules b/debian/rules deleted file mode 100755 index d8cd816..0000000 --- a/debian/rules +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/make -f - -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/kde.mk - -# These variables are used by debhelper.mk; we are telling it to -# 1. dh_compress not to compress any files with the below extensions. -# 2. dh_makeshlibs to create automatic conservative version dependencies -# 3. dh_shlibdeps which directories to look in to resolve internal dependencies -DEB_COMPRESS_EXCLUDE := .bz2 .css .dcl .docbook -license -DEB_DH_MAKESHLIBS_ARGS := -V -DEB_SHLIBDEPS_INCLUDE := debian/libartsc0/usr/lib debian/libarts1/usr/lib diff --git a/kalternatives.kdevelop b/kalternatives.kdevelop deleted file mode 100644 index 4d56712..0000000 --- a/kalternatives.kdevelop +++ /dev/null @@ -1,152 +0,0 @@ - - - - Juanjo - juanjux@yahoo.es - 0.10 - KDevKDEAutoProject - C++ - - C++ - Code - Qt - KDE - - - - - src/kalternatives - debug - - - src/kalternatives - executable - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - - - - - false - false - - - *.o,*.lo,CVS - false - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - w3c-svg - sw - w3c-uaag10 - wxwindows_bugs - - - qmake User Guide - - - - - libtool - - - - - - - - - - - - false - false - - - 0.10 - - - - - - - - - false - false - false - 0 - false - false - false - false - - - - - - true - true - true - false - true - true - true - 250 - 400 - 250 - - - diff --git a/kalternatives.kdevelop.pcs b/kalternatives.kdevelop.pcs deleted file mode 100644 index 8ebb09f7cfb55dea3ed90450f1ccf1ddb1d49a07..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 53020 zcmeI5+mqbKRmXoLY%$22^=7l#$g)_E6-8LVS=%u&jtQ}KHFji6i4w8oyO^zHSF%O@^=fuC zJC`j7_=f&p&#vje^ZM(uUSG;K)M`zyoYP;Ive)$AdT6y4+Qb&Cdb+09X*sXgSF_a{ zD(dop`g=+3huPo7*w;NTs;{?pu&;}v_o3{O>|>%%6bY7dWM0pgvkMWEl{bfg$-~*l zw~oo`qrzlq2YFJ(f!w&S{)hVAaO!s<$mC`9w_E+@RPv7}?mi_%dtA|$__VBt!drdR4 zT2GbAYvkNNyrv#os*XBQy;YaH_4vnB=dvR~|DM!XECm^VM&p7ez7RC66V_tTOA+DL zk|5lo)?>$;Xvw-WEv#8f7DUUM{$4X(Nu$29U+c$;s9aa;PWD-?TpMbQG+xLKF=`aO z0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S47`~JNN@A5?9M?;gnj^1Cca@WuE|^#{hl;(U85;dDxv zadwO|nx@m@-qh#xgnO)faehPnu|@*#R5dQ=Jsu?YHgT00gQo;==L7r%;&mEsdrR)G zG=8RRBfY~D+h10HGpay#V+`Bcdqvc?u3)(=D@StpcOYEVIL}Kq&*!X#CfFe(oEo?i z^n^36>YEq?K0WYWRV%kCAM%j>lOWuDVF$T+MRXH~o7WtdZPI{qU;w6V@hiS}s2HiI z`&22!$m!h*QhK{8-^{S4Oxm(>PwQBsE&qjETdnb|oN-?)Z*$Lv^=e(u*3@EEYgD}9YuFewpV^-$dhm2Y z7rB`cCUJe=$U0pqi~hl+p7b!p0vO^<*QXy)#hOCL*t`PHiL1vnyW@?v%UbVG7w}^I zC&QVyHCZY?9POx2I0`(dN&(w4j)n&57ww)Kiq@>V!6uJI@o%ttr6E?YOE%V&n_hLY Pu;N*Xo-1Os>Hq%&w6v=^ diff --git a/kalternatives.kdevses b/kalternatives.kdevses deleted file mode 100644 index 3a5f8de..0000000 --- a/kalternatives.kdevses +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kalternatives.pro b/kalternatives.pro deleted file mode 100644 index bd8d754..0000000 --- a/kalternatives.pro +++ /dev/null @@ -1,11 +0,0 @@ -###################################################################### -# Automatically generated by qmake (1.06c) Sat Feb 28 20:13:05 2004 -###################################################################### - -TEMPLATE = app -DEPENDPATH += src -INCLUDEPATH += . src - -# Input -HEADERS += src/altparser.h src/kalternatives.h -SOURCES += src/altparser.cpp src/kalternatives.cpp src/main.cpp diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..8866b04 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,62 @@ +################################################################################ +# TDEAlternatives - alternatives configuration module for TDE # +# # +# Improvements and feedback are welcome! # +# This software is licensed under the terms of the GNU GPL v3 license. # +################################################################################ + +include_directories( + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +### kcm_alternatives (module) ################################################## + +tde_add_kpart( + kcm_alternatives AUTOMOC + + SOURCES + addslavesui.ui + propertieswindow.ui + addalternativesui.ui + mainwindow.ui + altcontroller.cpp + tdealternatives.cpp + altparser.cpp + altitemelement.cpp + treeitemelement.cpp + addslaves.cpp + addalternatives.cpp + + LINK + tdeui-shared + tdeio-shared + + DESTINATION ${PLUGIN_INSTALL_DIR} +) + + +### translated desktop files ################################################### + +tde_create_translated_desktop(alternatives.desktop) + + +### data ####################################################################### + +tde_install_icons( ) + +install( + FILES tdealternativesui.rc + DESTINATION ${DATA_INSTALL_DIR}/tdealternatives/ +) + + +# kate: replace-tabs true; tab-width 2; \ No newline at end of file diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index bb80034..0000000 --- a/src/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -INCLUDES = $(all_includes) - -noinst_HEADERS = kalternatives.h altparser.h altcontroller.h altitemelement.h treeitemelement.h addslaves.h addalternatives.h - -KDE_ICON = kalternatives - -# Install this plugin in the KDE modules directory -kde_module_LTLIBRARIES = kcm_kalternatives.la - -kcm_kalternatives_la_SOURCES = addslavesui.ui propertieswindow.ui addalternativesui.ui mainwindow.ui altcontroller.cpp kalternatives.cpp altparser.cpp altitemelement.cpp treeitemelement.cpp addslaves.cpp addalternatives.cpp - -kcm_kalternatives_la_LIBADD = $(LIB_TDEUI) $(LIB_TDEIO) -kcm_kalternatives_la_LDFLAGS = $(all_libraries) -module -avoid-version -no-undefined - - -kcm_kalternatives_la_METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/kalternatives.pot - -xdg_apps_DATA = kalternatives.desktop diff --git a/src/addalternatives.cpp b/src/addalternatives.cpp index 4ecda4a..1a88725 100644 --- a/src/addalternatives.cpp +++ b/src/addalternatives.cpp @@ -21,7 +21,7 @@ #include "addalternatives.h" #include "addslaves.h" #include "treeitemelement.h" -#include "kalternatives.h" +#include "tdealternatives.h" #include "altcontroller.h" #include "altitemelement.h" #include "altparser.h" @@ -35,8 +35,8 @@ #include #include -AddAlternatives::AddAlternatives(TreeItemElement *treeItem, Kalternatives *kalt, int countSlaves): -AddAlternativesUi(kalt),m_treeItem(treeItem), m_kalt(kalt), m_countSlave(countSlaves) +AddAlternatives::AddAlternatives(TreeItemElement *treeItem, TDEAlternatives *kalt, int countSlaves): +AddAlternativesUi(kalt),m_treeItem(treeItem), m_alt(kalt), m_countSlave(countSlaves) { m_bOk->setGuiItem(KStdGuiItem::ok()); m_bCancel->setGuiItem(KStdGuiItem::cancel()); @@ -87,7 +87,7 @@ void AddAlternatives::slotOkClicked() item->addAlternative(a); - AltItemElement *altItem = new AltItemElement(m_kalt->optionsList(), a); + AltItemElement *altItem = new AltItemElement(m_alt->optionsList(), a); m_treeItem->getAltController()->addAltItem(altItem); @@ -108,7 +108,7 @@ void AddAlternatives::slotOkClicked() altItem->searchDescription(); } m_treeItem->setNbrAltChanged(TRUE); - emit m_kalt->configChanged(); + emit m_alt->configChanged(); close(); } else diff --git a/src/addalternatives.h b/src/addalternatives.h index bbb7454..c7c6c28 100644 --- a/src/addalternatives.h +++ b/src/addalternatives.h @@ -26,18 +26,18 @@ #include class TreeItemElement; -class Kalternatives; +class TDEAlternatives; class AddAlternatives : public AddAlternativesUi { - Q_OBJECT + TQ_OBJECT TreeItemElement *m_treeItem; - Kalternatives *m_kalt; + TDEAlternatives *m_alt; int m_countSlave; public: - AddAlternatives(TreeItemElement *treeItem, Kalternatives *kalt, int countSlaves); + AddAlternatives(TreeItemElement *treeItem, TDEAlternatives *kalt, int countSlaves); virtual ~AddAlternatives(); void addSlave(const TQString& text){m_textSlave->append(text);} diff --git a/src/addslaves.h b/src/addslaves.h index efcb274..27265b7 100644 --- a/src/addslaves.h +++ b/src/addslaves.h @@ -27,7 +27,7 @@ class AddAlternatives; class AddSlaves : public AddSlavesUi { - Q_OBJECT + TQ_OBJECT AddAlternatives *m_addAlternatives; diff --git a/src/alternatives.desktop b/src/alternatives.desktop new file mode 100644 index 0000000..818e58e --- /dev/null +++ b/src/alternatives.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Encoding=UTF-8 +Exec=tdecmshell alternatives +Icon=tdealternatives +Type=Application + +X-TDE-ModuleType=Library +X-TDE-Library=alternatives +X-TDE-RootOnly=true +X-TDE-HasReadOnlyMode=true +X-TDE-ParentApp=kcontrol + +Name=Alternatives +Comment=TDEAlternatives - DPKG/RPM alternatives manager for TDE +Categories=Qt;TDE;X-TDE-settings-system; +Keywords=applications,alternative,alternatives,dpkg,rpm,debian,devuan,ubuntu,redhat,fedora,mageia \ No newline at end of file diff --git a/src/altitemelement.cpp b/src/altitemelement.cpp index 0e695f9..d0125cf 100644 --- a/src/altitemelement.cpp +++ b/src/altitemelement.cpp @@ -62,12 +62,12 @@ void AltItemElement::searchDescription() *procdesc << "whatis"; *procdesc << exec; - connect(procdesc, SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, - SLOT(slotGetDescription(TDEProcess *, char *, int))); - //connect(procdesc, SIGNAL( receivedStderr(TDEProcess *, char *, int) ), this, - // SLOT(slotGetDescription(TDEProcess *, char *, int))); - connect(procdesc, SIGNAL( processExited(TDEProcess *)), this, - SLOT(slotDescriptionTermined(TDEProcess *))); + connect(procdesc, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int)), this, + TQ_SLOT(slotGetDescription(TDEProcess *, char *, int))); + //connect(procdesc, TQ_SIGNAL( receivedStderr(TDEProcess *, char *, int) ), this, + // TQ_SLOT(slotGetDescription(TDEProcess *, char *, int))); + connect(procdesc, TQ_SIGNAL( processExited(TDEProcess *)), this, + TQ_SLOT(slotDescriptionTermined(TDEProcess *))); procdesc->start(TDEProcess::NotifyOnExit,/*TDEProcess::Block,*/ TDEProcess::AllOutput); } } diff --git a/src/altitemelement.h b/src/altitemelement.h index dad1693..df04e6b 100644 --- a/src/altitemelement.h +++ b/src/altitemelement.h @@ -31,7 +31,7 @@ class AltController; class AltItemElement : public TQObject, public TQCheckListItem { - Q_OBJECT + TQ_OBJECT Alternative *m_alt; TDEListView *m_parent; diff --git a/src/hi16-app-kalternatives.png b/src/hi16-app-tdealternatives.png similarity index 100% rename from src/hi16-app-kalternatives.png rename to src/hi16-app-tdealternatives.png diff --git a/src/hi32-app-kalternatives.png b/src/hi32-app-tdealternatives.png similarity index 100% rename from src/hi32-app-kalternatives.png rename to src/hi32-app-tdealternatives.png diff --git a/src/kalternatives.desktop b/src/kalternatives.desktop deleted file mode 100644 index 1a83fbb..0000000 --- a/src/kalternatives.desktop +++ /dev/null @@ -1,37 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Exec=tdecmshell kalternatives -Icon=application-vnd.tde.misc -Type=Application - -X-TDE-ModuleType=Library -X-TDE-Library=kalternatives -X-TDE-RootOnly=true -X-TDE-HasReadOnlyMode=true -X-TDE-ParentApp=kcontrol - -Comment=Kalternatives - KDE Mandrake/Debian alternatives-system manager -Comment[da]=Alternative systemhåndteringer, Kalternatives for KDE Mandrake/Debian -Comment[es]=Kalternatives - administrador alternativo del sistema KDE en Mandrake/Debian -Comment[et]=Kalternatives - KDE Mandrake/Debiani alternatiivide süsteemi haldur -Comment[fr]=KAlternatives - Un gestionnaire du système d'alternatives Mandrake / Debian pour KDE -Comment[gl]=Kalternatives - Xestión do sistema de alternativas da Mandrake/Debian -Comment[it]=Kalternatives - Gestione dei sistemi di alternative di Mandrake e Debian per KDE -Comment[pt]=Kalternatives - Gestão de sistema de alternativas para Mandrake/Debian -Comment[pt_BR]=Kalternatives - Gestão de sistema de alternativas para Mandrake/Debian -Comment[sv]=Kalternativ - KDE:s Mandrake och Debian alternativ systemhantering -Comment[ta]=Kalternatives - கேடியி மாண்ட்ரேக்/டெபியன் மாற்றுகள் அமைப்பு மேலாளர் -Comment[tr]=Kseçenekleri - KDE Mandarake/Debian seçenekleri sistem yöneticisi -Comment[xx]=xxKalternatives - KDE Mandrake/Debian alternatives-system managerxx -Keywords=Kalternatives;kalternatives -Keywords[fr]=Kalternatives;kalternatives;alternatives -Keywords[sv]=Kalternativ;kalternativ -Keywords[tr]=Kseçenekleri;kseçenekleri -Keywords[xx]=xxKalternatives;kalternativesxx -Name=Kalternatives -Name[ta]=Kமாற்றுகள் -Name[tr]=Kseçenekleri -Name[xx]=xxKalternativesxx - - -Categories=Qt;TDE;X-TDE-settings-system; diff --git a/src/kalternatives.lsm b/src/kalternatives.lsm deleted file mode 100644 index 8558492..0000000 --- a/src/kalternatives.lsm +++ /dev/null @@ -1,16 +0,0 @@ -Begin3 -Title: kalternatives -- Some description -Version: 0.12 -Entered-date: -Description: -Keywords: KDE Qt -Author: Juanjo -Maintained-by: Juanjo -Home-page: -Alternate-site: -Primary-site: ftp://ftp.kde.org/pub/kde/unstable/apps/utils - xxxxxx kalternatives-0.12.tar.gz - xxx kalternatives-0.12.lsm -Platform: Linux. Needs KDE -Copying-policy: GPL -End diff --git a/src/kalternatives.cpp b/src/tdealternatives.cpp similarity index 81% rename from src/kalternatives.cpp rename to src/tdealternatives.cpp index 940fc57..744433a 100644 --- a/src/kalternatives.cpp +++ b/src/tdealternatives.cpp @@ -21,7 +21,7 @@ * 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include "kalternatives.h" +#include "tdealternatives.h" #include "altparser.h" #include "propertieswindow.h" #include "altcontroller.h" @@ -44,19 +44,21 @@ #include #include -typedef KGenericFactory KalternativesFactory; -K_EXPORT_COMPONENT_FACTORY( kcm_kalternatives, KalternativesFactory("kcmkalternatives")) +#include "config.h" + +typedef KGenericFactory TDEAlternativesFactory; +K_EXPORT_COMPONENT_FACTORY( kcm_alternatives, TDEAlternativesFactory("kcm_alternatives")) extern "C" { - TDECModule *create_kalternatives(TQWidget *parent, const char *name) + TDECModule *create_alternatives(TQWidget *parent, const char *name) { - return new Kalternatives(parent, name); + return new TDEAlternatives(parent, name); }; } -Kalternatives::Kalternatives(TQWidget *parent, const char *name, const TQStringList&) -:TDECModule(/*KalternativesFactory::instance(), */parent, name), myAboutData(0) +TDEAlternatives::TDEAlternatives(TQWidget *parent, const char *name, const TQStringList&) +:TDECModule(/*TDEAlternativesFactory::instance(), */parent, name), myAboutData(0) { setUseRootOnlyMsg(false); @@ -73,14 +75,16 @@ Kalternatives::Kalternatives(TQWidget *parent, const char *name, const TQStringL setButtons(Help); } -#ifdef MANDRAKE +#ifdef WITH_DISTRIBUTION_RPM m_mgr = new AltFilesManager("/var/lib/rpm/alternatives"); #else - #ifdef DEBIAN + #ifdef WITH_DISTRIBUTION_DPKG m_mgr = new AltFilesManager("/var/lib/dpkg/alternatives"); #else - KMessageBox::sorry(this, i18n("Kalternatives only work on Debian- or Mandrake-based systems"), i18n("Wrong System Type")); - TQTimer::singleShot(0, this, SLOT(die())); + KMessageBox::sorry(this, + i18n("TDEAlternatives only works on systems which use the DPKG or RPM package manager."), + i18n("Wrong System Type")); + TQTimer::singleShot(0, this, TQ_SLOT(die())); #endif #endif @@ -91,20 +95,20 @@ m_mgr = new AltFilesManager("/var/lib/rpm/alternatives"); mainwindow->m_altList->setShowToolTips(1); - connect(mainwindow->m_hideAlt, SIGNAL(clicked()), this, - SLOT(slotHideAlternativesClicked())); + connect(mainwindow->m_hideAlt, TQ_SIGNAL(clicked()), this, + TQ_SLOT(slotHideAlternativesClicked())); - connect(mainwindow->m_altList, SIGNAL(selectionChanged( TQListViewItem* )), this, - SLOT(slotSelectAlternativesClicked(TQListViewItem *))); + connect(mainwindow->m_altList, TQ_SIGNAL(selectionChanged( TQListViewItem* )), this, + TQ_SLOT(slotSelectAlternativesClicked(TQListViewItem *))); - connect(mainwindow->m_optionsList, SIGNAL(clicked(TQListViewItem *)), - this, SLOT(slotOptionClicked(TQListViewItem *))); - connect(mainwindow->m_bAdd, SIGNAL(clicked()), this, - SLOT(slotAddClicked())); - connect(mainwindow->m_bDelete, SIGNAL(clicked()), this, - SLOT(slotDeleteClicked())); - connect(mainwindow->m_bProperties, SIGNAL(clicked()), this, - SLOT(slotPropertiesClicked())); + connect(mainwindow->m_optionsList, TQ_SIGNAL(clicked(TQListViewItem *)), + this, TQ_SLOT(slotOptionClicked(TQListViewItem *))); + connect(mainwindow->m_bAdd, TQ_SIGNAL(clicked()), this, + TQ_SLOT(slotAddClicked())); + connect(mainwindow->m_bDelete, TQ_SIGNAL(clicked()), this, + TQ_SLOT(slotDeleteClicked())); + connect(mainwindow->m_bProperties, TQ_SIGNAL(clicked()), this, + TQ_SLOT(slotPropertiesClicked())); m_altList = mainwindow->m_altList; m_optionsList = mainwindow->m_optionsList; @@ -124,26 +128,24 @@ m_mgr = new AltFilesManager("/var/lib/rpm/alternatives"); m_statusCombo->setEnabled(false); } - myAboutData = new TDEAboutData("kcmkalternatives", I18N_NOOP("Kalternatives"), - KALT_VERSION, I18N_NOOP("KDE Mandrake/Debian alternatives-system manager"), + myAboutData = new TDEAboutData("kcm_alternatives", I18N_NOOP("TDEAlternatives"), + VERSION, I18N_NOOP("DPKG/RPM alternatives manager for TDE"), TDEAboutData::License_GPL, I18N_NOOP("(c) 2004 Juanjo Alvarez Martinez\n" - "(c) 2004 Mario Bensi")); + "(c) 2004 Mario Bensi")); myAboutData->addAuthor("Juanjo Alvarez Martinez", 0, "juanjo@juanjoalvarez.net", "http://juanjoalvarez.net"); myAboutData->addAuthor("Mario Bensi", 0, "nef@ipsquad.net", "http://ipsquad.net"); myAboutData->addAuthor("Pino Toscano", 0, "toscano.pino@tiscali.it"); -#if KDE_IS_VERSION(3,2,90) setAboutData( myAboutData ); -#endif load(); m_hideAlt->setChecked(true); slotHideAlternativesClicked(); } -Kalternatives::~Kalternatives() +TDEAlternatives::~TDEAlternatives() { if(m_mgr) delete m_mgr; if(m_altList) delete m_altList; @@ -153,12 +155,12 @@ Kalternatives::~Kalternatives() if(m_hideAlt) delete m_hideAlt; } -void Kalternatives::die() +void TDEAlternatives::die() { delete this; } -void Kalternatives::load() +void TDEAlternatives::load() { clearList(m_altList); TQPtrList *itemslist = m_mgr->getGlobalAlternativeList(); @@ -186,7 +188,7 @@ void Kalternatives::load() -void Kalternatives::clearList(TDEListView* list) +void TDEAlternatives::clearList(TDEListView* list) { TQListViewItemIterator it( list ); TQListViewItem *tmp; @@ -198,7 +200,7 @@ void Kalternatives::clearList(TDEListView* list) } -void Kalternatives::slotSelectAlternativesClicked(TQListViewItem *alternative) +void TDEAlternatives::slotSelectAlternativesClicked(TQListViewItem *alternative) { clearList(m_optionsList); TreeItemElement *treeItem; @@ -239,7 +241,7 @@ void Kalternatives::slotSelectAlternativesClicked(TQListViewItem *alternative) -void Kalternatives::slotHideAlternativesClicked() +void TDEAlternatives::slotHideAlternativesClicked() { if (m_hideAlt->isChecked ()) { @@ -269,7 +271,7 @@ void Kalternatives::slotHideAlternativesClicked() } -void Kalternatives::slotOptionClicked(TQListViewItem *option) +void TDEAlternatives::slotOptionClicked(TQListViewItem *option) { AltItemElement *altItem; if((altItem = dynamic_cast(option))) @@ -286,7 +288,7 @@ void Kalternatives::slotOptionClicked(TQListViewItem *option) } } -void Kalternatives::slotAddClicked() +void TDEAlternatives::slotAddClicked() { TreeItemElement *treeItem; if((treeItem = dynamic_cast(m_altList->selectedItem()))) @@ -302,7 +304,7 @@ void Kalternatives::slotAddClicked() } } } -void Kalternatives::slotDeleteClicked() +void TDEAlternatives::slotDeleteClicked() { TreeItemElement *treeItem; if((treeItem = dynamic_cast(m_altList->selectedItem()))) @@ -324,7 +326,7 @@ void Kalternatives::slotDeleteClicked() } } -void Kalternatives::slotPropertiesClicked() +void TDEAlternatives::slotPropertiesClicked() { AltItemElement *altItem; @@ -355,7 +357,7 @@ void Kalternatives::slotPropertiesClicked() } -void Kalternatives::save() +void TDEAlternatives::save() { TQListViewItemIterator it( m_altList ); TreeItemElement *treeItem; @@ -440,18 +442,18 @@ void Kalternatives::save() } -void Kalternatives::configChanged() +void TDEAlternatives::configChanged() { emit changed(true); } -TQString Kalternatives::quickHelp() const +TQString TDEAlternatives::quickHelp() const { - return i18n("

Kalternatives

\n" - "A Mandrake/Debian alternatives-system manager."); + return i18n("

TDEAlternatives

\n", + "RPM/DPKG alternatives manager for TDE"); } -#include "kalternatives.moc" +#include "tdealternatives.moc" \ No newline at end of file diff --git a/src/kalternatives.h b/src/tdealternatives.h similarity index 90% rename from src/kalternatives.h rename to src/tdealternatives.h index e035f10..b130d11 100644 --- a/src/kalternatives.h +++ b/src/tdealternatives.h @@ -21,8 +21,8 @@ * 51 Franklin Steet, Fifth Floor, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#ifndef _KALTERNATIVES_H_ -#define _KALTERNATIVES_H_ +#ifndef _tdealternatives_H_ +#define _tdealternatives_H_ //#ifdef HAVE_CONFIG_H //#include @@ -37,13 +37,11 @@ #include #include -#define KALT_VERSION "0.12" - class AltFilesManager; -class Kalternatives : public TDECModule +class TDEAlternatives : public TDECModule { - Q_OBJECT + TQ_OBJECT bool m_bisRoot; AltFilesManager *m_mgr; @@ -57,8 +55,8 @@ class Kalternatives : public TDECModule void clearList(TDEListView* list); public: - Kalternatives(TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() ); - virtual ~Kalternatives(); + TDEAlternatives(TQWidget *parent=0, const char *name=0, const TQStringList& = TQStringList() ); + virtual ~TDEAlternatives(); TDEListView *optionsList() const {return m_optionsList;} bool isBisRoot() const {return m_bisRoot;} @@ -80,4 +78,4 @@ private slots: void slotPropertiesClicked(); }; -#endif // _KALTERNATIVES_H_ +#endif // _tdealternatives_H_ diff --git a/src/kalternativesui.rc b/src/tdealternativesui.rc similarity index 100% rename from src/kalternativesui.rc rename to src/tdealternativesui.rc