[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    [patch] Preliminary Tabbed Browsing in Konqueror
From:       Doug Hanley <hanleyman () adelphia ! net>
Date:       2001-12-12 3:41:26
[Download RAW message or body]

Hello,

After silently waiting for tabs to come into konqueror for quite a while, I decided \
that I would just try and do it myself.  After some coding, I decided it would be \
best if i released what I have done so far.  

As for the design, I started out by making a base class for all frame containers \
called KonqFrameContainerBase which had basic functions like addChildFrame and \
removeChildFrame, then I made the original KonqFrameContainer derive that, and I made \
a new class called KonqFrameTabs which also dervies KonqFrameContainerBase and \
QTabWidget.  I then went into KonqViewManager and made it so that m_pMainContainer is \
always a tab widget (if you're gonna use tabs, it makes sense that you would only use \
them at the top level, right?).  Then all the frame splitting and such takes place \
under that as it has always done.

I made changes to the printfullhierarchy in KonqViewManager, which only really \
applies to debuging but still its there.

I also changed the way frames are deleted.  I wasn't sure about this one since it \
changed quite a few things, but it made more sense to me.  Now when frames are \
deleted all you do is call delete on the frame you want to delete and through class \
destructors, it will hierarchially delete subframes of the original frame.  You still \
have to take care of deleting views but this can be done easily though the listViews \
function in KonqFrameBase.  Again, this last change is not essential to tabs, so it \
can be removed if it needs to be. 

Now, with these changes there is no need for the splitWindow function, and I've added \
the addTab and removeTab functions.

Also, to account for people who dont want tabs, when there is only one tab, the tab \
bar gets hidden, so its acts as it normally would without tabs.  Only problem is that \
there is a still a grey space where the hidden tab bar resides, i havent been able to \
fix that.  Another thing that needs work, is focus after the removal of a frame

Remember to add the following lines to your konqueror.rc to get the new menu items \
under the window menu (on debian its in /usr/share/apps/konqueror/):

  <Action name="addtab"/>
  <Action name="removecurrenttab"/>

I think thats it, if you have any more questions, which I assume you will, feel free \
to ask.  This patch works for 2.2.1 and 2.2.2.  For some reason, I cant compile kde3.

Oh yeah, this is very much a work in progress.  I am well aware that there are bugs \
in it, additional help would be much appreciated.

Best regards,
Doug Hanley


["konqtabs.patch" (text/x-diff)]

Common subdirectories: kdebase-2.2.2.orig/konqueror/CVS and \
kdebase-2.2.2/konqueror/CVS Common subdirectories: kdebase-2.2.2.orig/konqueror/about \
and kdebase-2.2.2/konqueror/about Common subdirectories: \
kdebase-2.2.2.orig/konqueror/client and kdebase-2.2.2/konqueror/client Common \
subdirectories: kdebase-2.2.2.orig/konqueror/dirtree and \
kdebase-2.2.2/konqueror/dirtree Common subdirectories: \
kdebase-2.2.2.orig/konqueror/history and kdebase-2.2.2/konqueror/history Common \
subdirectories: kdebase-2.2.2.orig/konqueror/iconview and \
kdebase-2.2.2/konqueror/iconview Common subdirectories: \
kdebase-2.2.2.orig/konqueror/keditbookmarks and \
kdebase-2.2.2/konqueror/keditbookmarks Common subdirectories: \
kdebase-2.2.2.orig/konqueror/kfindpart and kdebase-2.2.2/konqueror/kfindpart Common \
subdirectories: kdebase-2.2.2.orig/konqueror/kfmexec and \
                kdebase-2.2.2/konqueror/kfmexec
diff -u kdebase-2.2.2.orig/konqueror/konq_frame.cc \
                kdebase-2.2.2/konqueror/konq_frame.cc
--- kdebase-2.2.2.orig/konqueror/konq_frame.cc	Mon Nov  5 21:40:29 2001
+++ kdebase-2.2.2/konqueror/konq_frame.cc	Sun Dec  9 17:56:35 2001
@@ -27,6 +27,7 @@
 #include <qtimer.h>
 #include <qpushbutton.h>
 #include <qtoolbutton.h>
+#include <qtabbar.h>
 
 #include <kapp.h>
 #include <kdebug.h>
@@ -371,8 +372,15 @@
 
 //###################################################################
 
-KonqFrame::KonqFrame( KonqFrameContainer *_parentContainer, const char *_name )
-:QWidget(_parentContainer,_name)
+void KonqFrameBase::printFrameInfo(QString spaces)
+{
+	kdDebug(1202) << spaces << "KonqFrameBase " << this << ", this shouldn't happen!" \
<< endl; +}
+
+//###################################################################
+
+KonqFrame::KonqFrame( KonqFrameContainerBase *_parentContainer, const char *_name )
+:QWidget(_parentContainer->widget(),_name)
 {
    m_pLayout = 0L;
    m_pView = 0L;
@@ -383,12 +391,14 @@
    connect(m_pStatusBar, SIGNAL(clicked()), this, SLOT(slotStatusBarClicked()));
    connect( m_pStatusBar, SIGNAL( linkedViewClicked( bool ) ), this, SLOT( \
slotLinkedViewClicked( bool ) ) );  m_separator = 0;
+   m_pParentContainer = _parentContainer;
 }
 
 KonqFrame::~KonqFrame()
 {
   kdDebug(1202) << "KonqFrame::~KonqFrame() " << this << endl;
   //delete m_pLayout;
+	//if (m_pView) delete m_pView;
 }
 
 bool KonqFrame::isActivePart()
@@ -421,6 +431,16 @@
     childView()->copyHistory( static_cast<KonqFrame *>( other )->childView() );
 }
 
+void KonqFrame::printFrameInfo( QString spaces )
+{
+	kdDebug(1202) << spaces << "KonqFrame " << this << " containing view "
+  	 		        << childView()
+                << " part "
+     	          << part()
+       	        << " whose widget is a "
+         	      << part()->widget()->className() << endl;
+}
+
 KParts::ReadOnlyPart *KonqFrame::attach( const KonqViewFactory &viewFactory )
 {
    KonqViewFactory factory( viewFactory );
@@ -493,14 +513,6 @@
    }
 };
 
