Use the form "<page> - <name>" for the items in the Bookmarks menu.

svn path=/trunk/playground/graphics/okular/; revision=625075
This commit is contained in:
Pino Toscano 2007-01-18 21:20:08 +00:00
parent 69557420a7
commit e71a608054

View file

@ -23,6 +23,17 @@
using namespace Okular;
class OkularBookmarkAction : public KBookmarkAction
{
public:
OkularBookmarkAction( const Okular::DocumentViewport& vp, const KBookmark& bk, KBookmarkOwner* owner, QObject *parent )
: KBookmarkAction( bk, owner, parent )
{
if ( vp.isValid() )
setText( QString::number( vp.pageNumber + 1 ) + " - " + text() );
}
};
class BookmarkManager::Private : public KBookmarkOwner
{
public:
@ -237,7 +248,7 @@ QList< QAction * > BookmarkManager::actionsForUrl( const KUrl& url ) const
if ( b.isSeparator() || b.isGroup() )
continue;
ret.append( new KBookmarkAction( b, d, 0 ) );
ret.append( new OkularBookmarkAction( DocumentViewport( b.url().htmlRef() ), b, d, 0 ) );
}
break;
}