summaryrefslogtreecommitdiff
path: root/core/launcher/launcher.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/launcher.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/launcher.cpp28
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
@@ -149,6 +149,15 @@ 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 )
{
int i=0;
@@ -187,6 +196,12 @@ void CategoryTabWidget::addItem( const QString& linkfile )
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 );
QPalette pal = categoryBar->palette();
@@ -248,8 +263,14 @@ void CategoryTabWidget::initializeCategories(AppLnkSet* rootFolder,
cfg. setGroup ( "GUI" );
setBusyIndicatorType ( cfg. readEntry ( "BusyType", QString::null ));
+ if ( !current.isNull() ) {
+ showTab(current);
+ }
+
categoryBar->show();
stack->show();
+
+ QCopEnvelope e("QPE/TaskBar","reloadApps()");
}
void CategoryTabWidget::setTabAppearance( const QString &id, Config &cfg )
@@ -614,7 +635,6 @@ Launcher::Launcher( QWidget* parent, const char* name, WFlags fl )
m_timeStamp = QString::number( stamp );
tabs = new CategoryTabWidget( this );
- tabs->setMaximumWidth( qApp->desktop()->width() );
setCentralWidget( tabs );
connect( tabs, SIGNAL(selected(const QString&)),
@@ -674,6 +694,7 @@ void Launcher::showMaximized()
void Launcher::doMaximize()
{
QMainWindow::showMaximized();
+ tabs->setMaximumWidth( qApp->desktop()->width() );
}
void Launcher::updateMimeTypes()
@@ -832,6 +853,11 @@ void Launcher::nextView()
tabs->nextTab();
}
+void Launcher::showTab(const QString& id)
+{
+ tabs->showTab(id);
+ raise();
+}
void Launcher::select( const AppLnk *appLnk )
{