-rw-r--r-- | core/launcher/desktop.cpp | 6 | ||||
-rw-r--r-- | core/launcher/launcher.cpp | 6 | ||||
-rw-r--r-- | core/launcher/launcher.pro | 2 | ||||
-rw-r--r-- | core/launcher/runningappbar.cpp | 287 | ||||
-rw-r--r-- | core/launcher/runningappbar.h | 88 | ||||
-rw-r--r-- | core/launcher/startmenu.cpp | 4 | ||||
-rw-r--r-- | core/launcher/taskbar.cpp | 21 | ||||
-rw-r--r-- | core/launcher/taskbar.h | 10 |
8 files changed, 405 insertions, 19 deletions
diff --git a/core/launcher/desktop.cpp b/core/launcher/desktop.cpp index a19e4c6..bca95b2 100644 --- a/core/launcher/desktop.cpp +++ b/core/launcher/desktop.cpp | |||
@@ -22,5 +22,5 @@ | |||
22 | #include "info.h" | 22 | #include "info.h" |
23 | #include "launcher.h" | 23 | #include "launcher.h" |
24 | #include "mrulist.h" | 24 | //#include "mrulist.h" |
25 | #include "qcopbridge.h" | 25 | #include "qcopbridge.h" |
26 | #include "shutdownimpl.h" | 26 | #include "shutdownimpl.h" |
@@ -319,5 +319,5 @@ void DesktopApplication::switchLCD ( bool on ) | |||
319 | if ( qApp ) { | 319 | if ( qApp ) { |
320 | DesktopApplication *dapp = (DesktopApplication *) qApp; | 320 | DesktopApplication *dapp = (DesktopApplication *) qApp; |
321 | 321 | ||
322 | if ( dapp-> m_screensaver ) | 322 | if ( dapp-> m_screensaver ) |
323 | dapp-> m_screensaver-> setBacklight ( on ? -3 : -1 ); | 323 | dapp-> m_screensaver-> setBacklight ( on ? -3 : -1 ); |
@@ -728,5 +728,5 @@ void Desktop::executeOrModify( const QString& appLnkFile ) | |||
728 | Global::terminateBuiltin( "calibrate" ); | 728 | Global::terminateBuiltin( "calibrate" ); |
729 | if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { | 729 | if ( QCopChannel::isRegistered( "QPE/Application/" + app ) ) { |
730 | MRUList::addTask( &lnk ); | 730 | //MRUList::addTask( &lnk ); |
731 | if ( hasVisibleWindow( app ) ) | 731 | if ( hasVisibleWindow( app ) ) |
732 | QCopChannel::send( "QPE/Application/" + app, "nextView()" ); | 732 | QCopChannel::send( "QPE/Application/" + app, "nextView()" ); |
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index effcd24..fd89410 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp | |||
@@ -59,5 +59,5 @@ | |||
59 | #include "desktop.h" | 59 | #include "desktop.h" |
60 | #include <qpe/lnkproperties.h> | 60 | #include <qpe/lnkproperties.h> |
61 | #include "mrulist.h" | 61 | //#include "mrulist.h" |
62 | #include "qrsync.h" | 62 | #include "qrsync.h" |
63 | #include <stdlib.h> | 63 | #include <stdlib.h> |
@@ -731,6 +731,6 @@ void Launcher::systemMessage( const QCString &msg, const QByteArray &data) | |||
731 | QString app; | 731 | QString app; |
732 | stream >> app; | 732 | stream >> app; |
733 | qWarning("app closed %s", app.latin1() ); | 733 | //qWarning("app closed %s", app.latin1() ); |
734 | MRUList::removeTask( app ); | 734 | // MRUList::removeTask( app ); |
735 | }else if ( msg == "linkChanged(QString)" ) { | 735 | }else if ( msg == "linkChanged(QString)" ) { |
736 | QString link; | 736 | QString link; |
diff --git a/core/launcher/launcher.pro b/core/launcher/launcher.pro index 5b32bc3..0e557aa 100644 --- a/core/launcher/launcher.pro +++ b/core/launcher/launcher.pro | |||
@@ -11,4 +11,5 @@ HEADERS = background.h \ | |||
11 | sidething.h \ | 11 | sidething.h \ |
12 | mrulist.h \ | 12 | mrulist.h \ |
13 | runningappbar.h \ | ||
13 | stabmon.h \ | 14 | stabmon.h \ |
14 | inputmethods.h \ | 15 | inputmethods.h \ |
@@ -52,4 +53,5 @@ SOURCES = background.cpp \ | |||
52 | sidething.cpp \ | 53 | sidething.cpp \ |
53 | mrulist.cpp \ | 54 | mrulist.cpp \ |
55 | runningappbar.cpp \ | ||
54 | stabmon.cpp \ | 56 | stabmon.cpp \ |
55 | inputmethods.cpp \ | 57 | inputmethods.cpp \ |
diff --git a/core/launcher/runningappbar.cpp b/core/launcher/runningappbar.cpp new file mode 100644 index 0000000..298f671 --- a/dev/null +++ b/core/launcher/runningappbar.cpp | |||
@@ -0,0 +1,287 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | ********************************************************************** | ||
20 | */ | ||
21 | |||
22 | #define QTOPIA_INTERNAL_PRELOADACCESS | ||
23 | |||
24 | // For "kill" | ||
25 | #include <sys/types.h> | ||
26 | #include <signal.h> | ||
27 | |||
28 | #include <qtimer.h> | ||
29 | #include <qpopupmenu.h> | ||
30 | #include <qmessagebox.h> | ||
31 | #include <qpainter.h> | ||
32 | #include "qprocess.h" | ||
33 | #include <qpe/qpeapplication.h> | ||
34 | #include <qpe/applnk.h> | ||
35 | #include <qpe/qcopenvelope_qws.h> | ||
36 | #include <qpe/global.h> | ||
37 | #include <qwindowsystem_qws.h> | ||
38 | #include "runningappbar.h" | ||
39 | |||
40 | RunningAppBar::RunningAppBar(QWidget* parent) | ||
41 | : QFrame(parent), m_AppLnkSet(0L), m_SelectedAppIndex(-1) | ||
42 | { | ||
43 | m_AppLnkSet = new AppLnkSet( QPEApplication::qpeDir() + "apps" ); | ||
44 | |||
45 | connect(qwsServer, SIGNAL(newChannel(const QString&)), this, SLOT(newQcopChannel(const QString&))); | ||
46 | connect(qwsServer, SIGNAL(removedChannel(const QString&)), this, SLOT(removedQcopChannel(const QString&))); | ||
47 | QCopChannel* channel = new QCopChannel( "QPE/System", this ); | ||
48 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | ||
49 | this, SLOT(received(const QCString&, const QByteArray&)) ); | ||
50 | |||
51 | spacing = AppLnk::smallIconSize()+3; | ||
52 | } | ||
53 | |||
54 | RunningAppBar::~RunningAppBar() { | ||
55 | } | ||
56 | |||
57 | void RunningAppBar::newQcopChannel(const QString& channelName) { | ||
58 | QString prefix("QPE/Application/"); | ||
59 | if (channelName.startsWith(prefix)) { | ||
60 | QString appName = channelName.mid(prefix.length()); | ||
61 | // qDebug("App %s just connected!", appName.latin1()); | ||
62 | const AppLnk* newGuy = m_AppLnkSet->findExec(appName); | ||
63 | if (newGuy && !newGuy->isPreloaded()) { | ||
64 | addTask(*newGuy); | ||
65 | } | ||
66 | } | ||
67 | } | ||
68 | |||
69 | void RunningAppBar::removedQcopChannel(const QString& channelName) { | ||
70 | QString prefix("QPE/Application/"); | ||
71 | if (channelName.startsWith(prefix)) { | ||
72 | QString appName = channelName.mid(prefix.length()); | ||
73 | qDebug("App %s just disconnected!", appName.latin1()); | ||
74 | const AppLnk* newGuy = m_AppLnkSet->findExec(appName); | ||
75 | if (newGuy) { | ||
76 | removeTask(*newGuy); | ||
77 | } | ||
78 | } | ||
79 | } | ||
80 | |||
81 | void RunningAppBar::received(const QCString& msg, const QByteArray& data) { | ||
82 | // Since fast apps appear and disappear without disconnecting from their | ||
83 | // channel we need to watch for the showing/hiding events and update according. | ||
84 | QDataStream stream( data, IO_ReadOnly ); | ||
85 | if ( msg == "fastAppShowing(QString)") { | ||
86 | QString appName; | ||
87 | stream >> appName; | ||
88 | addTask(*m_AppLnkSet->findExec(appName)); | ||
89 | } else if ( msg == "fastAppHiding(QString)") { | ||
90 | QString appName; | ||
91 | stream >> appName; | ||
92 | removeTask(*m_AppLnkSet->findExec(appName)); | ||
93 | } | ||
94 | } | ||
95 | |||
96 | void RunningAppBar::addTask(const AppLnk& appLnk) { | ||
97 | // qDebug("Added %s to app list.", appLnk.name().latin1()); | ||
98 | AppLnk* newApp = new AppLnk(appLnk); | ||
99 | newApp->setExec(appLnk.exec()); | ||
100 | m_AppList.prepend(newApp); | ||
101 | update(); | ||
102 | } | ||
103 | |||
104 | void RunningAppBar::removeTask(const AppLnk& appLnk) { | ||
105 | unsigned int i = 0; | ||
106 | for (; i < m_AppList.count() ; i++) { | ||
107 | AppLnk* target = m_AppList.at(i); | ||
108 | if (target->exec() == appLnk.exec()) { | ||
109 | qDebug("Removing %s from app list.", appLnk.name().latin1()); | ||
110 | m_AppList.remove(); | ||
111 | delete target; | ||
112 | } | ||
113 | } | ||
114 | update(); | ||
115 | } | ||
116 | |||
117 | void RunningAppBar::mousePressEvent(QMouseEvent *e) | ||
118 | { | ||
119 | // Find out if the user is clicking on an app icon... | ||
120 | // If so, snag the index so when we repaint we show it | ||
121 | // as highlighed. | ||
122 | m_SelectedAppIndex = 0; | ||
123 | int x=0; | ||
124 | QListIterator<AppLnk> it( m_AppList ); | ||
125 | for ( ; it.current(); ++it,++m_SelectedAppIndex,x+=spacing ) { | ||
126 | if ( x + spacing <= width() ) { | ||
127 | if ( e->x() >= x && e->x() < x+spacing ) { | ||
128 | if ( m_SelectedAppIndex < (int)m_AppList.count() ) { | ||
129 | repaint(FALSE); | ||
130 | return; | ||
131 | } | ||
132 | } | ||
133 | } else { | ||
134 | break; | ||
135 | } | ||
136 | } | ||
137 | m_SelectedAppIndex = -1; | ||
138 | repaint( FALSE ); | ||
139 | } | ||
140 | |||
141 | void RunningAppBar::mouseReleaseEvent(QMouseEvent *e) | ||
142 | { | ||
143 | if (e->button() == QMouseEvent::RightButton) { | ||
144 | return; | ||
145 | } | ||
146 | if ( m_SelectedAppIndex >= 0 ) { | ||
147 | QString channel = QString("QPE/Application/") + m_AppList.at(m_SelectedAppIndex)->exec(); | ||
148 | if (QCopChannel::isRegistered(channel.latin1())) { | ||
149 | // qDebug("%s is running!", m_AppList.at(m_SelectedAppIndex)->exec().latin1()); | ||
150 | QCopEnvelope e(channel.latin1(), "raise()"); | ||
151 | // This class will delete itself after hearing from the app or the timer expiring | ||
152 | (void)new AppMonitor(*m_AppList.at(m_SelectedAppIndex), *this); | ||
153 | } | ||
154 | else { | ||
155 | removeTask(*m_AppList.at(m_SelectedAppIndex)); | ||
156 | } | ||
157 | |||
158 | m_SelectedAppIndex = -1; | ||
159 | update(); | ||
160 | } | ||
161 | } | ||
162 | |||
163 | void RunningAppBar::paintEvent( QPaintEvent * ) | ||
164 | { | ||
165 | QPainter p( this ); | ||
166 | AppLnk *curApp; | ||
167 | int x = 0; | ||
168 | int y = (height() - AppLnk::smallIconSize()) / 2; | ||
169 | int i = 0; | ||
170 | |||
171 | p.fillRect( 0, 0, width(), height(), colorGroup().background() ); | ||
172 | |||
173 | QListIterator<AppLnk> it(m_AppList); | ||
174 | |||
175 | for (; it.current(); i++, ++it ) { | ||
176 | if ( x + spacing <= width() ) { | ||
177 | curApp = it.current(); | ||
178 | if ( (int)i == m_SelectedAppIndex ) | ||
179 | p.fillRect( x, y, spacing, curApp->pixmap().height()+1, colorGroup().highlight() ); | ||
180 | else | ||
181 | p.eraseRect( x, y, spacing, curApp->pixmap().height()+1 ); | ||
182 | p.drawPixmap( x, y, curApp->pixmap() ); | ||
183 | x += spacing; | ||
184 | } | ||
185 | } | ||
186 | } | ||
187 | |||
188 | QSize RunningAppBar::sizeHint() const | ||
189 | { | ||
190 | return QSize( frameWidth(), AppLnk::smallIconSize()+frameWidth()*2+3 ); | ||
191 | } | ||
192 | |||
193 | const int AppMonitor::RAISE_TIMEOUT_MS = 500; | ||
194 | |||
195 | AppMonitor::AppMonitor(const AppLnk& app, RunningAppBar& owner) | ||
196 | : QObject(0L), m_Owner(owner), m_App(app), m_PsProc(0L), m_AppKillerBox(0L) { | ||
197 | QCopChannel* channel = new QCopChannel( "QPE/System", this ); | ||
198 | connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), | ||
199 | this, SLOT(received(const QCString&, const QByteArray&)) ); | ||
200 | connect(&m_Timer, SIGNAL(timeout()), this, SLOT(timerExpired())); | ||
201 | m_Timer.start(RAISE_TIMEOUT_MS, TRUE); | ||
202 | } | ||
203 | |||
204 | AppMonitor::~AppMonitor() { | ||
205 | if (m_AppKillerBox) { | ||
206 | delete m_AppKillerBox; | ||
207 | m_AppKillerBox = 0L; | ||
208 | } | ||
209 | } | ||
210 | |||
211 | void AppMonitor::received(const QCString& msg, const QByteArray& data) { | ||
212 | QDataStream stream( data, IO_ReadOnly ); | ||
213 | |||
214 | if (msg == "appRaised(QString)") { | ||
215 | QString appName; | ||
216 | stream >> appName; | ||
217 | if (appName == m_App.exec()) { | ||
218 | // qDebug("Got a heartbeat from %s", appName.latin1()); | ||
219 | m_Timer.stop(); | ||
220 | // Check to make sure we're not waiting on user input... | ||
221 | if (m_AppKillerBox) { | ||
222 | // If we are, we kill the dialog box, and the code waiting on the result | ||
223 | // will clean us up (basically the user said "no"). | ||
224 | delete m_AppKillerBox; | ||
225 | m_AppKillerBox = 0L; | ||
226 | } | ||
227 | else { | ||
228 | // Ok, we're not waiting on user input, so clean us up now. | ||
229 | // WE DELETE OURSELVES HERE! Don't do anything else!! | ||
230 | delete this; | ||
231 | } | ||
232 | } | ||
233 | } | ||
234 | } | ||
235 | |||
236 | void AppMonitor::timerExpired() { | ||
237 | // qDebug("Checking in on %s", m_App.name().latin1()); | ||
238 | // We store this incase the application responds while we're | ||
239 | // waiting for user input so we know not to delete ourselves. This | ||
240 | // will be cleaned up in the destructor. | ||
241 | m_AppKillerBox = new QMessageBox(tr("Application Problem"), | ||
242 | tr("<p>%1 is not responding.</p>").arg(m_App.name()) + | ||
243 | tr("<p>Would you like to force the application to exit?</p>"), | ||
244 | QMessageBox::Warning, QMessageBox::Yes, | ||
245 | QMessageBox::No | QMessageBox::Default, | ||
246 | QMessageBox::NoButton); | ||
247 | if (m_AppKillerBox->exec() == QMessageBox::Yes) { | ||
248 | // qDebug("Killing the app!!! Bwuhahahaha!"); | ||
249 | m_PsProc = new QProcess(QString("ps")); | ||
250 | m_PsProc->addArgument("h"); | ||
251 | m_PsProc->addArgument("-C"); | ||
252 | m_PsProc->addArgument(m_App.exec()); | ||
253 | m_PsProc->addArgument("-o"); | ||
254 | m_PsProc->addArgument("pid"); | ||
255 | connect(m_PsProc, SIGNAL(processExited()), this, SLOT(psProcFinished())); | ||
256 | m_PsProc->start(); | ||
257 | } | ||
258 | else { | ||
259 | // qDebug("Wuss.."); | ||
260 | // WE DELETE OURSELVES HERE! Don't do anything else!! | ||
261 | delete this; | ||
262 | } | ||
263 | } | ||
264 | |||
265 | void AppMonitor::psProcFinished() { | ||
266 | QString pid = m_PsProc->readLineStdout(); | ||
267 | delete m_PsProc; | ||
268 | m_PsProc = 0L; | ||
269 | |||
270 | // qDebug("Killing app %s", pid.latin1()); | ||
271 | if (pid.isEmpty()) { | ||
272 | // Hmm.. did the application bail before we got there? | ||
273 | qDebug("AppMonitor: Tried to kill application %s but ps couldn't find it.", m_App.exec().latin1()); | ||
274 | } | ||
275 | else { | ||
276 | int success = kill(pid.toUInt(), SIGKILL); | ||
277 | if (success == 0) { | ||
278 | m_Owner.removeTask(m_App); | ||
279 | } | ||
280 | else { | ||
281 | qWarning("Could not kill task %s", m_App.exec().latin1()); | ||
282 | } | ||
283 | } | ||
284 | |||
285 | // WE DELETE OURSELVES HERE! Don't do anything else!! | ||
286 | delete this; | ||
287 | } | ||
diff --git a/core/launcher/runningappbar.h b/core/launcher/runningappbar.h new file mode 100644 index 0000000..880bb69 --- a/dev/null +++ b/core/launcher/runningappbar.h | |||
@@ -0,0 +1,88 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of the Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #ifndef RUNNING_APP_BAR_H | ||
22 | #define RUNNING_APP_BAR_H | ||
23 | |||
24 | #include <qframe.h> | ||
25 | #include <qlist.h> | ||
26 | #include <qtimer.h> | ||
27 | |||
28 | class AppLnk; | ||
29 | class AppLnkSet; | ||
30 | class QCString; | ||
31 | class QProcess; | ||
32 | class QMessageBox; | ||
33 | |||
34 | class RunningAppBar : public QFrame { | ||
35 | Q_OBJECT | ||
36 | |||
37 | public: | ||
38 | RunningAppBar(QWidget* parent); | ||
39 | ~RunningAppBar(); | ||
40 | |||
41 | void addTask(const AppLnk& appLnk); | ||
42 | void removeTask(const AppLnk& appLnk); | ||
43 | void paintEvent(QPaintEvent* event); | ||
44 | void mousePressEvent(QMouseEvent*); | ||
45 | void mouseReleaseEvent(QMouseEvent*); | ||
46 | QSize sizeHint() const; | ||
47 | |||
48 | private slots: | ||
49 | void newQcopChannel(const QString& channel); | ||
50 | void removedQcopChannel(const QString& channel); | ||
51 | void received(const QCString& msg, const QByteArray& data); | ||
52 | |||
53 | private: | ||
54 | AppLnkSet* m_AppLnkSet; | ||
55 | QList<AppLnk> m_AppList; | ||
56 | int m_SelectedAppIndex; | ||
57 | int spacing; | ||
58 | }; | ||
59 | |||
60 | /** | ||
61 | * Internal class that checks back in on the process when timerExpired is called | ||
62 | * to make sure the process is on top. If it's not it displays a dialog | ||
63 | * box asking permission to kill it. | ||
64 | */ | ||
65 | class AppMonitor : public QObject { | ||
66 | Q_OBJECT | ||
67 | |||
68 | public: | ||
69 | static const int RAISE_TIMEOUT_MS; | ||
70 | |||
71 | AppMonitor(const AppLnk& app, RunningAppBar& owner); | ||
72 | ~AppMonitor(); | ||
73 | |||
74 | private slots: | ||
75 | void timerExpired(); | ||
76 | void received(const QCString& msg, const QByteArray& data); | ||
77 | void psProcFinished(); | ||
78 | |||
79 | private: | ||
80 | RunningAppBar& m_Owner; | ||
81 | const AppLnk& m_App; | ||
82 | QTimer m_Timer; | ||
83 | QProcess* m_PsProc; | ||
84 | QMessageBox* m_AppKillerBox; | ||
85 | }; | ||
86 | |||
87 | #endif | ||
88 | |||
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp index 5bac874..5506c55 100644 --- a/core/launcher/startmenu.cpp +++ b/core/launcher/startmenu.cpp | |||
@@ -21,5 +21,5 @@ | |||
21 | #include "startmenu.h" | 21 | #include "startmenu.h" |
22 | #include "sidething.h" | 22 | #include "sidething.h" |
23 | #include "mrulist.h" | 23 | //#include "mrulist.h" |
24 | #include "info.h" | 24 | #include "info.h" |
25 | 25 | ||
@@ -76,5 +76,5 @@ void StartMenu::loadOptions() | |||
76 | QString tmpBoolString2 = config.readEntry( "StartButtonIsFlat", "TRUE" ); | 76 | QString tmpBoolString2 = config.readEntry( "StartButtonIsFlat", "TRUE" ); |
77 | startButtonIsFlat = ( tmpBoolString2 == "TRUE" ) ? TRUE : FALSE; | 77 | startButtonIsFlat = ( tmpBoolString2 == "TRUE" ) ? TRUE : FALSE; |
78 | QString tmpBoolString3 = config.readEntry( "UseMRUList", "TRUE" ); | 78 | // QString tmpBoolString3 = config.readEntry( "UseMRUList", "TRUE" ); |
79 | popupMenuSidePixmap = config.readEntry( "PopupMenuSidePixmap", "launcher/sidebar" ); | 79 | popupMenuSidePixmap = config.readEntry( "PopupMenuSidePixmap", "launcher/sidebar" ); |
80 | startButtonPixmap = config.readEntry( "StartButtonPixmap", "go" ); | 80 | startButtonPixmap = config.readEntry( "StartButtonPixmap", "go" ); |
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index e38b9fe..9f397eb 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp | |||
@@ -22,4 +22,5 @@ | |||
22 | #include "inputmethods.h" | 22 | #include "inputmethods.h" |
23 | #include "mrulist.h" | 23 | #include "mrulist.h" |
24 | #include "runningappbar.h" | ||
24 | #include "systray.h" | 25 | #include "systray.h" |
25 | #include "calibrate.h" | 26 | #include "calibrate.h" |
@@ -156,6 +157,9 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn | |||
156 | label = new QLabel(stack); | 157 | label = new QLabel(stack); |
157 | 158 | ||
158 | mru = new MRUList( stack ); | 159 | //mru = new MRUList( stack ); |
159 | stack->raiseWidget( mru ); | 160 | //stack->raiseWidget( mru ); |
161 | |||
162 | runningAppBar = new RunningAppBar(stack); | ||
163 | stack->raiseWidget(runningAppBar); | ||
160 | 164 | ||
161 | waitIcon = new Wait( this ); | 165 | waitIcon = new Wait( this ); |
@@ -167,5 +171,5 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn | |||
167 | #ifdef QT_QWS_CUSTOM | 171 | #ifdef QT_QWS_CUSTOM |
168 | lockState = new LockKeyState( this ); | 172 | lockState = new LockKeyState( this ); |
169 | #else | 173 | y#else |
170 | lockState = 0; | 174 | lockState = 0; |
171 | #endif | 175 | #endif |
@@ -197,5 +201,6 @@ void TaskBar::clearStatusBar() | |||
197 | { | 201 | { |
198 | label->clear(); | 202 | label->clear(); |
199 | stack->raiseWidget( mru ); | 203 | stack->raiseWidget(runningAppBar); |
204 | // stack->raiseWidget( mru ); | ||
200 | } | 205 | } |
201 | 206 | ||
@@ -210,5 +215,5 @@ void TaskBar::stopWait(const QString& app) | |||
210 | { | 215 | { |
211 | waitTimer->stop(); | 216 | waitTimer->stop(); |
212 | mru->addTask(sm->execToLink(app)); | 217 | //mru->addTask(sm->execToLink(app)); |
213 | waitIcon->setWaiting( false ); | 218 | waitIcon->setWaiting( false ); |
214 | } | 219 | } |
@@ -217,4 +222,5 @@ void TaskBar::stopWait() | |||
217 | { | 222 | { |
218 | waitTimer->stop(); | 223 | waitTimer->stop(); |
224 | |||
219 | waitIcon->setWaiting( false ); | 225 | waitIcon->setWaiting( false ); |
220 | } | 226 | } |
@@ -275,5 +281,5 @@ void TaskBar::receive( const QCString &msg, const QByteArray &data ) | |||
275 | int led, status; | 281 | int led, status; |
276 | stream >> led >> status; | 282 | stream >> led >> status; |
277 | 283 | ||
278 | ODevice::inst ( )-> setLed ( led, status ? OLED_BlinkSlow : OLED_Off ); | 284 | ODevice::inst ( )-> setLed ( led, status ? OLED_BlinkSlow : OLED_Off ); |
279 | } | 285 | } |
@@ -312,5 +318,6 @@ void TaskBar::toggleSymbolInput() | |||
312 | bool TaskBar::recoverMemory() | 318 | bool TaskBar::recoverMemory() |
313 | { | 319 | { |
314 | return mru->quitOldApps(); | 320 | //eturn mru->quitOldApps(); |
321 | return true; | ||
315 | } | 322 | } |
316 | 323 | ||
diff --git a/core/launcher/taskbar.h b/core/launcher/taskbar.h index 40983af..cd631ef 100644 --- a/core/launcher/taskbar.h +++ b/core/launcher/taskbar.h | |||
@@ -29,5 +29,6 @@ class InputMethods; | |||
29 | class Wait; | 29 | class Wait; |
30 | class SysTray; | 30 | class SysTray; |
31 | class MRUList; | 31 | //class MRUList; |
32 | class RunningAppBar; | ||
32 | class QWidgetStack; | 33 | class QWidgetStack; |
33 | class QTimer; | 34 | class QTimer; |
@@ -60,5 +61,5 @@ protected: | |||
60 | void styleChange( QStyle & ); | 61 | void styleChange( QStyle & ); |
61 | void setStatusMessage( const QString &text ); | 62 | void setStatusMessage( const QString &text ); |
62 | 63 | ||
63 | private slots: | 64 | private slots: |
64 | void calcMaxWindowRect(); | 65 | void calcMaxWindowRect(); |
@@ -66,10 +67,11 @@ private slots: | |||
66 | 67 | ||
67 | private: | 68 | private: |
68 | 69 | ||
69 | QTimer *waitTimer; | 70 | QTimer *waitTimer; |
70 | Wait *waitIcon; | 71 | Wait *waitIcon; |
71 | InputMethods *inputMethods; | 72 | InputMethods *inputMethods; |
72 | SysTray *sysTray; | 73 | SysTray *sysTray; |
73 | MRUList *mru; | 74 | // MRUList *mru; |
75 | RunningAppBar* runningAppBar; | ||
74 | QWidgetStack *stack; | 76 | QWidgetStack *stack; |
75 | QTimer *clearer; | 77 | QTimer *clearer; |