summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-07-08 09:00:06 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-07-08 09:00:06 -0500
commitf3088bc3de7db3d3bf5234cb8327b2bfa1e0a025 (patch)
treee4fffc99d900c9c18b0472cdd091f8e74a1ab2f4
parent7badb5a24e6e361890778df4b6ef6ae62335f8f7 (diff)
downloadamarok-f3088bc3de7db3d3bf5234cb8327b2bfa1e0a025.tar.gz
amarok-f3088bc3de7db3d3bf5234cb8327b2bfa1e0a025.zip
Fix abort on startup due to oversized tray icon creation when icon widget has not yet been shown
-rw-r--r--amarok/src/systray.cpp18
-rw-r--r--amarok/src/systray.h2
-rw-r--r--config.h.in10
3 files changed, 24 insertions, 6 deletions
diff --git a/amarok/src/systray.cpp b/amarok/src/systray.cpp
index 7c6721e6..4b2f44b9 100644
--- a/amarok/src/systray.cpp
+++ b/amarok/src/systray.cpp
@@ -55,9 +55,9 @@ Amarok::TrayIcon::TrayIcon( TQWidget *playerWidget )
quit->disconnect();
connect( quit, TQT_SIGNAL(activated()), kapp, TQT_SLOT(quit()) );
- baseIcon = KSystemTray::loadSizedIcon( "amarok", width() );
- playOverlay = Amarok::loadOverlay( "play", width() );
- pauseOverlay = Amarok::loadOverlay( "pause", width() );
+ baseIcon = KSystemTray::loadIcon( "amarok" );
+ playOverlay = Amarok::loadOverlay( "play", baseIcon.width() );
+ pauseOverlay = Amarok::loadOverlay( "pause", baseIcon.width() );
overlayVisible = false;
//paintIcon();
@@ -102,7 +102,7 @@ Amarok::TrayIcon::event( TQEvent *e )
}
}
-void Amarok::TrayIcon::resizeEvent ( TQResizeEvent * )
+void Amarok::TrayIcon::resizeTrayIcon ()
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
baseIcon = KSystemTray::loadSizedIcon( "amarok", width() );
@@ -121,6 +121,16 @@ void Amarok::TrayIcon::resizeEvent ( TQResizeEvent * )
paintIcon( -1, true );
}
+void Amarok::TrayIcon::resizeEvent ( TQResizeEvent * )
+{
+ resizeTrayIcon();
+}
+
+void Amarok::TrayIcon::showEvent ( TQShowEvent * )
+{
+ resizeTrayIcon();
+}
+
void
Amarok::TrayIcon::engineStateChanged( Engine::State state, Engine::State /*oldState*/ )
{
diff --git a/amarok/src/systray.h b/amarok/src/systray.h
index fe9380d8..6e4e4da2 100644
--- a/amarok/src/systray.h
+++ b/amarok/src/systray.h
@@ -31,6 +31,7 @@ protected:
// get notified of 'highlight' color change
virtual void paletteChange( const TQPalette & oldPalette );
void resizeEvent ( TQResizeEvent * );
+ void showEvent ( TQShowEvent * );
private:
bool event( TQEvent* );
@@ -40,6 +41,7 @@ private:
void paintIcon( int mergePixels = -1, bool force = false );
// blend an overlay icon over 'sourcePixmap' and repaint trayIcon
void blendOverlay( TQPixmap &sourcePixmap );
+ void resizeTrayIcon();
long trackLength, mergeLevel;
TQPixmap baseIcon, grayedIcon, alternateIcon;
diff --git a/config.h.in b/config.h.in
index 86dab1c2..34a6a06f 100644
--- a/config.h.in
+++ b/config.h.in
@@ -106,10 +106,13 @@
/* have mp4v2 */
#undef HAVE_MP4V2
-/* Define to 1 if you have the <mp4v2/mp4v2.h> header file. */
+/* have mp4v2 h */
#undef HAVE_MP4V2_H
-/* Define to 1 if you have the <mp4.h> header file. */
+/* Define to 1 if you have the <mp4v2/mp4v2.h> header file. */
+#undef HAVE_MP4V2_MP4V2_H
+
+/* have mp4 h */
#undef HAVE_MP4_H
/* have NMM */
@@ -399,6 +402,9 @@ int snprintf(char *str, size_t n, char const *fmt, ...);
#endif
+/* define to 1 if -fvisibility is supported */
+#undef __KDE_HAVE_GCC_VISIBILITY
+
#if defined(__SVR4) && !defined(__svr4__)
#define __svr4__ 1