[PATCH] Captions for top-level tool views

John Firebaugh jfirebaugh at kde.org
Wed Jul 25 15:27:15 UTC 2001


> Hi John,
>
> John Firebaugh wrote:
> > My first kdevelop contribution. This patch restores captions for
> > tree-views when they are undocked, into top-level views.
>
> Your patch doesn't work if I set View->TabText->IconsOnly and restart
> KDevelop.
> I cannot apply it. :-(
> Wanna try again?

Ah, yes. That is because QextMdiMainFrm::addToolWindow() tries hard to 
find a tab caption when it really should just use the one passed. Note 
also I changed the window type of undocked tool windows to NET::Tool.
I think this looks nicer.

Index: kdevelop/widgets/qextmdi/src/qextmdimainfrm.cpp
===================================================================
RCS file: /home/kde/kdevelop/kdevelop/widgets/qextmdi/src/Attic/qextmdimainfrm.cpp,v
retrieving revision 1.14.2.50
diff -u -3 -p -r1.14.2.50 qextmdimainfrm.cpp
--- kdevelop/widgets/qextmdi/src/qextmdimainfrm.cpp     2001/07/25 08:36:38     1.14.2.50
+++ kdevelop/widgets/qextmdi/src/qextmdimainfrm.cpp     2001/07/25 15:16:18
@@ -359,9 +359,10 @@ void QextMdiMainFrm::addToolWindow( QWid
                                               pToolView->icon() ? *(pToolView->icon()) : QPixmap(),
                                               0L,  // parent
                                               pToolView->caption(),
-                                              tabCaption.isEmpty() ? pToolView->tabCaption() : tabCaption);
+                                              tabCaption );
       pCover->setWidget( pToolView);
       pCover->setToolTipString( tabToolTip);
+      pCover->setDockWindowType( NET::Tool );
       KDockWidget* pTargetDock = 0L;
       if ((pTargetWnd == m_pDockbaseAreaOfDocumentViews->getWidget()) || (pTargetWnd == this)) {
          pTargetDock = m_pDockbaseAreaOfDocumentViews;

-
to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop-devel mailing list