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

List:       kfm-devel
Subject:    konq_mainview discussion
From:       David Faure <David.Faure () insa-lyon ! fr>
Date:       1999-02-28 23:31:55
[Download RAW message or body]

[Discussion about view-mode switching, see konq_mainview around line 715]

I agree with
// Simon:
// Well, IMHO: do not really remove the view but instead:
// 1) only replace the view variable
// 2) attach it to the opFrame (the old one will be detached automatically)
// I hope you don't mind me doing this change. We can still revert it, ok?
(and I removed the commented code from konq_mainview)

but detach() or attach() have the same result : core dump
(I tried adding detach() to my version of this code, core dump...)

#0  0x4005eaf3 in OPPartIf::removeChild (this=0x8162238, child=0x8165508) \
at opPart.cc:244 #1  0x4005e1cc in OPPartIf::cleanUp (this=0x816551c) at \
opPart.cc:74 #2  0x80719c7 in KonqBaseView::cleanUp ()
#3  0x401ec22b in KOMBase::decRef ()
#4  0x4007c19b in KOMVar<OpenParts::Part>::free (this=0x8168e70) at \
../kom/komVar.h:49 #5  0x4007c116 in KOMVar<OpenParts::Part>::reset \
(this=0x8168e70, ptr=0x0) at ../kom/komVar.h:57 #6  0x4007c089 in \
KOMVar<OpenParts::Part>::operator= (this=0x8168e70, ptr=0x0) at \
../kom/komVar.h:111 #7  0x40058d87 in OPFrame::detach (this=0x8168e08) at \
opFrame.cc:92 #8  0x40058c0e in OPFrame::attach (this=0x8168e08, \
_control=0x0) at opFrame.cc:44 #9  0x8083e7d in KonqMainView::openURL ()
#10 0x8085b8b in KonqMainView::slotURLEntered ()
#11 0x8097d70 in Konqueror::MainView_skel::dispatch ()
#12 0x80ad06c in InterfaceDispatcherWrapper<Konqueror::MainView_skel>::dispatch \
() #13 0x408e5335 in CORBA::MethodDispatcher::invoke ()
#14 0x408b9b9a in CORBA::DynamicImplementation::doinvoke ()
#15 0x408acc8f in MICO::BOAImpl::invoke ()
#16 0x408ced13 in CORBA::ORB::invoke_async () 

(to reproduce, enter http://www in the toolbar URL - you might need to do
Ctrl+O Esc first, because of a focus bug.)

--------------

However I'm not sure about :

    if (sViewName == "KonquerorHTMLView")
//      vView = Konqueror::View::_duplicate( new KonqHTMLView );
      vView = Konqueror::View::_duplicate( m_vHTMLView );
    else
//      vView = Konqueror::View::_duplicate( new KonqKfmIconView );
      vView = Konqueror::View::_duplicate( m_vKfmIconView );

I thought it might save a lot of memory if MainView doesn't create a
HTMLView, a IconView, and so on, at startup. konqueror_1 did that, but I
don't think it's a good idea. We only display one at a time.

Also because you can have TWO icon views in a mainview, can't you ?
So you can't simply use two global vars m_v*View.

--------------

//  EMIT_EVENT( m_vHTMLView, Konqueror::eventOpenURL, eventURL );
  EMIT_EVENT( m_vKfmTreeView, Konqueror::eventOpenURL, eventURL );
//  EMIT_EVENT( m_vKfmIconView, Konqueror::eventOpenURL, eventURL );
Hum, probably better use KfmRun, as you said...
But then KfmRun needs to know the view mode the user wants, to make the
difference between icon view, tree view, ... we'll see.

-- 
 ____________________________________________________________________
> > 
> David FAURE                                                       |
> E-mail : David.Faure@insa-lyon.fr, faure@kde.org                  |
> http://www.insa-lyon.fr/People/AEDI/dfaure/index.html             |
> ____________________________________________________________________|


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

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