@ -72,9 +72,9 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
m_view - > m_link = TQString ( ) ;
TQString text ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . tq arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" > " ) . tq arg( directionOf ( Utils : : stripTags ( node - > title ( ) ) ) ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" > " ) . arg( directionOf ( Utils : : stripTags ( node - > title ( ) ) ) ) ;
text + = node - > title ( ) ;
if ( node - > unread ( ) = = 0 )
text + = i18n ( " (no unread articles) " ) ;
@ -90,26 +90,26 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
TQString file = url . replace ( " / " , " _ " ) . replace ( " : " , " _ " ) ;
KURL u ( m_view - > m_imageDir ) ;
u . setFileName ( file ) ;
text + = TQString ( " <a href= \" %1 \" ><img class= \" headimage \" src= \" %2.png \" ></a> \n " ) . tq arg( node - > htmlUrl ( ) ) . tq arg( u . url ( ) ) ;
text + = TQString ( " <a href= \" %1 \" ><img class= \" headimage \" src= \" %2.png \" ></a> \n " ) . arg( node - > htmlUrl ( ) ) . arg( u . url ( ) ) ;
}
else text + = " <div class= \" body \" > " ;
if ( ! node - > description ( ) . isEmpty ( ) )
{
text + = TQString ( " <div dir= \" %1 \" > " ) . tq arg( Utils : : stripTags ( directionOf ( node - > description ( ) ) ) ) ;
text + = i18n ( " <b>Description:</b> %1<br><br> " ) . tq arg( node - > description ( ) ) ;
text + = TQString ( " <div dir= \" %1 \" > " ) . arg( Utils : : stripTags ( directionOf ( node - > description ( ) ) ) ) ;
text + = i18n ( " <b>Description:</b> %1<br><br> " ) . arg( node - > description ( ) ) ;
text + = " </div> \n " ; // /description
}
if ( ! node - > htmlUrl ( ) . isEmpty ( ) )
{
text + = TQString ( " <div dir= \" %1 \" > " ) . tq arg( directionOf ( node - > htmlUrl ( ) ) ) ;
text + = i18n ( " <b>Homepage:</b> <a href= \" %1 \" >%2</a> " ) . tq arg( node - > htmlUrl ( ) ) . tq arg( node - > htmlUrl ( ) ) ;
text + = TQString ( " <div dir= \" %1 \" > " ) . arg( directionOf ( node - > htmlUrl ( ) ) ) ;
text + = i18n ( " <b>Homepage:</b> <a href= \" %1 \" >%2</a> " ) . arg( node - > htmlUrl ( ) ) . arg( node - > htmlUrl ( ) ) ;
text + = " </div> \n " ; // / link
}
//text += i18n("<b>Unread articles:</b> %1"). tq arg(node->unread());
//text += i18n("<b>Unread articles:</b> %1"). arg(node->unread());
text + = " </div> " ; // /body
m_view - > renderContent ( text ) ;
@ -121,8 +121,8 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
m_view - > m_link = TQString ( ) ;
TQString text ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . tq arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" >%2 " ) . tq arg( directionOf ( Utils : : stripTags ( node - > title ( ) ) ) ) . tq arg( node - > title ( ) ) ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" >%2 " ) . arg( directionOf ( Utils : : stripTags ( node - > title ( ) ) ) ) . arg( node - > title ( ) ) ;
if ( node - > unread ( ) = = 0 )
text + = i18n ( " (no unread articles) " ) ;
else
@ -139,8 +139,8 @@ class ArticleViewer::ShowSummaryVisitor : public TreeNodeVisitor
m_view - > m_link = TQString ( ) ;
TQString text ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . tq arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" >%2 " ) . tq arg( directionOf ( Utils : : stripTags ( node - > title ( ) ) ) ) . tq arg( node - > title ( ) ) ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" >%2 " ) . arg( directionOf ( Utils : : stripTags ( node - > title ( ) ) ) ) . arg( node - > title ( ) ) ;
if ( node - > unread ( ) = = 0 )
text + = i18n ( " (no unread articles) " ) ;
else
@ -198,10 +198,10 @@ void ArticleViewer::generateNormalModeCSS()
" font-size: %2 ! important; \n "
" color: %3 ! important; \n "
" background: %4 ! important; \n "
" } \n \n " ) . tq arg( Settings : : standardFont ( ) )
. tq arg( TQString : : number ( pointsToPixel ( Settings : : mediumFontSize ( ) ) ) + " px " )
. tq arg( cg . text ( ) . name ( ) )
. tq arg( cg . base ( ) . name ( ) ) ;
" } \n \n " ) . arg( Settings : : standardFont ( ) )
. arg( TQString : : number ( pointsToPixel ( Settings : : mediumFontSize ( ) ) ) + " px " )
. arg( cg . text ( ) . name ( ) )
. arg( cg . base ( ) . name ( ) ) ;
m_normalModeCSS + = TQString (
" a { \n "
+ TQString ( " color: %1 ! important; \n " )
@ -214,18 +214,18 @@ void ArticleViewer::generateNormalModeCSS()
+ " margin-bottom: 10pt; \n "
// +" width: 99%;\n"
+ " } \n \n " )
. tq arg( cg . link ( ) . name ( ) )
. tq arg( cg . background ( ) . name ( ) )
. tq arg( cg . text ( ) . name ( ) ) ;
. arg( cg . link ( ) . name ( ) )
. arg( cg . background ( ) . name ( ) )
. arg( cg . text ( ) . name ( ) ) ;
m_normalModeCSS + = TQString ( " .headertitle a:link { color: %1 ! important; } \n "
" .headertitle a:visited { color: %2 ! important; } \n "
" .headertitle a:hover{ color: %3 ! important; } \n "
" .headertitle a:active { color: %4 ! important; } \n " )
. tq arg( cg . highlightedText ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) ) ;
. arg( cg . highlightedText ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) ) ;
m_normalModeCSS + = TQString (
" .headertitle { \n "
@ -244,8 +244,8 @@ void ArticleViewer::generateNormalModeCSS()
" .headimage { \n "
" float: right; \n "
" margin-left: 5px; \n "
" } \n \n " ) . tq arg( cg . highlight ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) ) ;
" } \n \n " ) . arg( cg . highlight ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) ) ;
m_normalModeCSS + = TQString (
" body { clear: none; } \n \n "
@ -278,10 +278,10 @@ void ArticleViewer::generateCombinedModeCSS()
" font-size: %2 ! important; \n "
" color: %3 ! important; \n "
" background: %4 ! important; \n "
" } \n \n " ) . tq arg( Settings : : standardFont ( ) )
. tq arg( TQString : : number ( pointsToPixel ( Settings : : mediumFontSize ( ) ) ) + " px " )
. tq arg( cg . text ( ) . name ( ) )
. tq arg( cg . base ( ) . name ( ) ) ;
" } \n \n " ) . arg( Settings : : standardFont ( ) )
. arg( TQString : : number ( pointsToPixel ( Settings : : mediumFontSize ( ) ) ) + " px " )
. arg( cg . text ( ) . name ( ) )
. arg( cg . base ( ) . name ( ) ) ;
m_combinedModeCSS + = (
" a { \n "
+ TQString ( " color: %1 ! important; \n " )
@ -294,18 +294,18 @@ void ArticleViewer::generateCombinedModeCSS()
+ " margin-bottom: 10pt; \n "
// +" width: 99%;\n"
+ " } \n \n " )
. tq arg( cg . link ( ) . name ( ) )
. tq arg( cg . background ( ) . name ( ) )
. tq arg( cg . text ( ) . name ( ) ) ;
. arg( cg . link ( ) . name ( ) )
. arg( cg . background ( ) . name ( ) )
. arg( cg . text ( ) . name ( ) ) ;
m_combinedModeCSS + = TQString ( " .headertitle a:link { color: %1 ! important; } \n "
" .headertitle a:visited { color: %2 ! important; } \n "
" .headertitle a:hover{ color: %3 ! important; } \n "
" .headertitle a:active { color: %4 ! important; } \n " )
. tq arg( cg . highlightedText ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) ) ;
. arg( cg . highlightedText ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) ) ;
m_combinedModeCSS + = TQString (
" .headertitle { \n "
" background: %1 ! important; \n "
@ -323,8 +323,8 @@ void ArticleViewer::generateCombinedModeCSS()
" .headimage { \n "
" float: right; \n "
" margin-left: 5px; \n "
" } \n \n " ) . tq arg( cg . highlight ( ) . name ( ) )
. tq arg( cg . highlightedText ( ) . name ( ) ) ;
" } \n \n " ) . arg( cg . highlight ( ) . name ( ) )
. arg( cg . highlightedText ( ) . name ( ) ) ;
m_combinedModeCSS + = TQString (
" body { clear: none; } \n \n "
@ -368,11 +368,11 @@ void ArticleViewer::displayAboutPage()
{
TQString location = locate ( " data " , " akregator/about/main.html " ) ;
TQString content = KPIM : : kFileToString ( location ) ;
content = content . tq arg( locate ( " data " , " libtdepim/about/kde_infopage.css " ) ) ;
content = content . arg( locate ( " data " , " libtdepim/about/kde_infopage.css " ) ) ;
if ( kapp - > reverseLayout ( ) )
content = content . tq arg( " @import \" %1 \" ; " ) . tq arg( locate ( " data " , " libtdepim/about/kde_infopage_rtl.css " ) ) ;
content = content . arg( " @import \" %1 \" ; " ) . arg( locate ( " data " , " libtdepim/about/kde_infopage_rtl.css " ) ) ;
else
content = content . tq arg( " " ) ;
content = content . arg( " " ) ;
begin ( KURL ( location ) ) ;
TQString info =
@ -389,25 +389,25 @@ void ArticleViewer::displayAboutPage()
" <p>We hope that you will enjoy Akregator.</p> \n "
" <p>Thank you,</p> \n "
" <p style='margin-bottom: 0px'> The Akregator Team</p> \n " )
. tq arg( AKREGATOR_VERSION ) // Akregator version
. tq arg( " http://akregator.kde.org/ " ) ; // Akregator homepage URL
. arg( AKREGATOR_VERSION ) // Akregator version
. arg( " http://akregator.kde.org/ " ) ; // Akregator homepage URL
TQString fontSize = TQString : : number ( pointsToPixel ( Settings : : mediumFontSize ( ) ) ) ;
TQString appTitle = i18n ( " Akregator " ) ;
TQString catchPhrase = " " ; //not enough space for a catch phrase at default window size i18n("Part of the Kontact Suite");
TQString quickDescription = i18n ( " An RSS feed reader for the K Desktop Environment. " ) ;
write ( content . tq arg( fontSize ) . tq arg( appTitle ) . tq arg( catchPhrase ) . tq arg( quickDescription ) . tq arg( info ) ) ;
write ( content . arg( fontSize ) . arg( appTitle ) . arg( catchPhrase ) . arg( quickDescription ) . arg( info ) ) ;
end ( ) ;
}
TQString ArticleViewer : : formatArticleNormalMode ( Feed * feed , const Article & article )
{
TQString text ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . tq arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
if ( ! article . title ( ) . isEmpty ( ) )
{
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" > \n " ) . tq arg( directionOf ( Utils : : stripTags ( article . title ( ) ) ) ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" > \n " ) . arg( directionOf ( Utils : : stripTags ( article . title ( ) ) ) ) ;
if ( article . link ( ) . isValid ( ) )
text + = " <a href= \" " + article . link ( ) . url ( ) + " \" > " ;
text + = article . title ( ) . replace ( " < " , " < " ) . replace ( " > " , " > " ) ; // TODO: better leave things escaped in the parser
@ -417,16 +417,16 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic
}
if ( article . pubDate ( ) . isValid ( ) )
{
text + = TQString ( " <span class= \" header \" dir= \" %1 \" > " ) . tq arg( directionOf ( i18n ( " Date " ) ) ) ;
text + = TQString ( " %1: " ) . tq arg( i18n ( " Date " ) ) ;
text + = TQString ( " <span class= \" header \" dir= \" %1 \" > " ) . arg( directionOf ( i18n ( " Date " ) ) ) ;
text + = TQString ( " %1: " ) . arg( i18n ( " Date " ) ) ;
text + = " </span><span class= \" headertext \" > " ;
text + = KGlobal : : locale ( ) - > formatDateTime ( article . pubDate ( ) , false , false ) + " </span> \n " ; // TODO: might need RTL?
}
TQString author = article . author ( ) ;
if ( ! author . isEmpty ( ) )
{
text + = TQString ( " <br/><span class= \" header \" dir= \" %1 \" > " ) . tq arg( directionOf ( i18n ( " Author " ) ) ) ;
text + = TQString ( " %1: " ) . tq arg( i18n ( " Author " ) ) ;
text + = TQString ( " <br/><span class= \" header \" dir= \" %1 \" > " ) . arg( directionOf ( i18n ( " Author " ) ) ) ;
text + = TQString ( " %1: " ) . arg( i18n ( " Author " ) ) ;
text + = " </span><span class= \" headertext \" > " ;
text + = author + " </span> \n " ; // TODO: might need RTL?
}
@ -437,14 +437,14 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic
TQString file = Utils : : fileNameForUrl ( feed - > xmlUrl ( ) ) ;
KURL u ( m_imageDir ) ;
u . setFileName ( file ) ;
text + = TQString ( " <a href= \" %1 \" ><img class= \" headimage \" src= \" %2.png \" ></a> \n " ) . tq arg( feed - > htmlUrl ( ) ) . tq arg( u . url ( ) ) ;
text + = TQString ( " <a href= \" %1 \" ><img class= \" headimage \" src= \" %2.png \" ></a> \n " ) . arg( feed - > htmlUrl ( ) ) . arg( u . url ( ) ) ;
}
if ( ! article . description ( ) . isEmpty ( ) )
{
text + = TQString ( " <div dir= \" %1 \" > " ) . tq arg( directionOf ( Utils : : stripTags ( article . description ( ) ) ) ) ;
text + = TQString ( " <div dir= \" %1 \" > " ) . arg( directionOf ( Utils : : stripTags ( article . description ( ) ) ) ) ;
text + = " <span class= \" content \" > " + article . description ( ) + " </span> " ;
text + = " </div> " ;
}
@ -486,7 +486,7 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic
//int length = article.enclosure().length();
//TQString lengthStr = KIO::convertSize(length);
//text += TQString("<hr><div><a href=\"%1\">%2</a> (%3, %4)</div>"). tq arg(url).tq arg(url).tq arg(lengthStr).tq arg(type);
//text += TQString("<hr><div><a href=\"%1\">%2</a> (%3, %4)</div>"). arg(url).arg(url).arg(lengthStr).arg(type);
}
//kdDebug() << text << endl;
return text ;
@ -496,13 +496,13 @@ TQString ArticleViewer::formatArticleNormalMode(Feed* feed, const Article& artic
TQString ArticleViewer : : formatArticleCombinedMode ( Feed * feed , const Article & article )
{
TQString text ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . tq arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
text = TQString ( " <div class= \" headerbox \" dir= \" %1 \" > \n " ) . arg( TQApplication : : reverseLayout ( ) ? " rtl " : " ltr " ) ;
KURL link = article . link ( ) ;
if ( ! article . title ( ) . isEmpty ( ) )
{
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" > \n " ) . tq arg( directionOf ( Utils : : stripTags ( article . title ( ) ) ) ) ;
text + = TQString ( " <div class= \" headertitle \" dir= \" %1 \" > \n " ) . arg( directionOf ( Utils : : stripTags ( article . title ( ) ) ) ) ;
if ( link . isValid ( ) )
text + = " <a href= \" " + link . url ( ) + " \" > " ;
text + = article . title ( ) . replace ( " < " , " < " ) . replace ( " > " , " > " ) ; // TODO: better leave things escaped in the parser
@ -512,8 +512,8 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art
}
if ( article . pubDate ( ) . isValid ( ) )
{
text + = TQString ( " <span class= \" header \" dir= \" %1 \" > " ) . tq arg( directionOf ( i18n ( " Date " ) ) ) ;
text + = TQString ( " %1: " ) . tq arg( i18n ( " Date " ) ) ;
text + = TQString ( " <span class= \" header \" dir= \" %1 \" > " ) . arg( directionOf ( i18n ( " Date " ) ) ) ;
text + = TQString ( " %1: " ) . arg( i18n ( " Date " ) ) ;
text + = " </span><span class= \" headertext \" > " ;
text + = KGlobal : : locale ( ) - > formatDateTime ( article . pubDate ( ) , false , false ) + " </span> \n " ; // TODO: might need RTL?
}
@ -521,8 +521,8 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art
TQString author = article . author ( ) ;
if ( ! author . isEmpty ( ) )
{
text + = TQString ( " <br/><span class= \" header \" dir= \" %1 \" > " ) . tq arg( directionOf ( i18n ( " Author " ) ) ) ;
text + = TQString ( " %1: " ) . tq arg( i18n ( " Author " ) ) ;
text + = TQString ( " <br/><span class= \" header \" dir= \" %1 \" > " ) . arg( directionOf ( i18n ( " Author " ) ) ) ;
text + = TQString ( " %1: " ) . arg( i18n ( " Author " ) ) ;
text + = " </span><span class= \" headertext \" > " ;
text + = author + " </span> \n " ; // TODO: might need RTL?
}
@ -534,14 +534,14 @@ TQString ArticleViewer::formatArticleCombinedMode(Feed* feed, const Article& art
TQString file = Utils : : fileNameForUrl ( feed - > xmlUrl ( ) ) ;
KURL u ( m_imageDir ) ;
u . setFileName ( file ) ;
text + = TQString ( " <a href= \" %1 \" ><img class= \" headimage \" src= \" %2.png \" ></a> \n " ) . tq arg( feed - > htmlUrl ( ) ) . tq arg( u . url ( ) ) ;
text + = TQString ( " <a href= \" %1 \" ><img class= \" headimage \" src= \" %2.png \" ></a> \n " ) . arg( feed - > htmlUrl ( ) ) . arg( u . url ( ) ) ;
}
if ( ! article . description ( ) . isEmpty ( ) )
{
text + = TQString ( " <div dir= \" %1 \" > " ) . tq arg( directionOf ( Utils : : stripTags ( article . description ( ) ) ) ) ;
text + = TQString ( " <div dir= \" %1 \" > " ) . arg( directionOf ( Utils : : stripTags ( article . description ( ) ) ) ) ;
text + = " <span class= \" content \" > " + article . description ( ) + " </span> " ;
text + = " </div> " ;
}