rpms/kdebase/FC-6 kdebase-3.5.5-1-redhat-startkde.patch, NONE, 1.1 kdebase-3.5.5-dbus.patch, NONE, 1.1 kdebase-3.5.5-kde#134816.patch, NONE, 1.1 kdebase-3.5.5-redhat-pam.patch, NONE, 1.1 .cvsignore, 1.53, 1.54 kdebase.spec, 1.234, 1.235 sources, 1.74, 1.75 kde-libtool.patch, 1.1, NONE kdebase-3.5.3-1-redhat.patch, 1.1, NONE kdebase-3.5.3-dbus.patch, 1.2, NONE kdebase-3.5.4-2-redhat.patch, 1.2, NONE kdebase-3.5.4-halbackend-dbus.patch, 1.1, NONE kdebase-3.5.4-kde#124116.patch, 1.1, NONE kdebase-3.5.4-kde#128552.patch, 1.1, NONE kdebase-3.5.4-kde#131770.patch, 1.1, NONE kdebase-3.5.4-kde#132873.patch, 1.1, NONE kdebase-3.5.4-kde#133665.patch, 1.1, NONE kdebase-3.5.4-kde#53642.patch, 1.1, NONE kdebase-3.5.4-kdm.patch, 1.1, NONE kdebase-3.5.4-leaks.patch, 1.2, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Oct 26 15:36:26 UTC 2006


Author: than

Update of /cvs/dist/rpms/kdebase/FC-6
In directory cvs.devel.redhat.com:/tmp/cvs-serv24138

Modified Files:
	.cvsignore kdebase.spec sources 
Added Files:
	kdebase-3.5.5-1-redhat-startkde.patch kdebase-3.5.5-dbus.patch 
	kdebase-3.5.5-kde#134816.patch kdebase-3.5.5-redhat-pam.patch 
Removed Files:
	kde-libtool.patch kdebase-3.5.3-1-redhat.patch 
	kdebase-3.5.3-dbus.patch kdebase-3.5.4-2-redhat.patch 
	kdebase-3.5.4-halbackend-dbus.patch 
	kdebase-3.5.4-kde#124116.patch kdebase-3.5.4-kde#128552.patch 
	kdebase-3.5.4-kde#131770.patch kdebase-3.5.4-kde#132873.patch 
	kdebase-3.5.4-kde#133665.patch kdebase-3.5.4-kde#53642.patch 
	kdebase-3.5.4-kdm.patch kdebase-3.5.4-leaks.patch 
Log Message:
3.5.5


kdebase-3.5.5-1-redhat-startkde.patch:
 startkde |   67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 58 insertions(+), 9 deletions(-)

--- NEW FILE kdebase-3.5.5-1-redhat-startkde.patch ---
--- kdebase-3.5.5/startkde.redhat	2006-10-02 13:13:29.000000000 +0200
+++ kdebase-3.5.5/startkde	2006-10-10 17:35:53.000000000 +0200
@@ -1,7 +1,54 @@
 #!/bin/sh
 #
 #  DEFAULT KDE STARTUP SCRIPT ( KDE-3.5.5 )
-#
+#  Modified for Red Hat Linux
+
+unset BLOCK_SIZE # breaks parsing of df output
+shopt -u -o noclobber # allow overwriting of files with '>'
+
+# set up user environment if not present
+# check for space on /tmp and "$HOME" and for write access
+#  error exit, if not
+space_tmp=`LANG=C df /tmp | xargs | cut -d" " -f11`
+homedir_mount=`LANG=C df "$HOME" | xargs | cut -d" " -f8`
+
+if [ "$homedir_mount" = "AFS" -a -x "`which fs 2>/dev/null`" ] ; then
+    # check for AFS
+    space_home=`LANG=C fs df "$HOME" | xargs | cut -d" " -f10`
+else
+    # check regular mounts
+    space_home=`LANG=C df "$HOME" | xargs | cut -d" " -f11`
+fi
+
+if [ $space_tmp -lt 50 ]; then
+    echo $"Not enough free disk space on /tmp"
+    exit 1
+fi
+
+if [ $space_home -lt 25 ]; then
+    echo $"Not enough free disk space on "$HOME""
+    exit 1
+fi
+testfile_tmp=`mktemp /tmp/KDE.startkde.XXXXXX`
+testfile_home=`mktemp "$HOME"/KDE.startkde.XXXXXX`
+
+if ! echo TEST_TEXT >$testfile_tmp 2>/dev/null ; then
+    echo $"You don't have write permissions for /tmp"
+    exit 1
+fi
+rm -f $testfile_tmp
+
+if ! echo TEST_TEXT >$testfile_home 2>/dev/null ; then
+     echo $"You don't have write permissions for "$HOME""
+     exit 1
+fi
+rm -f $testfile_home
+
+[ -d "$HOME"/.kde/share/config ] || mkdir -p "$HOME"/.kde/share/config
+
+if [ ! -e "$HOME"/.kde/share/config/emaildefaults ]; then
+  /usr/bin/mailsettings >"$HOME"/.kde/share/config/emaildefaults
+fi
 
 # When the X server dies we get a HUP signal from xinit. We must ignore it
 # because we still need to do some cleanup.
@@ -14,12 +61,12 @@
 	exit 1
 fi
 
-# Set the background to plain grey.
+# Set the background to the Red Hat default blue
 # The standard X background is nasty, causing moire effects and exploding
 # people's heads. We use colours from the standard KDE palette for those with
 # palettised displays.
 if test -z "$XDM_MANAGED" || echo "$XDM_MANAGED" | grep ",auto" > /dev/null; then
-  xsetroot -solid "#000000"
+  xsetroot -solid "#5477A0"
 fi
 
 # we have to unset this for Darwin since it will screw up KDE's dynamic-loading
@@ -61,7 +108,7 @@
 cat >$kdehome/share/config/startupconfigkeys <<EOF
 kcminputrc Mouse cursorTheme ''
 kcminputrc Mouse cursorSize ''
-kpersonalizerrc General FirstLogin true
+kpersonalizerrc General FirstLogin false
 ksplashrc KSplash Theme Default
 kcmrandrrc Display ApplyOnStartup false
 kcmrandrrc [Screen0]
@@ -157,8 +204,8 @@
 EOF
 fi
 
-# Source scripts found in <localprefix>/env/*.sh and <prefixes>/env/*.sh
-# (where <localprefix> is $KDEHOME or ~/.kde, and <prefixes> is where KDE is installed)
+# Source scripts found in <localprefix>/env/*.sh and /etc/kde/env/*.sh
+# (where <localprefix> is $KDEHOME or ~/.kde)
 #
 # This is where you can define environment variables that will be available to
 # all KDE programs, so this is where you can run agents using e.g. eval `ssh-agent`
@@ -170,9 +217,10 @@
 # better use the Autostart folder.
 
 exepath=`kde-config --path exe | tr : '\n'`
+envpath=/etc/kde/env/
 
-for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/env/,p'`; do
-  for file in "$prefix"*.sh; do
+for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/env/,p'` $envpath ; do
+  for file in "$prefix"*.sh ; do
     test -r "$file" && . "$file"
   done
 done
@@ -378,7 +426,8 @@
 echo 'startkde: Running shutdown scripts...'  1>&2
 
 # Run scripts found in $KDEDIRS/shutdown
-for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'`; do
+shutdownpath=/etc/kde/shutdown/
+for prefix in `echo "$exepath" | sed -n -e 's,/bin[^/]*/,/shutdown/,p'` $shutdownpath; do
   for file in `ls "$prefix" 2> /dev/null | egrep -v '(~|\.bak)$'`; do
     test -x "$prefix$file" && "$prefix$file"
   done

kdebase-3.5.5-dbus.patch:
 configure.in.in             |   66 -----
 mediamanager/Makefile.am    |   11 
 mediamanager/connection.cpp |  168 +++++++++++++
 mediamanager/connection.h   |   86 ++++++
 mediamanager/halbackend.h   |    2 
 mediamanager/integrator.cpp |  244 +++++++++++++++++++
 mediamanager/integrator.h   |   95 +++++++
 mediamanager/message.cpp    |  551 ++++++++++++++++++++++++++++++++++++++++++++
 mediamanager/message.h      |  132 ++++++++++
 9 files changed, 1286 insertions(+), 69 deletions(-)

--- NEW FILE kdebase-3.5.5-dbus.patch ---
--- kdebase-3.5.5/kioslave/media/configure.in.in.dbus	2006-10-01 19:31:54.000000000 +0200
+++ kdebase-3.5.5/kioslave/media/configure.in.in	2006-10-10 19:55:19.000000000 +0200
@@ -97,70 +97,6 @@
 
   AC_SUBST(DBUS_INCS)
   AC_SUBST(DBUS_LIBS)
-
-########### Check for DBus-Qt3 bindings
-
-  AC_MSG_CHECKING(for DBus-Qt3 bindings)
-
-  dbusqt_inc=NOTFOUND
-  dbusqt_lib=NOTFOUND
-  dbusqt=NOTFOUND
-
-  search_incs="$kde_includes $kde_extra_includes /usr/include /usr/include/dbus-1.0 /usr/local/include /usr/local/include/dbus-1.0"
-  AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)
-
-  if test -r $dbusqt_incdir/dbus/connection.h ; then
-    have_qt_patch=0
-    grep dbus_connection_setup_with_qt_main $dbusqt_incdir/dbus/connection.h \
-    > /dev/null 2>&1 && have_qt_patch=1
-    if test $have_qt_patch = 1 ; then
-      DBUSQT_INCS="-I$dbusqt_incdir"
-      dbusqt_inc=FOUND
-    fi
-  fi
-
-  search_libs="$kde_libraries $kde_extra_libs /usr/lib$kdelibsuff /usr/local/lib$kdelibsuff"
-  AC_FIND_FILE(libdbus-qt-1.so, $search_libs, dbusqt_libdir)
-
-  if test -r $dbusqt_libdir/libdbus-qt-1.so ; then
-    DBUSQT_LIBS="-L$dbusqt_libdir -ldbus-qt-1"
-    dbusqt_lib=FOUND
-  fi
-
-  if test $dbusqt_inc != FOUND  || test $dbusqt_lib != FOUND ; then 
-
-    search_incs="`pkg-config --cflags dbus-1  |sed 's/-I//g'`"
-    AC_FIND_FILE(dbus/connection.h, $search_incs, dbusqt_incdir)
-    if test -r $dbusqt_incdir/dbus/connection.h ; then
-      have_qt_patch=0
-      grep dbus_connection_setup_with_qt_main $dbusqt_incdir/dbus/connection.h \
-      > /dev/null 2>&1 && have_qt_patch=1
-      if test $have_qt_patch = 1 ; then
-        DBUSQT_INCS="-I$dbusqt_incdir"
-        dbusqt_inc=FOUND
-      fi
-    fi
-
-    search_libs="`pkg-config --libs dbus-1 --libs-only-L | sed 's/-L//g'`"
-    AC_FIND_FILE(libdbus-qt-1.so, $search_libs, dbusqt_libdir)
-
-    if test -r $dbusqt_libdir/libdbus-qt-1.so ; then
-      DBUSQT_LIBS="-L$dbusqt_libdir -ldbus-qt-1"
-      dbusqt_lib=FOUND
-    fi
-
-  fi
-
-
-  if test $dbusqt_inc = FOUND && test $dbusqt_lib = FOUND ; then
-    AC_MSG_RESULT(headers $dbusqt_incdir libraries $dbusqt_libdir)
-    dbusqt=FOUND
-  else
-    AC_MSG_RESULT(searched but not found)
-  fi
-
-  AC_SUBST(DBUSQT_INCS)
-  AC_SUBST(DBUSQT_LIBS)
 fi
 
 ########### Check if media HAL backend sould be compiled
@@ -168,7 +104,7 @@
 AC_MSG_CHECKING(if the HAL backend for media:/ should be compiled)
 
 HALBACKEND=no
-if test "x$hal" = "xFOUND" && test "x$dbus" = "xFOUND" && test "x$dbusqt" = "xFOUND" ; then
+if test "x$hal" = "xFOUND" && test "x$dbus" = "xFOUND" ; then
   AC_DEFINE_UNQUOTED([COMPILE_HALBACKEND],1, [media HAL backend compilation])
   HALBACKEND=yes
   AC_SUBST(HALBACKEND)
--- kdebase-3.5.5/kioslave/media/mediamanager/halbackend.h.dbus	2006-07-22 10:15:45.000000000 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/halbackend.h	2006-10-10 17:41:42.000000000 +0200
@@ -40,7 +40,7 @@
 /* We acknowledge the the dbus API is unstable */
 #define DBUS_API_SUBJECT_TO_CHANGE
 /* DBus-Qt bindings */
-#include <dbus/connection.h>
+#include <connection.h>
 /* HAL libraries */
 #include <libhal.h>
 #include <libhal-storage.h>
--- /dev/null	2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/connection.cpp	2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,168 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* connection.cpp: Qt wrapper for DBusConnection
+ *
+ * Copyright (C) 2003  Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+#include "connection.h"
+
+using namespace DBusQt;
+
+#include "integrator.h"
+using Internal::Integrator;
+
+struct Connection::Private
+{
+  Private( Connection *qq );
+  void setConnection( DBusConnection *c );
+  DBusConnection *connection;
+  int connectionSlot;
+  DBusError error;
+  Integrator *integrator;
+  int timeout;
+  Connection *q;
+};
+
+Connection::Private::Private( Connection *qq )
+  : connection( 0 ), connectionSlot( 0 ), integrator( 0 ),
+    timeout( -1 ), q( qq )
+{
+  dbus_error_init( &error );
+}
+
+void Connection::Private::setConnection( DBusConnection *c )
+{
+  if (!c) {
+    qDebug( "error: %s, %s", error.name, error.message );
+    dbus_error_free( &error );
+    return;
+  }
+  connection = c;
+  integrator = new Integrator( c, q );
+  connect( integrator, SIGNAL(readReady()), q, SLOT(dispatchRead()) );
+}
+
+Connection::Connection( QObject *parent )
+  : QObject( parent )
+{
+  d = new Private( this );
+}
+
+Connection::Connection( const QString& host, QObject *parent )
+  : QObject( parent )
+{
+  d = new Private( this );
+
+  if ( !host.isEmpty() )
+    init( host );
+}
+
+Connection::Connection( DBusBusType type, QObject* parent )
+  : QObject( parent )
+{
+  d = new Private( this );
+  d->setConnection( dbus_bus_get(type, &d->error) );
+}
+
+void Connection::init( const QString& host )
+{
+  d->setConnection( dbus_connection_open( host.ascii(), &d->error) );
+  //dbus_connection_allocate_data_slot( &d->connectionSlot );
+  //dbus_connection_set_data( d->connection, d->connectionSlot, 0, 0 );
+}
+
+bool Connection::isConnected() const
+{
+  return dbus_connection_get_is_connected( d->connection );
+}
+
+bool Connection::isAuthenticated() const
+{
+  return dbus_connection_get_is_authenticated( d->connection );
+}
+
+void Connection::open( const QString& host )
+{
+  if ( host.isEmpty() ) return;
+
+  init( host );
+}
+
+void Connection::close()
+{
+  dbus_connection_close( d->connection );
+}
+
+void Connection::flush()
+{
+  dbus_connection_flush( d->connection );
+}
+
+void Connection::dispatchRead()
+{
+  while ( dbus_connection_dispatch( d->connection ) == DBUS_DISPATCH_DATA_REMAINS )
+    ;
+}
+
+DBusConnection* Connection::connection() const
+{
+  return d->connection;
+}
+
+Connection::Connection( DBusConnection *connection, QObject *parent  )
+  : QObject( parent )
+{
+  d = new Private(this);
+  d->setConnection(connection);
+}
+
+void Connection::send( const Message &m )
+{
+    dbus_connection_send(d->connection, m.message(), 0);
+}
+
+void Connection::sendWithReply( const Message& )
+{
+}
+
+Message Connection::sendWithReplyAndBlock( const Message &m )
+{
+  DBusMessage *reply;
+  reply = dbus_connection_send_with_reply_and_block( d->connection, m.message(), d->timeout, &d->error );
+  if (dbus_error_is_set(&d->error)) {
+      qDebug("error: %s, %s", d->error.name, d->error.message);
+      dbus_error_free(&d->error);
+  }
+  return Message( reply );
+}
+
+void* Connection::virtual_hook( int, void*  )
+{
+}
+
+void Connection::dbus_connection_setup_with_qt_main (DBusConnection *connection)
+{
+  d->setConnection( connection );
+}
+
+
+
+/////////////////////////////////////////////////////////
+
+#include "connection.moc"
--- /dev/null	2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/connection.h	2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,86 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* connection.h: Qt wrapper for DBusConnection
+ *
+ * Copyright (C) 2003  Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+#ifndef DBUS_QT_CONNECTION_H
+#define DBUS_QT_CONNECTION_H
+
+/* We acknowledge the the dbus API is unstable */
+#define DBUS_API_SUBJECT_TO_CHANGE
+
+#include "message.h"
+
+#include <qobject.h>
+#include <qstring.h>
+
+#include "dbus/dbus.h"
+
+namespace DBusQt {
+  namespace Internal {
+    class Integrator;
+  }
+
+  class Connection : public QObject
+  {
+    Q_OBJECT
+  public:
+    Connection( QObject *parent =0 );
+    Connection( const QString& host,
+                QObject *parent = 0 );
+    Connection( DBusBusType type, QObject* parent = 0 );
+
+    bool isConnected() const;
+    bool isAuthenticated() const;
+
+    Message borrowMessage();
+    Message popMessage();
+    void stealBorrowMessage( const Message& );
+    void dbus_connection_setup_with_qt_main (DBusConnection *connection);
+
+  public slots:
+    void open( const QString& );
+    void close();
+    void flush();
+    void send( const Message& );
+    void sendWithReply( const Message& );
+    Message sendWithReplyAndBlock( const Message& );
+
+  protected slots:
+    void dispatchRead();
+
+  protected:
+    void init( const QString& host );
+    virtual void *virtual_hook( int id, void *data );
+
+  private:
+    friend class Internal::Integrator;
+    DBusConnection *connection() const;
+    Connection( DBusConnection *connection, QObject *parent );
+
+  private:
+    struct Private;
+    Private *d;
+  };
+
+}
+
+
+#endif
--- /dev/null	2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/message.h	2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,132 @@
+/* -*- mode: C++; c-file-style: "gnu" -*- */
+/* message.h: Qt wrapper for DBusMessage
+ *
+ * Copyright (C) 2003  Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+#ifndef DBUS_QT_MESSAGE_H
+#define DBUS_QT_MESSAGE_H
+
+/* We acknowledge the the dbus API is unstable */
+#define DBUS_API_SUBJECT_TO_CHANGE
+
+#include <qvariant.h>
+#include <qstring.h>
+#include <qstringlist.h>
+
+#include "dbus/dbus.h"
+
+namespace DBusQt {
+
+  class Message
+  {
+  public:
+    class iterator {
+    public:
+      iterator();
+      iterator( const iterator& );
+      iterator( DBusMessage* msg );
+      ~iterator();
+
+      iterator& operator=( const iterator& );
+      const QVariant& operator*() const;
+      QVariant& operator*();
+      iterator& operator++();
+      iterator operator++(int);
+      bool operator==( const iterator& it );
+      bool operator!=( const iterator& it );
+
+      QVariant var() const;
+    protected:
+      QVariant marshallBaseType( DBusMessageIter* i );
+      void fillVar();
+      struct IteratorData;
+      IteratorData *d;
+    };
+
+    Message( int messageType );
+    Message( DBusMessage * );//hide this one from the public implementation
+    Message( const QString& service, const QString& path,
+             const QString& interface, const QString& method );
+    Message( const Message& replayingTo );
+    Message( const QString& path, const QString& interface,
+             const QString& name );
+    Message( const Message& replayingTo, const QString& errorName,
+             const QString& errorMessage );
+
+    Message operator=( const Message& other );
+
+    virtual ~Message();
+
+    int type() const;
+
+    void setPath( const QString& );
+    QString path() const;
+
+    void setInterface( const QString& );
+    QString interface() const;
+
+    void setMember( const QString& );
+    QString member() const;
+
+    QString errorName() const;
+
+    QString destination() const;
+
+    bool    setSender( const QString& sender );
+    QString    sender() const;
+
+    QString signature() const;
+
+    iterator begin() const;
+    iterator end() const;
+
+    QVariant at( int i );
+
+
+  public:
+    Message& operator<<( bool );
+    Message& operator<<( Q_INT8 );
+    Message& operator<<( Q_INT32 );
+    Message& operator<<( Q_UINT32 );
+    Message& operator<<( Q_INT64 );
+    Message& operator<<( Q_UINT64 );
+    Message& operator<<( double );
+    Message& operator<<( const QString& );
+    Message& operator<<( const QVariant& );
+    //Message& operator<<();
+    //Message& operator<<();
+    //Message& operator<<();
+    //Message& operator<<();
+    //Message& operator<<();
+    //Message& operator<<();
+    //Message& operator<<();
+
+  protected:
+    friend class Connection;
+    DBusMessage* message() const;
+
+  private:
+    struct Private;
+    Private *d;
+  };
+
+}
+
+#endif
--- /dev/null	2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/integrator.h	2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,95 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* integrator.h: integrates D-BUS into Qt event loop
+ *
+ * Copyright (C) 2003  Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.1
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+#ifndef DBUS_QT_INTEGRATOR_H
+#define DBUS_QT_INTEGRATOR_H
+
+/* We acknowledge the the dbus API is unstable */
+#define DBUS_API_SUBJECT_TO_CHANGE
+
+#include <qobject.h>
+
+#include <qintdict.h>
+#include <qptrdict.h>
+
+#include "dbus/dbus.h"
+
+class QTimer;
+
+namespace DBusQt
+{
+  class Connection;
+
+  namespace Internal
+  {
+    struct Watch;
+
+    class Timeout : public QObject
+    {
+      Q_OBJECT
+    public:
+      Timeout( QObject *parent, DBusTimeout *t );
+    public:
+      void start();
+    signals:
+      void timeout( DBusTimeout* );
+    protected slots:
+      void slotTimeout();
+    private:
+      QTimer *m_timer;
+      DBusTimeout *m_timeout;
+    };
+
+    class Integrator : public QObject
+    {
+      Q_OBJECT
+    public:
+      Integrator( DBusConnection *connection, QObject *parent );
+      Integrator( DBusServer *server, QObject *parent );
+
+    signals:
+      void readReady();
+      void newConnection( Connection* );
+
+    protected slots:
+      void slotRead( int );
+      void slotWrite( int );
+      void slotTimeout( DBusTimeout *timeout );
+
+    public:
+      void addWatch( DBusWatch* );
+      void removeWatch( DBusWatch* );
+
+      void addTimeout( DBusTimeout* );
+      void removeTimeout( DBusTimeout* );
+
+      void handleConnection( DBusConnection* );
+    private:
+      QIntDict<Watch> m_watches;
+      QPtrDict<Timeout> m_timeouts;
+      DBusConnection *m_connection;
+      DBusServer *m_server;
+    };
+  }
+}
+
+#endif
--- kdebase-3.5.5/kioslave/media/mediamanager/Makefile.am.dbus	2005-09-10 10:25:36.000000000 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/Makefile.am	2006-10-10 17:41:42.000000000 +0200
@@ -1,17 +1,22 @@
 kde_module_LTLIBRARIES = kded_mediamanager.la
 
 if include_media_halbackend
-HALBACKEND_INCS = $(HAL_INCS) $(DBUS_INCS) $(DBUSQT_INCS)
+HALBACKEND_INCS = $(HAL_INCS) $(DBUS_INCS)
 endif
 
 METASOURCES = AUTO
 INCLUDES = -I$(srcdir)/../libmediacommon -I../libmediacommon $(HALBACKEND_INCS) $(all_includes)
 
+DBUSQT3BINDING_LIB = libdbusqt3.la
+libdbusqt3_la_SOURCES = connection.cpp integrator.cpp message.cpp
+libdbusqt3_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
+libdbusqt3_la_LIBADD = $(HAL_LIBS) $(DBUS_LIBS)
+
 if include_media_halbackend
 HALBACKEND_LIB = libhalbackend.la
 libhalbackend_la_SOURCES = halbackend.cpp
 libhalbackend_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
-libhalbackend_la_LIBADD = $(HAL_LIBS) $(DBUS_LIBS) $(DBUSQT_LIBS)
+libhalbackend_la_LIBADD = $(HAL_LIBS) $(DBUS_LIBS) $(DBUSQT3BINDING_LIB)
 endif
 
 if include_media_linuxcdpolling
@@ -20,7 +25,7 @@
 liblinuxcdpolling_la_LDFLAGS = -avoid-version $(all_libraries) -no-undefined
 endif
 
-noinst_LTLIBRARIES = $(LINUXCDPOLLING_LIB) $(HALBACKEND_LIB)
+noinst_LTLIBRARIES = $(LINUXCDPOLLING_LIB) $(HALBACKEND_LIB) $(DBUSQT3BINDING_LIB)
 
 kded_mediamanager_la_SOURCES = mediamanager.cpp mediamanager.skel medialist.cpp backendbase.cpp fstabbackend.cpp removablebackend.cpp mediadirnotify.cpp mediadirnotify.skel
 kded_mediamanager_la_LDFLAGS = $(all_libraries) -module -avoid-version
--- /dev/null	2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/message.cpp	2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,551 @@
+/* -*- mode: C++; c-file-style: "gnu" -*- */
+/* message.cpp: Qt wrapper for DBusMessage
+ *
+ * Copyright (C) 2003  Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+#include "message.h"
+
+#include <qmap.h>
+
+#include <cstdlib>
+
+namespace DBusQt {
+
+struct Message::iterator::IteratorData {
+  DBusMessageIter *iter;
+  QVariant         var;
+  bool             end;
+  DBusMessage	  *mesg;
+};
+
+/**
+ * Iterator.
+ */
+Message::iterator::iterator()
+{
+  d = new IteratorData;
+  d->iter = 0; d->end = true;
+}
+
+/**
+ * Constructs iterator for the message.
+ * @param msg message whose fields we want to iterate
+ */
+Message::iterator::iterator( DBusMessage* msg )
+{
+  d = new IteratorData;
+  d->mesg = msg;
+  d->iter = static_cast<DBusMessageIter *>( malloc( sizeof(DBusMessageIter) ) );
+  dbus_message_iter_init( d->mesg, d->iter );
+  if ( !d->iter ) {
+    qDebug("No iterator??");
+  }
+  fillVar();
+  d->end = false;
+}
+
+/**
+ * Copy constructor for the iterator.
+ * @param itr iterator
+ */
+Message::iterator::iterator( const iterator& itr )
+{
+  d = new IteratorData;
+  d->iter = itr.d->iter;
+  d->var  = itr.d->var;
+  d->end  = itr.d->end;
+}
+
+/**
+ * Destructor.
+ */
+Message::iterator::~iterator()
+{
+  free( d->iter );
+  delete d; d=0;
+}
+
+/**
+ * Creates an iterator equal to the @p itr iterator
+ * @param itr other iterator
+ * @return
+ */
+Message::iterator&
+Message::iterator::operator=( const iterator& itr )
+{
+  IteratorData *tmp = new IteratorData;
+  tmp->iter = itr.d->iter;
+  tmp->var  = itr.d->var;
+  tmp->end  = itr.d->end;
+  delete d; d=tmp;
+  return *this;
+}
+
+/**
+ * Returns the constant QVariant held by the iterator.
+ * @return the constant reference to QVariant held by this iterator
+ */
+const QVariant&
+Message::iterator::operator*() const
+{
+  return d->var;
+}
+
+/**
+ * Returns the QVariant held by the iterator.
+ * @return reference to QVariant held by this iterator
+ */
+QVariant&
+Message::iterator::operator*()
+{
+  return d->var;
+}
+
+/**
+ * Moves to the next field and return a reference to itself after
+ * incrementing.
+ * @return reference to self after incrementing
+ */
+Message::iterator&
+Message::iterator::operator++()
+{
+  if ( d->end )
+    return *this;
+
+  if (  dbus_message_iter_next( d->iter ) ) {
+    fillVar();
+  } else {
+    d->end = true;
+    d->var = QVariant();
+  }
+  return *this;
+}
+
+/**
+ * Moves to the next field and returns self before incrementing.
+ * @return self before incrementing
+ */
+Message::iterator
+Message::iterator::operator++(int)
+{
+  iterator itr( *this );
+  operator++();
+  return itr;
+}
+
+/**
+ * Compares this iterator to @p it iterator.
+ * @param it the iterator to which we're comparing this one to
+ * @return true if they're equal, false otherwise
+ */
+bool
+Message::iterator::operator==( const iterator& it )
+{
+  if ( d->end == it.d->end ) {
+    if ( d->end == true ) {
+      return true;
+    } else {
+      return d->var == it.d->var;
+    }
+  } else
+    return false;
+}
+
+/**
+ * Compares two iterators.
+ * @param it The other iterator.
+ * @return true if two iterators are not equal, false
+ *         otherwise
+ */
+bool
+Message::iterator::operator!=( const iterator& it )
+{
+  return !operator==( it );
+}
+
+QVariant Message::iterator::marshallBaseType( DBusMessageIter* i )
+{
+  QVariant ret;
+  switch (dbus_message_iter_get_arg_type(i)) {
+  case DBUS_TYPE_INT32:
+    {
+      dbus_int32_t v;
+      dbus_message_iter_get_basic (i, &v);
+      ret = QVariant( v );
+    }
+    break;
+  case DBUS_TYPE_UINT32:
+    {
+      dbus_uint32_t v;
+      dbus_message_iter_get_basic (i, &v);
+      ret = QVariant( v );
+    }
+    break;
+  case DBUS_TYPE_DOUBLE:
+    {
+      double v;
+      dbus_message_iter_get_basic (i, &v);
+      ret = QVariant( v );
+    }
+    break;
+  case DBUS_TYPE_STRING:
+    {
+      const char *v;
+      dbus_message_iter_get_basic (i, &v);
+      ret = QVariant( v );
+    }
+    break;
+  default:
+    ret = QVariant();
+    break;
+  }
+  return ret;
+}
+
+/**
+ * Fills QVariant based on what current DBusMessageIter helds.
+ */
+void
+Message::iterator::fillVar()
+{
+  switch ( dbus_message_iter_get_arg_type( d->iter ) ) {
+  case DBUS_TYPE_INT32:
+  case DBUS_TYPE_UINT32:
+  case DBUS_TYPE_DOUBLE:
+  case DBUS_TYPE_STRING:
+    d->var = marshallBaseType( d->iter );
+    break;
+  case DBUS_TYPE_ARRAY: {
+    switch ( dbus_message_iter_get_element_type( d->iter ) ) {
+    case DBUS_TYPE_STRING: {
+      QStringList tempList;
+      DBusMessageIter sub;
+      dbus_message_iter_recurse (d->iter, &sub);
+      while (dbus_message_iter_get_arg_type (&sub) != DBUS_TYPE_INVALID)
+        {
+          const char *v;
+          dbus_message_iter_get_basic (&sub, &v);
+          tempList.append( QString( v ) );
+          dbus_message_iter_next (&sub);
+        }
+      d->var = QVariant( tempList );
+      break;
+    }
+    default:
+      qDebug( "Array of type not implemented" );
+      d->var = QVariant();
+      break;
+    }
+    break;
+  }
+#if 0
+  /* DICT is gone for now, but expected to be reintroduced, or else
+   * reintroduced as a flag on the introspection data that can
+   * apply to array of struct of two fields
+   */
+  case DBUS_TYPE_DICT: {
+    qDebug( "Got a hash!" );
+    QMap<QString, QVariant> tempMap;
+    DBusMessageIter dictIter;
+    dbus_message_iter_init_dict_iterator( d->iter, &dictIter );
+    do {
+      char *key = dbus_message_iter_get_dict_key( &dictIter );
+      tempMap[key] = marshallBaseType( &dictIter );
+      dbus_free( key );
+      dbus_message_iter_next( &dictIter );
+    } while( dbus_message_iter_has_next( &dictIter ) );
+    d->var = QVariant( tempMap );
+    break;
+    qDebug( "Hash/Dict type not implemented" );
+    d->var = QVariant();
+    break;
+  }
+#endif
+  default:
+    qDebug( "not implemented" );
+    d->var = QVariant();
+    break;
+  }
+}
+
+/**
+ * Returns a QVariant help by this iterator.
+ * @return QVariant held by this iterator
+ */
+QVariant
+Message::iterator::var() const
+{
+  return d->var;
+}
+
+struct Message::Private {
+  DBusMessage *msg;
+};
+
+Message::Message( DBusMessage *m )
+{
+  d = new Private;
+  d->msg = m;
+}
+
+/**
+ *
+ */
+Message::Message( int messageType )
+{
+  d = new Private;
+  d->msg = dbus_message_new( messageType );
+}
+
+/**
+ * Constructs a new Message with the given service and name.
+ * @param service service service that the message should be sent to
+ * @param name name of the message
+ */
+Message::Message( const QString& service, const QString& path,
+                  const QString& interface, const QString& method )
+{
+  d = new Private;
+  d->msg = dbus_message_new_method_call( service.latin1(), path.latin1(),
+                                         interface.latin1(), method.latin1() );
+}
+
+/**
+ * Constructs a message that is a reply to some other
+ * message.
+ * @param name the name of the message
+ * @param replayingTo original_message the message which the created
+ * message is a reply to.
+ */
+Message::Message( const Message& replayingTo )
+{
+  d = new Private;
+  d->msg = dbus_message_new_method_return( replayingTo.d->msg );
+}
+
+Message:: Message( const QString& path, const QString& interface,
+                   const QString& name )
+{
+  d = new Private;
+  d->msg = dbus_message_new_signal( path.ascii(), interface.ascii(),
+                                    name.ascii() );
+}
+
+Message::Message( const Message& replayingTo, const QString& errorName,
+                  const QString& errorMessage )
+{
+  d = new Private;
+  d->msg = dbus_message_new_error( replayingTo.d->msg, errorName.utf8(),
+                                   errorMessage.utf8() );
+}
+
+Message Message::operator=( const Message& other )
+{
+  //FIXME: ref the other.d->msg instead of copying it?
+}
+/**
+ * Destructs message.
+ */
+Message::~Message()
+{
+  if ( d->msg ) {
+    dbus_message_unref( d->msg );
+  }
+  delete d; d=0;
+}
+
+int Message::type() const
+{
+  return dbus_message_get_type( d->msg );
+}
+
+void Message::setPath( const QString& path )
+{
+  dbus_message_set_path( d->msg, path.ascii() );
+}
+
+QString Message::path() const
+{
+  return dbus_message_get_path( d->msg );
+}
+
+void Message::setInterface( const QString& iface )
+{
+  dbus_message_set_interface( d->msg, iface.ascii() );
+}
+
+QString Message::interface() const
+{
+  return dbus_message_get_interface( d->msg );
+}
+
+void Message::setMember( const QString& member )
+{
+  dbus_message_set_member( d->msg, member.ascii() );
+}
+
+QString Message::member() const
+{
+  return dbus_message_get_member( d->msg );
+}
+
+QString Message::errorName() const
+{
+  return dbus_message_get_error_name( d->msg );
+}
+
+QString Message::destination() const
+{
+  return dbus_message_get_destination( d->msg );
+}
+
+/**
+ * Sets the message sender.
+ * @param sender the sender
+ * @return false if unsuccessful
+ */
+bool
+Message::setSender( const QString& sender )
+{
+  return dbus_message_set_sender( d->msg, sender.latin1() );
+}
+
+/**
+ * Returns sender of this message.
+ * @return sender
+ */
+QString
+Message::sender() const
+{
+  return dbus_message_get_sender( d->msg );
+}
+
+QString Message::signature() const
+{
+  return dbus_message_get_signature( d->msg );
+}
+
+
+/**
+ * Returns the starting iterator for the fields of this
+ * message.
+ * @return starting iterator
+ */
+Message::iterator
+Message::begin() const
+{
+  return iterator( d->msg );
+}
+
+/**
+ * Returns the ending iterator for the fields of this
+ * message.
+ * @return ending iterator
+ */
+Message::iterator
+Message::end() const
+{
+  return iterator();
+}
+
+/**
+ * Returns the field at position @p i
+ * @param i position of the wanted field
+ * @return QVariant at position @p i or an empty QVariant
+ */
+QVariant
+Message::at( int i )
+{
+  iterator itr( d->msg );
+
+  while ( i-- ) {
+    if ( itr == end() )
+      return QVariant();//nothing there
+    ++itr;
+  }
+  return *itr;
+}
+
+/**
+ * The underlying DBusMessage of this class.
+ * @return DBusMessage pointer.
+ */
+DBusMessage*
+Message::message() const
+{
+  return d->msg;
+}
+
+Message& Message::operator<<( bool b )
+{
+  const dbus_bool_t right_size_bool = b;
+  dbus_message_append_args( d->msg, DBUS_TYPE_BOOLEAN, &right_size_bool,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_INT8 byte )
+{
+  dbus_message_append_args( d->msg, DBUS_TYPE_BYTE, &byte,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_INT32 num )
+{
+  dbus_message_append_args( d->msg, DBUS_TYPE_INT32, &num,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_UINT32 num )
+{
+  dbus_message_append_args( d->msg, DBUS_TYPE_UINT32, &num,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_INT64 num )
+{
+  dbus_message_append_args( d->msg, DBUS_TYPE_INT64, &num,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( Q_UINT64 num )
+{
+  dbus_message_append_args( d->msg, DBUS_TYPE_UINT64, &num,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( double num )
+{
+  dbus_message_append_args( d->msg, DBUS_TYPE_DOUBLE, &num,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( const QString& str )
+{
+  const char *u = str.utf8();
+  dbus_message_append_args( d->msg, DBUS_TYPE_STRING, &u,
+                            DBUS_TYPE_INVALID );
+}
+
+Message& Message::operator<<( const QVariant& custom )
+{
+  //FIXME: imeplement
+}
+
+}
--- /dev/null	2006-10-09 18:32:23.425560750 +0200
+++ kdebase-3.5.5/kioslave/media/mediamanager/integrator.cpp	2006-10-10 17:41:42.000000000 +0200
@@ -0,0 +1,244 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
+/* integrator.h: integrates D-BUS into Qt event loop
+ *
+ * Copyright (C) 2003  Zack Rusin <zack at kde.org>
+ *
+ * Licensed under the Academic Free License version 2.0
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+#include "integrator.h"
+#include "connection.h"
+
+#include <qtimer.h>
+#include <qsocketnotifier.h>
+#include <qintdict.h>
+#include <qptrlist.h>
+
+namespace DBusQt
+{
+namespace Internal {
+
+struct Watch {
+  Watch(): readSocket( 0 ), writeSocket( 0 ) { }
+
+  DBusWatch *watch;
+  QSocketNotifier *readSocket;
+  QSocketNotifier *writeSocket;
+};
+
+//////////////////////////////////////////////////////////////
+dbus_bool_t dbusAddWatch( DBusWatch *watch, void *data )
+{
+  Integrator *con = static_cast<Integrator*>( data );
+  con->addWatch( watch );
+  return true;
+}
+void dbusRemoveWatch( DBusWatch *watch, void *data )
+{
+  Integrator *con = static_cast<Integrator*>( data );
+  con->removeWatch( watch );
+}
+
+void dbusToggleWatch( DBusWatch *watch, void *data )
+{
+  Integrator *itg = static_cast<Integrator*>( data );
+  if ( dbus_watch_get_enabled( watch ) )
+    itg->addWatch( watch );
+  else
+    itg->removeWatch( watch );
+}
+
+dbus_bool_t dbusAddTimeout( DBusTimeout *timeout, void *data )
+{
+  if ( !dbus_timeout_get_enabled(timeout) )
+    return true;
+
+  Integrator *itg = static_cast<Integrator*>( data );
+  itg->addTimeout( timeout );
+  return true;
+}
+
+void dbusRemoveTimeout( DBusTimeout *timeout, void *data )
+{
+  Integrator *itg = static_cast<Integrator*>( data );
+  itg->removeTimeout( timeout );
+}
+
+void dbusToggleTimeout( DBusTimeout *timeout, void *data )
+{
+  Integrator *itg = static_cast<Integrator*>( data );
+
+  if ( dbus_timeout_get_enabled( timeout ) )
+    itg->addTimeout( timeout );
+  else
+    itg->removeTimeout( timeout );
+}
+
+void dbusWakeupMain( void* )
+{
+}
+
+void dbusNewConnection( DBusServer     *server,
+                        DBusConnection *new_connection,
+                        void           *data )
+{
+  Integrator *itg = static_cast<Integrator*>( data );
+  itg->handleConnection( new_connection );
+}
+/////////////////////////////////////////////////////////////
+
+Timeout::Timeout( QObject *parent, DBusTimeout *t )
+  : QObject( parent ),  m_timeout( t )
+{
+  m_timer = new QTimer( this );
+  connect( m_timer,  SIGNAL(timeout()),
+           SLOT(slotTimeout()) );
+}
+
+void Timeout::slotTimeout()
+{
+  emit timeout( m_timeout );
+}
+
+void Timeout::start()
+{
+  m_timer->start( dbus_timeout_get_interval( m_timeout ) );
+}
+
+Integrator::Integrator( DBusConnection *conn, QObject *parent )
+  : QObject( parent ), m_connection( conn )
+{
+  m_timeouts.setAutoDelete( true );
+
+  dbus_connection_set_watch_functions( m_connection,
+                                       dbusAddWatch,
+                                       dbusRemoveWatch,
+                                       dbusToggleWatch,
+                                       this, 0 );
+  dbus_connection_set_timeout_functions( m_connection,
+                                         dbusAddTimeout,
+                                         dbusRemoveTimeout,
+                                         dbusToggleTimeout,
+                                         this, 0 );
+  dbus_connection_set_wakeup_main_function( m_connection,
+					    dbusWakeupMain,
+					    this, 0 );
+}
+
+Integrator::Integrator( DBusServer *server, QObject *parent )
+  : QObject( parent ), m_server( server )
+{
+  m_connection = reinterpret_cast<DBusConnection*>( m_server );
+  m_timeouts.setAutoDelete( true );
+
+  dbus_server_set_watch_functions( m_server,
+                                   dbusAddWatch,
+                                   dbusRemoveWatch,
+                                   dbusToggleWatch,
+                                   this, 0 );
+  dbus_server_set_timeout_functions( m_server,
+                                     dbusAddTimeout,
+                                     dbusRemoveTimeout,
+                                     dbusToggleTimeout,
+                                     this, 0 );
+  dbus_server_set_new_connection_function( m_server,
+                                           dbusNewConnection,
+                                           this,  0 );
+}
+
+void Integrator::slotRead( int fd )
+{
+  QIntDictIterator<Watch>	it( m_watches );
+  for ( ; it.current(); ++it )
+    dbus_watch_handle ( it.current()->watch, DBUS_WATCH_READABLE );
+
+  emit readReady();
+}
+
+void Integrator::slotWrite( int fd )
+{
+  QIntDictIterator<Watch>       it( m_watches );
+  for ( ; it.current(); ++it )
+    dbus_watch_handle ( it.current()->watch, DBUS_WATCH_WRITABLE );
+}
+
+void Integrator::slotTimeout( DBusTimeout *timeout )
+{
+  dbus_timeout_handle( timeout );
+}
+
+void Integrator::addWatch( DBusWatch *watch )
+{
+  if ( !dbus_watch_get_enabled( watch ) )
+    return;
+
+  Watch *qtwatch = new Watch;
+  qtwatch->watch = watch;
+
+  int flags = dbus_watch_get_flags( watch );
+  int fd = dbus_watch_get_fd( watch );
+
+  if ( flags & DBUS_WATCH_READABLE ) {
+    qtwatch->readSocket = new QSocketNotifier( fd, QSocketNotifier::Read, this );
+    QObject::connect( qtwatch->readSocket, SIGNAL(activated(int)), SLOT(slotRead(int)) );
+  }
+
+  if (flags & DBUS_WATCH_WRITABLE) {
+    qtwatch->writeSocket = new QSocketNotifier( fd, QSocketNotifier::Write, this );
+    QObject::connect( qtwatch->writeSocket, SIGNAL(activated(int)), SLOT(slotWrite(int)) );
+  }
+
+  m_watches.insert( fd, qtwatch );
+}
+
+void Integrator::removeWatch( DBusWatch *watch )
+{
+  int key = dbus_watch_get_fd( watch );
+
+  Watch *qtwatch = m_watches.take( key );
+
+  if ( qtwatch ) {
+    delete qtwatch->readSocket;  qtwatch->readSocket = 0;
+    delete qtwatch->writeSocket; qtwatch->writeSocket = 0;
+    delete qtwatch;
+  }
+}
+
+void Integrator::addTimeout( DBusTimeout *timeout )
+{
+  Timeout *mt = new Timeout( this, timeout );
+  m_timeouts.insert( timeout, mt );
+  connect( mt, SIGNAL(timeout(DBusTimeout*)),
+           SLOT(slotTimeout(DBusTimeout*)) );
+  mt->start();
+}
+
+void Integrator::removeTimeout( DBusTimeout *timeout )
+{
+  m_timeouts.remove( timeout );
+}
+
+void Integrator::handleConnection( DBusConnection *c )
+{
+  Connection *con = new Connection( c, this );
+  emit newConnection( con );
+}
+
+}//end namespace Internal
+}//end namespace DBusQt
+
+#include "integrator.moc"

kdebase-3.5.5-kde#134816.patch:
 konq_popupmenu.cc |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

--- NEW FILE kdebase-3.5.5-kde#134816.patch ---
Index: libkonq/konq_popupmenu.cc
===================================================================
--- libkonq/konq_popupmenu.cc	(Revision 594167)
+++ libkonq/konq_popupmenu.cc	(Revision 594168)
@@ -851,9 +851,25 @@
                 KTrader::OfferList::ConstIterator it = offers.begin();
                 for( ; it != offers.end(); it++ )
                 {
-                    if ((*it)->noDisplay())
-                        continue;
+                    KService::Ptr service = (*it);
 
+                    // Skip OnlyShowIn=Foo and NotShowIn=KDE entries,
+                    // but still offer NoDisplay=true entries, that's the
+                    // whole point of such desktop files. This is why we don't
+                    // use service->noDisplay() here.
+                    const QString onlyShowIn = service->property("OnlyShowIn", QVariant::String).toString();
+                    if ( !onlyShowIn.isEmpty() ) {
+                        const QStringList aList = QStringList::split(';', onlyShowIn);
+                        if (!aList.contains("KDE"))
+                            continue;
+                    }
+                    const QString notShowIn = service->property("NotShowIn", QVariant::String).toString();
+                    if ( !notShowIn.isEmpty() ) {
+                        const QStringList aList = QStringList::split(';', notShowIn);
+                        if (aList.contains("KDE"))
+                            continue;
+                    }
+
                     QCString nam;
                     nam.setNum( id );
 

kdebase-3.5.5-redhat-pam.patch:
 kde.pamd |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

--- NEW FILE kdebase-3.5.5-redhat-pam.patch ---
--- kdebase-3.5.4/kde.pamd.redhat	2005-09-10 10:26:16.000000000 +0200
+++ kdebase-3.5.4/kde.pamd	2006-08-25 14:15:02.000000000 +0200
@@ -1,7 +1,9 @@
 #%PAM-1.0
-auth       required	/lib/security/pam_pwdb.so shadow nullok
-auth       required	/lib/security/pam_nologin.so
-account    required	/lib/security/pam_pwdb.so
-password   required	/lib/security/pam_cracklib.so
-password   required	/lib/security/pam_pwdb.so shadow nullok use_authtok
-session    required	/lib/security/pam_pwdb.so
+auth       include     system-auth
+account    required	pam_nologin.so
+account    include     system-auth
+password   include     system-auth
+session    include	system-auth
+session    required    pam_loginuid.so
+session    optional    pam_selinux.so
+session    optional	pam_console.so


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/kdebase/FC-6/.cvsignore,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- .cvsignore	30 Sep 2006 21:12:08 -0000	1.53
+++ .cvsignore	26 Oct 2006 15:36:19 -0000	1.54
@@ -27,3 +27,4 @@
 kdebase-3.5.4.tar.bz2
 kde-redhat-config-3.5-fc5-0.4.tar.bz2
 kde-redhat-config-3.5-fc5-0.5.tar.bz2
+kdebase-3.5.5.tar.bz2


Index: kdebase.spec
===================================================================
RCS file: /cvs/dist/rpms/kdebase/FC-6/kdebase.spec,v
retrieving revision 1.234
retrieving revision 1.235
diff -u -r1.234 -r1.235
--- kdebase.spec	4 Oct 2006 14:04:49 -0000	1.234
+++ kdebase.spec	26 Oct 2006 15:36:19 -0000	1.235
@@ -7,8 +7,8 @@
 %define include_kappfinder 0
 
 %define qt_version 3.3.6
-%define arts_version 1.5.4
-%define kde_version 3.5.4
+%define arts_version 1.5.5
+%define kde_version 3.5.5
 %define kdelibs_epoch 6
 %define arts_epoch 8
 %define make_cvs 1
@@ -17,8 +17,8 @@
 
 Summary: K Desktop Environment - core files
 Name: kdebase
-Version: 3.5.4
-Release: 13%{?dist}
+Version: 3.5.5
+Release: 0.1%{?dist}
 Epoch: 6
 Url: http://www.kde.org
 Group: User Interface/Desktops
@@ -37,8 +37,8 @@
 Source10: cr32-app-package_games_kids.png
 Source11: cr48-app-package_games_kids.png
 
-Patch200: kde-libtool.patch
-Patch1: kdebase-3.5.4-2-redhat.patch
+Patch0: kdebase-3.5.5-redhat-pam.patch
+Patch1: kdebase-3.5.5-1-redhat-startkde.patch
 Patch2: kdebase-3.3.92-vroot.patch
 Patch3: kdebase-3.x-shortcuts.patch
 Patch4: kdebase-3.2.0-keymap.patch
@@ -61,16 +61,14 @@
 Patch25: kdebase-3.5.4-konqueror-shortcut.patch
 
 # upstream patches
-Patch100: kdebase-3.5.4-halbackend-dbus.patch
-Patch101: kdebase-3.5.4-kde#128552.patch
-Patch102: kdebase-3.5.4-kde#124116.patch
-Patch103: kdebase-3.5.4-kde#131770.patch
-Patch104: kdebase-3.5.4-kde#132873.patch
-Patch105: kdebase-3.5.4-kdm.patch
-Patch106: kdebase-3.5.4-kde#53642.patch
-Patch107: kdebase-3.5.4-kde#133665.patch
-Patch108: kdebase-3.5.4-leaks.patch
+Patch500: kdebase-3.5.5-kde#134816.patch
 
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+Requires(post): desktop-file-utils
+Requires(postun): desktop-file-utils
+Requires(post): fileutils sh-utils
+Requires(postun): fileutils sh-utils
 Requires: kdelibs >= %{kdelibs_epoch}:%{version}
 Requires: libxml2 >= 2.6.5
 Requires: /etc/X11/xdm/Xaccess
@@ -79,10 +77,6 @@
 Requires: /etc/X11/xinit/Xsession
 Requires: /etc/X11/xdm/Xsetup_0
 Requires: cdparanoia-libs
-Requires(post,postun): /sbin/ldconfig
-Requires(post,postun): desktop-file-utils
-Requires(pre,post): fileutils sh-utils
-Requires(post): xfs
 Requires: pam >= 0.79-6
 Requires: htdig
 %ifnarch s390 s390x
@@ -91,8 +85,8 @@
 
 %if %{redhatify}
 Requires: desktop-backgrounds-basic
-Requires: redhat-menus => 1.2
-Requires: redhat-artwork >= 0.92
+Requires: redhat-menus => 6.7.5
+Requires: redhat-artwork >= 5.0.8
 %endif
 
 BuildRequires: kdelibs-devel >= %{kde_version}
@@ -159,7 +153,8 @@
 
 %prep
 %setup -q
-%patch1 -p1 -b .redhat
+%patch0 -p1 -b .redhat-pam
+%patch1 -p1 -b .redhat-startkde
 %patch2 -p1 -b .vroot
 %patch3 -p1 -b .shortcuts
 %patch4 -p1 -b .keymap
@@ -182,15 +177,7 @@
 %patch25 -p1 -b .konqueror-shortcut
 
 # upstream patches
-%patch100 -p0 -b .halbackend-dbus
-%patch101 -p0 -b .kde#128552
-%patch102 -p0 -b .kde#124116
-%patch103 -p0 -b .kde#131770
-%patch104 -p0 -b .kde#132873
-%patch105 -p0 -b .kdm-crash
-%patch106 -p0 -b .kde#53642
-%patch107 -p0 -b .kde#133665
-%patch108 -p0 -b .leaks
+%patch500 -p0 -b .kde#134816
 
 %if %{rhel}
    rm -rf kdeprint/kdeprintfax
@@ -409,6 +396,7 @@
    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg  2> /dev/null || :
 fi
 %{_bindir}/update-desktop-database 2> /dev/null || : 
+%{_bindir}/kbuildsycoca --noincremental --global > /dev/null 2>&1 || :
 
 %postun
 /sbin/ldconfig 
@@ -417,6 +405,7 @@
    %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/crystalsvg  2> /dev/null || :
 fi
 %{_bindir}/update-desktop-database 2> /dev/null || : 
+%{_bindir}/kbuildsycoca --noincremental --global > /dev/null 2>&1 || :
 
 %files
 %defattr(-,root,root)
@@ -564,9 +553,12 @@
 %dir %{_includedir}/kde/ksplash
 %{_includedir}/kde/ksplash/*
 %{_libdir}/*.so
-%exclude %{_libdir}/libkdeinit_*
+%exclude %{_libdir}/libkdeinit_*.so
 
 %changelog
+* Thu Oct 26 2006 Than Ngo <than at redhat.com> 6:3.5.5-0.1
+- 3.5.5
+
 * Wed Oct 04 2006 Than Ngo Than Ngo <than at redhat.com> 6:3.5.4-13
 - add shortcut Shift+Left/Shift+Right for tab_move_left/tab_move_right
 


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/kdebase/FC-6/sources,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- sources	30 Sep 2006 21:12:08 -0000	1.74
+++ sources	26 Oct 2006 15:36:19 -0000	1.75
@@ -1,2 +1,2 @@
-882a9729c08b197caef2c8712c980d9c  kdebase-3.5.4.tar.bz2
 61b60ed4ea41b30dfc18579cac48d20c  kde-redhat-config-3.5-fc5-0.5.tar.bz2
+0c685af1cbca75f9c77b3ed231ba0468  kdebase-3.5.5.tar.bz2


--- kde-libtool.patch DELETED ---


--- kdebase-3.5.3-1-redhat.patch DELETED ---


--- kdebase-3.5.3-dbus.patch DELETED ---


--- kdebase-3.5.4-2-redhat.patch DELETED ---


--- kdebase-3.5.4-halbackend-dbus.patch DELETED ---


--- kdebase-3.5.4-kde#124116.patch DELETED ---


--- kdebase-3.5.4-kde#128552.patch DELETED ---


--- kdebase-3.5.4-kde#131770.patch DELETED ---


--- kdebase-3.5.4-kde#132873.patch DELETED ---


--- kdebase-3.5.4-kde#133665.patch DELETED ---


--- kdebase-3.5.4-kde#53642.patch DELETED ---


--- kdebase-3.5.4-kdm.patch DELETED ---


--- kdebase-3.5.4-leaks.patch DELETED ---




More information about the fedora-cvs-commits mailing list