[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    [Kde-pim] [PATCH] Kontact's NewsTicker plugin issues
From:       Henrique Pinto <henrique.pinto () kdemail ! net>
Date:       2004-07-23 15:41:45
Message-ID: 200407231241.46112.henrique.pinto () kdemail ! net
[Download RAW message or body]

Hi!

The attached patch solves some issues with the newsticker plugin. The summary 
widget was still using the KNode icon, so I've changed it to "kontact_news". 
The "Revista do Linux" magazine was closed, so I removed the entry (and also 
the "Magazines" category, as it was empty). And entities were not being 
resolved in titles, leading to things like "AT&amp;T" being displayed. Is it 
OK to commit it?

Thank you!

-- 
	Henrique Pinto
	henrique.pinto@kdemail.net

["kontact_newsticker_entities.diff" (text/x-diff)]

Index: kcmkontactknt.cpp
===================================================================
RCS file: /home/kde/kdepim/kontact/plugins/newsticker/kcmkontactknt.cpp,v
retrieving revision 1.10
diff -u -3 -p -r1.10 kcmkontactknt.cpp
--- kcmkontactknt.cpp	10 Jul 2004 19:36:45 -0000	1.10
+++ kcmkontactknt.cpp	23 Jul 2004 15:38:17 -0000
@@ -147,7 +147,6 @@ void KCMKontactKNT::loadNews()
   parents.append( new QListViewItem( mAllNews, i18n( "Business" ) ) );
   parents.append( new QListViewItem( mAllNews, i18n( "Computers" ) ) );
   parents.append( new QListViewItem( mAllNews, i18n( "Misc" ) ) );
-  parents.append( new QListViewItem( mAllNews, i18n( "Magazines" ) ) );
   parents.append( new QListViewItem( mAllNews, i18n( "Recreation" ) ) );
   parents.append( new QListViewItem( mAllNews, i18n( "Society" ) ) );
 
Index: newsfeeds.h
===================================================================
RCS file: /home/kde/kdepim/kontact/plugins/newsticker/newsfeeds.h,v
retrieving revision 1.1
diff -u -3 -p -r1.1 newsfeeds.h
--- newsfeeds.h	12 Feb 2004 16:39:06 -0000	1.1
+++ newsfeeds.h	23 Jul 2004 15:38:20 -0000
@@ -3,7 +3,7 @@
 
 #include <qvaluelist.h>
 
-#define DEFAULT_NEWSSOURCES 61
+#define DEFAULT_NEWSSOURCES 60
 
 class NewsSourceData
 {
@@ -11,7 +11,7 @@ class NewsSourceData
     typedef QValueList<NewsSourceData> List;
 
     enum Category { Arts, Business, Computers, Misc,
-                   Magazines, Recreation, Society };
+                    Recreation, Society };
 
     NewsSourceData( const QString &name = I18N_NOOP( "Unknown" ),
                     const QString &url = QString::null,
@@ -62,9 +62,9 @@ static NewsSourceData NewsSourceDefault[
 		NewsSourceData::Business ),
 	// Computers ----------
 		NewsSourceData(
-		QString::fromLatin1( "linuxartist.org" ),
-		QString::fromLatin1( "http://www.linuxartist.org/backend.php"),
-		QString::fromLatin1( "http://www.linuxartist.org/favicon.ico"),
+		QString::fromLatin1("linuxartist.org"),
+		QString::fromLatin1("http://www.linuxartist.org/backend.php"),
+		QString::fromLatin1("http://www.linuxartist.org/favicon.ico"),
 		NewsSourceData::Computers ),
 		NewsSourceData(
 		QString::fromLatin1("KDE Deutschland"),
@@ -317,12 +317,6 @@ static NewsSourceData NewsSourceDefault[
 		QString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"),
 		QString::fromLatin1( "http://www.csmonitor.com/favicon.ico"),
 		NewsSourceData::Misc ),
-	// Magazines ------
-		NewsSourceData(
-		QString::fromLatin1("Revista do Linux"),
-		QString::fromLatin1("http://www.revistadolinux.com.br/noticias/arquivo/noticias.rdf"),
-		QString::fromLatin1("http://www.revistadolinux.com.br/favicon.ico"),
-		NewsSourceData::Magazines ),	
 	// Recreation
 		NewsSourceData(
 		QString::fromLatin1("Segfault"),
Index: summarywidget.cpp
===================================================================
RCS file: /home/kde/kdepim/kontact/plugins/newsticker/summarywidget.cpp,v
retrieving revision 1.24
diff -u -3 -p -r1.24 summarywidget.cpp
--- summarywidget.cpp	18 Feb 2004 00:13:42 -0000	1.24
+++ summarywidget.cpp	23 Jul 2004 15:38:21 -0000
@@ -34,6 +34,7 @@
 #include <kiconloader.h>
 #include <klocale.h>
 #include <kurllabel.h>
+#include <kcharsets.h>
 
 #include "summarywidget.h"
 
@@ -43,7 +44,7 @@ SummaryWidget::SummaryWidget( QWidget *p
 {
   QVBoxLayout *vlay = new QVBoxLayout( this );
 
-  QPixmap icon = KGlobal::iconLoader()->loadIcon( "knode",
+  QPixmap icon = KGlobal::iconLoader()->loadIcon( "kontact_news",
                                                   KIcon::Desktop, KIcon::SizeMedium );
 
   QWidget *header = createHeader( this, icon, i18n( "News Feeds" ) );
@@ -220,7 +221,7 @@ void SummaryWidget::updateView()
 
     // header
     QLabel *label = new QLabel( hbox );
-    label->setText( (*it).title );
+    label->setText( KCharsets::resolveEntities( (*it).title ) );
     label->setAlignment( AlignLeft|AlignVCenter );
     label->setTextFormat( RichText );
     label->setFont( boldFont );


_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic