- KGenericFactory

- make 'em services

svn path=/trunk/KDE/kdebase/workspace/; revision=564565
This commit is contained in:
Matthias Kretz 2006-07-20 13:26:37 +00:00
parent ec2b5dff3c
commit 581feff4ec
6 changed files with 17 additions and 17 deletions

View file

@ -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} )

View file

@ -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;

View file

@ -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} )

View file

@ -19,6 +19,7 @@
#include "kcm.h"
#include <kglobal.h>
#include <kgenericfactory.h>
#include <QLayout>
//Added by qt3to4:
#include <QVBoxLayout>
@ -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<KWinInternal::KCMRules> 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 );

View file

@ -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();

View file

@ -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;