SOURCES: amarok-wikilang.patch - simplified

shadzik shadzik at pld-linux.org
Mon Feb 16 14:29:06 CET 2009


Author: shadzik                      Date: Mon Feb 16 13:29:06 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- simplified

---- Files affected:
SOURCES:
   amarok-wikilang.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/amarok-wikilang.patch
diff -u SOURCES/amarok-wikilang.patch:1.1 SOURCES/amarok-wikilang.patch:1.2
--- SOURCES/amarok-wikilang.patch:1.1	Fri Feb 13 01:05:46 2009
+++ SOURCES/amarok-wikilang.patch	Mon Feb 16 14:29:01 2009
@@ -1,7 +1,5 @@
-author: shadzik at pld-linux.org
-
---- src/context/engines/wikipedia/WikipediaEngine.h.orig	2009-02-12 22:25:48.295155524 +0100
-+++ src/context/engines/wikipedia/WikipediaEngine.h	2009-02-12 23:21:12.984509845 +0100
+--- src/context/engines/wikipedia/WikipediaEngine.h.orig	2009-02-10 19:58:15.000000000 +0100
++++ src/context/engines/wikipedia/WikipediaEngine.h	2009-02-16 14:17:57.968771852 +0100
 @@ -21,6 +21,7 @@
  #include <context/DataEngine.h>
  
@@ -10,51 +8,35 @@
  
  /**
      This class provide Wikipedia data for use in Context applets. 
-@@ -66,8 +67,8 @@
-     QString wikiAlbumPostfix();
-     QString wikiTrackPostfix();
-     QString wikiSiteUrl();
--    QString wikiUrl( const QString& item ) const;
--    QString wikiLocale() const;
-+    QString wikiUrl( const QString& item );
-+    QString wikiLocale();
-     
-     void reloadWikipedia();
-     
-@@ -80,6 +81,7 @@
+@@ -80,7 +81,7 @@
      QString m_wikiCurrentEntry;
      QString m_wikiCurrentUrl;
      QString m_wikiLanguages;
+-    QString m_wikiLocale;
 +    QLocale m_wikiLang;
-     QString m_wikiLocale;
      // stores what features are enabled
      bool m_requested;
---- src/context/engines/wikipedia/WikipediaEngine.cpp.orig	2009-02-12 22:11:01.234729628 +0100
-+++ src/context/engines/wikipedia/WikipediaEngine.cpp	2009-02-12 23:21:17.993249676 +0100
-@@ -27,7 +27,7 @@
+     QStringList m_sources;
+--- src/context/engines/wikipedia/WikipediaEngine.cpp.orig	2009-02-10 19:58:15.000000000 +0100
++++ src/context/engines/wikipedia/WikipediaEngine.cpp	2009-02-16 14:19:52.111853566 +0100
+@@ -27,7 +27,6 @@
      , ContextObserver( ContextView::self() )
      , m_wikiJob( 0 )
      , m_currentSelection( "artist" )
 -    , m_wikiLocale( "en" )
-+    , m_wikiLocale( "" )
      , m_requested( true )
      , m_sources( "current" )
      , m_triedRefinedSearch( false )
-@@ -327,9 +327,11 @@
- }
- 
+@@ -329,7 +328,7 @@
  inline QString
--WikipediaEngine::wikiLocale() const
-+WikipediaEngine::wikiLocale()
+ WikipediaEngine::wikiLocale() const
  {
 -    return !m_wikiLocale.isEmpty() ? m_wikiLocale : QString( "en" );
-+    m_wikiLocale = m_wikiLang.name().split('_')[0];
-+    //return !m_wikiLocale.isEmpty() ? m_wikiLocale : QString( "en" );
-+    return m_wikiLocale;
++	return m_wikiLang.name().split('_')[0];
  }
  
  inline QString
-@@ -339,6 +341,8 @@
+@@ -339,6 +338,8 @@
          return " (band)";
      else if( wikiLocale() == "de" )
          return " (Band)";
@@ -63,12 +45,3 @@
      return QString();
  }
  
-@@ -355,7 +359,7 @@
- }
- 
- inline QString
--WikipediaEngine::wikiUrl( const QString &item ) const
-+WikipediaEngine::wikiUrl( const QString &item )
- {
-     return QString( "http://%1.wikipedia.org/wiki/" ).arg( wikiLocale() ) + KUrl::toPercentEncoding( item, "/" );
- }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/amarok-wikilang.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list