-KonqFrameContainer* KonqFrame::parentContainer()
-{
-   if( parentWidget()->isA("KonqFrameContainer") )
-      return static_cast<KonqFrameContainer*>(parentWidget());
-   else
-      return 0L;
-}
-
 void KonqFrame::reparentFrame( QWidget* parent, const QPoint & p, bool showIt )
 {
    QWidget::reparent( parent, p, showIt );
@@ -540,18 +552,31 @@
 
 //###################################################################
 
+void KonqFrameContainerBase::printFrameInfo(QString spaces)
+{
+	kdDebug(1202) << spaces << "KonqFrameContainerBase " << this << ", this shouldn't \
happen!" << endl; +}
+
+//###################################################################
+
 KonqFrameContainer::KonqFrameContainer( Orientation o,
-                                        QWidget* parent,
+                                        KonqFrameContainerBase* parent,
                                         const char * name)
-  : QSplitter( o, parent, name)
+  : QSplitter( o, parent->widget(), name)
 {
+	m_pParentContainer = parent;
   m_pFirstChild = 0L;
   m_pSecondChild = 0L;
+  setOpaqueResize( true );
 }
 
 KonqFrameContainer::~KonqFrameContainer()
 {
     kdDebug(1202) << "KonqFrameContainer::~KonqFrameContainer() " << this << " - " \
<< className() << endl; +		if ( m_pFirstChild )
+			delete m_pFirstChild;
+		if ( m_pSecondChild )
+			delete m_pSecondChild;
 }
 
 void KonqFrameContainer::listViews( ChildViewList *viewList )
@@ -620,12 +645,15 @@
    return 0L;
 }
 
-KonqFrameContainer* KonqFrameContainer::parentContainer()
+void KonqFrameContainer::printFrameInfo( QString spaces )
 {
-  if( parentWidget()->isA("KonqFrameContainer") )
-    return static_cast<KonqFrameContainer*>(parentWidget());
-  else
-    return 0L;
+	kdDebug(1202) << spaces << "KonqFrameContainer " << this << endl;
+	KonqFrameBase* child = firstChild();
+	if (child != 0L) child->printFrameInfo(spaces + "  ");
+	else kdDebug(1202) << spaces << "  Null child" << endl;
+  child = secondChild();
+	if (child != 0L) child->printFrameInfo(spaces + "  ");
+	else kdDebug(1202) << spaces << "  Null child" << endl;
 }
 
 void KonqFrameContainer::reparentFrame( QWidget* parent, const QPoint & p, bool \
showIt ) @@ -649,11 +677,13 @@
       if( !m_pFirstChild )
       {
           m_pFirstChild = frame;
+					frame->setParentContainer(this);
           kdDebug(1202) << "Setting as first child" << endl;
       }
       else if( !m_pSecondChild )
       {
           m_pSecondChild = frame;
+					frame->setParentContainer(this);
           kdDebug(1202) << "Setting as second child" << endl;
       }
       else
@@ -666,14 +696,146 @@
 void KonqFrameContainer::removeChildFrame( KonqFrameBase * frame )
 {
   kdDebug(1202) << "KonqFrameContainer::RemoveChildFrame " << this << ". Child " << \
frame << " removed" << endl; +
   if( m_pFirstChild == frame )
-    m_pFirstChild = 0L;
+	{
+		m_pFirstChild = m_pSecondChild;
+		m_pSecondChild = 0L;
+	}
 
   else if( m_pSecondChild == frame )
     m_pSecondChild = 0L;
 
   else
     kdWarning(1202) << this << " Can't find this child:" << frame << endl;
+}
+
+//###################################################################
+
+KonqFrameTabs::KonqFrameTabs(QWidget* parent, const char * name)
+  : QTabWidget(parent, name)
+{
+  m_pParentContainer = 0L;
+  m_pChildFrameList = new QList<KonqFrameBase>;
+  m_pChildFrameList->setAutoDelete(false);
+
+  tabBar()->hide();
+}
+
+KonqFrameTabs::~KonqFrameTabs()
+{
+  kdDebug(1202) << "KonqFrameTabs::~KonqFrameTabs() " << this << " - " << \
className() << endl; +  m_pChildFrameList->setAutoDelete(true);	
+  delete m_pChildFrameList;
+}
+
+void KonqFrameTabs::listViews( ChildViewList *viewList ) {
+  int childFrameCount = m_pChildFrameList->count();
+  for( int i=0 ; i<childFrameCount ; i++) \
m_pChildFrameList->at(i)->listViews(viewList); +}
+
+void KonqFrameTabs::saveConfig( KConfig* config, const QString &prefix, bool \
saveURLs, int id, int depth ) +{
+  /*  int idSecond = id + (int)pow( 2.0, depth );
+
+  //write children sizes
+  config->writeEntry( QString::fromLatin1( "SplitterSizes" ).prepend( prefix ), \
sizes() ); +
+  //write children
+  QStringList strlst;
+  if( firstChild() )
+    strlst.append( QString::fromLatin1( firstChild()->frameType() ) + \
QString::number(idSecond - 1) ); +  if( secondChild() )
+    strlst.append( QString::fromLatin1( secondChild()->frameType() ) + \
QString::number( idSecond ) ); +
+  config->writeEntry( QString::fromLatin1( "Children" ).prepend( prefix ), strlst );
+
+  //write orientation
+  QString o;
+  if( orientation() == Qt::Horizontal )
+    o = QString::fromLatin1("Horizontal");
+  else if( orientation() == Qt::Vertical )
+    o = QString::fromLatin1("Vertical");
+  config->writeEntry( QString::fromLatin1( "Orientation" ).prepend( prefix ), o );
+
+
+  //write child configs
+  if( firstChild() ) {
+    QString newPrefix = QString::fromLatin1( firstChild()->frameType() ) + \
QString::number(idSecond - 1); +    newPrefix.append( '_' );
+    firstChild()->saveConfig( config, newPrefix, saveURLs, id, depth + 1 );
+  }
+
+  if( secondChild() ) {
+    QString newPrefix = QString::fromLatin1( secondChild()->frameType() ) + \
QString::number( idSecond ); +    newPrefix.append( '_' );
+    secondChild()->saveConfig( config, newPrefix, saveURLs, idSecond, depth + 1 );
+  }
+
+  */
+}
+
+void KonqFrameTabs::copyHistory( KonqFrameBase *other )
+{
+  /* assert( other->frameType() == "Tabs" );
+  KonqFramTabs* otherTabs = static_cast<KonqFrameTabs *>( other );
+  int thisCount = m_pViewList->count();
+  int otherCount = otherTabs->->count();
+  int count = thisCount;
+  if (thisCount>otherCount) count = otherCount;
+
+  for (
+    firstChild()->copyHistory( static_cast<KonqFrameTabs *>( other )->firstChild() \
); +  if ( secondChild() )
+    secondChild()->copyHistory( static_cast<KonqFrameTabs *>( other )->secondChild() \
); +  */
+}
+
+void KonqFrameTabs::printFrameInfo( QString spaces )
+{
+  kdDebug(1202) << spaces << "KonqFrameTabs " << this << endl;
+  KonqFrameBase* child;
+  int childFrameCount = m_pChildFrameList->count();
+  for (int i = 0 ; i < childFrameCount ; i++) {
+    child = m_pChildFrameList->at(i);
+    if (child != 0L) child->printFrameInfo(spaces + "  ");
+    else kdDebug(1202) << spaces << "  Null child" << endl;
+  }
+}
+
+void KonqFrameTabs::reparentFrame( QWidget* parent, const QPoint & p, bool showIt )
+{
+  QWidget::reparent( parent, p, showIt );
+}
+
+void KonqFrameTabs::insertChildFrame( KonqFrameBase* frame )
+{
+  kdDebug(1202) << "KonqFrameTabs " << this << ": insertChildFrame " << frame << \
endl; +
+  if (frame)
+  {
+    kdDebug(1202) << "Adding frame" << endl;
+    addTab(frame->widget(),"KonqFrameBaseTab");
+    frame->setParentContainer(this);
+    m_pChildFrameList->append(frame);
+    if (tabBar()->count()==2)
+      tabBar()->show();
+  } 
+  else
+    kdWarning(1202) << "KonqFrameTabs " << this << ": insertChildFrame(0L) !" << \
endl; +}
+
+void KonqFrameTabs::removeChildFrame( KonqFrameBase * frame )
+{
+  kdDebug(1202) << "KonqFrameTabs::RemoveChildFrame " << this << ". Child " << frame \
<< " removed" << endl; +  if (frame) {
+    removePage(frame->widget());
+    m_pChildFrameList->remove(frame);
+    if (tabBar()->count()==1)
+      tabBar()->hide();			
+  }
+  else
+    kdWarning(1202) << "KonqFrameTabs " << this << ": removeChildFrame(0L) !" << \
endl;  }
 
 #include "konq_frame.moc"
