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

List:       kfm-devel
Subject:    window.history - solutions (?)
From:       Nikolas Zimmermann <wildfox () kde ! org>
Date:       2001-02-28 19:54:04
[Download RAW message or body]

Hi there,

i've looked where the whole history stuff in konqi
is "saved". It's in the KonqView class....

to do nice functions via JS like history.back
or forward...or even length
i would need that list....

now the question is how to acces that list
i got 2 ideas.

1. "mem eater" (?)
As we can access the KParts::BrowserExtension
from the ecma bindings (via part->browserExtension())
i thought we could add a QList<HistoryEntry> into that Extension
and everytime we visit a new site the KonqView
will "send" his new m_lstHistory to the extension...we will have
the same list in KonqView and the BrowserExtension so that
we could use it via JS....now Simon told me that it's bad to store
something in the extension...never mind .....let's see your opinion

2. "ugly hack" (!)
Normally only the application "talks" with the embedded part.
With that solution we would just place an empty QList<HistoryEntry>
into the extension and if someone triggers a history.back
the extension emits a signal getHistoryList()... the khtmlpart
receives the signal and emit the same signal again
now konqueror has the signal and gets the historylist from KonqView
and calls gotHistoryList(QList<HistoryEntry>) in khtmlpart
...khtmlpart calls gotHistoryList in the extension.....the extension
emits a signal so that the ecma binding "knows" that the QList
in the extension isn't empty anymore and accesses everything it needs.


I prefer the first solution..
Ideas?

Bye
 Bye
  Niko

-- 
Nikolas Zimmermann
wildfox@kde.org

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

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