From cfa8c3a6d50503a48719df332999750be7f8fdd7 Mon Sep 17 00:00:00 2001 From: Fabio D'Urso Date: Sat, 20 Apr 2013 10:53:04 +0200 Subject: [PATCH] HighlightAnnotation text improvements - Changed property dialog title from "Highlight" to "Text Markup", because it's used for Underline, Squiggle and Strike out too. - Renamed Squiggly (adjective) to Squiggle (noun) - Show the precise type of HighlightAnnotation in the review panel and on right-click on a HighlightAnnotation --- ui/annotationpropertiesdialog.cpp | 2 +- ui/annotationwidgets.cpp | 2 +- ui/guiutils.cpp | 16 +++++++++++++++- ui/pageviewannotator.cpp | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ui/annotationpropertiesdialog.cpp b/ui/annotationpropertiesdialog.cpp index 57152118c..28af358ee 100644 --- a/ui/annotationpropertiesdialog.cpp +++ b/ui/annotationpropertiesdialog.cpp @@ -126,7 +126,7 @@ void AnnotsPropertiesDialog::setCaptionTextbyAnnotType() captiontext = i18n( "Geometry Properties" ); break; case Okular::Annotation::AHighlight: - captiontext = i18n( "Highlight Properties" ); + captiontext = i18n( "Text Markup Properties" ); break; case Okular::Annotation::AStamp: captiontext = i18n( "Stamp Properties" ); diff --git a/ui/annotationwidgets.cpp b/ui/annotationwidgets.cpp index ea711d521..70d12bd41 100644 --- a/ui/annotationwidgets.cpp +++ b/ui/annotationwidgets.cpp @@ -525,7 +525,7 @@ QWidget * HighlightAnnotationWidget::createStyleWidget() typelay->addWidget( m_typeCombo ); m_typeCombo->addItem( i18n( "Highlight" ) ); - m_typeCombo->addItem( i18n( "Squiggly" ) ); + m_typeCombo->addItem( i18n( "Squiggle" ) ); m_typeCombo->addItem( i18n( "Underline" ) ); m_typeCombo->addItem( i18n( "Strike out" ) ); m_typeCombo->setCurrentIndex( m_hlAnn->highlightType() ); diff --git a/ui/guiutils.cpp b/ui/guiutils.cpp index c685b4771..652fce571 100644 --- a/ui/guiutils.cpp +++ b/ui/guiutils.cpp @@ -80,7 +80,21 @@ QString captionForAnnotation( const Okular::Annotation * ann ) ret = i18n( "Geometry" ); break; case Okular::Annotation::AHighlight: - ret = i18n( "Highlight" ); + switch ( ( (Okular::HighlightAnnotation*)ann )->highlightType() ) + { + case Okular::HighlightAnnotation::Highlight: + ret = i18n( "Highlight" ); + break; + case Okular::HighlightAnnotation::Squiggly: + ret = i18n( "Squiggle" ); + break; + case Okular::HighlightAnnotation::Underline: + ret = i18n( "Underline" ); + break; + case Okular::HighlightAnnotation::StrikeOut: + ret = i18n( "Strike Out" ); + break; + } break; case Okular::Annotation::AStamp: ret = i18n( "Stamp" ); diff --git a/ui/pageviewannotator.cpp b/ui/pageviewannotator.cpp index a3c44ddff..2fc372175 100644 --- a/ui/pageviewannotator.cpp +++ b/ui/pageviewannotator.cpp @@ -1058,7 +1058,7 @@ QString PageViewAnnotator::defaultToolName( const QDomElement &toolElement ) else if ( annotType == "rectangle" ) return i18n( "Rectangle" ); else if ( annotType == "squiggly" ) - return i18n( "Squiggly" ); + return i18n( "Squiggle" ); else if ( annotType == "stamp" ) return i18n( "Stamp" ); else if ( annotType == "straight-line" )