Remove obsolete HAS_GROWL compile definition

meow-7.2.2
Ansariel 2023-04-06 12:40:16 +02:00
parent 766acfa818
commit 2b6d9801bb
5 changed files with 3 additions and 32 deletions

View File

@ -19,5 +19,3 @@ target_include_directories( fs::growl SYSTEM INTERFACE
${AUTOBUILD_INSTALL_DIR}/include/Growl
)
endif (DARWIN OR WINDOWS) # <FS:Zi> no need to do these things on Linux
add_compile_definitions(HAS_GROWL)

View File

@ -36,9 +36,7 @@
#include "llviewerprecompiledheaders.h"
#include "growlnotifierwin.h"
#ifdef HAS_GROWL
#include "growl.h"
#endif
#include "llviewercontrol.h"
@ -55,9 +53,7 @@ void __cdecl GrowlLogSink( char const *aMessage, int aLevel )
GrowlNotifierWin::GrowlNotifierWin() :
mApplicationName("")
{
#ifdef HAS_GROWL
mGrowlImpl = NULL;
#endif
LL_INFOS("GrowlNotifierWin") << "Windows growl notifier initialized." << LL_ENDL;
#ifdef GROWL_HAS_LOG
@ -69,20 +65,17 @@ GrowlNotifierWin::GrowlNotifierWin() :
GrowlNotifierWin::~GrowlNotifierWin()
{
LL_INFOS("GrowlNotifierWin") << "Windows growl notifier destroyed." << LL_ENDL;
#ifdef HAS_GROWL
if (mGrowlImpl)
{
delete mGrowlImpl;
mGrowlImpl = NULL;
}
#endif
}
void GrowlNotifierWin::registerApplication(const std::string& application, const std::set<std::string>& notificationTypes)
{
mApplicationName = application;
#ifdef HAS_GROWL
char **arr = (char**)malloc(sizeof(*arr) * notificationTypes.size());
S32 i = 0;
for (std::set<std::string>::const_iterator it = notificationTypes.begin(); it != notificationTypes.end(); ++it, ++i)
@ -99,25 +92,18 @@ void GrowlNotifierWin::registerApplication(const std::string& application, const
free(arr[i]);
}
free(arr);
#endif
}
void GrowlNotifierWin::showNotification(const std::string& notification_title, const std::string& notification_message,
const std::string& notification_type)
{
#ifdef HAS_GROWL
if (mGrowlImpl)
{
mGrowlImpl->Notify(notification_type.c_str(), notification_title.c_str(), notification_message.c_str());
}
#endif
}
bool GrowlNotifierWin::isUsable()
{
#ifdef HAS_GROWL
return (mGrowlImpl && mGrowlImpl->isConnected());
#else
return false;
#endif
}

View File

@ -36,10 +36,7 @@
#define GROWLNOTIFIERWIN_H
#include "growlnotifier.h"
#ifdef HAS_GROWL
#include <growl++.hpp>
#endif
class GrowlNotifierWin : public GrowlNotifier
{
@ -53,9 +50,7 @@ public:
private:
std::string mApplicationName;
#ifdef HAS_GROWL
Growl* mGrowlImpl;
#endif
};
#endif // GROWLNOTIFIERWIN_H

View File

@ -263,9 +263,7 @@ using namespace LL;
#include "llcoproceduremanager.h"
#include "llviewereventrecorder.h"
#if HAS_GROWL
#include "growlmanager.h"
#endif
#include "fsavatarrenderpersistence.h"
// *FIX: These extern globals should be cleaned up.
@ -2019,9 +2017,7 @@ bool LLAppViewer::cleanup()
// workaround for DEV-35406 crash on shutdown
LLEventPumps::instance().reset();
#if HAS_GROWL
GrowlManager::destroyManager();
#endif
GrowlManager::destroyManager(); // <FS> Growl support
//dump scene loading monitor results
if (LLSceneMonitor::instanceExists())

View File

@ -225,9 +225,7 @@
//#include "llfloaterimsession.h"
#include "fsfloaterim.h"
// </FS:Ansariel> [FS communication UI]
#if HAS_GROWL
#include "growlmanager.h"
#endif
#include "fsassetblacklist.h"
#include "fsavatarrenderpersistence.h"
@ -662,10 +660,8 @@ bool idle_startup()
//
std::string lastGPU = gSavedSettings.getString("LastGPUString");
std::string thisGPU = LLFeatureManager::getInstance()->getGPUString();
#if HAS_GROWL
GrowlManager::initiateManager();
#endif
GrowlManager::initiateManager(); // <FS> Growl support
// <FS:Ansariel> Store current font and skin for system info (FIRE-6806)
gSavedSettings.setString("FSInternalFontSettingsFile", gSavedSettings.getString("FSFontSettingsFile"));