summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/launcher/launcher.cpp34
-rw-r--r--core/launcher/launcher.h2
2 files changed, 32 insertions, 4 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index fc944e1..e74301c 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -150,4 +150,13 @@ void CategoryTabWidget::nextTab()
150} 150}
151 151
152
153void CategoryTabWidget::showTab(const QString& id)
154{
155 if ( categoryBar ) {
156 int idx = ids.findIndex( id );
157 categoryBar->setCurrentTab( idx );
158 }
159}
160
152void CategoryTabWidget::addItem( const QString& linkfile ) 161void CategoryTabWidget::addItem( const QString& linkfile )
153{ 162{
@@ -188,4 +197,10 @@ void CategoryTabWidget::initializeCategories(AppLnkSet* rootFolder,
188 AppLnkSet* docFolder, const QList<FileSystem> &fs) 197 AppLnkSet* docFolder, const QList<FileSystem> &fs)
189{ 198{
199 QString current;
200 if ( categoryBar ) {
201 int c = categoryBar->currentTab();
202 if ( c >= 0 ) current = ids[c];
203 }
204
190 delete categoryBar; 205 delete categoryBar;
191 categoryBar = new CategoryTabBar( this ); 206 categoryBar = new CategoryTabBar( this );
@@ -249,6 +264,12 @@ void CategoryTabWidget::initializeCategories(AppLnkSet* rootFolder,
249 setBusyIndicatorType ( cfg. readEntry ( "BusyType", QString::null )); 264 setBusyIndicatorType ( cfg. readEntry ( "BusyType", QString::null ));
250 265
266 if ( !current.isNull() ) {
267 showTab(current);
268 }
269
251 categoryBar->show(); 270 categoryBar->show();
252 stack->show(); 271 stack->show();
272
273 QCopEnvelope e("QPE/TaskBar","reloadApps()");
253} 274}
254 275
@@ -615,5 +636,4 @@ Launcher::Launcher( QWidget* parent, const char* name, WFlags fl )
615 636
616 tabs = new CategoryTabWidget( this ); 637 tabs = new CategoryTabWidget( this );
617 tabs->setMaximumWidth( qApp->desktop()->width() );
618 setCentralWidget( tabs ); 638 setCentralWidget( tabs );
619 639
@@ -675,4 +695,5 @@ void Launcher::doMaximize()
675{ 695{
676 QMainWindow::showMaximized(); 696 QMainWindow::showMaximized();
697 tabs->setMaximumWidth( qApp->desktop()->width() );
677} 698}
678 699
@@ -833,4 +854,9 @@ void Launcher::nextView()
833} 854}
834 855
856void Launcher::showTab(const QString& id)
857{
858 tabs->showTab(id);
859 raise();
860}
835 861
836void Launcher::select( const AppLnk *appLnk ) 862void Launcher::select( const AppLnk *appLnk )
@@ -890,5 +916,5 @@ void Launcher::updateLink(const QString& link)
890 notify_sm = true; 916 notify_sm = true;
891 } 917 }
892 918
893 if ( notify_sm ) 919 if ( notify_sm )
894 QCopEnvelope e ( "QPE/TaskBar", "reloadApps()" ); 920 QCopEnvelope e ( "QPE/TaskBar", "reloadApps()" );
@@ -1190,5 +1216,5 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data)
1190 else if ( msg == "setBusyIndicatorType(QString)" ) { 1216 else if ( msg == "setBusyIndicatorType(QString)" ) {
1191 QString type; 1217 QString type;
1192 stream >> type; 1218 stream >> type;
1193 tabs->setBusyIndicatorType(type); 1219 tabs->setBusyIndicatorType(type);
1194 } 1220 }
@@ -1198,5 +1224,5 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data)
1198 else 1224 else
1199 raise ( ); 1225 raise ( );
1200 1226
1201 } 1227 }
1202} 1228}
diff --git a/core/launcher/launcher.h b/core/launcher/launcher.h
index 89bf6f3..c92ef5d 100644
--- a/core/launcher/launcher.h
+++ b/core/launcher/launcher.h
@@ -73,4 +73,5 @@ public slots:
73 void nextTab(); 73 void nextTab();
74 void prevTab(); 74 void prevTab();
75 void showTab(const QString&);
75 76
76protected slots: 77protected slots:
@@ -106,4 +107,5 @@ public:
106public slots: 107public slots:
107 void viewSelected(const QString&); 108 void viewSelected(const QString&);
109 void showTab(const QString&);
108 void select( const AppLnk * ); 110 void select( const AppLnk * );
109 void externalSelected( const AppLnk *); 111 void externalSelected( const AppLnk *);