Commit following patch per upstream's suggestion:

commit 7dbec1171386f182be77942ae43dc3684a96cfc4
Author: Mark Kretschmann <kretschmann@kde.org>
Date:   Sat Oct 2 09:06:11 2010 +0200

    Better workaround for wrong applet size on startup.

    This version also works in the case that Amarok was hidden to
    tray before starting, and it does not produce a jerking motion
    when starting in fullscreen mode.
    Thanks to Felix Geyer <debfx-pkg@fobos.de> for the idea.

    It might worth to include this patch in Amarok packages.

Bump PKGREVISION.
This commit is contained in:
wiz 2010-10-02 10:08:31 +00:00
parent 310c689276
commit ffe5bfa9b2
6 changed files with 139 additions and 3 deletions

View file

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.88 2010/09/24 09:44:51 wiz Exp $
# $NetBSD: Makefile,v 1.89 2010/10/02 10:08:31 wiz Exp $
#
DISTNAME= amarok-${VERS}
VERS= 2.3.2
PKGREVISION= 1
PKGREVISION= 2
CATEGORIES= audio multimedia
#MASTER_SITES= http://download.kde.org/unstable/amarok/${VERS}/src/ \
# ftp://gd.tuwien.ac.at/kde/unstable/amarok/${VERS}/src/

View file

@ -1,7 +1,11 @@
$NetBSD: distinfo,v 1.43 2010/09/24 09:44:51 wiz Exp $
$NetBSD: distinfo,v 1.44 2010/10/02 10:08:31 wiz Exp $
SHA1 (amarok-2.3.2.tar.bz2) = 594d6d3ad57832fb80ba4387459356132d37ace2
RMD160 (amarok-2.3.2.tar.bz2) = 3c2a7868fb7b3f74e35e124cf3a8bad5d8653390
Size (amarok-2.3.2.tar.bz2) = 13948250 bytes
SHA1 (patch-aa) = 30de693fabd0ac8637c049e5357fd08fadd4ceed
SHA1 (patch-ab) = 152a6c0516dcab316c4f90480f1bb7fb46eabfbe
SHA1 (patch-ac) = 22c385f4633a828dd6b812e461836c1a1284c1a6
SHA1 (patch-ad) = 682691c8f730df13a0a3424a91fda0898fc2626e
SHA1 (patch-ae) = a5869b106a704afde677a54b894e3848c9f929eb
SHA1 (patch-af) = 8193e7504c5730813309b6ef9f172ef14dc0da9f

View file

@ -0,0 +1,36 @@
$NetBSD: patch-ac,v 1.8 2010/10/02 10:08:31 wiz Exp $
commit 7dbec1171386f182be77942ae43dc3684a96cfc4
Author: Mark Kretschmann <kretschmann@kde.org>
Date: Sat Oct 2 09:06:11 2010 +0200
Better workaround for wrong applet size on startup.
This version also works in the case that Amarok was hidden to
tray before starting, and it does not produce a jerking motion
when starting in fullscreen mode.
Thanks to Felix Geyer <debfx-pkg@fobos.de> for the idea.
It might worth to include this patch in Amarok packages.
--- src/App.cpp.orig 2010-09-15 21:24:11.000000000 +0000
+++ src/App.cpp
@@ -787,18 +787,6 @@ App::continueInit()
aUrl.run();
}
s_delayedAmarokUrls.clear();
-
- QTimer::singleShot( 1500, this, SLOT( resizeMainWindow() ) );
-}
-
-
-void App::resizeMainWindow() // SLOT
-{
- // HACK
- // This code works around a bug in KDE 4.5, which causes our Plasma applets to show
- // with a wrong initial size. Remove when this bug is fixed in Plasma.
- m_mainWindow->resize( m_mainWindow->width(), m_mainWindow->height() - 1 );
- m_mainWindow->resize( m_mainWindow->width(), m_mainWindow->height() + 1 );
}

View file

@ -0,0 +1,25 @@
$NetBSD: patch-ad,v 1.3 2010/10/02 10:08:31 wiz Exp $
commit 7dbec1171386f182be77942ae43dc3684a96cfc4
Author: Mark Kretschmann <kretschmann@kde.org>
Date: Sat Oct 2 09:06:11 2010 +0200
Better workaround for wrong applet size on startup.
This version also works in the case that Amarok was hidden to
tray before starting, and it does not produce a jerking motion
when starting in fullscreen mode.
Thanks to Felix Geyer <debfx-pkg@fobos.de> for the idea.
It might worth to include this patch in Amarok packages.
--- src/App.h.orig 2010-09-15 21:24:11.000000000 +0000
+++ src/App.h
@@ -83,7 +83,6 @@ class AMAROK_EXPORT App : public KUnique
private slots:
void continueInit();
- void resizeMainWindow();
public slots:
void applySettings( bool firstTime = false );

View file

@ -0,0 +1,46 @@
$NetBSD: patch-ae,v 1.1 2010/10/02 10:08:31 wiz Exp $
commit 7dbec1171386f182be77942ae43dc3684a96cfc4
Author: Mark Kretschmann <kretschmann@kde.org>
Date: Sat Oct 2 09:06:11 2010 +0200
Better workaround for wrong applet size on startup.
This version also works in the case that Amarok was hidden to
tray before starting, and it does not produce a jerking motion
when starting in fullscreen mode.
Thanks to Felix Geyer <debfx-pkg@fobos.de> for the idea.
It might worth to include this patch in Amarok packages.
--- src/MainWindow.cpp.orig 2010-09-15 21:24:11.000000000 +0000
+++ src/MainWindow.cpp
@@ -506,6 +506,13 @@ MainWindow::showEvent(QShowEvent* e)
if (!m_layoutEverRestored)
restoreLayout();
+ static bool windowEverShown = false;
+ if ( !windowEverShown )
+ {
+ windowEverShown = true;
+ QTimer::singleShot( 250, this, SLOT( resizeWindowHack() ) );
+ }
+
QWidget::showEvent(e);
}
@@ -1704,4 +1711,14 @@ MainWindow::isWaitingForCd() const
return m_waitingForCd;
}
+void
+MainWindow::resizeWindowHack()
+{
+ // HACK
+ // This code works around a bug in KDE 4.5, which causes our Plasma applets to show
+ // with a wrong initial size. Remove when this bug is fixed in Plasma.
+ resize( width(), height() - 1 );
+ resize( width(), height() + 1 );
+}
+
#include "MainWindow.moc"

View file

@ -0,0 +1,25 @@
$NetBSD: patch-af,v 1.1 2010/10/02 10:08:31 wiz Exp $
commit 7dbec1171386f182be77942ae43dc3684a96cfc4
Author: Mark Kretschmann <kretschmann@kde.org>
Date: Sat Oct 2 09:06:11 2010 +0200
Better workaround for wrong applet size on startup.
This version also works in the case that Amarok was hidden to
tray before starting, and it does not produce a jerking motion
when starting in fullscreen mode.
Thanks to Felix Geyer <debfx-pkg@fobos.de> for the idea.
It might worth to include this patch in Amarok packages.
--- src/MainWindow.h.orig 2010-09-15 21:24:11.000000000 +0000
+++ src/MainWindow.h
@@ -148,6 +148,7 @@ class AMAROK_EXPORT MainWindow : public
void slotAddStream();
void slotJumpTo();
void showScriptSelector();
+ void resizeWindowHack();
#ifdef DEBUG_BUILD_TYPE
void showNetworkRequestViewer();
#endif // DEBUG_BUILD_TYPE