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

List:       kde-bugs-dist
Subject:    [Bug 44961] named target opens new window instead of reuseing
From:       David Faure <faure () kde ! org>
Date:       2005-05-12 16:45:31
Message-ID: 20050512164531.28688.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=44961         
faure kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From faure kde org  2005-05-12 18:45 -------
SVN commit 412789 by dfaure:

Fix for <a target="..">: when opening a link into a new tab, the tab wasn't
assigned the frameName from the target attribute.
BUG: 44961


 M  +12 -7     trunk/KDE/kdebase/konqueror/konq_mainwindow.cc  


--- trunk/KDE/kdebase/konqueror/konq_mainwindow.cc #412788:412789
 @ -472,8 +472,11  @
                               const QString &_serviceType, KonqOpenURLRequest& req,
                               bool trustedSource )
 {
+#ifndef NDEBUG // needed for req.debug()
   kdDebug(1202) << "KonqMainWindow::openURL : url = '" << _url << "'  "
-                << "serviceType='" << _serviceType << "' view=" << _view << endl;
+                << "serviceType='" << _serviceType << " req=" << req.debug()
+                << "' view=" << _view << endl;
+#endif
 
   KURL url( _url );
   QString serviceType( _serviceType );
 @ -516,11 +519,13  @
     if (view) {
       view->setCaption( _url.host() );
       view->setLocationBarURL( _url );
+      if ( !req.args.frameName.isEmpty() )
+          view->setViewName( req.args.frameName ); // #44961
 
       if ( req.newTabInFront )
         m_pViewManager->showTab( view );
 
-        updateViewActions(); //A new tab created -- we may need to enable the \
"remove tab" button (#56318) +      updateViewActions(); //A new tab created -- we \
may need to enable the "remove tab" button (#56318)  }
     else
       req.newTab = false;
 @ -634,7 +639,7  @
 
 bool KonqMainWindow::openView( QString serviceType, const KURL &_url, KonqView \
*childView, KonqOpenURLRequest& req )  {
-  // TODO: Replace KURL() with referring URL. DF: done, please check.
+  // Second argument is referring URL
   if ( !kapp->authorizeURLAction("open", childView ? childView->url() : KURL(), \
_url) )  {
      QString msg = KIO::buildErrorString(KIO::ERR_ACCESS_DENIED, _url.prettyURL());
 @ -810,15 +815,15  @
             enableAllActions( true );
 
             m_pViewManager->setActivePart( childView->part() );
-
-            childView->setViewName( m_initialFrameName.isEmpty() ? \
                req.args.frameName : m_initialFrameName );
-            m_initialFrameName = QString::null;
             m_currentView = childView;
         }
       }
 
-      if ( !childView )
+      if ( childView )
           return false; // It didn't work out.
+
+      childView->setViewName( m_initialFrameName.isEmpty() ? req.args.frameName : \
m_initialFrameName ); +      m_initialFrameName = QString::null;
   }
   else // We know the child view
   {


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

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