summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-07-07 00:53:05 +0000
committerJames Cook <james@lindenlab.com>2009-07-07 00:53:05 +0000
commit52aeaa32841e7d0b37abab0a2a2540c2be2f16b7 (patch)
treed8f5c98644029dd289a97aa0d8b55c5a6200c214 /indra/newview/llappviewer.cpp
parent2c722655bd6701a3dc8518c6518c51f538765dcd (diff)
Merge skinning-14 to viewer-2, including refactoring many floaters to register them with LLFloaterReg, support for introspection of ParamBlock based UI widgets to dump XML schema, splitting llfolderview.cpp into three separate files to unravel dependencies and skeleton for for LLListView widget. Resolved conflicts in these files:
lldraghandle.h, lluictrl.h, llchiclet.cpp, llfolderview.h/cpp, lliinventorybridge.cpp, llpanelpicks.cpp, llviewermenu.cpp, floater_mute.xml, floater_preferences.xml, notifications.xml, panel_preferences_audio.xml, panel_preferences_graphics1.xml, panel_region_general.xml svn merge -r124961:126284 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-14
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp37
1 files changed, 19 insertions, 18 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0253d9e8d5..de3cf1a81b 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -152,8 +152,9 @@
#include "llviewerfloaterreg.h"
#include "llcommandlineparser.h"
#include "llfloatermemleak.h"
+#include "llfloaterreg.h"
#include "llfloatersnapshot.h"
-#include "llinventoryview.h"
+#include "llfloaterinventory.h"
// includes for idle() idleShutdown()
#include "llviewercontrol.h"
@@ -235,9 +236,6 @@ LLTimer gLogoutTimer;
static const F32 LOGOUT_REQUEST_TIME = 6.f; // this will be cut short by the LogoutReply msg.
F32 gLogoutMaxTime = LOGOUT_REQUEST_TIME;
-LLUUID gInventoryLibraryOwner;
-LLUUID gInventoryLibraryRoot;
-
BOOL gDisconnected = FALSE;
// Map scale in pixels per region
@@ -930,9 +928,10 @@ bool LLAppViewer::mainLoop()
#endif
//memory leaking simulation
- if(LLFloaterMemLeak::getInstance())
+ LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking");
+ if(mem_leak_instance)
{
- LLFloaterMemLeak::getInstance()->idle() ;
+ mem_leak_instance->idle() ;
}
// canonical per-frame event
@@ -1099,9 +1098,10 @@ bool LLAppViewer::mainLoop()
catch(std::bad_alloc)
{
//stop memory leaking simulation
- if(LLFloaterMemLeak::getInstance())
+ LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking");
+ if(mem_leak_instance)
{
- LLFloaterMemLeak::getInstance()->stop() ;
+ mem_leak_instance->stop() ;
llwarns << "Bad memory allocation in LLAppViewer::mainLoop()!" << llendl ;
}
else
@@ -1126,9 +1126,10 @@ bool LLAppViewer::mainLoop()
llwarns << "Bad memory allocation when saveFinalSnapshot() is called!" << llendl ;
//stop memory leaking simulation
- if(LLFloaterMemLeak::getInstance())
+ LLFloaterMemLeak* mem_leak_instance = LLFloaterReg::getTypedInstance<LLFloaterMemLeak>("mem_leaking");
+ if(mem_leak_instance)
{
- LLFloaterMemLeak::getInstance()->stop() ;
+ mem_leak_instance->stop() ;
}
}
}
@@ -3864,20 +3865,20 @@ void LLAppViewer::disconnectViewer()
LLSelectMgr::getInstance()->deselectAll();
}
- if (!gNoRender)
+ // save inventory if appropriate
+ gInventory.cache(gInventory.getRootFolderID(), gAgent.getID());
+ if (gInventory.getLibraryRootFolderID().notNull()
+ && gInventory.getLibraryOwnerID().notNull())
{
- // save inventory if appropriate
- gInventory.cache(gAgent.getInventoryRootID(), gAgent.getID());
- if(gInventoryLibraryRoot.notNull() && gInventoryLibraryOwner.notNull())
- {
- gInventory.cache(gInventoryLibraryRoot, gInventoryLibraryOwner);
- }
+ gInventory.cache(
+ gInventory.getLibraryRootFolderID(),
+ gInventory.getLibraryOwnerID());
}
saveNameCache();
// close inventory interface, close all windows
- LLInventoryView::cleanup();
+ LLFloaterInventory::cleanup();
gAgentWearables.cleanup();