[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdepim/kontact
From: Daniel Molkentin <molkentin () kde ! org>
Date: 2003-11-09 22:40:12
[Download RAW message or body]
CVS commit by danimo:
Preload certain plugins entirely. Currently only kmail does this.
This will allow to fix at least the summary view and the "summaryview
has no valid "new" action" bug.
M +2 -0 interfaces/kontactplugin.desktop 1.58
M +1 -0 plugins/kmail/kmailplugin.desktop 1.26
M +13 -0 src/mainwindow.cpp 1.87
M +1 -0 src/mainwindow.h 1.38
--- kdepim/kontact/interfaces/kontactplugin.desktop #1.57:1.58
@@ -29,2 +29,4 @@
[PropertyDef::X-KDE-KontactPartExecutableName]
Type=QString
+[PropertyDef::X-KDE-KontactPartLoadOnStart]
+Type=bool
--- kdepim/kontact/plugins/kmail/kmailplugin.desktop #1.25:1.26
@@ -9,4 +9,5 @@
X-KDE-KontactPartLibraryName=libkmailpart
X-KDE-KontactPartExecutableName=kmail
+X-KDE-KontactPartLoadOnStart=true
X-KDE-PluginInfo-Website=http://kmail.kde.org/
--- kdepim/kontact/src/mainwindow.cpp #1.86:1.87
@@ -230,4 +230,5 @@ void MainWindow::loadPlugins()
{
QPtrList<Plugin> plugins;
+ QPtrList<KParts::Part> loadDelayed;
uint i;
@@ -255,4 +256,10 @@ void MainWindow::loadPlugins()
QVariant libNameProp = ( *it )->property( "X-KDE-KontactPartLibraryName" );
QVariant exeNameProp = ( *it )->property( "X-KDE-KontactPartExecutableName" );
+ QVariant loadOnStart = ( *it )->property( "X-KDE-KontactPartLoadOnStart" );
+
+ if (!loadOnStart.isNull() && loadOnStart.toBool() )
+ {
+ mDelayedPreload.append(plugin);
+ }
kdDebug() << "LIBNAMEPART: " << libNameProp.toString() << endl;
@@ -450,4 +458,9 @@ void MainWindow::loadSettings()
if ( mSplitter )
mSplitter->setSizes( Prefs::self()->mSidePaneSplitter );
+
+ // Preload Plugins. This _must_ happen before the default part is loaded
+ PluginList::ConstIterator it;
+ for ( it = mDelayedPreload.begin(); it != mDelayedPreload.end(); ++it )
+ selectPlugin( *it );
selectPlugin( Prefs::self()->mActivePlugin );
--- kdepim/kontact/src/mainwindow.h #1.37:1.38
@@ -131,4 +131,5 @@ class MainWindow : public Kontact::Core,
typedef QValueList<Kontact::Plugin*> PluginList;
PluginList mPlugins;
+ PluginList mDelayedPreload;
QValueList<KPluginInfo*> mPluginInfos;
KParts::InfoExtension *mLastInfoExtension;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic