Make mono-stereo indicator work and change location of configfile

This commit is contained in:
Thomas Frauendorfer 2008-01-25 22:10:59 +01:00
parent 366cb35a93
commit 38218a7057
2 changed files with 14 additions and 9 deletions

View file

@ -67,18 +67,18 @@ MainDisplay::MainDisplay (QWidget *parent) : SkinDisplay(parent)
Skin::BALANCE_BTN_0, Skin::BALANCE_BTN_1, -20, 20); Skin::BALANCE_BTN_0, Skin::BALANCE_BTN_1, -20, 20);
m_bslider->move (177, 57); m_bslider->move (177, 57);
XMMSHandler &xmmsh = XMMSHandler::getInstance (); XMMSHandler &client = XMMSHandler::getInstance ();
connect (&xmmsh, SIGNAL(currentSong (const Xmms::PropDict &)), connect (&client, SIGNAL(currentSong (const Xmms::PropDict &)),
this, SLOT(setMediainfo (const Xmms::PropDict &))); this, SLOT(setMediainfo (const Xmms::PropDict &)));
connect (&xmmsh, SIGNAL(playbackStatusChanged(Xmms::Playback::Status)), connect (&client, SIGNAL(playbackStatusChanged(Xmms::Playback::Status)),
this, SLOT(setStatus(Xmms::Playback::Status))); this, SLOT(setStatus(Xmms::Playback::Status)));
// connect (&xmmsh, SIGNAL(playtimeChanged(uint)), // connect (&xmmsh, SIGNAL(playtimeChanged(uint)),
// this, SLOT(setPlaytime(uint))); // this, SLOT(setPlaytime(uint)));
connect (xmmsh.cache () , SIGNAL (playtime (uint32_t)), connect (client.cache () , SIGNAL (playtime (uint32_t)),
this, SLOT (setPlaytime (uint32_t))); this, SLOT (setPlaytime (uint32_t)));
connect (&xmmsh, SIGNAL(getVolume(uint)), this, SLOT(updateVolume(uint))); connect (&client, SIGNAL(getVolume(uint)), this, SLOT(updateVolume(uint)));
connect (m_vslider, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int))); connect (m_vslider, SIGNAL(valueChanged(int)), this, SLOT(setVolume(int)));
xmmsh.volumeGet(); client.volumeGet();
} }
@ -181,8 +181,8 @@ MainDisplay::setMediainfo (const Xmms::PropDict &info)
} else { } else {
m_khz->setNumber(0, 1); m_khz->setNumber(0, 1);
} }
if (info.contains ("channels:in") && if (info.contains ("channels") &&
info.get<int32_t> ("channels:in") > 1) { info.get<int32_t> ("channels") > 1) {
m_stereo->setStereoMono (1, 0); m_stereo->setStereoMono (1, 0);
} else { } else {
m_stereo->setStereoMono (0, 1); m_stereo->setStereoMono (0, 1);

View file

@ -17,6 +17,8 @@
#include "playlist.h" #include "playlist.h"
#include "equalizer.h" #include "equalizer.h"
#include "Skin.h" #include "Skin.h"
//TODO: change to xclient.h sometime later
#include "XMMSHandler.h"
#ifdef HAVE_SERVERBROWSER #ifdef HAVE_SERVERBROWSER
#include "Serverbrowser.h" #include "Serverbrowser.h"
@ -29,10 +31,13 @@ main (int argc, char **argv)
{ {
QApplication app(argc, argv); QApplication app(argc, argv);
QCoreApplication::setOrganizationName("XMMS2 Team"); QCoreApplication::setOrganizationName("xmms2");
QCoreApplication::setOrganizationDomain("xmms.org"); QCoreApplication::setOrganizationDomain("xmms.org");
QCoreApplication::setApplicationName("Promoe"); QCoreApplication::setApplicationName("Promoe");
//TODO: Change to XClient sometime later
XMMSHandler &client = XMMSHandler::getInstance ();
QSettings settings; QSettings settings;
#ifdef Q_OS_MACX #ifdef Q_OS_MACX