-rw-r--r-- | core/launcher/launcher.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 5ec1cf8..ccc2114 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -78,5 +78,5 @@ static bool isVisibleWindow( int ); LauncherTabWidget::LauncherTabWidget( Launcher* parent ) : - QVBox( parent ), docview( 0 ) + QVBox( parent ), docview( 0 ),docTabEnabled(true),m_DocumentTabId(0) { docLoadingWidgetEnabled = false; @@ -129,5 +129,5 @@ void LauncherTabWidget::createDocLoadingWidget() Config cfg( "Launcher" ); cfg.setGroup( "DocTab" ); - bool docTabEnabled = cfg.readBoolEntry( "Enable", true ); + docTabEnabled = cfg.readBoolEntry( "Enable", true ); QLabel *textLabel = new QLabel( docLoadingVBox ); @@ -217,12 +217,15 @@ LauncherView* LauncherTabWidget::newView( const QString& id, const QPixmap& pm, this, SIGNAL(rightPressed(AppLnk*))); + int n = categoryBar->count(); + stack->addWidget( view, n ); LauncherTab *tab = new LauncherTab( id, view, pm, label ); categoryBar->insertTab( tab, n-1 ); - - if ( id == "Documents" ) + if ( id == "Documents" ) { docview = view; + m_DocumentTabId = n; + } odebug << "inserting " << id << " at " << n-1 << "" << oendl; @@ -605,5 +608,4 @@ void Launcher::properties( AppLnk *appLnk ) if (QPEApplication::execDialog( &prop )==QDialog::Accepted && tabs->currentView()==tabs->docView()) { - tabs->docView()->updateTools(); } } @@ -722,6 +724,11 @@ void Launcher::documentRemoved( const DocLnk& doc ) void Launcher::documentChanged( const DocLnk& oldDoc, const DocLnk& newDoc ) { +#if 0 documentRemoved( oldDoc ); documentAdded( newDoc ); +// tabs->docView()->updateTools(); +#else + tabs->docView()->changeItem(oldDoc,new DocLnk(newDoc)); +#endif } |