summaryrefslogtreecommitdiff
path: root/testing/amarok/toolbarfix.patch
blob: ec012ca7431934b39a52bbf0bcc541816d9ef78b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff -rup amarok-2.5.0/src/context/toolbar/AppletToolbar.cpp amarok-2.5.0.new/src/context/toolbar/AppletToolbar.cpp
--- amarok-2.5.0/src/context/toolbar/AppletToolbar.cpp	2011-12-15 08:36:48.000000000 +0100
+++ amarok-2.5.0.new/src/context/toolbar/AppletToolbar.cpp	2012-01-29 20:20:01.901360205 +0100
@@ -108,6 +108,17 @@ Context::AppletToolbar::appletRemoved( P
     }
 }
 
+void Context::AppletToolbar::setContainment( Containment * containment )
+{
+    m_cont = containment;
+}
+
+Context::Containment *
+Context::AppletToolbar::containment() const
+{
+    return m_cont;
+}
+
 QSizeF
 Context::AppletToolbar::sizeHint( Qt::SizeHint which, const QSizeF &constraint ) const
 {
Only in amarok-2.5.0.new/src/context/toolbar: AppletToolbar.cpp.orig
Only in amarok-2.5.0.new/src/context/toolbar: AppletToolbar.cpp.rej
diff -rup amarok-2.5.0/src/context/toolbar/AppletToolbar.h amarok-2.5.0.new/src/context/toolbar/AppletToolbar.h
--- amarok-2.5.0/src/context/toolbar/AppletToolbar.h	2011-12-15 08:36:48.000000000 +0100
+++ amarok-2.5.0.new/src/context/toolbar/AppletToolbar.h	2012-01-29 20:17:52.414686784 +0100
@@ -55,6 +55,9 @@ class AppletToolbar : public QGraphicsWi
         
         void appletRemoved( Plasma::Applet* applet );
 
+        void setContainment( Containment * containment );
+        Containment* containment() const;
+
     signals:
         void showApplet( Plasma::Applet* );
         void appletAddedToToolbar( Plasma::Applet* applet, int loc );
Only in amarok-2.5.0.new/src/context/toolbar: AppletToolbar.h.orig
diff -rup amarok-2.5.0/src/context/ToolbarView.cpp amarok-2.5.0.new/src/context/ToolbarView.cpp
--- amarok-2.5.0/src/context/ToolbarView.cpp	2011-12-15 08:36:48.000000000 +0100
+++ amarok-2.5.0.new/src/context/ToolbarView.cpp	2012-01-29 20:17:52.394686782 +0100
@@ -74,7 +74,9 @@ Context::ToolbarView::ToolbarView( Plasm
     setVerticalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
 
     // now we create the toolbar
-    m_toolbar = new AppletToolbar( containment );
+    m_toolbar = new AppletToolbar(0);
+    scene->addItem(m_toolbar.data());
+    m_toolbar.data()->setContainment( qobject_cast<Context::Containment *>(containment) );
     m_toolbar.data()->setZValue( m_toolbar.data()->zValue() + 1000 );
     m_toolbar.data()->setPos( TOOLBAR_X_OFFSET, 0 );
 
@@ -96,7 +98,7 @@ Context::ToolbarView::ToolbarView( Plasm
 
 Context::ToolbarView::~ToolbarView()
 {
-
+    delete m_toolbar.data();
 }
 
 void
Only in amarok-2.5.0.new/src/context: ToolbarView.cpp.orig