зеркало из https://github.com/mozilla/gecko-dev.git
remove unused code, now that we use playSystemSound(). (see #64462)
rs=bienvenu
This commit is contained in:
Родитель
a305479ba0
Коммит
4c514df917
|
@ -79,32 +79,23 @@ nsStatusBarBiffManager::~nsStatusBarBiffManager()
|
||||||
}
|
}
|
||||||
|
|
||||||
#define PREF_PLAY_SOUND_ON_NEW_MAIL "mail.biff.play_sound"
|
#define PREF_PLAY_SOUND_ON_NEW_MAIL "mail.biff.play_sound"
|
||||||
#define PREF_PLAY_DEFAULT_SOUND "mail.biff.use_default_sound"
|
|
||||||
#define PREF_USER_SPECIFIED_SOUND_FILE "mail.biff.sound_file"
|
|
||||||
#define DEFAULT_NEW_MAIL_SOUND_URL_PREF "mail.biff.default_sound_url"
|
|
||||||
|
|
||||||
nsresult nsStatusBarBiffManager::Init()
|
nsresult nsStatusBarBiffManager::Init()
|
||||||
{
|
{
|
||||||
if (mInitialized)
|
if (mInitialized)
|
||||||
return NS_ERROR_ALREADY_INITIALIZED;
|
return NS_ERROR_ALREADY_INITIALIZED;
|
||||||
|
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
|
|
||||||
kBiffStateAtom = NS_NewAtom("BiffState");
|
kBiffStateAtom = NS_NewAtom("BiffState");
|
||||||
|
|
||||||
nsCOMPtr<nsIMsgMailSession> mailSession =
|
nsCOMPtr<nsIMsgMailSession> mailSession =
|
||||||
do_GetService(kMsgMailSessionCID, &rv);
|
do_GetService(kMsgMailSessionCID, &rv);
|
||||||
if(NS_SUCCEEDED(rv))
|
if(NS_SUCCEEDED(rv))
|
||||||
mailSession->AddFolderListener(this);
|
mailSession->AddFolderListener(this);
|
||||||
|
|
||||||
nsCOMPtr<nsIPref> pref = do_GetService(NS_PREF_CONTRACTID);
|
mInitialized = PR_TRUE;
|
||||||
nsXPIDLCString url;
|
return NS_OK;
|
||||||
rv = pref->CopyCharPref(DEFAULT_NEW_MAIL_SOUND_URL_PREF, getter_Copies(url));
|
|
||||||
NS_ENSURE_SUCCESS(rv,rv);
|
|
||||||
|
|
||||||
mDefaultSoundURL = url;
|
|
||||||
mInitialized = PR_TRUE;
|
|
||||||
return NS_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult nsStatusBarBiffManager::Shutdown()
|
nsresult nsStatusBarBiffManager::Shutdown()
|
||||||
|
|
|
@ -61,7 +61,6 @@ public:
|
||||||
private:
|
private:
|
||||||
PRBool mInitialized;
|
PRBool mInitialized;
|
||||||
PRUint32 mCurrentBiffState;
|
PRUint32 mCurrentBiffState;
|
||||||
nsCString mDefaultSoundURL;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static nsIAtom* kBiffStateAtom;
|
static nsIAtom* kBiffStateAtom;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче