Summary: | Please allow optional saving of KDE Help Center searches and display links to each one | ||
---|---|---|---|
Product: | [Applications] khelpcenter | Reporter: | Robert Moore <rdm> |
Component: | general | Assignee: | Cornelius Schumacher <schumacher> |
Status: | RESOLVED WORKSFORME | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Robert Moore
2006-03-28 23:00:09 UTC
I did not find where to correctly categorize this bug, so please accept my apology for this oversight and correctly categorize the bug (or create a new category?) as appropriate. Bookmarks in Help Center would be valid. However, it will be just as good to give the one-item context menu for links in the Help Center another item: Konqueror's "Bookmark This Link". Below is my effort to patch view.cpp ("+++"), as retrieved from: http://lxr.kde.org/source/KDE/kdebase/khelpcenter/view.cpp Unfortunately it's incomplete, but I guess the other required bits of code are to be found on the lxr.kde.org site, too. I'd appreciate any guidance posted to this bug report. Hopefully I'll be able to eventually resolve this bug by submitting its patch(es) myself. From http://lxr.kde.org/source/KDE/kdebase/khelpcenter/view.cpp : 041 connect( this, SIGNAL( popupMenu( const QString &, const QPoint& ) ), 042 this, SLOT( showMenu( const QString &, const QPoint& ) ) ); ... 261 else 262 { 263 QAction *action = pop.addAction(i18n("Copy Link Address")); 264 connect( action, SIGNAL( triggered() ), this, SLOT( slotCopyLink() ) ); 265 266 mCopyURL = completeURL(url).url(); +++ QAction *action = pop.addAction(i18n("Bookmark Link in Konqueror")); +++ connect( action, SIGNAL( triggered() ), this, SLOT( slotKonqBookmark() ) ); 267 } ... 272 void View::slotCopyLink() 273 { 274 QApplication::clipboard()->setText(mCopyURL); 275 } ... 347 KUrl View::urlFromLinkNode( const DOM::Node &n ) const 348 { 349 if ( n.isNull() || n.nodeType() != DOM::Node::ELEMENT_NODE ) 350 return KUrl(); 351 352 DOM::Element elem = static_cast<DOM::Element>( n ); 353 354 KUrl href ( elem.getAttribute( "href" ).string() ); 355 if ( !href.protocol().isNull() ) 356 return href; 357 358 QString path = baseURL().path(); 359 path.truncate( path.lastIndexOf( '/' ) + 1 ); 360 path += href.url(); 361 362 KUrl url = baseURL(); 363 url.setRef( QString() ); 364 url.setEncodedPathAndQuery( path ); 365 366 return url; 367 } Withdrawn pending KDE4 release. Report to be moved to wiki. http://wiki.kde.org/ |