summaryrefslogtreecommitdiffstats
path: root/knotes
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-07-07 19:51:30 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-07-07 19:51:30 -0500
commit8231cc23f3e8b266a6b0e229865905233e867cbf (patch)
treec3392a7bf9a843f9f46de3bee0ec895ce4d2a068 /knotes
parent93aee1b625df28b290eaf0779ee241ddce27cb69 (diff)
downloadtdepim-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 'knotes')
-rw-r--r--knotes/knotesapp.cpp16
-rw-r--r--knotes/knotesapp.h2
2 files changed, 16 insertions, 2 deletions
diff --git a/knotes/knotesapp.cpp b/knotes/knotesapp.cpp
index 26aee48c3..14fd625b9 100644
--- a/knotes/knotesapp.cpp
+++ b/knotes/knotesapp.cpp
@@ -105,7 +105,7 @@ KNotesApp::KNotesApp()
KWin::setSystemTrayWindowFor( winId(), tqt_xrootwin() );
TQToolTip::add( this, i18n( "KNotes: Sticky notes for TDE" ) );
setBackgroundMode( X11ParentRelative );
- setPixmap( KSystemTray::loadSizedIcon( "knotes", TQWidget::width() ) );
+ setPixmap( KSystemTray::loadIcon( "knotes" ) );
// set the initial style
KNote::setStyle( KNotesGlobalConfig::style() );
@@ -210,7 +210,7 @@ KNotesApp::KNotesApp()
updateNoteActions();
}
-void KNotesApp::resizeEvent ( TQResizeEvent * )
+void KNotesApp::resizeTrayIcon ()
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
TQPixmap origpixmap;
@@ -223,6 +223,18 @@ void KNotesApp::resizeEvent ( TQResizeEvent * )
setPixmap(scaledpixmap);
}
+void KNotesApp::resizeEvent ( TQResizeEvent * )
+{
+ // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
+ resizeTrayIcon();
+}
+
+void KNotesApp::showEvent ( TQShowEvent * )
+{
+ // Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
+ resizeTrayIcon();
+}
+
KNotesApp::~KNotesApp()
{
saveNotes();
diff --git a/knotes/knotesapp.h b/knotes/knotesapp.h
index 2c2656f3a..0888e20bb 100644
--- a/knotes/knotesapp.h
+++ b/knotes/knotesapp.h
@@ -104,6 +104,7 @@ public slots:
protected:
void mousePressEvent( TQMouseEvent* );
void resizeEvent ( TQResizeEvent * );
+ void showEvent ( TQShowEvent * );
protected slots:
void slotShowNote();
@@ -122,6 +123,7 @@ protected slots:
private:
void showNote( KNote *note ) const;
void saveConfigs();
+ void resizeTrayIcon();
private slots:
void acceptConnection();