Diffstat (limited to 'core/pim/today/plugins/mail/mailplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/today/plugins/mail/mailplugin.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/core/pim/today/plugins/mail/mailplugin.cpp b/core/pim/today/plugins/mail/mailplugin.cpp index d497970..a37d506 100644 --- a/core/pim/today/plugins/mail/mailplugin.cpp +++ b/core/pim/today/plugins/mail/mailplugin.cpp @@ -11,50 +11,59 @@ * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ #include "mailplugin.h" -#include "mailpluginwidget.h" - MailPlugin::MailPlugin() { + m_widget = 0l; } MailPlugin::~MailPlugin() { + delete m_widget; } QString MailPlugin::pluginName() const { return QObject::tr( "Mail plugin" ); } double MailPlugin::versionNumber() const { return 0.6; } QString MailPlugin::pixmapNameWidget() const { return "mail/desktopicon"; } QWidget* MailPlugin::widget( QWidget * wid ) { - return new MailPluginWidget( wid, "Mail" ); + if(!m_widget) { + m_widget = new MailPluginWidget( wid, "Datebook" ); + } + return m_widget; } + QString MailPlugin::pixmapNameConfig() const { return 0l; } -TodayConfigWidget* MailPlugin::configWidget( QWidget* wid ) { +TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { return 0l; } QString MailPlugin::appName() const { return "mail"; } bool MailPlugin::excludeFromRefresh() const { return false; } +void MailPlugin::refresh() { + if ( m_widget ) { + m_widget->refresh(); + } +} |