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

List:       kde-commits
Subject:    KDE/kdepim/kontact/plugins/summary
From:       Allen Winter <winter () kde ! org>
Date:       2008-04-29 16:52:01
Message-ID: 1209487921.451536.17618.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 802499 by winterz:

i18n message context
coding style cleaning


 M  +47 -44    summaryview_plugin.cpp  
 M  +20 -20    summaryview_plugin.h  


--- trunk/KDE/kdepim/kontact/plugins/summary/summaryview_plugin.cpp #802498:802499
@@ -1,24 +1,24 @@
-/* This file is part of the KDE project
+/*
+  This file is part of the KDE project
 
-   Copyright (C) 2003 Sven L�ppken <sven@kde.org>
+  Copyright (C) 2003 Sven L�ppken <sven@kde.org>
 
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Library General Public
+  License as published by the Free Software Foundation; either
+  version 2 of the License, or (at your option) any later version.
 
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Library General Public License for more details.
 
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
+  You should have received a copy of the GNU Library General Public License
+  along with this library; see the file COPYING.LIB.  If not, write to
+  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+  Boston, MA 02110-1301, USA.
  */
 
-
 #include "summaryview_plugin.h"
 #include "summaryview_part.h"
 
@@ -31,28 +31,25 @@
 #include <kgenericfactory.h>
 #include <kparts/componentfactory.h>
 #include <kaboutdata.h>
-
 #include <KAction>
 #include <KActionCollection>
 #include <KSelectAction>
 
-
 #include <QtDBus/QtDBus>
 #include <QList>
 #include <QMenu>
 
-EXPORT_KONTACT_PLUGIN(SummaryView, summary)
+EXPORT_KONTACT_PLUGIN( SummaryView, summary )
 
-SummaryView::SummaryView( Kontact::Core *core, const QVariantList& )
-  : Kontact::Plugin( core, core, 0 ),
-    mAboutData( 0 ), mPart( 0 )
+SummaryView::SummaryView( Kontact::Core *core, const QVariantList & )
+  : Kontact::Plugin( core, core, 0 ), mAboutData( 0 ), mPart( 0 )
 {
   setComponentData( KontactPluginFactory::componentData() );
 
-  mSyncAction = new KSelectAction( KIcon("view-refresh"), i18n( "Synchronize All" ), this );
+  mSyncAction = new KSelectAction( KIcon( "view-refresh" ), i18n( "Synchronize All" ), this );
   actionCollection()->addAction( "kontact_summary_sync", mSyncAction );
-  connect( mSyncAction, SIGNAL( triggered( QString )  ), SLOT( syncAccount( QString ) ) );
-  connect( mSyncAction->menu(), SIGNAL( aboutToShow() ), this, SLOT( fillSyncActionSubEntries() ) );
+  connect( mSyncAction, SIGNAL(triggered(QString)), SLOT(syncAccount(QString)) );
+  connect( mSyncAction->menu(), SIGNAL(aboutToShow()), this, SLOT(fillSyncActionSubEntries()) );
 
   insertSyncAction( mSyncAction );
   fillSyncActionSubEntries();
@@ -61,7 +58,7 @@
 void SummaryView::fillSyncActionSubEntries()
 {
   QStringList menuItems;
-  menuItems.append( i18n("All") );
+  menuItems.append( i18nc( "@action:inmenu sync everything", "All" ) );
 
 #ifdef KMAIL_SUPPORTED
   org::kde::kmail::kmail kmail( "org.kde.kmail", "/KMail", QDBusConnection::sessionBus() );
@@ -75,11 +72,11 @@
   mSyncAction->setItems( menuItems );
 }
 
-void SummaryView::syncAccount( const QString& account )
+void SummaryView::syncAccount( const QString &account )
 {
 #ifdef KMAIL_SUPPORTED
-  org::kde::kmail::kmail kmail( "org.kde.kmail" , "/KMail" , QDBusConnection::sessionBus() );
-  kmail.checkAccount( ( account == i18n("All") ? QString() : account ) );
+  org::kde::kmail::kmail kmail( "org.kde.kmail", "/KMail", QDBusConnection::sessionBus() );
+  kmail.checkAccount( ( account == i18nc( "sync everything", "All" ) ? QString() : account ) );
 #endif
   fillSyncActionSubEntries();
 }
@@ -90,16 +87,18 @@
 
 void SummaryView::doSync()
 {
-  if ( mPart )
+  if ( mPart ) {
     mPart->updateSummaries();
+  }
 
-  const QList<Kontact::Plugin*> pluginList = core()->pluginList();
-  Q_FOREACH( const Kontact::Plugin* i, pluginList ) {
+  const QList<Kontact::Plugin *> pluginList = core()->pluginList();
+  Q_FOREACH( const Kontact::Plugin *i, pluginList ) {
     // execute all sync actions but our own
-    const QList<KAction*>* actions = i->syncActions();
-    Q_FOREACH( KAction* j, *actions )  {
-      if ( j != mSyncAction )
+    const QList<KAction *>* actions = i->syncActions();
+    Q_FOREACH( KAction *j, *actions ) {
+      if ( j != mSyncAction ) {
         j->trigger();
+      }
     }
   }
   fillSyncActionSubEntries();
@@ -107,8 +106,7 @@
 
 KParts::ReadOnlyPart *SummaryView::createPart()
 {
-  mPart = new SummaryViewPart( core(), "summarypartframe", aboutData(),
-                               this );
+  mPart = new SummaryViewPart( core(), "summarypartframe", aboutData(), this );
   mPart->setObjectName( "summaryPart" );
   return mPart;
 }
@@ -116,14 +114,19 @@
 const KAboutData *SummaryView::aboutData()
 {
   if ( !mAboutData ) {
-    mAboutData = new KAboutData( "kontactsummary", 0, ki18n("Kontact Summary"),
-                                 "1.1",
-                                 ki18n("Kontact Summary View"),
-                                 KAboutData::License_LGPL,
-                                 ki18n("(c) 2003 The Kontact developers" ) );
-    mAboutData->addAuthor( ki18n("Sven Lueppken"), KLocalizedString(), "sven@kde.org" );
-    mAboutData->addAuthor( ki18n("Cornelius Schumacher"), KLocalizedString(), "schumacher@kde.org" );
-    mAboutData->addAuthor( ki18n("Tobias Koenig"), KLocalizedString(), "tokoe@kde.org" );
+    mAboutData = new KAboutData(
+      "kontactsummary", 0, ki18n( "Kontact Summary" ),
+      "1.1",
+      ki18n( "Kontact Summary View" ),
+      KAboutData::License_LGPL,
+      ki18n( "(c) 2003 The Kontact developers" ) );
+
+    mAboutData->addAuthor( ki18n( "Sven Lueppken" ),
+                           KLocalizedString(), "sven@kde.org" );
+    mAboutData->addAuthor( ki18n( "Cornelius Schumacher" ),
+                           KLocalizedString(), "schumacher@kde.org" );
+    mAboutData->addAuthor( ki18n( "Tobias Koenig" ),
+                           KLocalizedString(), "tokoe@kde.org" );
     mAboutData->setProductName( "kontact/summary" );
   }
 
--- trunk/KDE/kdepim/kontact/plugins/summary/summaryview_plugin.h #802498:802499
@@ -1,27 +1,27 @@
 /*
-   This file is part of KDE Kontact.
+  This file is part of KDE Kontact.
 
-   Copyright (C) 2003 Sven L�ppken <sven@kde.org>
+  Copyright (C) 2003 Sven L�ppken <sven@kde.org>
 
+  This library is free software; you can redistribute it and/or
+  modify it under the terms of the GNU Library General Public
+  License as published by the Free Software Foundation; either
+  version 2 of the License, or (at your option) any later version.
 
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
+  This library is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+  Library General Public License for more details.
 
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
+  You should have received a copy of the GNU Library General Public License
+  along with this library; see the file COPYING.LIB.  If not, write to
+  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+  Boston, MA 02110-1301, USA.
 */
 
 #ifndef SUMMARYVIEW_PLUGIN_H
 #define SUMMARYVIEW_PLUGIN_H
+
 #include "plugin.h"
 
 #include <klocale.h>
@@ -38,26 +38,26 @@
   Q_OBJECT
 
   public:
-    SummaryView( Kontact::Core *core, const QVariantList& );
-	  ~SummaryView();
+    SummaryView( Kontact::Core *core, const QVariantList & );
+    ~SummaryView();
 
     int weight() const { return 100; }
 
     const KAboutData *aboutData();
 
   protected:
-    virtual KParts::ReadOnlyPart* createPart();
+    virtual KParts::ReadOnlyPart *createPart();
 
   private slots:
 
     void doSync();
-    void syncAccount( const QString& account );
+    void syncAccount( const QString &account );
     void fillSyncActionSubEntries();
 
   private:
     KAboutData *mAboutData;
     SummaryViewPart *mPart;
-    KSelectAction *mSyncAction; 
+    KSelectAction *mSyncAction;
 };
 
 #endif
[prev in list] [next in list] [prev in thread] [next in thread] 

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