Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 34099483 authored by Tobias Koenig's avatar Tobias Koenig

Update the bookmark menu whenever bookmarks have been renamed

in the sidebar

BUG: 157189

svn path=/trunk/KDE/kdegraphics/okular/; revision=771286
parent 8e4d1708
......@@ -150,6 +150,7 @@ KBookmark::List BookmarkManager::bookmarks( const KUrl& url ) const
void BookmarkManager::save() const
{
d->manager->save( false );
emit const_cast<BookmarkManager*>( this )->saved();
}
static QHash<KUrl, KBookmarkGroup>::iterator find( QHash<KUrl, KBookmarkGroup>& files, const KUrl& url, KBookmarkManager * manager, bool doCreate )
......
......@@ -92,6 +92,11 @@ class OKULAR_EXPORT BookmarkManager : public QObject
*/
void openUrl( const KUrl& url );
/**
* This signal is emitted whenever bookmarks have been saved.
*/
void saved();
private:
class Private;
Private * const d;
......
......@@ -282,6 +282,9 @@ m_cliPresentation(false), m_generatorGuiClient(0)
m_document->addObserver( m_pageSizeLabel );
m_document->addObserver( bookmarkList );
connect( m_document->bookmarkManager(), SIGNAL( saved() ),
this, SLOT( slotRebuildBookmarkMenu() ) );
// ACTIONS
KActionCollection * ac = actionCollection();
......@@ -1034,6 +1037,10 @@ void Part::enableTOC(bool enable)
m_sidebar->setItemEnabled(0, enable);
}
void Part::slotRebuildBookmarkMenu()
{
rebuildBookmarkMenu();
}
void Part::slotShowFindBar()
{
......
......@@ -153,6 +153,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
void updateViewActions();
void updateBookmarksActions();
void enableTOC(bool enable);
void slotRebuildBookmarkMenu();
public slots:
// connected to Shell action (and browserExtension), not local one
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment