diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-07-07 19:51:30 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2014-07-07 19:51:30 -0500 |
commit | 8231cc23f3e8b266a6b0e229865905233e867cbf (patch) | |
tree | c3392a7bf9a843f9f46de3bee0ec895ce4d2a068 /korganizer | |
parent | 93aee1b625df28b290eaf0779ee241ddce27cb69 (diff) | |
download | tdepim-8231cc23f3e8b266a6b0e229865905233e867cbf.tar.gz tdepim-8231cc23f3e8b266a6b0e229865905233e867cbf.zip |
Fix korgac abort on startup due to oversized tray icon creation when icon widget has not yet been shown
Properly print caldav/carddav wallet warnings to prevent backtrace spew
Diffstat (limited to 'korganizer')
-rw-r--r-- | korganizer/korgac/alarmdockwindow.cpp | 16 | ||||
-rw-r--r-- | korganizer/korgac/alarmdockwindow.h | 4 |
2 files changed, 17 insertions, 3 deletions
diff --git a/korganizer/korgac/alarmdockwindow.cpp b/korganizer/korgac/alarmdockwindow.cpp index f8f15addf..1f5d5b33c 100644 --- a/korganizer/korgac/alarmdockwindow.cpp +++ b/korganizer/korgac/alarmdockwindow.cpp @@ -58,8 +58,8 @@ AlarmDockWindow::AlarmDockWindow( const char *name ) // Set up icons TDEGlobal::iconLoader()->addAppDir( "korgac" ); - mPixmapEnabled = loadSizedIcon( "korgac", width() ); - mPixmapDisabled = loadSizedIcon( "korgac_disabled", width() ); + mPixmapEnabled = loadIcon( "korgac" ); + mPixmapDisabled = loadIcon( "korgac_disabled" ); setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled ); @@ -104,7 +104,7 @@ AlarmDockWindow::~AlarmDockWindow() { } -void AlarmDockWindow::resizeEvent ( TQResizeEvent * ) +void AlarmDockWindow::resizeTrayIcon () { // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes mPixmapEnabled = loadSizedIcon( "korgac", width() ); @@ -115,6 +115,16 @@ void AlarmDockWindow::resizeEvent ( TQResizeEvent * ) setPixmap( alarmsEnabled ? mPixmapEnabled : mPixmapDisabled ); } +void AlarmDockWindow::resizeEvent ( TQResizeEvent * ) +{ + resizeTrayIcon(); +} + +void AlarmDockWindow::showEvent ( TQShowEvent * ) +{ + resizeTrayIcon(); +} + void AlarmDockWindow::slotUpdate( int reminders ) { TQToolTip::remove( this ); diff --git a/korganizer/korgac/alarmdockwindow.h b/korganizer/korgac/alarmdockwindow.h index 6f317fda8..6f6cd7bdb 100644 --- a/korganizer/korgac/alarmdockwindow.h +++ b/korganizer/korgac/alarmdockwindow.h @@ -52,6 +52,7 @@ class AlarmDockWindow : public KSystemTray void mousePressEvent( TQMouseEvent * ); // void closeEvent( TQCloseEvent * ); void resizeEvent ( TQResizeEvent * ); + void showEvent ( TQShowEvent * ); protected slots: void slotQuit(); @@ -59,6 +60,9 @@ class AlarmDockWindow : public KSystemTray void slotDismissAll(); private: + void resizeTrayIcon(); + + private: TQPixmap mPixmapEnabled; TQPixmap mPixmapDisabled; TQString mName; |