[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/konqueror
From: David Faure <faure () kde ! org>
Date: 2003-10-27 17:51:59
[Download RAW message or body]
CVS commit by faure:
Let window.resizeTo etc. also work when the tabbar is shown and there's only
one tab. Tested by Andras Mantia.
M +8 -2 konq_view.cc 1.349
--- kdebase/konqueror/konq_view.cc #1.348:1.349
@@ -26,4 +26,5 @@
#include "konq_events.h"
#include "konq_viewmgr.h"
+#include "konq_tabs.h"
#include "konq_browseriface.h"
#include <kparts/statusbarextension.h>
@@ -468,5 +469,7 @@ void KonqView::slotEnableAction( const c
void KonqView::slotMoveTopLevelWidget( int x, int y )
{
- if ( m_pMainWindow->currentView()->frame()->parentContainer()->frameType() != "Tabs" )
+ KonqFrameContainerBase* container = frame()->parentContainer();
+ // If tabs are shown, only accept to move the whole window if there's only one tab.
+ if ( container->frameType() != "Tabs" || static_cast<KonqFrameTabs*>(container)->count() == 1 )
m_pMainWindow->move( x, y );
}
@@ -474,5 +477,8 @@ void KonqView::slotMoveTopLevelWidget( i
void KonqView::slotResizeTopLevelWidget( int w, int h )
{
- if ( m_pMainWindow->currentView()->frame()->parentContainer()->frameType() != "Tabs" )
+ KonqFrameContainerBase* container = frame()->parentContainer();
+ // If tabs are shown, only accept to resize the whole window if there's only one tab.
+ // ### Maybe we could store the size requested by each tab and resize the window to the biggest one.
+ if ( container->frameType() != "Tabs" || static_cast<KonqFrameTabs*>(container)->count() == 1 )
m_pMainWindow->resize( w, h );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic