Commit 1e68ded6 authored by Pino Toscano's avatar Pino Toscano

Florian is right, change also the icon of the add/remove bookmark action

svn path=/trunk/KDE/kdegraphics/okular/; revision=660124
parent 0260a8f2
......@@ -297,6 +297,7 @@ m_searchStarted(false), m_cliPresentation(false)
m_addBookmark = KStandardAction::addBookmark( this, SLOT( slotAddBookmark() ), ac );
m_addBookmarkText = m_addBookmark->text();
m_addBookmarkIcon = m_addBookmark->icon();
m_prevBookmark = ac->addAction("previous_bookmark");
m_prevBookmark->setText(i18n( "Previous Bookmark" ));
......@@ -956,16 +957,19 @@ void Part::updateBookmarksActions()
if ( m_document->isBookmarked( m_document->currentPage() ) )
{
m_addBookmark->setText( i18n( "Remove Bookmark" ) );
m_addBookmark->setIcon( KIcon( "bookmark" ) ); // ### 'bookmark-remove' or similar
}
else
{
m_addBookmark->setText( m_addBookmarkText );
m_addBookmark->setIcon( m_addBookmarkIcon );
}
}
else
{
m_addBookmark->setEnabled( false );
m_addBookmark->setText( m_addBookmarkText );
m_addBookmark->setIcon( m_addBookmarkIcon );
}
}
......
......@@ -18,6 +18,7 @@
#include <kparts/browserextension.h>
#include <kparts/part.h>
#include <qicon.h>
#include <qlist.h>
#include <qpointer.h>
#include <qprocess.h>
......@@ -236,6 +237,7 @@ class Part : public KParts::ReadOnlyPart, public Okular::DocumentObserver, publi
QList<QAction*> m_bookmarkActions;
bool m_cliPresentation;
QString m_addBookmarkText;
QIcon m_addBookmarkIcon;
private slots:
void slotGeneratorPreferences();
......
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