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.cpp17
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
@@ -76,9 +76,9 @@
static bool isVisibleWindow( int );
//===========================================================================
LauncherTabWidget::LauncherTabWidget( Launcher* parent ) :
- QVBox( parent ), docview( 0 )
+ QVBox( parent ), docview( 0 ),docTabEnabled(true),m_DocumentTabId(0)
{
docLoadingWidgetEnabled = false;
docLoadingWidget = 0;
docLoadingWidgetProgress = 0;
@@ -127,9 +127,9 @@ void LauncherTabWidget::createDocLoadingWidget()
waitPixmap->setAlignment( int( QLabel::AlignCenter ) );
Config cfg( "Launcher" );
cfg.setGroup( "DocTab" );
- bool docTabEnabled = cfg.readBoolEntry( "Enable", true );
+ docTabEnabled = cfg.readBoolEntry( "Enable", true );
QLabel *textLabel = new QLabel( docLoadingVBox );
textLabel->setAlignment( int( QLabel::AlignCenter ) );
docLoadingWidgetProgress = new QProgressBar( docLoadingVBox );
@@ -215,16 +215,19 @@ LauncherView* LauncherTabWidget::newView( const QString& id, const QPixmap& pm,
this, SIGNAL(clicked(const AppLnk*)));
connect( view, SIGNAL(rightPressed(AppLnk*)),
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;
Config cfg("Launcher");
@@ -603,9 +606,8 @@ void Launcher::properties( AppLnk *appLnk )
/* ### libqtopia FIXME also moving docLnks... */
LnkProperties prop(appLnk,0 );
if (QPEApplication::execDialog( &prop )==QDialog::Accepted && tabs->currentView()==tabs->docView()) {
- tabs->docView()->updateTools();
}
}
}
@@ -720,10 +722,15 @@ 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
}
void Launcher::allDocumentsRemoved()
{