-rw-r--r-- | core/launcher/launcher.cpp | 28 |
1 files changed, 27 insertions, 1 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() } + +void CategoryTabWidget::showTab(const QString& id) +{ + if ( categoryBar ) { + int idx = ids.findIndex( id ); + categoryBar->setCurrentTab( idx ); + } +} + void CategoryTabWidget::addItem( const QString& linkfile ) { @@ -188,4 +197,10 @@ void CategoryTabWidget::initializeCategories(AppLnkSet* rootFolder, AppLnkSet* docFolder, const QList<FileSystem> &fs) { + QString current; + if ( categoryBar ) { + int c = categoryBar->currentTab(); + if ( c >= 0 ) current = ids[c]; + } + delete categoryBar; categoryBar = new CategoryTabBar( this ); @@ -249,6 +264,12 @@ void CategoryTabWidget::initializeCategories(AppLnkSet* rootFolder, setBusyIndicatorType ( cfg. readEntry ( "BusyType", QString::null )); + if ( !current.isNull() ) { + showTab(current); + } + categoryBar->show(); stack->show(); + + QCopEnvelope e("QPE/TaskBar","reloadApps()"); } @@ -615,5 +636,4 @@ Launcher::Launcher( QWidget* parent, const char* name, WFlags fl ) tabs = new CategoryTabWidget( this ); - tabs->setMaximumWidth( qApp->desktop()->width() ); setCentralWidget( tabs ); @@ -675,4 +695,5 @@ void Launcher::doMaximize() { QMainWindow::showMaximized(); + tabs->setMaximumWidth( qApp->desktop()->width() ); } @@ -833,4 +854,9 @@ void Launcher::nextView() } +void Launcher::showTab(const QString& id) +{ + tabs->showTab(id); + raise(); +} void Launcher::select( const AppLnk *appLnk ) |