rpms/kdepim/devel kdepim-3.5.9-opensync03.patch, NONE, 1.1 kdepim.spec, 1.154, 1.155

Kevin Kofler (kkofler) fedora-extras-commits at redhat.com
Fri Feb 15 05:52:13 UTC 2008


Author: kkofler

Update of /cvs/pkgs/rpms/kdepim/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24914/devel

Modified Files:
	kdepim.spec 
Added Files:
	kdepim-3.5.9-opensync03.patch 
Log Message:
* Fri Feb 15 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 6:3.5.9-2
- update opensync03 patch

kdepim-3.5.9-opensync03.patch:

--- NEW FILE kdepim-3.5.9-opensync03.patch ---
Index: libqopensync/environment.cpp
===================================================================
--- libqopensync/environment.cpp	(.../kdepim/enterprise/kdepim/kitchensync)	(revision 774532)
+++ libqopensync/environment.cpp	(.../work/kitchensync-OpenSync0.30API)	(revision 774532)
@@ -1,172 +0,0 @@
-/*
-    This file is part of libqopensync.
-
-    Copyright (c) 2005 Tobias Koenig <tokoe at 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 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.
-*/
-
-#include "environment.h"
-
-#include <opensync/opensync.h>
-
-using namespace QSync;
-
-Environment::Environment()
-{
-  mEnvironment = osync_env_new();
-}
-
-Environment::~Environment()
-{
-  osync_env_free( mEnvironment );
-}
-
-Environment::GroupIterator Environment::groupBegin()
-{
-  GroupIterator it( this );
-  it.mPos = 0;
-
-  return it;
-}
-
-Environment::GroupIterator Environment::groupEnd()
-{
-  GroupIterator it( this );
-  it.mPos = groupCount();
-
-  return it;
-}
-
-Environment::PluginIterator Environment::pluginBegin()
-{
-  PluginIterator it( this );
-  it.mPos = 0;
-
-  return it;
-}
-
-Environment::PluginIterator Environment::pluginEnd()
-{
-  PluginIterator it( this );
-  it.mPos = pluginCount();
-
-  return it;
-}
-
-Result Environment::initialize()
-{
-  OSyncError *error = 0;
-  if ( !osync_env_initialize( mEnvironment, &error ) )
-    return Result( &error );
-  else
-    return Result();
-}
-
-Result Environment::finalize()
-{
-  OSyncError *error = 0;
-  if ( !osync_env_finalize( mEnvironment, &error ) )
-    return Result( &error);
-  else
-    return Result();
-}
-
-int Environment::groupCount() const
-{
-  return osync_env_num_groups( mEnvironment );
-}
-
-Group Environment::groupAt( int pos ) const
-{
-  Group group;
-
-  if ( pos < 0 || pos >= groupCount() )
-    return group;
-
-  OSyncGroup *ogroup = osync_env_nth_group( mEnvironment, pos );
-  group.mGroup = ogroup;
-
-  return group;
-}
-
-Group Environment::groupByName( const QString &name ) const
-{
-  Group group;
-
-  OSyncGroup *ogroup = osync_env_find_group( mEnvironment, name.latin1() );
-  if ( ogroup )
-    group.mGroup = ogroup;
-
-  return group;
-}
-
-Group Environment::addGroup()
-{
-  Group group;
-
-  OSyncGroup *ogroup = osync_group_new( mEnvironment );
-  if ( ogroup )
-    group.mGroup = ogroup;
-
-  return group;
-}
-
-Result Environment::removeGroup( const Group &group )
-{
-  OSyncError *error = 0;
-  if ( !osync_group_delete( group.mGroup, &error ) )
-    return Result( &error );
-  else
-    return Result();
-}
-
-int Environment::pluginCount() const
-{
-  return osync_env_num_plugins( mEnvironment );
-}
-
-Plugin Environment::pluginAt( int pos ) const
-{
-  Plugin plugin;
-
-  if ( pos < 0 || pos >= pluginCount() )
-    return plugin;
-
-  OSyncPlugin *oplugin = osync_env_nth_plugin( mEnvironment, pos );
-  plugin.mPlugin = oplugin;
-
-  return plugin;
-}
-
-Plugin Environment::pluginByName( const QString &name ) const
-{
-  Plugin plugin;
-
-  OSyncPlugin *oplugin = osync_env_find_plugin( mEnvironment, name.latin1() );
-  if ( oplugin )
-    plugin.mPlugin = oplugin;
-
-  return plugin;
-}
-
-Conversion Environment::conversion() const
-{
-  Conversion conversion;
-  conversion.mEnvironment = mEnvironment;
-
-  return conversion;
-}
Index: libqopensync/environment.h
===================================================================
--- libqopensync/environment.h	(.../kdepim/enterprise/kdepim/kitchensync)	(revision 774532)
+++ libqopensync/environment.h	(.../work/kitchensync-OpenSync0.30API)	(revision 774532)
@@ -1,199 +0,0 @@
-/*
-    This file is part of libqopensync.
-
-    Copyright (c) 2005 Tobias Koenig <tokoe at 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 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
[...3250 lines suppressed...]
       mSynchronizing = true;
       mSyncAction->setText( "Abort Synchronization" );
       break;
-    case QSync::SyncEngineUpdate::EndPhaseRead:
+    case QSync::SyncEngineUpdate::Read:
       mStatus->setText( i18n( "Data read" ) );
       break;
-    case QSync::SyncEngineUpdate::EndPhaseWrite:
+    case QSync::SyncEngineUpdate::Written:
       mStatus->setText( i18n( "Data written" ) );
       mProgressBar->setProgress( 100 );
       mProcessedItems = mMaxProcessedItems = 0;
       break;
-    case QSync::SyncEngineUpdate::EndPhaseDisconnected:
+    case QSync::SyncEngineUpdate::Disconnected:
       mStatus->setText( i18n( "Disconnected" ) );
       break;
     case QSync::SyncEngineUpdate::Error:
@@ -257,7 +250,7 @@
       mSynchronizing = false;
       mSyncAction->setText( i18n( "Synchronize Now" ) );
       break;
-    case QSync::SyncEngineUpdate::SyncSuccessfull:
+    case QSync::SyncEngineUpdate::SyncSuccessful:
       mStatus->setText( i18n( "Successfully synchronized" ) );
       mSyncProcess->group().setLastSynchronization( QDateTime::currentDateTime() );
       mSyncProcess->group().save();
@@ -288,30 +281,24 @@
         case QSync::SyncMemberUpdate::Connected:
           (*it)->setStatusMessage( i18n( "Connected" ) );
           break;
-        case QSync::SyncMemberUpdate::SentChanges:
+        case QSync::SyncMemberUpdate::Read:
           (*it)->setStatusMessage( i18n( "Changes read" ) );
           break;
-        case QSync::SyncMemberUpdate::CommittedAll:
+        case QSync::SyncMemberUpdate::Written:
           (*it)->setStatusMessage( i18n( "Changes written" ) );
           break;
         case QSync::SyncMemberUpdate::Disconnected:
           (*it)->setStatusMessage( i18n( "Disconnected" ) );
           break;
-        case QSync::SyncMemberUpdate::ConnectError:
-          (*it)->setStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
+        case QSync::SyncMemberUpdate::SyncDone:
+          (*it)->setStatusMessage( i18n( "Synchronization done" ) );
           break;
-        case QSync::SyncMemberUpdate::GetChangesError:
-          (*it)->setStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
+        case QSync::SyncMemberUpdate::Discovered:
+          (*it)->setStatusMessage( i18n( "Discovered" ) );
           break;
-        case QSync::SyncMemberUpdate::CommittedAllError:
+        case QSync::SyncMemberUpdate::Error:
           (*it)->setStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
           break;
-        case QSync::SyncMemberUpdate::SyncDoneError:
-          (*it)->setStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
-          break;
-        case QSync::SyncMemberUpdate::DisconnectedError:
-          (*it)->setStatusMessage( i18n( "Error: %1" ).arg( update.result().message() ) );
-          break;
         default:
           break;
       }
@@ -352,12 +339,9 @@
   QFont boldFont;
   boldFont.setBold( true );
 
-  MemberInfo mi( member );
+  const MemberInfo mi( member );
+  const QPixmap icon = mi.smallIcon();
 
-  QPixmap icon = mi.smallIcon();
-
-  QSync::Plugin plugin = member.plugin();
-
   QVBoxLayout *layout = new QVBoxLayout( this );
 
   QHBox* box = new QHBox( this );
@@ -378,7 +362,14 @@
   mStatus = new QLabel( box );
 
   mMemberName->setText( member.name() );
-  mDescription->setText( plugin.longName() );
+
+  const QSync::PluginEnv *env = SyncProcessManager::self()->pluginEnv();
+  const QSync::Plugin plugin = env->pluginByName( member.pluginName() );
+
+  if ( plugin.isValid() )
+    mDescription->setText( plugin.longName() );
+  else
+    mDescription->setText( i18n("Plugin \"%1\" can't get initialized!").arg( member.pluginName() ) );
 }
 
 void MemberItem::setStatusMessage( const QString &msg )
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(.../kdepim/enterprise/kdepim/kitchensync)	(revision 774532)
+++ src/Makefile.am	(.../work/kitchensync-OpenSync0.30API)	(revision 774532)
@@ -24,7 +24,7 @@
                             pluginpicker.cpp configgui.cpp configguiblank.cpp configguifile.cpp \
                             memberinfo.cpp groupconfigcommon.cpp kwidgetlist.cpp \
                             configguipalm.cpp conflictdialog.cpp singleconflictdialog.cpp \
-                            addresseediffalgo.cpp calendardiffalgo.cpp \
+                            addresseediffalgo.cpp calendardiffalgo.cpp xmldiffalgo.cpp \
                             htmldiffalgodisplay.cpp genericdiffalgo.cpp multiconflictdialog.cpp \
                             configguiirmc.cpp \
                             configguisyncmlobex.cpp configguisyncmlhttp.cpp configguiopie.cpp  \
Index: src/multiconflictdialog.cpp
===================================================================
--- src/multiconflictdialog.cpp	(.../kdepim/enterprise/kdepim/kitchensync)	(revision 774532)
+++ src/multiconflictdialog.cpp	(.../work/kitchensync-OpenSync0.30API)	(revision 774532)
@@ -39,8 +39,10 @@
     {
       QGridLayout *layout = new QGridLayout( this, 2, 1, KDialog::marginHint(), KDialog::spacingHint() );
 
-      MemberInfo mi( change.member() );
-      layout->addWidget( new QLabel( mi.name(), this ), 0, 0 );
+      // TODO change doesn't contain member as struct member .. use SyncMapping to determine the correct member.
+      //MemberInfo mi( change.member() );
+      //layout->addWidget( new QLabel( mi.name(), this ), 0, 0 );
+      layout->addWidget( new QLabel( "PORTING TODO", this ), 0, 0 );
 
       QString type;
       switch ( change.changeType() ) {
Index: src/pluginpicker.cpp
===================================================================
--- src/pluginpicker.cpp	(.../kdepim/enterprise/kdepim/kitchensync)	(revision 774532)
+++ src/pluginpicker.cpp	(.../work/kitchensync-OpenSync0.30API)	(revision 774532)
@@ -24,7 +24,7 @@
 #include "memberinfo.h"
 #include "syncprocessmanager.h"
 
-#include <libqopensync/environment.h>
+#include <libqopensync/pluginenv.h>
 
 #include <kdialog.h>
 #include <kglobal.h>
@@ -77,12 +77,14 @@
 {
   mPluginList->clear();
 
-  QSync::Environment *env = SyncProcessManager::self()->environment();
+  const QSync::PluginEnv *env = SyncProcessManager::self()->pluginEnv();
 
-  QSync::Environment::PluginIterator it( env->pluginBegin() );
-  for( ; it != env->pluginEnd(); ++it ) {
-    QSync::Plugin plugin = *it;
-    mPluginList->appendItem( new PluginItem( mPluginList, plugin ) );
+  for ( int i = 0; i < env->pluginCount(); ++i ) {
+    QSync::Plugin plugin = env->pluginAt( i );
+
+    if ( plugin.isValid() )
+      mPluginList->appendItem( new PluginItem( mPluginList, plugin ) );
+
   }
 }
 
Index: configure.in.bot
===================================================================
--- configure.in.bot	(.../kdepim/enterprise/kdepim/kitchensync)	(revision 774532)
+++ configure.in.bot	(.../work/kitchensync-OpenSync0.30API)	(revision 774532)
@@ -1,7 +1,7 @@
-if test "$HAVE_OPENSYNC" = 0 -o "$HAVE_OPENSYNC_ENGINE" = 0; then
+if test "$HAVE_OPENSYNC" = 0; then
 	echo ""
 	echo "You're missing a compatible version of libopensync."
-        echo "Version 0.19 or greater is needed."
+        echo "Version 0.31 or greater is needed."
 	echo "kitchensync will not be built."
 	echo ""
 	all_tests=bad
Index: configure.in.in
===================================================================
--- configure.in.in	(.../kdepim/enterprise/kdepim/kitchensync)	(revision 774532)
+++ configure.in.in	(.../work/kitchensync-OpenSync0.30API)	(revision 774532)
@@ -29,9 +29,7 @@
 
 
 HAVE_OPENSYNC=0
-HAVE_OPENSYNC_ENGINE=0
-PKG_CHECK_MODULES(OPENSYNC, opensync-1.0 >= 0.19, HAVE_OPENSYNC=1,HAVE_OPENSYNC=0)
-PKG_CHECK_MODULES(OPENSYNCENGINE, osengine-1.0 >= 0.19, HAVE_OPENSYNC_ENGINE=1, HAVE_OPENSYNC_ENGINE=0)
+PKG_CHECK_MODULES(OPENSYNC, opensync-1.0 >= 0.33, HAVE_OPENSYNC=1,HAVE_OPENSYNC=0)
 PKG_CHECK_MODULES(LIBXML,   libxml-2.0, , HAVE_OPENSYNC=0)
 PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.6, , HAVE_OPENSYNC=0)
 
@@ -52,9 +50,9 @@
 AC_SUBST(OPENSYNC_HEADERDIR)
 
 dnl Check if we can compile KitchenSync
-AM_CONDITIONAL(compile_kitchensync, test "$HAVE_OPENSYNC" = 1 -a "$HAVE_OPENSYNC_ENGINE" = 1)
+AM_CONDITIONAL(compile_kitchensync, test "$HAVE_OPENSYNC" = 1)
 
-if test "$HAVE_OPENSYNC" = 1 -a "$HAVE_OPENSYNC_ENGINE" = 1 ; then
+if test "$HAVE_OPENSYNC" = 1; then
     AC_MSG_RESULT([found])
 else
     AC_MSG_RESULT([not found])


Index: kdepim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdepim/devel/kdepim.spec,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -r1.154 -r1.155
--- kdepim.spec	15 Feb 2008 03:19:52 -0000	1.154
+++ kdepim.spec	15 Feb 2008 05:51:37 -0000	1.155
@@ -35,9 +35,9 @@
 # script used to generate svn checkout Source0 above
 Source1: kdepim-enterprise-svn_checkout.sh
 
-Release: 1.%{ent_date}svn.ent%{?dist}
+Release: 2.%{ent_date}svn.ent%{?dist}
 %else
-Release: 1%{?dist}
+Release: 2%{?dist}
 Source0: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.bz2
 %endif
 
@@ -48,9 +48,9 @@
 
 Patch1: kdepim-3.4.0-kandy-icons.patch
 Patch2: kdepim-xdg_open.patch
-# LANG=en_US.UTF-8 svn diff svn://anonsvn.kde.org/home/kde/branches/kdepim/enterprise/kdepim/kitchensync@728478 \
-# svn://anonsvn.kde.org/home/kde/branches/work/kitchensync-OpenSync0.30API@728478 >kdepim-opensync03.patch
-#Patch3: kdepim-opensync03.patch
+# LANG=en_US.UTF-8 svn diff svn://anonsvn.kde.org/home/kde/branches/kdepim/enterprise/kdepim/kitchensync@774532 \
+# svn://anonsvn.kde.org/home/kde/branches/work/kitchensync-OpenSync0.30API@774532 >kdepim-3.5.9-opensync03.patch
+Patch3: kdepim-3.5.9-opensync03.patch
 
 ## upstream patches
 
@@ -160,8 +160,7 @@
 
 %patch2 -p1 -b .xdg_open
 
-#if 0%{?fedora} > 8 
-%if 0
+%if 0%{?fedora} > 8
 pushd kitchensync
 %patch3 -p0 -b .opensync03
 popd
@@ -298,6 +297,9 @@
 
 
 %changelog
+* Fri Feb 15 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> 6:3.5.9-2
+- update opensync03 patch
+
 * Thu Feb 14 2008 Rex Dieter <rdieter at fedoraproject.org> 6:3.5.9-1
 - kde-3.5.9
 




More information about the fedora-extras-commits mailing list