From 581feff4ec5a74282d0c7ed95878aecafeeb2c93 Mon Sep 17 00:00:00 2001 From: Matthias Kretz Date: Thu, 20 Jul 2006 13:26:37 +0000 Subject: [PATCH] - KGenericFactory - make 'em services svn path=/trunk/KDE/kdebase/workspace/; revision=564565 --- kcmkwin/kwindecoration/CMakeLists.txt | 2 +- kcmkwin/kwindecoration/kwindecoration.desktop | 9 +++++---- kcmkwin/kwinrules/CMakeLists.txt | 2 +- kcmkwin/kwinrules/kcm.cpp | 13 +++++-------- kcmkwin/kwinrules/kcm.h | 3 ++- kcmkwin/kwinrules/kwinrules.desktop | 5 +++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/kcmkwin/kwindecoration/CMakeLists.txt b/kcmkwin/kwindecoration/CMakeLists.txt index aa1faad438..10be71f605 100644 --- a/kcmkwin/kwindecoration/CMakeLists.txt +++ b/kcmkwin/kwindecoration/CMakeLists.txt @@ -19,7 +19,7 @@ install(TARGETS kcm_kwindecoration DESTINATION ${PLUGIN_INSTALL_DIR} ) ########### install files ############### -install( FILES kwindecoration.desktop DESTINATION ${XDG_APPS_DIR} ) +install( FILES kwindecoration.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/kcmkwin/kwindecoration/kwindecoration.desktop b/kcmkwin/kwindecoration/kwindecoration.desktop index 4c0580e323..73efe954b7 100644 --- a/kcmkwin/kwindecoration/kwindecoration.desktop +++ b/kcmkwin/kwindecoration/kwindecoration.desktop @@ -2,11 +2,13 @@ Encoding=UTF-8 Exec=kcmshell kwindecoration Icon=kcmkwm -Type=Application +Type=Service +ServiceTypes=KCModule DocPath=kcontrol/kwindecoration/index.html -X-KDE-Library=kwindecoration -X-KDE-FactoryName=kwindecoration +X-KDE-Library=kcm_kwindecoration +X-KDE-FactoryName=kcm_kwindecoration +X-KDE-ParentApp=kcontrol Name=Window Decorations Name[fr]=Décoration des fenêtres @@ -19,4 +21,3 @@ Comment[x-test]=xxConfigure the look and feel of window titlesxx Keywords=kwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decoration Keywords[fr]=kwin,fenêtre,gestionnaire,bordure,style,thème,apparence,ergonomie,disposition,bouton,poignée,bord,kwm,décoration Keywords[x-test]=xxkwin,window,manager,border,style,theme,look,feel,layout,button,handle,edge,kwm,decorationxx -Categories=Qt;KDE;X-KDE-settings-looknfeel; diff --git a/kcmkwin/kwinrules/CMakeLists.txt b/kcmkwin/kwinrules/CMakeLists.txt index 1c9d8c2bf0..2def58d0c5 100644 --- a/kcmkwin/kwinrules/CMakeLists.txt +++ b/kcmkwin/kwinrules/CMakeLists.txt @@ -39,7 +39,7 @@ install(TARGETS kcm_kwinrules DESTINATION ${PLUGIN_INSTALL_DIR} ) ########### install files ############### -install( FILES kwinrules.desktop DESTINATION ${XDG_APPS_DIR} ) +install( FILES kwinrules.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) diff --git a/kcmkwin/kwinrules/kcm.cpp b/kcmkwin/kwinrules/kcm.cpp index 94223c373b..3c0be52ab3 100644 --- a/kcmkwin/kwinrules/kcm.cpp +++ b/kcmkwin/kwinrules/kcm.cpp @@ -19,6 +19,7 @@ #include "kcm.h" #include +#include #include //Added by qt3to4: #include @@ -29,18 +30,14 @@ #include "ruleslist.h" -extern "C" - KDE_EXPORT KCModule *create_kwinrules( QWidget *parent, const char* ) - { - KInstance *inst = new KInstance("kcmkwinrules"); - return new KWinInternal::KCMRules( inst, parent ); - } +typedef KGenericFactory KCMRulesFactory; +K_EXPORT_COMPONENT_FACTORY(kwinrules, KCMRulesFactory("kcmkwinrules")) namespace KWinInternal { -KCMRules::KCMRules( KInstance *inst, QWidget *parent ) -: KCModule( inst, parent ) +KCMRules::KCMRules( QWidget *parent, const QStringList & ) +: KCModule( KCMRulesFactory::instance(), parent ) , config( "kwinrulesrc" ) { QVBoxLayout *layout = new QVBoxLayout( this ); diff --git a/kcmkwin/kwinrules/kcm.h b/kcmkwin/kwinrules/kcm.h index 7002bf3131..3bdbf873f7 100644 --- a/kcmkwin/kwinrules/kcm.h +++ b/kcmkwin/kwinrules/kcm.h @@ -25,6 +25,7 @@ class KConfig; class KAboutData; +class QStringList; namespace KWinInternal { @@ -36,7 +37,7 @@ class KCMRules { Q_OBJECT public: - KCMRules( KInstance *inst, QWidget *parent ); + KCMRules( QWidget *parent, const QStringList &args ); virtual void load(); virtual void save(); virtual void defaults(); diff --git a/kcmkwin/kwinrules/kwinrules.desktop b/kcmkwin/kwinrules/kwinrules.desktop index f1f4cd58f9..b509f631d9 100644 --- a/kcmkwin/kwinrules/kwinrules.desktop +++ b/kcmkwin/kwinrules/kwinrules.desktop @@ -1,12 +1,14 @@ [Desktop Entry] Encoding=UTF-8 Icon=kcmkwm -Type=Application +Type=Service +ServiceTypes=KCModule Exec=kcmshell kwinrules DocPath=kcontrol/windowmanagement/index.html X-KDE-Library=kwinrules X-KDE-FactoryName=kwinrules +X-KDE-ParentApp=kcontrol Name=Window-Specific Settings Name[fr]=Paramètres spécifiques à la fenêtre @@ -19,4 +21,3 @@ Comment[x-test]=xxConfigure settings specifically for a windowxx Keywords=size,position,state,window behavior,windows,specific,workarounds,remember,rules Keywords[fr]=taille,position,état,comportement de fenêtre,fenêtres,spécifique,astuces,souvenir,règles Keywords[x-test]=xxsize,position,state,window behavior,windows,specific,workarounds,remember,rulesxx -Categories=Qt;KDE;X-KDE-settings-desktop;