create an Identity settings section and move the author field there

svn path=/trunk/playground/graphics/okular/; revision=601335
remotes/origin/KDE/4.0
Pino Toscano 20 years ago
parent 91611a9afc
commit 5862ea6dc8
  1. 4
      conf/okular.kcfg
  2. 6
      ui/pageviewannotator.cpp

@ -128,7 +128,6 @@
</entry>
</group>
<group name="General" >
<entry key="AnnotationsAuthor" type="String" />
<entry key="ObeyDRM" type="Bool" >
<default>true</default>
</entry>
@ -205,4 +204,7 @@
<max>4.0</max>
</entry>
</group>
<group name="Identity" >
<entry key="IdentityAuthor" type="String" />
</group>
</kcfg>

@ -605,7 +605,7 @@ void PageViewAnnotator::setEnabled( bool on )
m_toolBar->showItems( (PageViewToolBar::Side)Okular::Settings::editToolBarPlacement(), items );
// ask for Author's name if not already set
if ( Okular::Settings::annotationsAuthor().isEmpty() )
if ( Okular::Settings::identityAuthor().isEmpty() )
{
// get default username from the kdelibs/kdecore/KUser
KUser currentUser;
@ -620,7 +620,7 @@ void PageViewAnnotator::setEnabled( bool on )
firstTry = false;
}
// save the name
Okular::Settings::setAnnotationsAuthor( userName );
Okular::Settings::setIdentityAuthor( userName );
Okular::Settings::writeConfig();
}
}
@ -695,7 +695,7 @@ QRect PageViewAnnotator::routeEvent( QMouseEvent * e, PageViewItem * item )
if ( !annotation ) continue;
annotation->creationDate = annotation->modifyDate = QDateTime::currentDateTime();
annotation->author = Okular::Settings::annotationsAuthor();
annotation->author = Okular::Settings::identityAuthor();
m_document->addPageAnnotation( m_lockedItem->pageNumber(), annotation );
}

Loading…
Cancel
Save