plugins.cpp

00001 /*****************************************************************
00002  KWin - the KDE window manager
00003  This file is part of the KDE project.
00004 
00005 Copyright (C) 1999, 2000    Daniel M. Duley <mosfet@kde.org>
00006 Copyright (C) 2003 Lubos Lunak <l.lunak@kde.org>
00007 
00008 You can Freely distribute this program under the GNU General Public
00009 License. See the file "COPYING" for the exact licensing terms.
00010 ******************************************************************/
00011 
00012 #include "plugins.h"
00013 
00014 #include <kglobal.h>
00015 #include <klocale.h>
00016 #include <stdlib.h>
00017 #include <qpixmap.h>
00018 #include <kstandarddirs.h>
00019 namespace KWinInternal
00020 {
00021 
00022 PluginMgr::PluginMgr()
00023     : KDecorationPlugins( KGlobal::config())
00024     {
00025    if( !KStandardDirs::isDiscovery())
00026        defaultPlugin = (QPixmap::defaultDepth() > 8) ?
00027                "kwin3_iaora" : "kwin3_quartz";
00028    else
00029         defaultPlugin = (QPixmap::defaultDepth() > 8) ?
00030                 "kwin3_plastik" : "kwin3_quartz";
00031     loadPlugin( "" ); // load the plugin specified in cfg file
00032     }
00033 
00034 void PluginMgr::error( const QString &error_msg )
00035     {
00036     qWarning( "%s", (i18n("KWin: ") + error_msg +
00037                     i18n("\nKWin will now exit...")).local8Bit().data() );
00038     exit(1);
00039     }
00040 
00041 bool PluginMgr::provides( Requirement )
00042     {
00043     return false;
00044     }
00045 
00046 } // namespace
KDE Home | KDE Accessibility Home | Description of Access Keys