summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-23 13:14:25 (UTC)
committer harlekin <harlekin>2003-03-23 13:14:25 (UTC)
commit56192a3d601e5364e9b8f4c331d892befb19cbc1 (patch) (side-by-side diff)
tree97966e16e29316a6dc28e2f0c9619192a3757b8f
parentc3b01d2abd00b82b821604827987f2becccf5233 (diff)
downloadopie-56192a3d601e5364e9b8f4c331d892befb19cbc1.zip
opie-56192a3d601e5364e9b8f4c331d892befb19cbc1.tar.gz
opie-56192a3d601e5364e9b8f4c331d892befb19cbc1.tar.bz2
after refresh show the same tab again as before ( for example after a medium is inserted or linkcChanged(QString) has been called
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()
}
+
+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 )
@@ -890,5 +916,5 @@ void Launcher::updateLink(const QString& link)
notify_sm = true;
}
-
+
if ( notify_sm )
QCopEnvelope e ( "QPE/TaskBar", "reloadApps()" );
@@ -1190,5 +1216,5 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data)
else if ( msg == "setBusyIndicatorType(QString)" ) {
QString type;
- stream >> type;
+ stream >> type;
tabs->setBusyIndicatorType(type);
}
@@ -1198,5 +1224,5 @@ void Launcher::launcherMessage( const QCString &msg, const QByteArray &data)
else
raise ( );
-
+
}
}
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:
void nextTab();
void prevTab();
+ void showTab(const QString&);
protected slots:
@@ -106,4 +107,5 @@ public:
public slots:
void viewSelected(const QString&);
+ void showTab(const QString&);
void select( const AppLnk * );
void externalSelected( const AppLnk *);