diff -u kdebase-2.2.2.orig/konqueror/konq_frame.h \
                kdebase-2.2.2/konqueror/konq_frame.h
--- kdebase-2.2.2.orig/konqueror/konq_frame.h	Wed May 16 13:27:30 2001
+++ kdebase-2.2.2/konqueror/konq_frame.h	Sun Dec  9 17:56:35 2001
@@ -27,6 +27,7 @@
 #include <qsplitter.h>
 #include <qcheckbox.h>
 #include <qlabel.h>
+#include <qtabwidget.h>
 
 #include <kpixmap.h>
 #include <kpixmapeffect.h>
@@ -41,7 +42,9 @@
 class KonqView;
 class KonqFrameBase;
 class KonqFrame;
+class KonqFrameContainerBase;
 class KonqFrameContainer;
+class KonqFrameTabs;
 class KConfig;
 class KSeparator;
 class KProgress;
@@ -168,21 +171,28 @@
 class KonqFrameBase
 {
  public:
+  virtual ~KonqFrameBase() {}
+
   virtual void saveConfig( KConfig* config, const QString &prefix, bool saveURLs, \
int id = 0, int depth = 0 ) = 0;  virtual void copyHistory( KonqFrameBase *other ) = \
0;  
+	virtual void printFrameInfo( QString spaces );
+
   virtual void reparentFrame( QWidget* parent,
                               const QPoint & p, bool showIt=FALSE ) = 0;
 
-  virtual KonqFrameContainer* parentContainer() = 0;
+  virtual KonqFrameContainerBase* parentContainer() { return m_pParentContainer; }
+	virtual void setParentContainer(KonqFrameContainerBase* parent) { \
m_pParentContainer = parent; } +
   virtual QWidget* widget() = 0;
 
   virtual void listViews( ChildViewList *viewList ) = 0;
   virtual QCString frameType() = 0;
 
- protected:
+protected:
   KonqFrameBase() {}
-  virtual ~KonqFrameBase() {}
+
+	KonqFrameContainerBase* m_pParentContainer;
 };
 
 /**
@@ -202,7 +212,7 @@
   Q_OBJECT
 
 public:
-  KonqFrame( KonqFrameContainer *_parentContainer = 0L,
+  KonqFrame( KonqFrameContainerBase *_parentContainer = 0L,
              const char *_name = 0L );
   virtual ~KonqFrame();
 
@@ -246,10 +256,12 @@
   virtual void saveConfig( KConfig* config, const QString &prefix, bool saveURLs, \
int id = 0, int depth = 0 );  virtual void copyHistory( KonqFrameBase *other );
 
+	virtual void printFrameInfo( QString spaces );
+
   virtual void reparentFrame(QWidget * parent,
                      const QPoint & p, bool showIt=FALSE );
 
-  virtual KonqFrameContainer* parentContainer();
+  //virtual KonqFrameContainerBase* parentContainer();
   virtual QWidget* widget() { return this; }
   virtual QCString frameType() { return QCString("View"); }
 
@@ -285,6 +297,32 @@
   KonqFrameHeader *m_pHeader;
 };
 
+class KonqFrameContainerBase : public KonqFrameBase
+{
+public:
+  virtual ~KonqFrameContainerBase() {}
+
+  /**
+   * Call this after inserting a new frame into the splitter.
+   */
+  virtual void insertChildFrame( KonqFrameBase * frame ) = 0;
+  /**
+   * Call this before deleting one of our children.
+   */
+  virtual void removeChildFrame( KonqFrameBase * frame ) = 0;
+
+  //inherited
+	virtual void printFrameInfo( QString spaces );
+
+  virtual QCString frameType() { return QCString("ContainerBase"); }
+
+  virtual void reparentFrame(QWidget * parent,
+                             const QPoint & p, bool showIt=FALSE ) = 0;
+
+protected:
+  KonqFrameContainerBase() {}
+};
+
 /**
  * With KonqFrameContainers and @refKonqFrames we can create a flexible
  * storage structure for the views. The top most element is a
@@ -294,13 +332,13 @@
  * KonqFrameContainers or, as leaves, KonqFrames.
  */
 
-class KonqFrameContainer : public QSplitter, public KonqFrameBase
+class KonqFrameContainer : public QSplitter, public KonqFrameContainerBase
 {
   Q_OBJECT
   friend class KonqFrame; //for emitting ctrlTabPressed() only, aleXXX
 public:
   KonqFrameContainer( Orientation o,
-                      QWidget* parent,
+                      KonqFrameContainerBase* parent,
                       const char * name = 0);
   virtual ~KonqFrameContainer();
 
@@ -313,9 +351,10 @@
   KonqFrameBase* secondChild() { return m_pSecondChild; }
   KonqFrameBase* otherChild( KonqFrameBase* child );
 
+	virtual void printFrameInfo( QString spaces );
+
   void swapChildren();
 
-  virtual KonqFrameContainer* parentContainer();
   virtual QWidget* widget() { return this; }
   virtual QCString frameType() { return QCString("Container"); }
 
@@ -341,6 +380,54 @@
 protected:
   KonqFrameBase* m_pFirstChild;
   KonqFrameBase* m_pSecondChild;
+};
+
+class KonqFrameTabs : public QTabWidget, public KonqFrameContainerBase
+{
+  Q_OBJECT
+  friend class KonqFrame; //for emitting ctrlTabPressed() only, aleXXX
+public:
+  KonqFrameTabs(QWidget* parent, const char * name = 0);
+  virtual ~KonqFrameTabs();
+
+  virtual void listViews( ChildViewList *viewList );
+
+  virtual void saveConfig( KConfig* config, const QString &prefix, bool saveURLs, \
int id = 0, int depth = 0 ); +  virtual void copyHistory( KonqFrameBase *other );
+
+	virtual void printFrameInfo( QString spaces );
+
+	QList<KonqFrameBase>* childFrameList() { return m_pChildFrameList; }
+
+  virtual KonqFrameContainerBase* parentContainer() { return 0L; }
+	virtual void setParentContainer(KonqFrameContainerBase* parent) { return; }
+
+  virtual QWidget* widget() { return this; }
+  virtual QCString frameType() { return QCString("Tabs"); }
+
+  /**
+   * Call this after inserting a new frame into the splitter.
+   */
+  void insertChildFrame( KonqFrameBase * frame );
+  /**
+   * Call this before deleting one of our children.
+   */
+  void removeChildFrame( KonqFrameBase * frame );
+
+  //inherited
+  virtual void reparentFrame(QWidget * parent,
+                             const QPoint & p, bool showIt=FALSE );
+
+  //make this one public
+  //int idAfter( QWidget* w ){ return Q::idAfter( w ); }
+
+signals:
+  void ctrlTabPressed();
+
+protected:
+  //KonqFrameBase* m_pFirstChild;
+  //KonqFrameBase* m_pSecondChild;
+  QList<KonqFrameBase>* m_pChildFrameList;
 };
 
 #endif
