- connect(dolphinView, SIGNAL(contentsMoved(int, int)),
- this, SLOT(slotContentsMoved(int, int)));
- connect(dolphinView, SIGNAL(redirection(const KUrl&, const KUrl&)),
- this, SLOT(slotRedirection(const KUrl&, const KUrl&)));
-/* connect(dolphinView, SIGNAL(redirection(const KUrl&)),
- this, SLOT(slotRedirection(const KUrl&)));*/
- updateContent();
-}
-
-UrlNavigator::~UrlNavigator()
-{
-}
-
-void UrlNavigator::setUrl(const KUrl& url)
-{
- QString urlStr(url.pathOrUrl());
- //kDebug() << "setUrl(" << url << ")" << endl;
- if ( urlStr.length() > 0 && urlStr.at(0) == '~') {
- // replace '~' by the home directory
- urlStr.remove(0, 1);
- urlStr.insert(0, QDir::home().path());
- }
-
- const KUrl transformedUrl(urlStr);
-
- if (m_historyIndex > 0) {
- // Check whether the previous element of the history has the same Url.
- // If yes, just go forward instead of inserting a duplicate history
- // element.
- const KUrl& nextUrl = m_history[m_historyIndex - 1].url();
- if (transformedUrl == nextUrl) {
- goForward();
-// kDebug() << "goin' forward in history" << endl;
- return;
- }
- }
-
- const KUrl& currUrl = m_history[m_historyIndex].url();
- if (currUrl == transformedUrl) {
- // don't insert duplicate history elements
-// kDebug() << "currUrl == transformedUrl" << endl;
- return;
- }