diff options
author | Slávek Banko <[email protected]> | 2021-07-12 19:30:23 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2021-07-12 19:44:58 +0200 |
commit | 7d5c09fcba81401f990f6ec9f9b53f9f0f92ca9e (patch) | |
tree | f0bb2ca42d7105c8d585d9bdd747ba2b67ed099a /client | |
parent | 402e7a479aeff06fef928520f6c4d70c31d74694 (diff) | |
download | twin-style-dekorator-7d5c09fcba81401f990f6ec9f9b53f9f0f92ca9e.tar.gz twin-style-dekorator-7d5c09fcba81401f990f6ec9f9b53f9f0f92ca9e.zip |
Add KDE_EXPORT to the public symbols.
Add twin client translations into template.
Use common rules for build and install translations.
Delete generated files.
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'client')
-rw-r--r-- | client/CMakeL10n.txt | 10 | ||||
-rw-r--r-- | client/CMakeLists.txt | 6 | ||||
-rw-r--r-- | client/config/CMakeL10n.txt | 3 | ||||
-rw-r--r-- | client/config/CMakeLists.txt | 2 | ||||
-rw-r--r-- | client/config/deKoratorconfig.cpp | 11 | ||||
-rw-r--r-- | client/config/themes.cpp | 4 | ||||
-rw-r--r-- | client/config/themes.moc.cpp | 110 | ||||
-rw-r--r-- | client/config/themes.moc.loT | 7 | ||||
-rw-r--r-- | client/deKorator.desktop | 2 | ||||
-rw-r--r-- | client/deKoratorclient.cpp | 16 | ||||
-rw-r--r-- | client/shadow.cpp | 4 | ||||
-rw-r--r-- | client/themes.moc.cpp | 110 |
12 files changed, 37 insertions, 248 deletions
diff --git a/client/CMakeL10n.txt b/client/CMakeL10n.txt index b7dc64b..c76af0e 100644 --- a/client/CMakeL10n.txt +++ b/client/CMakeL10n.txt @@ -1,6 +1,12 @@ +##### create translation templates ############## + +tde_l10n_create_template( + CATALOG "messages/twin_deKorator/" + SOURCES . + X-POT ${CMAKE_SOURCE_DIR}/../../../core/tde-i18n/template/messages/tdebase/twin_clients.pot +) + tde_l10n_create_template( CATALOG "desktop_files/twin-style-deKorator-desktops" SOURCES deKorator.desktop ) - -tde_l10n_auto_add_subdirectories( ) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 1377087..6374694 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -22,7 +22,7 @@ tde_add_kpart( twin3_deKorator AUTOMOC SOURCES deKoratorclient.cpp - shadow.cpp + shadow.cpp LINK tdecore-shared tdeui-shared @@ -34,7 +34,7 @@ tde_add_kpart( twin3_deKorator AUTOMOC ##### other data -install( - FILES deKorator.desktop +tde_create_translated_desktop( + SOURCE deKorator.desktop DESTINATION ${DATA_INSTALL_DIR}/twin ) diff --git a/client/config/CMakeL10n.txt b/client/config/CMakeL10n.txt deleted file mode 100644 index 019282a..0000000 --- a/client/config/CMakeL10n.txt +++ /dev/null @@ -1,3 +0,0 @@ -##### create translation templates ############## - -tde_l10n_create_template( "messages/twin_deKorator_config" ) diff --git a/client/config/CMakeLists.txt b/client/config/CMakeLists.txt index c303eb4..e51806d 100644 --- a/client/config/CMakeLists.txt +++ b/client/config/CMakeLists.txt @@ -19,7 +19,7 @@ tde_add_kpart( twin_deKorator_config AUTOMOC SOURCES deKoratorconfig.cpp configdialog.ui - themes.cpp + themes.cpp LINK tdecore-shared tdeui-shared diff --git a/client/config/deKoratorconfig.cpp b/client/config/deKoratorconfig.cpp index db3d638..1904a9a 100644 --- a/client/config/deKoratorconfig.cpp +++ b/client/config/deKoratorconfig.cpp @@ -31,6 +31,10 @@ // Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////// +#if defined(HAVE_CONFIG_H) +# include "config.h" +#endif + #include <tdeconfig.h> #include <tdelocale.h> #include <tdeglobal.h> @@ -61,9 +65,8 @@ DeKoratorConfig::DeKoratorConfig( TDEConfig* config, TQWidget* parent ) { // create the configuration object config_ = new TDEConfig( "twindeKoratorrc" ); - TDEGlobal::locale() ->insertCatalogue( "twin_deKorator_config" ); - - + TDEGlobal::locale()->insertCatalogue("twin_clients"); + TDEGlobal::locale()->insertCatalogue("twin_deKorator"); // create and show the configuration dialog dialog_ = new ConfigDialog( parent ); @@ -455,7 +458,7 @@ void DeKoratorConfig::setTheme() extern "C" { - TQObject * allocate_config( TDEConfig * config, TQWidget * parent ) + KDE_EXPORT TQObject * allocate_config( TDEConfig * config, TQWidget * parent ) { return ( new DeKoratorConfig( config, parent ) ); } diff --git a/client/config/themes.cpp b/client/config/themes.cpp index 5525b6a..1688874 100644 --- a/client/config/themes.cpp +++ b/client/config/themes.cpp @@ -31,7 +31,9 @@ // Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////// -#include <config.h> +#if defined(HAVE_CONFIG_H) +# include "config.h" +#endif #include <stdlib.h> #include <unistd.h> diff --git a/client/config/themes.moc.cpp b/client/config/themes.moc.cpp deleted file mode 100644 index 9e25331..0000000 --- a/client/config/themes.moc.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** IconThemesConfig meta object code from reading C++ file 'themes.h' -** -** Created: Wed Dec 7 20:20:14 2005 -** by: The TQt MOC ($Id: qt/moc_yacc.cpp 3.3.5 edited Sep 2 14:41 $) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#undef QT_NO_COMPAT -#include "themes.h" -#include <tqmetaobject.h> -#include <tqapplication.h> - -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.5. It" -#error "cannot be used with the include files from this version of TQt." -#error "(The moc has changed too much.)" -#endif - -const char *IconThemesConfig::className() const -{ - return "IconThemesConfig"; -} - -TQMetaObject *IconThemesConfig::metaObj = 0; -static TQMetaObjectCleanUp cleanUp_IconThemesConfig( "IconThemesConfig", &IconThemesConfig::staticMetaObject ); - -#ifndef QT_NO_TRANSLATION -TQString IconThemesConfig::tr( const char *s, const char *c ) -{ - if ( tqApp ) - return tqApp->translate( "IconThemesConfig", s, c, TQApplication::DefaultCodec ); - else - return TQString::fromLatin1( s ); -} -#ifndef QT_NO_TRANSLATION_UTF8 -TQString IconThemesConfig::trUtf8( const char *s, const char *c ) -{ - if ( tqApp ) - return tqApp->translate( "IconThemesConfig", s, c, TQApplication::UnicodeUTF8 ); - else - return TQString::fromUtf8( s ); -} -#endif // QT_NO_TRANSLATION_UTF8 - -#endif // QT_NO_TRANSLATION - -TQMetaObject* IconThemesConfig::staticMetaObject() -{ - if ( metaObj ) - return metaObj; - TQMetaObject* parentObject = TDECModule::staticMetaObject(); - static const TQUParameter param_slot_0[] = { - { "item", &static_QUType_ptr, "TQListViewItem", TQUParameter::In } - }; - static const TQUMethod slot_0 = {"themeSelected", 1, param_slot_0 }; - static const TQUMethod slot_1 = {"installNewTheme", 0, 0 }; - static const TQUMethod slot_2 = {"removeSelectedTheme", 0, 0 }; - static const TQMetaData slot_tbl[] = { - { "themeSelected(TQListViewItem*)", &slot_0, TQMetaData::Protected }, - { "installNewTheme()", &slot_1, TQMetaData::Protected }, - { "removeSelectedTheme()", &slot_2, TQMetaData::Protected } - }; - metaObj = TQMetaObject::new_metaobject( - "IconThemesConfig", parentObject, - slot_tbl, 3, - 0, 0, -#ifndef QT_NO_PROPERTIES - 0, 0, - 0, 0, -#endif // QT_NO_PROPERTIES - 0, 0 ); - cleanUp_IconThemesConfig.setMetaObject( metaObj ); - return metaObj; -} - -void* IconThemesConfig::tqt_cast( const char* clname ) -{ - if ( !qstrcmp( clname, "IconThemesConfig" ) ) - return this; - return TDECModule::tqt_cast( clname ); -} - -bool IconThemesConfig::tqt_invoke( int _id, TQUObject* _o ) -{ - switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: themeSelected((TQListViewItem*)static_QUType_ptr.get(_o+1)); break; - case 1: installNewTheme(); break; - case 2: removeSelectedTheme(); break; - default: - return TDECModule::tqt_invoke( _id, _o ); - } - return TRUE; -} - -bool IconThemesConfig::tqt_emit( int _id, TQUObject* _o ) -{ - return TDECModule::tqt_emit(_id,_o); -} -#ifndef QT_NO_PROPERTIES - -bool IconThemesConfig::tqt_property( int id, int f, TQVariant* v) -{ - return TDECModule::tqt_property( id, f, v); -} - -bool IconThemesConfig::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES diff --git a/client/config/themes.moc.loT b/client/config/themes.moc.loT deleted file mode 100644 index f7771d1..0000000 --- a/client/config/themes.moc.loT +++ /dev/null @@ -1,7 +0,0 @@ -# themes.moc.lo - a libtool object file -# Generated by ltmain.sh - GNU libtool 1.5a (1.1240 2003/06/26 06:55:19) -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# Name of the PIC object. diff --git a/client/deKorator.desktop b/client/deKorator.desktop index afc4c60..00683d7 100644 --- a/client/deKorator.desktop +++ b/client/deKorator.desktop @@ -1,5 +1,3 @@ -# KDE Desktop Entry [Desktop Entry] -Encoding=UTF-8 Name=DeKorator X-TDE-Library=twin3_deKorator diff --git a/client/deKoratorclient.cpp b/client/deKoratorclient.cpp index c92cb02..406248d 100644 --- a/client/deKoratorclient.cpp +++ b/client/deKoratorclient.cpp @@ -31,9 +31,9 @@ // Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////// - - - +#if defined(HAVE_CONFIG_H) +# include "config.h" +#endif #include "deKoratorclient.h" @@ -176,9 +176,12 @@ TQString DeKoratorFactory::buttonsPath_ = ""; TQString DeKoratorFactory::masksPath_ = ""; -extern "C" KDecorationFactory* create_factory() +extern "C" { - return new DeKorator::DeKoratorFactory(); + KDE_EXPORT KDecorationFactory* create_factory() + { + return new DeKorator::DeKoratorFactory(); + } } ////////////////////////////////////////////////////////////////////////////// @@ -187,6 +190,9 @@ extern "C" KDecorationFactory* create_factory() // Constructor DeKoratorFactory::DeKoratorFactory() { + TDEGlobal::locale()->insertCatalogue("twin_clients"); + TDEGlobal::locale()->insertCatalogue("twin_deKorator"); + readConfig(); initialized_ = TRUE; diff --git a/client/shadow.cpp b/client/shadow.cpp index 09b813a..c9b81fa 100644 --- a/client/shadow.cpp +++ b/client/shadow.cpp @@ -31,6 +31,10 @@ // Boston, MA 02110-1301, USA. /////////////////////////////////////////////////////////////////////// +#if defined(HAVE_CONFIG_H) +# include "config.h" +#endif + #include "shadow.h" #include <tqcolor.h> diff --git a/client/themes.moc.cpp b/client/themes.moc.cpp deleted file mode 100644 index f685683..0000000 --- a/client/themes.moc.cpp +++ /dev/null @@ -1,110 +0,0 @@ -/**************************************************************************** -** IconThemesConfig meta object code from reading C++ file 'themes.h' -** -** Created: Wed Dec 7 21:43:34 2005 -** by: The TQt MOC ($Id: qt/moc_yacc.cpp 3.3.5 edited Sep 2 14:41 $) -** -** WARNING! All changes made in this file will be lost! -*****************************************************************************/ - -#undef QT_NO_COMPAT -#include "themes.h" -#include <tqmetaobject.h> -#include <tqapplication.h> - -#include <private/qucomextra_p.h> -#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) -#error "This file was generated using the moc from 3.3.5. It" -#error "cannot be used with the include files from this version of TQt." -#error "(The moc has changed too much.)" -#endif - -const char *IconThemesConfig::className() const -{ - return "IconThemesConfig"; -} - -TQMetaObject *IconThemesConfig::metaObj = 0; -static TQMetaObjectCleanUp cleanUp_IconThemesConfig( "IconThemesConfig", &IconThemesConfig::staticMetaObject ); - -#ifndef QT_NO_TRANSLATION -TQString IconThemesConfig::tr( const char *s, const char *c ) -{ - if ( tqApp ) - return tqApp->translate( "IconThemesConfig", s, c, TQApplication::DefaultCodec ); - else - return TQString::fromLatin1( s ); -} -#ifndef QT_NO_TRANSLATION_UTF8 -TQString IconThemesConfig::trUtf8( const char *s, const char *c ) -{ - if ( tqApp ) - return tqApp->translate( "IconThemesConfig", s, c, TQApplication::UnicodeUTF8 ); - else - return TQString::fromUtf8( s ); -} -#endif // QT_NO_TRANSLATION_UTF8 - -#endif // QT_NO_TRANSLATION - -TQMetaObject* IconThemesConfig::staticMetaObject() -{ - if ( metaObj ) - return metaObj; - TQMetaObject* parentObject = TDECModule::staticMetaObject(); - static const TQUParameter param_slot_0[] = { - { "item", &static_QUType_ptr, "TQListViewItem", TQUParameter::In } - }; - static const TQUMethod slot_0 = {"themeSelected", 1, param_slot_0 }; - static const TQUMethod slot_1 = {"installNewTheme", 0, 0 }; - static const TQUMethod slot_2 = {"removeSelectedTheme", 0, 0 }; - static const TQMetaData slot_tbl[] = { - { "themeSelected(TQListViewItem*)", &slot_0, TQMetaData::Protected }, - { "installNewTheme()", &slot_1, TQMetaData::Protected }, - { "removeSelectedTheme()", &slot_2, TQMetaData::Protected } - }; - metaObj = TQMetaObject::new_metaobject( - "IconThemesConfig", parentObject, - slot_tbl, 3, - 0, 0, -#ifndef QT_NO_PROPERTIES - 0, 0, - 0, 0, -#endif // QT_NO_PROPERTIES - 0, 0 ); - cleanUp_IconThemesConfig.setMetaObject( metaObj ); - return metaObj; -} - -void* IconThemesConfig::tqt_cast( const char* clname ) -{ - if ( !qstrcmp( clname, "IconThemesConfig" ) ) - return this; - return TDECModule::tqt_cast( clname ); -} - -bool IconThemesConfig::tqt_invoke( int _id, TQUObject* _o ) -{ - switch ( _id - staticMetaObject()->slotOffset() ) { - case 0: themeSelected((TQListViewItem*)static_QUType_ptr.get(_o+1)); break; - case 1: installNewTheme(); break; - case 2: removeSelectedTheme(); break; - default: - return TDECModule::tqt_invoke( _id, _o ); - } - return TRUE; -} - -bool IconThemesConfig::tqt_emit( int _id, TQUObject* _o ) -{ - return TDECModule::tqt_emit(_id,_o); -} -#ifndef QT_NO_PROPERTIES - -bool IconThemesConfig::tqt_property( int id, int f, TQVariant* v) -{ - return TDECModule::tqt_property( id, f, v); -} - -bool IconThemesConfig::tqt_static_property( TQObject* , int , int , TQVariant* ){ return FALSE; } -#endif // QT_NO_PROPERTIES |