Commit 75cfb03d authored by Laurent Montel's avatar Laurent Montel 😁

Port it

svn path=/trunk/KDE/kdemultimedia/juk/; revision=555735
parent 345056b6
......@@ -86,8 +86,6 @@ kde4_add_ui3_files(juk_SRCS
tagguesserconfigdlgwidget.ui
trackpickerdialogbase.ui )
kde4_add_dcop_skels(juk_SRCS jukIface.h )
kde4_add_executable(juk ${juk_SRCS})
# Add gstreamer here too...
......
......@@ -28,9 +28,6 @@
//Added by qt3to4:
#include <Q3ValueList>
#include <dcopref.h>
#include <dcopclient.h>
#include "k3bexporter.h"
#include "playlistitem.h"
#include "playlist.h"
......@@ -129,7 +126,8 @@ void K3bExporter::exportPlaylistItems(const PlaylistItemList &items)
{
if(items.empty())
return;
#warning "kde4: port it when k3b will port"
#if 0
DCOPClient *client = DCOPClient::mainClient();
DCOPCString appId, appObj;
QByteArray data;
......@@ -140,6 +138,7 @@ void K3bExporter::exportPlaylistItems(const PlaylistItemList &items)
DCOPRef ref(appId, appObj);
exportViaDCOP(items, ref);
}
#endif
}
void K3bExporter::slotExport()
......@@ -179,6 +178,7 @@ void K3bExporter::exportViaCmdLine(const PlaylistItemList &items)
KMessageBox::error(m_parent, i18n("Unable to start K3b."));
}
#if 0
void K3bExporter::exportViaDCOP(const PlaylistItemList &items, DCOPRef &ref)
{
Q3ValueList<DCOPRef> projectList;
......@@ -238,7 +238,7 @@ bool K3bExporter::startNewK3bProject(DCOPRef &ref)
return true;
}
#endif
K3bExporter::K3bOpenMode K3bExporter::openMode()
{
int reply = KMessageBox::questionYesNoCancel(
......
......@@ -20,7 +20,6 @@
#include "playlistitem.h"
class QWidget;
class DCOPRef;
class PlaylistBox;
class PlaylistAction;
......@@ -55,9 +54,11 @@ private:
// Private method declarations
void exportViaCmdLine(const PlaylistItemList &items);
#if 0
void exportViaDCOP(const PlaylistItemList &items, DCOPRef &ref);
void DCOPErrorMessage();
bool startNewK3bProject(DCOPRef &ref);
#endif
K3bOpenMode openMode();
// Private member variable declarations
......
......@@ -16,7 +16,6 @@
#include <kuniqueapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
#include <dcopclient.h>
#include <kconfigbase.h>
#include <kconfig.h>
#include <klocale.h>
......@@ -80,9 +79,10 @@ int main(int argc, char *argv[])
// Here we do some DCOP locking of sorts to prevent incoming DCOP calls
// before JuK has finished its initialization.
a.dcopClient()->suspend();
#warning "kde4: port it"
//a.dcopClient()->suspend();
JuK *juk = new JuK;
a.dcopClient()->resume();
//a.dcopClient()->resume();
a.setMainWidget(juk);
......
......@@ -45,6 +45,9 @@
#include "config.h"
#include <dbus/qdbus.h>
#include "playeradaptor.h"
using namespace ActionCollection;
enum PlayerManagerStatus { StatusStopped = -1, StatusPaused = 1, StatusPlaying = 2 };
......@@ -69,6 +72,9 @@ PlayerManager::PlayerManager() :
// Since the setup() method will be called indirectly by the player() method
// later, just disable it here. -- mpyne
// setup();
new PlayerAdaptor( this );
QDBus::sessionBus().registerObject("/Player", this);
}
PlayerManager::~PlayerManager()
......
......@@ -17,7 +17,6 @@
#define PLAYERMANAGER_H
#include "player.h"
#include "jukIface.h"
//Added by qt3to4:
#include <QPixmap>
......@@ -32,7 +31,7 @@ class PlaylistInterface;
* the actions from the top-level mainwindow.
*/
class PlayerManager : public Player, public PlayerIface
class PlayerManager : public Player
{
Q_OBJECT
......
......@@ -28,7 +28,6 @@
#include <kurl.h>
#include <kio/netaccess.h>
#include <kio/job.h>
#include <dcopclient.h>
#include <kmenu.h>
#include <kactionmenu.h>
#include <ktoggleaction.h>
......@@ -1730,8 +1729,8 @@ void Playlist::setPlaying(PlaylistItem *item, bool addToHistory)
}
TrackSequenceManager::instance()->setCurrent(item);
QByteArray data;
kapp->dcopClient()->emitDCOPSignal("Player", "trackChanged()", data);
#warning "kde4: port it"
//kapp->dcopClient()->emitDCOPSignal("Player", "trackChanged()", data);
if(!item)
return;
......
......@@ -46,6 +46,8 @@
#include <q3widgetstack.h>
#include <q3hbox.h>
#include <dbus/qdbus.h>
#include "collectionadaptor.h"
#define widget (kapp->mainWidget())
using namespace ActionCollection;
......@@ -73,6 +75,8 @@ PlaylistCollection::PlaylistCollection(Q3WidgetStack *playlistStack) :
m_belowDistraction(0),
m_distraction(0)
{
new CollectionAdaptor(this );
QDBus::sessionBus().registerObject("/Collection",this );
m_instance = this;
m_actionHandler = new ActionHandler(this);
......
......@@ -15,9 +15,7 @@
#ifndef PLAYLIST_COLLECTION_H
#define PLAYLIST_COLLECTION_H
#include "playlistinterface.h"
#include "stringhash.h"
#include "jukIface.h"
#include <kshortcut.h>
#include <klocale.h>
......@@ -27,7 +25,7 @@
//Added by qt3to4:
#include <QPixmap>
#include <Q3ValueList>
#include "playlistinterface.h"
class Q3WidgetStack;
class KAction;
class Playlist;
......@@ -40,8 +38,9 @@ class DynamicPlaylist;
typedef Q3ValueList<Playlist *> PlaylistList;
typedef Q3ValueList<PlaylistItem *> PlaylistItemList;
class PlaylistCollection : public PlaylistInterface, CollectionIface
class PlaylistCollection : public PlaylistInterface
{
Q_OBJECT
friend class Playlist;
friend class CollectionList;
friend class DynamicPlaylist;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment