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 | |||
@@ -15,15 +15,15 @@ | |||
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | 16 | ||
17 | 17 | ||
18 | #include "mailplugin.h" | 18 | #include "mailplugin.h" |
19 | #include "mailpluginwidget.h" | ||
20 | |||
21 | 19 | ||
22 | MailPlugin::MailPlugin() { | 20 | MailPlugin::MailPlugin() { |
21 | m_widget = 0l; | ||
23 | } | 22 | } |
24 | 23 | ||
25 | MailPlugin::~MailPlugin() { | 24 | MailPlugin::~MailPlugin() { |
25 | delete m_widget; | ||
26 | } | 26 | } |
27 | 27 | ||
28 | QString MailPlugin::pluginName() const { | 28 | QString MailPlugin::pluginName() const { |
29 | return QObject::tr( "Mail plugin" ); | 29 | return QObject::tr( "Mail plugin" ); |
@@ -37,16 +37,20 @@ QString MailPlugin::pixmapNameWidget() const { | |||
37 | return "mail/desktopicon"; | 37 | return "mail/desktopicon"; |
38 | } | 38 | } |
39 | 39 | ||
40 | QWidget* MailPlugin::widget( QWidget * wid ) { | 40 | QWidget* MailPlugin::widget( QWidget * wid ) { |
41 | return new MailPluginWidget( wid, "Mail" ); | 41 | if(!m_widget) { |
42 | m_widget = new MailPluginWidget( wid, "Datebook" ); | ||
43 | } | ||
44 | return m_widget; | ||
42 | } | 45 | } |
43 | 46 | ||
47 | |||
44 | QString MailPlugin::pixmapNameConfig() const { | 48 | QString MailPlugin::pixmapNameConfig() const { |
45 | return 0l; | 49 | return 0l; |
46 | } | 50 | } |
47 | 51 | ||
48 | TodayConfigWidget* MailPlugin::configWidget( QWidget* wid ) { | 52 | TodayConfigWidget* MailPlugin::configWidget( QWidget* ) { |
49 | return 0l; | 53 | return 0l; |
50 | } | 54 | } |
51 | 55 | ||
52 | QString MailPlugin::appName() const { | 56 | QString MailPlugin::appName() const { |
@@ -57,4 +61,9 @@ QString MailPlugin::appName() const { | |||
57 | bool MailPlugin::excludeFromRefresh() const { | 61 | bool MailPlugin::excludeFromRefresh() const { |
58 | return false; | 62 | return false; |
59 | } | 63 | } |
60 | 64 | ||
65 | void MailPlugin::refresh() { | ||
66 | if ( m_widget ) { | ||
67 | m_widget->refresh(); | ||
68 | } | ||
69 | } | ||