diff -u kdebase-2.2.2.orig/konqueror/konq_guiclients.cc \
                kdebase-2.2.2/konqueror/konq_guiclients.cc
--- kdebase-2.2.2.orig/konqueror/konq_guiclients.cc	Sat Jul 28 23:56:40 2001
+++ kdebase-2.2.2/konqueror/konq_guiclients.cc	Sun Dec  9 17:56:35 2001
@@ -228,7 +228,7 @@
 
   KonqViewManager *viewManager = m_mainWindow->viewManager();
 
-  KonqFrameContainer *mainContainer = viewManager->mainContainer();
+  KonqFrameContainerBase *mainContainer = viewManager->mainContainer();
 
   if ( toggle )
   {
@@ -245,8 +245,10 @@
     else
       newSplitterSizes << 30 << 100;
 
-    KonqFrameContainer *newContainer = childView->frame()->parentContainer();
-    newContainer->setSizes( newSplitterSizes );
+    KonqFrameContainerBase *newContainer = childView->frame()->parentContainer();
+
+    if (newContainer->frameType()=="Container")
+      static_cast<KonqFrameContainer*>(newContainer)->setSizes( newSplitterSizes );
 
     if ( m_mainWindow->currentView() )
     {
diff -u kdebase-2.2.2.orig/konqueror/konq_mainwindow.cc \
                kdebase-2.2.2/konqueror/konq_mainwindow.cc
--- kdebase-2.2.2.orig/konqueror/konq_mainwindow.cc	Mon Nov  5 21:40:29 2001
+++ kdebase-2.2.2/konqueror/konq_mainwindow.cc	Sun Dec  9 17:56:36 2001
@@ -560,7 +560,7 @@
   if ( !childView )
     {
       // Create a new view
-      childView = m_pViewManager->splitView( Qt::Horizontal, serviceType, \
serviceName ); +      childView = m_pViewManager->addTab( serviceType, serviceName );
 
       if ( !childView )
         {
@@ -1808,12 +1808,23 @@
   newView->openURL( m_currentView->url(), m_currentView->locationBarURL() );
 }
 
+void KonqMainWindow::slotAddTab()
+{
+  KonqView* newView = m_pViewManager->addTab();
+  newView->openURL( m_currentView->url(), m_currentView->locationBarURL() );
+}
+
 void KonqMainWindow::slotRemoveView()
 {
   // takes care of choosing the new active view
   m_pViewManager->removeView( m_currentView );
 }
 
+void KonqMainWindow::slotRemoveCurrentTab()
+{
+	m_pViewManager->removeCurrentTab();
+}
+
 void KonqMainWindow::slotSaveViewPropertiesLocally()
 {
   m_bSaveViewPropertiesLocally = !m_bSaveViewPropertiesLocally;
@@ -2663,7 +2674,9 @@
   // Window menu
   m_paSplitViewHor = new KAction( i18n( "Split View &Left/Right" ), \
"view_left_right", CTRL+SHIFT+Key_L, this, SLOT( slotSplitViewHorizontal() ), \
actionCollection(), "splitviewh" );  m_paSplitViewVer = new KAction( i18n( "Split \
View &Top/Bottom" ), "view_top_bottom", CTRL+SHIFT+Key_T, this, SLOT( \
slotSplitViewVertical() ), actionCollection(), "splitviewv" ); +  m_paAddTab = new \
KAction( i18n( "Add Tab" ), "view_add_tab", 0, this, SLOT( slotAddTab() ), \
actionCollection(), "addtab" );  m_paRemoveView = new KAction( i18n( "&Remove Active \
View" ),"view_remove", CTRL+SHIFT+Key_R, this, SLOT( slotRemoveView() ), \
actionCollection(), "removeview" ); +  m_paRemoveCurrentTab = new KAction( i18n( \
"Remove Current Tab" ), "view_remove_current_tab", 0, this, SLOT( \
slotRemoveCurrentTab() ), actionCollection(), "removecurrenttab" );  
   m_paSaveRemoveViewProfile = new KAction( i18n( "&Configure View Profiles..." ), 0, \
m_pViewManager, SLOT( slotProfileDlg() ), actionCollection(), "saveremoveviewprofile" \
);  m_pamLoadViewProfile = new KActionMenu( i18n( "Load &View Profile" ), \
                actionCollection(), "loadviewprofile" );
diff -u kdebase-2.2.2.orig/konqueror/konq_mainwindow.h \
                kdebase-2.2.2/konqueror/konq_mainwindow.h
--- kdebase-2.2.2.orig/konqueror/konq_mainwindow.h	Fri May 11 07:13:54 2001
+++ kdebase-2.2.2/konqueror/konq_mainwindow.h	Sun Dec  9 17:56:36 2001
@@ -306,7 +306,9 @@
 
   void slotSplitViewHorizontal();
   void slotSplitViewVertical();
+  void slotAddTab();
   void slotRemoveView();
+	void slotRemoveCurrentTab();
 
   void slotSaveViewProfile();
   void slotSaveViewPropertiesLocally();
@@ -451,7 +453,9 @@
 
   KAction *m_paSplitViewHor;
   KAction *m_paSplitViewVer;
+  KAction *m_paAddTab;
   KAction *m_paRemoveView;
+	KAction *m_paRemoveCurrentTab;
 
   KAction *m_paSaveRemoveViewProfile;
   KActionMenu *m_pamLoadViewProfile;
diff -u kdebase-2.2.2.orig/konqueror/konq_view.cc \
                kdebase-2.2.2/konqueror/konq_view.cc
--- kdebase-2.2.2.orig/konqueror/konq_view.cc	Wed Jun 20 15:21:06 2001
+++ kdebase-2.2.2/konqueror/konq_view.cc	Sun Dec  9 17:56:36 2001
@@ -95,8 +95,10 @@
   if ( isPassiveMode() && m_pPart )
       disconnect( m_pPart, SIGNAL( destroyed() ), m_pMainWindow->viewManager(), \
SLOT( slotObjectDestroyed() ) );  
+	partDeleted();
   delete m_pPart;
   delete (KonqRun *)m_pRun;
+	//m_pMainWindow->removeChildView(this);
   //kdDebug(1202) << "KonqView::~KonqView " << this << " done" << endl;
 }
 
@@ -136,6 +138,11 @@
   m_pPart->openURL( url );
 
   sendOpenURLEvent( url, args );
+
+  KonqFrameContainerBase* frameContainer = frame()->parentContainer();
+  if (frameContainer)
+    if (frameContainer->frameType()=="Tabs")
+      static_cast<KonqFrameTabs*>(frameContainer)->changeTab(frame(),locationBarURL);
  
   updateHistoryEntry(false /* don't save location bar URL yet */);
   // add pending history entry
diff -u kdebase-2.2.2.orig/konqueror/konq_viewmgr.cc \
                kdebase-2.2.2/konqueror/konq_viewmgr.cc
--- kdebase-2.2.2.orig/konqueror/konq_viewmgr.cc	Tue Sep  4 18:16:55 2001
+++ kdebase-2.2.2/konqueror/konq_viewmgr.cc	Sun Dec  9 17:56:36 2001
@@ -51,7 +51,10 @@
 {
   m_pMainWindow = mainWindow;
 
-  m_pMainContainer = 0L;
+  m_pMainContainer = new KonqFrameTabs( m_pMainWindow );
+  m_pMainWindow->setCentralWidget( m_pMainContainer );
+  m_pMainContainer->setGeometry( 0, 0, m_pMainWindow->width(), \
m_pMainWindow->height() ); +  \
connect(m_pMainContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
  
   m_pamProfiles = 0L;
   m_bProfileListDirty = true;
@@ -69,17 +72,16 @@
                                        bool newOneFirst)
 {
   kdDebug(1202) << "KonqViewManager::splitView(ServiceType)" << endl;
+	printFullHierarchy( m_pMainContainer );
 
   KonqFrame* viewFrame = 0L;
-  if( m_pMainContainer )
+
+  if ( m_pMainWindow->currentView() )
+    viewFrame = m_pMainWindow->currentView()->frame();
+  else
   {
-    if ( m_pMainWindow->currentView() )
-      viewFrame = m_pMainWindow->currentView()->frame();
-    else
-    {
-      kdWarning(1202) << "splitView called, but no current view!" << endl;
-      return 0L; // if we go on, we'll hit the assert in split()
-    }
+    kdWarning(1202) << "splitView called, but no current view!" << endl;
+    return 0L; // if we go on, we'll hit the assert in split()
   }
 
   KonqFrameContainer *newContainer;
@@ -87,10 +89,13 @@
 
   if ( newOneFirst )
   {
-      newContainer->moveToLast( viewFrame->widget() );
-      newContainer->swapChildren();
+    newContainer->moveToLast( viewFrame->widget() );
+    newContainer->swapChildren();
   }
 
+  printFullHierarchy( m_pMainContainer );
+  kdDebug(1202) << "KonqViewManager::splitView(ServiceType) done" << endl;
+
   return childView;
 }
 
@@ -101,13 +106,17 @@
 {
   kdDebug(1202) << "KonqViewManager::splitWindow(default)" << endl;
 
+  return 0L;
+
+  /*
   KURL url = m_pMainWindow->currentView()->url();
 
   QString locationBarURL;
   KonqFrameBase* splitFrame = 0L;
   if( m_pMainContainer )
   {
-    splitFrame = m_pMainContainer->firstChild();
+    if (m_pMainContainer->frameType()=="Tabs") return 0L;
+    splitFrame = static_cast<KonqFrameContainer*>(m_pMainContainer)->firstChild();
     locationBarURL = m_pMainWindow->currentView()->locationBarURL();
     if ( !splitFrame )
     {
@@ -129,6 +138,29 @@
     childView->openURL( url, locationBarURL );
 
   return childView;
+
+  */
+}
+
+KonqView* KonqViewManager::addTab(const QString &serviceType, const QString \
&serviceName, bool passiveMode) +{
+  kdDebug(1202) << "------------- KonqViewManager::splitTab starting -------------" \
<< endl; +  printFullHierarchy( m_pMainContainer );
+
+  KService::Ptr service;
+  KTrader::OfferList partServiceOffers, appServiceOffers;
+
+  KonqViewFactory newViewFactory = createView( serviceType, serviceName, service, \
partServiceOffers, appServiceOffers ); +
+  if( newViewFactory.isNull() )
+    return 0L; //do not split at all if we can't create the new view
+
+  KonqView* childView = setupView( m_pMainContainer, newViewFactory, service, \
partServiceOffers, appServiceOffers, serviceType, passiveMode ); +
+  printFullHierarchy( m_pMainContainer );
+  kdDebug(1202) << "------------- KonqViewManager::splitTab done -------------" << \
endl; +
+  return childView;
 }
 
 KonqView* KonqViewManager::split (KonqFrameBase* splitFrame,
@@ -148,19 +180,18 @@
     return 0L; //do not split at all if we can't create the new view
 
   KonqView *childView;
-  if( m_pMainContainer )
+  if( m_pMainWindow->currentView() )
   {
     assert( splitFrame );
 
-    KonqFrameContainer* parentContainer = splitFrame->parentContainer();
-    bool moveNewContainer = (parentContainer->idAfter( splitFrame->widget() ) != 0);
+    KonqFrameContainerBase* parentContainer = splitFrame->parentContainer();
 
 #ifndef NDEBUG
     printSizeInfo( splitFrame, parentContainer, "before split");
 #endif
 
     splitFrame->widget()->setUpdatesEnabled( false );
-    parentContainer->setUpdatesEnabled( false );
+    parentContainer->widget()->setUpdatesEnabled( false );
 
     QPoint pos = splitFrame->widget()->pos();
 
@@ -174,12 +205,9 @@
     KonqFrameContainer *newContainer = new KonqFrameContainer( orientation, \
                parentContainer );
     connect(newContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
  newContainer->setUpdatesEnabled( false );
-    newContainer->setOpaqueResize( true );
     newContainer->show();
 
     parentContainer->insertChildFrame( newContainer );
-    if( moveNewContainer )
-      parentContainer->moveToFirst( newContainer );
 
     //kdDebug(1202) << "Move in child" << endl;
     splitFrame->widget()->reparent( newContainer, pos, true /*showIt*/ );
@@ -198,7 +226,7 @@
 
     splitFrame->widget()->setUpdatesEnabled( true );
     newContainer->setUpdatesEnabled( true );
-    parentContainer->setUpdatesEnabled( true );
+    parentContainer->widget()->setUpdatesEnabled( true );
 
     if ( newFrameContainer )
       *newFrameContainer = newContainer;
@@ -206,21 +234,15 @@
   }
   else // We had no main container, create one
   {
-    m_pMainContainer = new KonqFrameContainer( orientation, m_pMainWindow );
-    kdDebug(1202) << "Created main container " << m_pMainContainer << endl;
-    connect(m_pMainContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
                
-    m_pMainWindow->setCentralWidget( m_pMainContainer );
-    m_pMainContainer->setOpaqueResize();
-    m_pMainContainer->setGeometry( 0, 0, m_pMainWindow->width(), \
                m_pMainWindow->height() );
-
-    childView = setupView( m_pMainContainer, newViewFactory, service, \
                partServiceOffers, appServiceOffers, serviceType, passiveMode );
-
-    //m_pMainContainer->show();
+    KonqFrameContainer* newContainer = new KonqFrameContainer( orientation, \
m_pMainContainer ); +    kdDebug(1202) << "Created new container, child of \
m_pMainContainer" << newContainer << endl; +    \
connect(newContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
 +    m_pMainContainer->insertChildFrame( newContainer);
 
-    //childView->frame()->statusbar()->hideStuff();
+    childView = setupView( newContainer, newViewFactory, service, partServiceOffers, \
appServiceOffers, serviceType, passiveMode );  
     if ( newFrameContainer )
-      *newFrameContainer = m_pMainContainer;
+      *newFrameContainer = newContainer;
   }
 
 #ifndef NDEBUG
@@ -230,9 +252,37 @@
   return childView;
 }
 
+void KonqViewManager::removeCurrentTab() {
+  kdDebug(1202) << "---------------- KonqViewManager::removeCurrentTab \
--------------" << endl; +  printFullHierarchy( m_pMainContainer );
+
+  KonqFrameBase* currentFrame = \
dynamic_cast<KonqFrameBase*>(m_pMainContainer->currentPage()); +  \
m_pMainContainer->removeChildFrame(currentFrame); +  currentFrame->widget()->hide();
+  //currentFrame->widget()->setUpdatesEnabled(false);
+
+  QList<KonqView> viewList;
+  QListIterator<KonqView> it( viewList );
+
+  currentFrame->listViews( &viewList );
+
+  for ( it.toFirst(); it.current(); ++it )
+  {
+    m_pMainWindow->removeChildView( it.current() );
+    delete it.current();
+  }
+
+  delete currentFrame;
+
+  printFullHierarchy( m_pMainContainer );
+  kdDebug(1202) << "------------- KonqViewManager::removeCurrentTab done \
--------------" << endl; +}	
+
 void KonqViewManager::removeView( KonqView *view )
 {
-  kdDebug(1202) << "---------------- removeView " << view << endl;
+  kdDebug(1202) << "---------------- removeView --------------" << view << endl;
+  printFullHierarchy( m_pMainContainer );
+
   if ( activePart() == view->part() )
   {
     KonqView *nextView = chooseNextView( view );
@@ -246,53 +296,67 @@
       setActivePart( nextView->part(), true /*immediate */ );
   }
 
-  KonqFrameContainer* parentContainer = view->frame()->parentContainer();
-  KonqFrameContainer* grandParentContainer = parentContainer->parentContainer();
-  kdDebug(1202) << "view=" << view << " parentContainer=" << parentContainer
-                << " grandParentContainer=" << grandParentContainer << endl;
-  bool moveOtherChild = (grandParentContainer->idAfter( parentContainer ) != 0);
+  KonqFrame* frame = view->frame();
+  KonqFrameContainerBase* parentContainer = frame->parentContainer();
+	
+  kdDebug(1202) << parentContainer->frameType() << endl;
 
-  KonqFrameBase* otherFrame = parentContainer->otherChild( view->frame() );
+  if (parentContainer->frameType()=="Container")
+  {
+    kdDebug(1202) << "parentContainer " << parentContainer << " is a \
KonqFrameContainer" << endl;  
-  if( otherFrame == 0L ) {
-    kdWarning(1202) << "KonqViewManager::removeView: This shouldn't happen!" << \
                endl;
-    return;
+    KonqFrameContainerBase* grandParentContainer = \
parentContainer->parentContainer(); +    KonqFrameBase* otherFrame = \
static_cast<KonqFrameContainer*>(parentContainer)->otherChild( frame ); +
+    kdDebug(1202) << "view=" << view << " parentContainer=" << parentContainer
+                  << " grandParentContainer=" << grandParentContainer << endl;
+
+    if( otherFrame == 0L )
+    {
+      kdWarning(1202) << "KonqViewManager::removeView: This shouldn't happen!" << \
endl; +      return;
+    }
+
+    kdDebug(1202) << "KonqViewManager::removeView reparenting other frame " << \
otherFrame << " widget=" << otherFrame->widget() << endl; +    QPoint pos = \
otherFrame->widget()->pos(); +
+    otherFrame->reparentFrame( m_pMainWindow, pos );
+    otherFrame->widget()->hide(); // Can't hide before, but after is better than \
nothing +    otherFrame->widget()->resize( 100, 30 ); // bring it to the QWidget \
defaultsize +
+    kdDebug(1202) << "--- Removing otherFrame from parentContainer" << endl;
+    parentContainer->removeChildFrame( otherFrame );
+
+    kdDebug(1202) << "--- Removing parentContainer from grandParentContainer" << \
endl; +    grandParentContainer->removeChildFrame( parentContainer );
+
+    m_pMainWindow->removeChildView(view);
+
+    kdDebug(1202) << "--- Deleting parentContainer " << parentContainer
+                  << ". Its parent is " << parentContainer->widget()->parent() << \
endl; +    delete parentContainer;
+
+    otherFrame->reparentFrame( grandParentContainer->widget(), pos, true /*showIt*/ \
); +
+    kdDebug(1202) << "--- Inserting otherFrame into grandParentContainer" << endl;		
+    grandParentContainer->insertChildFrame( otherFrame );
   }
+  else {
+    kdDebug(1202) << "parentContainer " << parentContainer << " is a KonqFrameTabs" \
<< endl; +
+    m_pMainContainer->removeChildFrame( frame );
+
+    // This deletes the widgets inside, including the part's widget, so tell the \
child view +    //view->partDeleted();
 
-  kdDebug(1202) << "KonqViewManager::removeView reparenting other frame " << \
                otherFrame << " widget=" << otherFrame->widget() << endl;
-  QPoint pos = otherFrame->widget()->pos();
+    m_pMainWindow->removeChildView(view);
 
-  otherFrame->reparentFrame( m_pMainWindow, pos );
-  otherFrame->widget()->hide(); // Can't hide before, but after is better than \
                nothing
-  otherFrame->widget()->resize( 100, 30 ); // bring it to the QWidget defaultsize
-  parentContainer->removeChildFrame( otherFrame );
-
-  m_pMainWindow->removeChildView( view );
-
-  parentContainer->removeChildFrame( view->frame() );
-
-  // We did so ourselves for passive views - doesn't really matter, but saves a call \
                to slotPassiveModePartDeleted
-  if ( view->isPassiveMode() && view->part() )
-      disconnect( view->part(), SIGNAL( destroyed() ), this, SLOT( \
                slotPassiveModePartDeleted() ) );
-
-  kdDebug(1202) << "Deleting view frame " << view->frame() << endl;
-  delete view->frame();
-  // This deletes the widgets inside, including the part's widget, so tell the child \
                view
-  view->partDeleted();
-  kdDebug(1202) << "Deleting view " << view << endl;
-  delete view;
-
-  grandParentContainer->removeChildFrame( parentContainer );
-  kdDebug(1202) << "Deleting parentContainer " << parentContainer
-                << ". Its parent is " << parentContainer->parent() << endl;
-  delete parentContainer;
-
-  otherFrame->reparentFrame( grandParentContainer, pos, true/*showIt*/ );
-  grandParentContainer->insertChildFrame( otherFrame );
-  if( moveOtherChild )
-    grandParentContainer->moveToFirst( otherFrame->widget() );
+    kdDebug(1202) << "Deleting view frame " << frame << endl;
+    delete frame;
+  }
+
+  kdDebug(1202) << "------------- removeView done --------------" << view << endl;
 
-  kdDebug(1202) << "------------- removeView done " << view << endl;
 #ifndef NDEBUG
   printFullHierarchy( m_pMainContainer );
 #endif
@@ -318,10 +382,6 @@
         kdDebug(1202) << "Deleting last view -> closing the window" << endl;
         setActivePart( 0L, true );
         m_pMainWindow->removeChildView( view );
-        kdDebug(1202) << "Deleting frame " << view << endl;
-        delete view->frame(); // This deletes the widgets inside, including the \
                part's widget
-        kdDebug(1202) << "Deleting view " << view << endl;
-        delete view;
         kdDebug(1202) << "Deleting m_pMainContainer " << m_pMainContainer << endl;
         delete m_pMainContainer;
         m_pMainContainer = 0L;
@@ -378,18 +438,18 @@
   QList<KonqView> viewList;
   QListIterator<KonqView> it( viewList );
 
-  if (m_pMainContainer) {
-    m_pMainContainer->listViews( &viewList );
+  if ( !m_pMainWindow->currentView() ) return;
 
-    for ( it.toFirst(); it.current(); ++it ) {
-      m_pMainWindow->removeChildView( it.current() );
-      delete it.current();
-    }
+  m_pMainContainer->listViews( &viewList );
 
-    kdDebug(1202) << "deleting m_pMainContainer " << endl;
-    delete m_pMainContainer;
-    m_pMainContainer = 0L;
+  for ( it.toFirst(); it.current(); ++it ) {
+    m_pMainWindow->removeChildView( it.current() );
+    delete it.current();
   }
+
+  kdDebug(1202) << "deleting m_pMainContainer " << endl;
+  delete m_pMainContainer;
+  m_pMainContainer = 0L;
 }
 
 KonqView *KonqViewManager::chooseNextView( KonqView *view )
@@ -459,7 +519,7 @@
   return viewFactory;
 }
 
-KonqView *KonqViewManager::setupView( KonqFrameContainer *parentContainer,
+KonqView *KonqViewManager::setupView( KonqFrameContainerBase *parentContainer,
                                       KonqViewFactory &viewFactory,
                                       const KService::Ptr &service,
                                       const KTrader::OfferList &partServiceOffers,
@@ -526,14 +586,14 @@
 void KonqViewManager::saveViewProfile( KConfig & cfg, bool saveURLs, bool \
saveWindowSize )  {
   kdDebug(1202) << "KonqViewManager::saveViewProfile" << endl;
-  if( m_pMainContainer && m_pMainContainer->firstChild() ) {
-    cfg.writeEntry( "RootItem", QString::fromLatin1( \
                m_pMainContainer->firstChild()->frameType() )
-                    + QString::number(0) );
-    QString prefix = QString::fromLatin1( \
                m_pMainContainer->firstChild()->frameType() )
-                     + QString::number(0);
-    prefix.append( '_' );
-    m_pMainContainer->firstChild()->saveConfig( &cfg, prefix, saveURLs, 0, 1 );
-  }
+  //if( m_pMainContainer && m_pMainContainer->firstChild() ) {
+  //  cfg.writeEntry( "RootItem", QString::fromLatin1( \
m_pMainContainer->firstChild()->frameType() ) +  //                  + \
QString::number(0) ); +  //  QString prefix = QString::fromLatin1( \
m_pMainContainer->firstChild()->frameType() ) +  //                   + \
QString::number(0); +  //  prefix.append( '_' );
+  //  m_pMainContainer->firstChild()->saveConfig( &cfg, prefix, saveURLs, 0, 1 );
+  //}
 
   if ( saveWindowSize )
   {
@@ -583,12 +643,11 @@
 
   if ( rootItem != "empty" && forcedURL.url() != "about:blank" )
   {
-      m_pMainContainer = new KonqFrameContainer( Qt::Horizontal, m_pMainWindow );
-      connect(m_pMainContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
                
-      m_pMainWindow->setCentralWidget( m_pMainContainer );
-      m_pMainContainer->setOpaqueResize();
-      m_pMainContainer->setGeometry( 0, 0, m_pMainWindow->width(), \
                m_pMainWindow->height() );
-      m_pMainContainer->show();
+    //m_pMainContainer = new KonqFrameContainer( Qt::Horizontal, m_pMainWindow );
+    //connect(m_pMainContainer->widget(),SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
 +    //m_pMainWindow->setCentralWidget( m_pMainContainer->widget() );
+    //m_pMainContainer->widget()->setGeometry( 0, 0, m_pMainWindow->width(), \
m_pMainWindow->height() ); +    //m_pMainContainer->widget()->show();
 
       // This flag is used by KonqView, to distinguish manual view creation
       // from profile loading (e.g. in switchView)
@@ -726,7 +785,7 @@
     return QSize( width, height );
 }
 
-void KonqViewManager::loadItem( KConfig &cfg, KonqFrameContainer *parent,
+void KonqViewManager::loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
                                 const QString &name, const KURL & defaultURL, bool \
openURL )  {
   QString prefix;
@@ -813,7 +872,6 @@
       KonqFrameContainer *newContainer = new KonqFrameContainer( o, parent );
       connect(newContainer,SIGNAL(ctrlTabPressed()),m_pMainWindow,SLOT(slotCtrlTabPressed()));
  parent->insertChildFrame( newContainer );
-      newContainer->setOpaqueResize();
       newContainer->show();
 
       loadItem( cfg, newContainer, childList.at(0), defaultURL, openURL );
@@ -919,57 +977,30 @@
 ///////////////// Debug stuff ////////////////
 
 void KonqViewManager::printSizeInfo( KonqFrameBase* frame,
-                                     KonqFrameContainer* parent,
+                                     KonqFrameContainerBase* parent,
                                      const char* msg )
 {
+  /*
   QRect r;
   r = frame->widget()->geometry();
   qDebug("Child size %s : x: %d, y: %d, w: %d, h: %d", msg, \
r.x(),r.y(),r.width(),r.height() );  
   QValueList<int> sizes;
-  sizes = parent->sizes();
+  sizes = static_cast<KonqFrameContainer*>(parent)->sizes();
   printf( "Parent sizes %s :", msg );
   QValueList<int>::ConstIterator it;
   for( it = sizes.begin(); it != sizes.end(); ++it )
     printf( " %d", (*it) );
   printf("\n");
+  */
 }
 
-void KonqViewManager::printFullHierarchy( KonqFrameContainer * container, int ident \
) +void KonqViewManager::printFullHierarchy( KonqFrameContainerBase * container )
 {
-    if (container)
-    {
-        QString spaces;
-        for ( int i = 0 ; i < ident ; i++ )
-            spaces += " ";
-        kdDebug(1202) << spaces << "Container " << container << endl;
-        KonqFrameBase * child = container->firstChild();
-        if ( !child )
-            kdDebug(1202) << spaces << "  Null child" << endl;
-        else if ( child->widget()->isA("KonqFrameContainer") )
-            printFullHierarchy( static_cast<KonqFrameContainer *>(child), ident + 2 \
                );
-        else
-            kdDebug(1202) << spaces << "  " << "KonqFrame containing view "
-                          << static_cast<KonqFrame *>(child)->childView()
-                          << " part "
-                          << static_cast<KonqFrame *>(child)->part()
-                          << " whose widget is a "
-                          << static_cast<KonqFrame \
                *>(child)->part()->widget()->className() << endl;
-        child = container->secondChild();
-        if ( !child )
-            kdDebug(1202) << spaces << "  Null child" << endl;
-        else if ( child->widget()->isA("KonqFrameContainer") )
-            printFullHierarchy( static_cast<KonqFrameContainer *>(child), ident + 2 \
                );
-        else
-            kdDebug(1202) << spaces << "  " << "KonqFrame " << child << " containing \
                view "
-                          << static_cast<KonqFrame *>(child)->childView()
-                          << " part "
-                          << static_cast<KonqFrame *>(child)->part()
-                          << " whose widget is a "
-                          << static_cast<KonqFrame \
                *>(child)->part()->widget()->className() << endl;
-    }
-    else
-        kdDebug(1202) << "Null container" << endl;
+  kdDebug(1202) << m_pMainWindow->currentView();
+
+  if (container) container->printFrameInfo(QString::null);
+  else kdDebug(1202) << "Null Container" << endl;
 }
 
 #include "konq_viewmgr.moc"
diff -u kdebase-2.2.2.orig/konqueror/konq_viewmgr.h \
                kdebase-2.2.2/konqueror/konq_viewmgr.h
--- kdebase-2.2.2.orig/konqueror/konq_viewmgr.h	Sat Jul 28 23:56:40 2001
+++ kdebase-2.2.2/konqueror/konq_viewmgr.h	Sun Dec  9 17:56:36 2001
@@ -38,6 +38,8 @@
 class KonqMainWindow;
 class KonqFrameBase;
 class KonqFrameContainer;
+class KonqFrameContainerBase;
+class KonqFrameTabs;
 class KonqView;
 class BrowserView;
 class KActionMenu;
@@ -81,6 +83,14 @@
                          const QString & serviceName = QString::null,
                          bool newOneFirst = false);
 
+	/**
+	 * Adds a tab to m_pMainContainer
+	 */
+
+  KonqView* addTab(const QString &serviceType = QString::null,
+		     					 const QString &serviceName = QString::null,
+							     bool passiveMode = false);
+
   /**
    * Do the actual splitting. The new View will be created from serviceType.
    * Returns the newly created view or 0L if the new view couldn't be created.
@@ -99,6 +109,12 @@
   void removeView( KonqView *view );
 
   /**
+   * Guess Again!:->
+   * Also takes care of setting another view as active if the active view was in \
this tab +   */
+	void removeCurrentTab();
+
+  /**
    * Saves the current view layout to a config file.
    * Remove config file before saving, especially if saveURLs is false.
    * @param cfg the config file
@@ -174,7 +190,7 @@
 
   void profileListDirty( bool broadcast = true );
 
-  KonqFrameContainer *mainContainer() const { return m_pMainContainer; }
+  KonqFrameTabs *mainContainer() const { return m_pMainContainer; }
 
   KonqMainWindow *mainWindow() const { return m_pMainWindow; }
 
@@ -216,7 +232,7 @@
    * @param openURL whether to open urls at all (from the profile or using @p \
                defaultURL).
    *  (this is set to false when we have a forcedURL to open)
    */
-  void loadItem( KConfig &cfg, KonqFrameContainer *parent,
+  void loadItem( KConfig &cfg, KonqFrameContainerBase *parent,
                  const QString &name, const KURL & defaultURL, bool openURL );
 
   // Disabled - we do it ourselves
@@ -239,7 +255,7 @@
    * Mainly creates the backend structure(KonqView) for a view and
    * connects it
    */
-  KonqView *setupView( KonqFrameContainer *parentContainer,
+  KonqView *setupView( KonqFrameContainerBase *parentContainer,
                        KonqViewFactory &viewFactory,
                        const KService::Ptr &service,
                        const KTrader::OfferList &partServiceOffers,
@@ -249,13 +265,14 @@
 
   //just for debugging
   void printSizeInfo( KonqFrameBase* frame,
-                      KonqFrameContainer* parent,
+                      KonqFrameContainerBase* parent,
                       const char* msg );
-  void printFullHierarchy( KonqFrameContainer * container, int ident = 0 );
+
+  void printFullHierarchy( KonqFrameContainerBase * container );
 
   KonqMainWindow *m_pMainWindow;
 
-  KonqFrameContainer *m_pMainContainer;
+  KonqFrameTabs *m_pMainContainer;
 
   QGuardedPtr<KActionMenu> m_pamProfiles;
   bool m_bProfileListDirty;
diff -u kdebase-2.2.2.orig/konqueror/konqueror.rc \
                kdebase-2.2.2/konqueror/konqueror.rc
--- kdebase-2.2.2.orig/konqueror/konqueror.rc	Sat Jul 28 23:56:40 2001
+++ kdebase-2.2.2/konqueror/konqueror.rc	Tue Dec 11 21:49:56 2001
@@ -87,6 +87,9 @@
   <Action name="splitviewv"/>
   <Action name="removeview"/>
   <Separator/>
+  <Action name="addtab"/>
+  <Action name="removecurrenttab"/>
+  <Separator/>    
   <ActionList name="toggleview" />
   <Separator/>
   <Action name="saveviewprofile"/>
Common subdirectories: kdebase-2.2.2.orig/konqueror/listview and \
kdebase-2.2.2/konqueror/listview Common subdirectories: \
kdebase-2.2.2.orig/konqueror/pics and kdebase-2.2.2/konqueror/pics Common \
subdirectories: kdebase-2.2.2.orig/konqueror/shellcmdplugin and \
kdebase-2.2.2/konqueror/shellcmdplugin Common subdirectories: \
kdebase-2.2.2.orig/konqueror/sidebar and kdebase-2.2.2/konqueror/sidebar



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic