Hello community,

here is the log from the commit of package dolphin-plugins for openSUSE:Factory 
checked in at 2014-03-18 17:16:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dolphin-plugins (Old)
 and      /work/SRC/openSUSE:Factory/.dolphin-plugins.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dolphin-plugins"

Changes:
--------
--- /work/SRC/openSUSE:Factory/dolphin-plugins/dolphin-plugins.changes  
2014-02-11 10:22:24.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.dolphin-plugins.new/dolphin-plugins.changes     
2014-03-18 17:16:57.000000000 +0100
@@ -1,0 +2,14 @@
+Thu Mar 13 20:53:37 UTC 2014 - tittiatc...@gmail.com
+
+- Update to 4.12.90
+   * KDE 4.13 Beta 2  release
+   * See http://www.kde.org/announcements/announce-4.13-beta2.php
+
+-------------------------------------------------------------------
+Fri Mar  7 11:37:41 UTC 2014 - tittiatc...@gmail.com
+
+- Update to 4.12.80
+   * KDE 4.13 Beta 1  release
+   * See http://www.kde.org/announcements/announce-4.13-beta1.php
+
+-------------------------------------------------------------------

Old:
----
  dolphin-plugins-4.12.2.tar.xz

New:
----
  dolphin-plugins-4.12.90.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dolphin-plugins.spec ++++++
--- /var/tmp/diff_new_pack.9t3rY0/_old  2014-03-18 17:16:59.000000000 +0100
+++ /var/tmp/diff_new_pack.9t3rY0/_new  2014-03-18 17:16:59.000000000 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           dolphin-plugins
-Version:        4.12.2
+Version:        4.12.90
 Release:        0
 Summary:        Version control plugins for Dolphin
 License:        GPL-2.0+
@@ -71,5 +71,7 @@
 %_kde4_modulesdir/fileviewhgplugin.so
 %_kde4_modulesdir/fileviewbazaarplugin.so
 %_kde4_servicesdir/fileviewbazaarplugin.desktop
+%_kde4_modulesdir/fileviewdropboxplugin.so
+%_kde4_servicesdir/fileviewdropboxplugin.desktop
 
 %changelog

++++++ dolphin-plugins-4.12.2.tar.xz -> dolphin-plugins-4.12.90.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dolphin-plugins-4.12.2/CMakeLists.txt 
new/dolphin-plugins-4.12.90/CMakeLists.txt
--- old/dolphin-plugins-4.12.2/CMakeLists.txt   2013-10-14 06:18:49.000000000 
+0200
+++ new/dolphin-plugins-4.12.90/CMakeLists.txt  2014-03-10 05:45:42.000000000 
+0100
@@ -16,5 +16,6 @@
   macro_optional_add_subdirectory(git)
   macro_optional_add_subdirectory(hg)
   macro_optional_add_subdirectory(bazaar)
+  macro_optional_add_subdirectory(dropbox)
 endif(LIBKONQ_FOUND)
 macro_display_feature_log()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dolphin-plugins-4.12.2/bazaar/fileviewbazaarplugin.desktop 
new/dolphin-plugins-4.12.90/bazaar/fileviewbazaarplugin.desktop
--- old/dolphin-plugins-4.12.2/bazaar/fileviewbazaarplugin.desktop      
2013-10-14 06:18:49.000000000 +0200
+++ new/dolphin-plugins-4.12.90/bazaar/fileviewbazaarplugin.desktop     
2014-03-10 05:45:42.000000000 +0100
@@ -17,6 +17,7 @@
 Name[hu]=Bazaar
 Name[it]=Bazaar
 Name[kk]=Bazaar
+Name[ko]=Bazaar
 Name[lt]=Bazaar
 Name[mr]=बझार
 Name[nb]=Bazaar
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dolphin-plugins-4.12.2/dropbox/CMakeLists.txt 
new/dolphin-plugins-4.12.90/dropbox/CMakeLists.txt
--- old/dolphin-plugins-4.12.2/dropbox/CMakeLists.txt   1970-01-01 
01:00:00.000000000 +0100
+++ new/dolphin-plugins-4.12.90/dropbox/CMakeLists.txt  2014-03-10 
05:45:42.000000000 +0100
@@ -0,0 +1,12 @@
+project(fileviewdropboxplugin)
+
+include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} ${LIBKONQ_INCLUDE_DIR} 
)
+
+set(fileviewdropboxplugin_SRCS
+    fileviewdropboxplugin.cpp
+)
+
+kde4_add_plugin(fileviewdropboxplugin  ${fileviewdropboxplugin_SRCS})
+target_link_libraries(fileviewdropboxplugin ${KDE4_KIO_LIBS} 
${LIBKONQ_LIBRARY})
+install(FILES fileviewdropboxplugin.desktop DESTINATION 
${SERVICES_INSTALL_DIR})
+install(TARGETS fileviewdropboxplugin DESTINATION ${PLUGIN_INSTALL_DIR})
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dolphin-plugins-4.12.2/dropbox/fileviewdropboxplugin.cpp 
new/dolphin-plugins-4.12.90/dropbox/fileviewdropboxplugin.cpp
--- old/dolphin-plugins-4.12.2/dropbox/fileviewdropboxplugin.cpp        
1970-01-01 01:00:00.000000000 +0100
+++ new/dolphin-plugins-4.12.90/dropbox/fileviewdropboxplugin.cpp       
2014-03-10 05:45:42.000000000 +0100
@@ -0,0 +1,224 @@
+/*****************************************************************************
+ *   Copyright (C) 2014 by Emmanuel Pescosta <emmanuelpescosta...@gmail.com> *
+ *   Copyright (C) 2012 by Sergei Stolyarov <ser...@regolit.com>             *
+ *   Copyright (C) 2010 by Thomas Richard <thomas.rich...@proan.be>          *
+ *   Copyright (C) 2009-2010 by Peter Penz <peter.pen...@gmail.com>          *
+ *                                                                           *
+ *   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.,                                         *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA              *
+ *****************************************************************************/
+
+#include <KAction>
+#include <KFileItem>
+#include <KFileItemListProperties>
+#include <KLocalizedString>
+#include <KActionCollection>
+#include <KPluginFactory>
+
+#include <QDir>
+#include <QPointer>
+#include <QLocalSocket>
+#include <QFileSystemWatcher>
+
+#include "fileviewdropboxplugin.h"
+
+K_PLUGIN_FACTORY(FileViewDropboxPluginFactory, 
registerPlugin<FileViewDropboxPlugin>();)
+K_EXPORT_PLUGIN(FileViewDropboxPluginFactory("fileviewdropboxplugin"))
+
+class FileViewDropboxPlugin::Private
+{
+public:
+    Private(FileViewDropboxPlugin* parent) :
+        contextFilePaths(),
+        controlSocketPath(),
+        controlSocket(new QLocalSocket(parent)),
+        itemStateSocket(new QLocalSocket),
+        databaseFileWatcher(new QFileSystemWatcher(parent)),
+        contextActions(new KActionCollection(parent))
+    {
+    }
+
+    ~Private()
+    {
+        delete itemStateSocket;
+    }
+
+    QStringList contextFilePaths;
+    QString controlSocketPath;
+    QPointer<QLocalSocket> controlSocket;
+    QPointer<QLocalSocket> itemStateSocket;
+    QPointer<QFileSystemWatcher> databaseFileWatcher;
+    QPointer<KActionCollection> contextActions;
+};
+
+QMap<QString, KVersionControlPlugin2::ItemVersion> 
FileViewDropboxPlugin::m_itemVersions;
+
+FileViewDropboxPlugin::FileViewDropboxPlugin(QObject* parent, const 
QVariantList& args):
+    KVersionControlPlugin2(parent),
+    d(new Private(this))
+{
+    Q_UNUSED(args);
+
+    if (m_itemVersions.isEmpty()) {
+        m_itemVersions.insert("up to date", 
KVersionControlPlugin2::NormalVersion);
+        m_itemVersions.insert("syncing",    
KVersionControlPlugin2::UpdateRequiredVersion);
+        m_itemVersions.insert("unsyncable", 
KVersionControlPlugin2::ConflictingVersion);
+        m_itemVersions.insert("unwatched",  
KVersionControlPlugin2::UnversionedVersion);
+    }
+
+    const QString dropboxDir = QDir::home().path() % QDir::separator() % 
fileName() % QDir::separator();
+    d->controlSocketPath = QDir::toNativeSeparators(dropboxDir % 
QLatin1String("command_socket"));
+    d->controlSocket->connectToServer(d->controlSocketPath);
+
+    connect(d->databaseFileWatcher, SIGNAL(fileChanged(QString)), 
SIGNAL(itemVersionsChanged()));
+    d->databaseFileWatcher->addPath(QDir::toNativeSeparators(dropboxDir % 
QLatin1String("aggregation.dbx")));
+
+    connect(d->contextActions, SIGNAL(actionTriggered(QAction*)), 
SLOT(handleContextAction(QAction*)));
+}
+
+FileViewDropboxPlugin::~FileViewDropboxPlugin()
+{
+    delete d;
+}
+
+QString FileViewDropboxPlugin::fileName() const
+{
+    return QLatin1String(".dropbox");
+}
+
+bool FileViewDropboxPlugin::beginRetrieval(const QString& directory)
+{
+    Q_UNUSED(directory);
+    Q_ASSERT(directory.endsWith(QLatin1Char('/')));
+
+    
qRegisterMetaType<QAbstractSocket::SocketError>("QAbstractSocket::SocketError");
+    
qRegisterMetaType<QAbstractSocket::SocketState>("QAbstractSocket::SocketState");
+
+    return connectWithDropbox(d->itemStateSocket, LongTimeout);
+}
+
+KVersionControlPlugin2::ItemVersion FileViewDropboxPlugin::itemVersion(const 
KFileItem& item) const
+{
+    const QStringList reply = sendCommand("icon_overlay_file_status\npath\t", 
QStringList() << QDir(item.localPath()).canonicalPath(),
+                                          d->itemStateSocket, WaitForReply, 
LongTimeout);
+    if(reply.count() < 2) {
+        // file/dir is not served by dropbox
+        return KVersionControlPlugin2::UnversionedVersion;
+    }
+
+    return m_itemVersions.value(reply.at(1), 
KVersionControlPlugin2::UnversionedVersion);
+}
+
+void FileViewDropboxPlugin::endRetrieval()
+{
+}
+
+QList<QAction*> FileViewDropboxPlugin::actions(const KFileItemList& items) 
const
+{
+    Q_ASSERT(!items.isEmpty());
+
+    d->contextActions->clear();
+    d->contextFilePaths.clear();
+
+    const KFileItemListProperties properties(items);
+    if (!properties.isLocal()) {
+        // not all files/dirs are local files/dirs
+        return QList<QAction*>();
+    }
+
+    foreach (const KFileItem& item, items) {
+        d->contextFilePaths << QDir(item.localPath()).canonicalPath();
+    }
+
+    const QStringList reply = 
sendCommand("icon_overlay_context_options\npaths\t", d->contextFilePaths, 
d->controlSocket, WaitForReply);
+    if (reply.count() < 2) {
+        // files/dirs are not served by dropbox
+        return QList<QAction*>();
+    }
+
+    // analyze item options and dynamically form a menu
+    foreach (const QString& replyLine, reply) {
+        const QStringList options = replyLine.split("~");
+
+        if (options.count() > 2) {
+            KAction* action = d->contextActions->addAction(options.at(2));
+            action->setText(options.at(0));
+            action->setToolTip(options.at(1));
+            action->setIcon(KIcon("dropbox"));
+        }
+    }
+
+    return d->contextActions->actions();
+}
+
+void FileViewDropboxPlugin::handleContextAction(QAction* action)
+{
+    sendCommand("icon_overlay_context_action\nverb\t" % action->objectName() % 
"\npaths\t", d->contextFilePaths, d->controlSocket);
+}
+
+QStringList FileViewDropboxPlugin::sendCommand(const QString& command,
+                                               const QStringList& paths,
+                                               const QPointer<QLocalSocket>& 
socket,
+                                               SendCommandMode mode,
+                                               SendCommandTimeout timeout) 
const
+{
+    if (!connectWithDropbox(socket, timeout)) {
+        return QStringList();
+    }
+
+    static const QString parameterSeperator('\t');
+    static const QString done("\ndone\n");
+    static const QString ok("ok\n");
+
+    const QString request = command % paths.join(parameterSeperator) % done;
+
+    socket->readAll();
+    socket->write(request.toUtf8());
+    socket->flush();
+
+    if (mode == SendCommandOnly) {
+        return QStringList();
+    }
+
+    QString reply;
+    while (socket->waitForReadyRead(timeout == ShortTimeout ? 100 : 500)) {
+        reply.append(QString::fromUtf8(socket->readAll()));
+
+        if (reply.endsWith(done)) {
+            break;
+        }
+    }
+
+    reply.remove(done);
+    reply.remove(ok);
+
+    return reply.split(parameterSeperator, QString::SkipEmptyParts);
+}
+
+bool FileViewDropboxPlugin::connectWithDropbox(const QPointer<QLocalSocket>& 
socket, SendCommandTimeout timeout) const
+{
+    if (socket->state() != QLocalSocket::ConnectedState) {
+        socket->connectToServer(d->controlSocketPath);
+
+        if (!socket->waitForConnected(timeout == ShortTimeout ? 100 : 500)) {
+            socket->abort();
+            return false;
+        }
+    }
+
+    return true;
+}
+
+#include "fileviewdropboxplugin.moc"
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dolphin-plugins-4.12.2/dropbox/fileviewdropboxplugin.desktop 
new/dolphin-plugins-4.12.90/dropbox/fileviewdropboxplugin.desktop
--- old/dolphin-plugins-4.12.2/dropbox/fileviewdropboxplugin.desktop    
1970-01-01 01:00:00.000000000 +0100
+++ new/dolphin-plugins-4.12.90/dropbox/fileviewdropboxplugin.desktop   
2014-03-10 05:45:42.000000000 +0100
@@ -0,0 +1,31 @@
+[Desktop Entry]
+Type=Service
+Name=Dropbox
+Name[ca]=Dropbox
+Name[da]=Dropbox
+Name[de]=Dropbox
+Name[es]=Dropbox
+Name[fi]=Dropbox
+Name[fr]=DropBox
+Name[hu]=Dropbox
+Name[it]=Dropbox
+Name[ko]=Dropbox
+Name[nl]=Dropbox
+Name[pl]=Dropbox
+Name[pt]=Dropbox
+Name[pt_BR]=Dropbox
+Name[ru]=Dropbox
+Name[sk]=Dropbox
+Name[sl]=Dropbox
+Name[sr]=Дропбокс
+Name[sr@ijekavian]=Дропбокс
+Name[sr@ijekavianlatin]=Dropbox
+Name[sr@latin]=Dropbox
+Name[sv]=Dropbox
+Name[tr]=Dropbox
+Name[uk]=Dropbox
+Name[x-test]=xxDropboxxx
+Name[zh_TW]=Dropbox
+X-KDE-ServiceTypes=FileViewVersionControlPlugin
+MimeType=text/plain;
+X-KDE-Library=fileviewdropboxplugin
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/dolphin-plugins-4.12.2/dropbox/fileviewdropboxplugin.h 
new/dolphin-plugins-4.12.90/dropbox/fileviewdropboxplugin.h
--- old/dolphin-plugins-4.12.2/dropbox/fileviewdropboxplugin.h  1970-01-01 
01:00:00.000000000 +0100
+++ new/dolphin-plugins-4.12.90/dropbox/fileviewdropboxplugin.h 2014-03-10 
05:45:42.000000000 +0100
@@ -0,0 +1,88 @@
+/*****************************************************************************
+ *   Copyright (C) 2014 by Emmanuel Pescosta <emmanuelpescosta...@gmail.com> *
+ *   Copyright (C) 2012 by Sergei Stolyarov <ser...@regolit.com>             *
+ *   Copyright (C) 2010 by Thomas Richard <thomas.rich...@proan.be>          *
+ *   Copyright (C) 2009-2010 by Peter Penz <peter.pen...@gmail.com>          *
+ *                                                                           *
+ *   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.,                                         *
+ *   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA              *
+ *****************************************************************************/
+
+#ifndef FILEVIEWDROPBOXPLUGIN_H
+#define FILEVIEWDROPBOXPLUGIN_H
+
+#include <kversioncontrolplugin2.h>
+
+#include <QMap>
+
+class QLocalSocket;
+
+//The dropbox protocol info can be found in the dropboxd-protocol file
+//it can be found here 
http://dl.dropbox.com/u/4577542/dropbox/dropboxd-protocol.txt
+//Thanks Steffen Schuldenzucker!
+
+/**
+ * @brief Dropbox implementation for the KVersionControlPlugin2 interface.
+ */
+class FileViewDropboxPlugin : public KVersionControlPlugin2
+{
+    Q_OBJECT
+
+private:
+    enum SendCommandMode
+    {
+        WaitForReply,
+        SendCommandOnly
+    };
+
+    enum SendCommandTimeout
+    {
+        ShortTimeout,
+        LongTimeout
+    };
+
+public:
+    FileViewDropboxPlugin(QObject* parent, const QVariantList& args);
+    virtual ~FileViewDropboxPlugin();
+
+    virtual QString fileName() const;
+
+    virtual bool beginRetrieval(const QString& directory);
+    virtual KVersionControlPlugin2::ItemVersion itemVersion(const KFileItem& 
item) const;
+    virtual void endRetrieval();
+
+    virtual QList<QAction*> actions(const KFileItemList& items) const;
+
+private slots:
+    void handleContextAction(QAction* action);
+
+private:
+    QStringList sendCommand(const QString& command,
+                            const QStringList& paths,
+                            const QPointer<QLocalSocket>& socket,
+                            SendCommandMode mode = SendCommandOnly,
+                            SendCommandTimeout timeout = ShortTimeout) const;
+
+    bool connectWithDropbox(const QPointer<QLocalSocket>& socket, 
SendCommandTimeout timeout) const;
+
+private:
+    class Private;
+    Private* const d;
+
+    static QMap<QString, KVersionControlPlugin2::ItemVersion> m_itemVersions;
+};
+
+#endif // FILEVIEWDROPBOXPLUGIN_H
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dolphin-plugins-4.12.2/hg/fileviewhgplugin.desktop 
new/dolphin-plugins-4.12.90/hg/fileviewhgplugin.desktop
--- old/dolphin-plugins-4.12.2/hg/fileviewhgplugin.desktop      2013-10-14 
06:18:49.000000000 +0200
+++ new/dolphin-plugins-4.12.90/hg/fileviewhgplugin.desktop     2014-03-10 
05:45:42.000000000 +0100
@@ -17,6 +17,7 @@
 Name[hu]=Mercurial
 Name[it]=Mercurial
 Name[kk]=Mercurial
+Name[ko]=Mercurial
 Name[lt]=Mercurial
 Name[mr]=मर्क्युरियल
 Name[nb]=Mercurial

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to