diff --git a/CMakeL10n.txt b/CMakeL10n.txt index 58d96ae..f3216be 100644 --- a/CMakeL10n.txt +++ b/CMakeL10n.txt @@ -5,7 +5,18 @@ # This software is licensed under the terms of the GNU GPL v3 license. # ################################################################################ -cmake_minimum_required( VERSION 3.1 ) + +##### set project version ######################## + +include( TDEVersion ) +cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} ) + + +##### include our cmake modules ################# include( TDEL10n ) + + +##### create translation templates ############## + tde_l10n_auto_add_subdirectories( ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9476e27..c6088bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,11 +5,21 @@ # This software is licensed under the terms of the GNU GPL v3 license. # ################################################################################ -cmake_minimum_required( VERSION 3.1 ) -project( kcm_alternatives ) +##### set project version ######################## + +include( TDEVersion ) +cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} ) +tde_set_project_version( ) + + +#### general package setup + +project( tdealternatives ) + + +#### include essential cmake modules -### Required modules ########################################################### include( FindPkgConfig ) include( CheckFunctionExists ) include( CheckSymbolExists ) @@ -18,36 +28,59 @@ include( CheckLibraryExists ) include( CheckCSourceCompiles ) include( CheckCXXSourceCompiles ) -### TDE macros ################################################################# + +#### include our cmake modules + include( TDEMacros ) -tde_set_project_version( ) + + +##### setup install paths 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} ) +##### optional stuff + +option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) +option( WITH_DISTRIBUTION_DPKG "Enable support for DPKG package manager" OFF ) +option( WITH_DISTRIBUTION_RPM "Enable support for RPM package manager" OFF ) + +option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} ) + + +##### user requested modules + +option( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks -### Configure checks ########################################################### include( ConfigureChecks.cmake ) -### Compiler settings ########################################################## + +###### global 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 ######################################################### + +##### directories + add_subdirectory( src ) + + +##### other data ################################ + 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 + +##### write configure files + +configure_file( config.h.cmake config.h @ONLY ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 7555a11..57d5f51 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -5,6 +5,8 @@ # This software is licensed under the terms of the GNU GPL v3 license. # ################################################################################ + +# required stuff find_package( TQt ) find_package( TDE ) @@ -16,6 +18,8 @@ test_big_endian( WORDS_BIGENDIAN ) tde_setup_largefiles( ) +##### check for gcc visibility support + if( WITH_GCC_VISIBILITY ) tde_setup_gcc_visibility( ) endif( WITH_GCC_VISIBILITY ) @@ -29,4 +33,4 @@ 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 +endif( ) diff --git a/config.h.cmake b/config.h.cmake index 7791faa..5e1c7d0 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -3,10 +3,10 @@ // Defined if you have fvisibility and fvisibility-inlines-hidden support. #cmakedefine __TDE_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). */ +// 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 */ +// Distributions #cmakedefine WITH_DISTRIBUTION_DPKG @WITH_DISTRIBUTION_DPKG@ #cmakedefine WITH_DISTRIBUTION_RPM @WITH_DISTRIBUTION_RPM@ diff --git a/src/CMakeL10n.txt b/src/CMakeL10n.txt index 63647ca..c191845 100644 --- a/src/CMakeL10n.txt +++ b/src/CMakeL10n.txt @@ -5,11 +5,9 @@ # This software is licensed under the terms of the GNU GPL v3 license. # ################################################################################ -tde_l10n_auto_add_subdirectories( ) - tde_l10n_create_template( "messages/tdealternatives" ) tde_l10n_create_template( CATALOG "desktop_files/tdealternatives-desktops" - SOURCES alternatives.desktop + SOURCES tdealternatives.desktop ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1b0b76c..3d217b7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,47 +6,36 @@ ################################################################################ include_directories( - ${CMAKE_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} + ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} ) + link_directories( - ${TQT_LIBRARY_DIRS} + ${TQT_LIBRARY_DIRS} + ${TDE_LIB_DIR} ) -### kcm_alternatives (module) ################################################## - -tde_add_kpart( - kcm_alternatives AUTOMOC +### kcm_tdealternatives (module) ################################################## +tde_add_kpart( kcm_tdealternatives AUTOMOC SOURCES - addslavesui.ui - propertieswindow.ui - addalternativesui.ui - mainwindow.ui - altcontroller.cpp - tdealternatives.cpp - altparser.cpp - altitemelement.cpp - treeitemelement.cpp - addslaves.cpp - addalternatives.cpp - + 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 - + tdeui-shared tdeio-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) ### translated desktop files ################################################### -tde_create_translated_desktop(alternatives.desktop) +tde_create_translated_desktop( tdealternatives.desktop ) ### data ####################################################################### @@ -54,6 +43,6 @@ tde_create_translated_desktop(alternatives.desktop) tde_install_icons( ) install( - FILES tdealternativesui.rc - DESTINATION ${DATA_INSTALL_DIR}/tdealternatives/ + FILES tdealternativesui.rc + DESTINATION ${DATA_INSTALL_DIR}/tdealternatives ) diff --git a/src/tdealternatives.cpp b/src/tdealternatives.cpp index 33cdad5..62d7815 100644 --- a/src/tdealternatives.cpp +++ b/src/tdealternatives.cpp @@ -47,7 +47,7 @@ #include "config.h" typedef KGenericFactory TDEAlternativesFactory; -K_EXPORT_COMPONENT_FACTORY( kcm_alternatives, TDEAlternativesFactory("kcm_alternatives")) +K_EXPORT_COMPONENT_FACTORY( kcm_tdealternatives, TDEAlternativesFactory("kcm_tdealternatives")) extern "C" { @@ -129,7 +129,7 @@ m_mgr = new AltFilesManager("/var/lib/rpm/alternatives"); m_statusCombo->setEnabled(false); } - myAboutData = new TDEAboutData("kcm_alternatives", I18N_NOOP("TDEAlternatives"), + myAboutData = new TDEAboutData("kcm_tdealternatives", I18N_NOOP("Alternatives"), VERSION, I18N_NOOP("DPKG/RPM alternatives manager for TDE"), TDEAboutData::License_GPL, I18N_NOOP("(c) 2004 Juanjo Alvarez Martinez\n" "(c) 2004 Mario Bensi")); diff --git a/src/alternatives.desktop b/src/tdealternatives.desktop similarity index 60% rename from src/alternatives.desktop rename to src/tdealternatives.desktop index cb5e6b5..51fb27a 100644 --- a/src/alternatives.desktop +++ b/src/tdealternatives.desktop @@ -1,11 +1,11 @@ [Desktop Entry] Encoding=UTF-8 -Exec=tdecmshell alternatives +Exec=tdecmshell tdealternatives Icon=tdealternatives Type=Application X-TDE-ModuleType=Library -X-TDE-Library=alternatives +X-TDE-Library=tdealternatives X-TDE-RootOnly=true X-TDE-HasReadOnlyMode=true X-TDE-ParentApp=kcontrol @@ -13,4 +13,4 @@ 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 +Keywords=applications;alternative;alternatives;tdealternative;tdealternatives;dpkg;rpm;debian;devuan;ubuntu;redhat;fedora;mageia diff --git a/translations/desktop_files/tdealternatives-desktops.pot b/translations/desktop_files/tdealternatives-desktops.pot index 45d5bc2..50d4c2b 100644 --- a/translations/desktop_files/tdealternatives-desktops.pot +++ b/translations/desktop_files/tdealternatives-desktops.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-09 16:07+0300\n" +"POT-Creation-Date: 2025-03-30 21:39+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,16 +17,16 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #. Name -#: alternatives.desktop:13 +#: tdealternatives.desktop:13 msgid "Alternatives" msgstr "" #. Comment -#: alternatives.desktop:14 +#: tdealternatives.desktop:14 msgid "TDEAlternatives - DPKG/RPM alternatives manager for TDE" msgstr "" #. Keywords -#: alternatives.desktop:16 -msgid "applications;alternative;alternatives;dpkg;rpm;debian;devuan;ubuntu;redhat;fedora;mageia" +#: tdealternatives.desktop:16 +msgid "applications;alternative;alternatives;tdealternative;tdealternatives;dpkg;rpm;debian;devuan;ubuntu;redhat;fedora;mageia" msgstr "" diff --git a/translations/messages/tdealternatives.pot b/translations/messages/tdealternatives.pot index 314796d..36cfeed 100644 --- a/translations/messages/tdealternatives.pot +++ b/translations/messages/tdealternatives.pot @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2024-08-09 16:07+0300\n" +"POT-Creation-Date: 2025-03-31 12:06+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -56,69 +56,70 @@ msgstr "" msgid "no description" msgstr "" -#: main.cpp:35 +#: main.cpp:34 msgid "A TDE Manager for the Debian/Mandrake alternatives system" msgstr "" -#: main.cpp:47 +#: main.cpp:46 msgid "tdealternatives" msgstr "" -#: tdealternatives.cpp:85 +#: tdealternatives.cpp:86 msgid "" "TDEAlternatives only works on systems which use the DPKG or RPM package " "manager." msgstr "" -#: tdealternatives.cpp:86 +#: tdealternatives.cpp:87 msgid "Wrong System Type" msgstr "" -#: mainwindow.ui:349 tdealternatives.cpp:120 +#: mainwindow.ui:349 tdealternatives.cpp:121 #, no-c-format msgid "&Add" msgstr "" -#: mainwindow.ui:360 tdealternatives.cpp:121 +#: mainwindow.ui:360 tdealternatives.cpp:122 #, no-c-format msgid "&Properties" msgstr "" -#: tdealternatives.cpp:131 -msgid "TDEAlternatives" +#: mainwindow.ui:54 tdealternatives.cpp:132 +#, no-c-format +msgid "Alternatives" msgstr "" -#: tdealternatives.cpp:132 +#: tdealternatives.cpp:133 msgid "DPKG/RPM alternatives manager for TDE" msgstr "" -#: tdealternatives.cpp:133 +#: tdealternatives.cpp:134 msgid "" "(c) 2004 Juanjo Alvarez Martinez\n" "(c) 2004 Mario Bensi" msgstr "" -#: tdealternatives.cpp:342 +#: tdealternatives.cpp:343 msgid "" "Description :\n" "%1\n" msgstr "" -#: tdealternatives.cpp:343 +#: tdealternatives.cpp:344 msgid "Path : %1\n" msgstr "" -#: tdealternatives.cpp:344 +#: tdealternatives.cpp:345 msgid "Priority : %1\n" msgstr "" -#: tdealternatives.cpp:347 +#: tdealternatives.cpp:348 msgid "" "_n: Slave :\n" "Slaves :" msgstr "" -#: tdealternatives.cpp:454 +#: tdealternatives.cpp:455 msgid "" "_:

TDEAlternatives

\n" "\n" @@ -147,12 +148,7 @@ msgstr "" #: mainwindow.ui:30 #, no-c-format -msgid "Alternatives Manager" -msgstr "" - -#: mainwindow.ui:54 -#, no-c-format -msgid "Alternatives" +msgid "TDE Alternatives Manager" msgstr "" #: mainwindow.ui:117