mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
Reworked SoundManager and SoundPage in the settings.
Added new icon in the statusbar to switch off the sound. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4832 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4422d6557b
commit
3cba51abf4
24 changed files with 749 additions and 642 deletions
|
@ -44,6 +44,7 @@
|
|||
#include "gui/common/Emoticons.h"
|
||||
#include "util/EventReceiver.h"
|
||||
#include "gui/RetroShareLink.h"
|
||||
#include "gui/SoundManager.h"
|
||||
|
||||
/*** WINDOWS DON'T LIKE THIS - REDEFINES VER numbers.
|
||||
#include <gui/qskinobject/qskinobject.h>
|
||||
|
@ -65,9 +66,9 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
#endif
|
||||
|
||||
QStringList args = char_array_to_stringlist(argv+1, argc-1);
|
||||
|
||||
Q_INIT_RESOURCE(images);
|
||||
QStringList args = char_array_to_stringlist(argv+1, argc-1);
|
||||
|
||||
Q_INIT_RESOURCE(images);
|
||||
|
||||
rsiface = NULL;
|
||||
|
||||
|
@ -75,7 +76,7 @@ int main(int argc, char *argv[])
|
|||
createRsIface(*notify);
|
||||
createRsControl(*rsiface, *notify);
|
||||
|
||||
/* RetroShare Core Objects */
|
||||
/* RetroShare Core Objects */
|
||||
RsInit::InitRsConfig();
|
||||
int initResult = RsInit::InitRetroShare(argc, argv);
|
||||
|
||||
|
@ -177,23 +178,23 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
// true: note auto-login is active
|
||||
std::string lockFile;
|
||||
int retVal = RsInit::LockAndLoadCertificates(true, lockFile);
|
||||
std::string lockFile;
|
||||
int retVal = RsInit::LockAndLoadCertificates(true, lockFile);
|
||||
switch(retVal)
|
||||
{
|
||||
case 0: break;
|
||||
case 1: QMessageBox::warning( 0,
|
||||
QObject::tr("Multiple instances"),
|
||||
QObject::tr("Another RetroShare using the same profile is "
|
||||
"already running on your system. Please close "
|
||||
"that instance first\n Lock file:\n") +
|
||||
QString::fromStdString(lockFile));
|
||||
"already running on your system. Please close "
|
||||
"that instance first\n Lock file:\n") +
|
||||
QString::fromStdString(lockFile));
|
||||
return 1;
|
||||
case 2: QMessageBox::critical( 0,
|
||||
QObject::tr("Multiple instances"),
|
||||
QObject::tr("An unexpected error occurred when Retroshare"
|
||||
"tried to acquire the single instance lock\n Lock file:\n") +
|
||||
QString::fromStdString(lockFile));
|
||||
"tried to acquire the single instance lock\n Lock file:\n") +
|
||||
QString::fromStdString(lockFile));
|
||||
return 1;
|
||||
case 3: QMessageBox::critical( 0,
|
||||
QObject::tr("Login Failure"),
|
||||
|
@ -210,10 +211,12 @@ int main(int argc, char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* recreate global settings object, now with correct path */
|
||||
/* recreate global settings object, now with correct path */
|
||||
RshareSettings::Create(true);
|
||||
Rshare::resetLanguageAndStyle();
|
||||
|
||||
SoundManager::create();
|
||||
|
||||
splashScreen.showMessage(rshare.translate("SplashScreen", "Load configuration"), Qt::AlignHCenter | Qt::AlignBottom);
|
||||
|
||||
rsicontrol->StartupRetroShare();
|
||||
|
@ -323,8 +326,11 @@ int main(int argc, char *argv[])
|
|||
|
||||
rsicontrol->rsGlobalShutDown();
|
||||
|
||||
delete(soundManager);
|
||||
soundManager = NULL;
|
||||
|
||||
Settings->sync();
|
||||
delete Settings;
|
||||
delete(Settings);
|
||||
|
||||
return ti ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue