mirror of
https://invent.kde.org/graphics/okular
synced 2024-09-17 23:11:48 +00:00
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:
parent
69557420a7
commit
e71a608054
|
@ -23,6 +23,17 @@
|
||||||
|
|
||||||
using namespace Okular;
|
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
|
class BookmarkManager::Private : public KBookmarkOwner
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -237,7 +248,7 @@ QList< QAction * > BookmarkManager::actionsForUrl( const KUrl& url ) const
|
||||||
if ( b.isSeparator() || b.isGroup() )
|
if ( b.isSeparator() || b.isGroup() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ret.append( new KBookmarkAction( b, d, 0 ) );
|
ret.append( new OkularBookmarkAction( DocumentViewport( b.url().htmlRef() ), b, d, 0 ) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue