summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llcommon/llsdserialize.cpp2
-rw-r--r--indra/llcommon/llsdserialize_xml.cpp12
-rw-r--r--indra/llcommon/llsys.cpp248
-rw-r--r--[-rwxr-xr-x]indra/llcommon/llversionviewer.h0
-rw-r--r--indra/llinventory/llinventory.cpp3
-rw-r--r--[-rwxr-xr-x]indra/llmath/llvolume.cpp0
-rw-r--r--indra/llplugin/llpluginprocesschild.cpp2
-rw-r--r--indra/llplugin/llpluginprocessparent.cpp1
-rw-r--r--[-rwxr-xr-x]indra/llprimitive/llprimitive.h0
-rw-r--r--indra/llui/llmenubutton.cpp11
-rw-r--r--indra/llui/llmenubutton.h21
-rw-r--r--indra/llui/llview.cpp18
-rw-r--r--[-rwxr-xr-x]indra/newview/llassetuploadresponders.cpp0
-rwxr-xr-xindra/newview/llavataractions.cpp8
-rw-r--r--[-rwxr-xr-x]indra/newview/llfloatermodelpreview.cpp0
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp46
-rw-r--r--indra/newview/llfloaterworldmap.h5
-rw-r--r--indra/newview/llfolderview.cpp14
-rw-r--r--indra/newview/llfolderview.h1
-rw-r--r--indra/newview/llfolderviewitem.h2
-rw-r--r--indra/newview/llinventorypanel.cpp4
-rw-r--r--indra/newview/lllogininstance.cpp1
-rw-r--r--[-rwxr-xr-x]indra/newview/llmeshrepository.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/llmeshrepository.h0
-rw-r--r--indra/newview/llpanellogin.cpp30
-rw-r--r--indra/newview/llpanellogin.h2
-rw-r--r--indra/newview/llpanelmaininventory.cpp20
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp487
-rw-r--r--indra/newview/llpanelmarketplaceinbox.h2
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.cpp25
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.h2
-rw-r--r--indra/newview/llsidepanelinventory.cpp92
-rw-r--r--indra/newview/llsidepanelinventory.h5
-rw-r--r--indra/newview/llstartup.cpp25
-rw-r--r--indra/newview/llviewermenu.cpp57
-rw-r--r--[-rwxr-xr-x]indra/newview/llvovolume.cpp0
-rw-r--r--[-rwxr-xr-x]indra/newview/skins/default/xui/en/floater_model_preview.xml0
-rw-r--r--indra/newview/skins/default/xui/en/menu_mode_change.xml24
-rw-r--r--indra/newview/skins/default/xui/en/panel_login.xml33
-rw-r--r--indra/newview/skins/default/xui/en/panel_status_bar.xml14
-rw-r--r--indra/newview/skins/minimal/xui/en/main_view.xml4
-rw-r--r--indra/newview/skins/minimal/xui/en/panel_login.xml37
-rw-r--r--indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml2
-rw-r--r--indra/newview/skins/minimal/xui/en/panel_status_bar.xml16
44 files changed, 622 insertions, 654 deletions
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index bf62600514..6610daa1e0 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -313,8 +313,10 @@ LLSDParser::LLSDParser()
LLSDParser::~LLSDParser()
{ }
+LLFastTimer::DeclareTimer FTM_SD_PARSE("LLSD Parsing");
S32 LLSDParser::parse(std::istream& istr, LLSD& data, S32 max_bytes)
{
+ LLFastTimer _(FTM_SD_PARSE);
mCheckLimits = (LLSDSerialize::SIZE_UNLIMITED == max_bytes) ? false : true;
mMaxBytesLeft = max_bytes;
return doParse(istr, data);
diff --git a/indra/llcommon/llsdserialize_xml.cpp b/indra/llcommon/llsdserialize_xml.cpp
index c5a7c6fc15..d8213c4477 100644
--- a/indra/llcommon/llsdserialize_xml.cpp
+++ b/indra/llcommon/llsdserialize_xml.cpp
@@ -354,6 +354,7 @@ static unsigned get_till_eol(std::istream& input, char *buf, unsigned bufsize)
return count;
}
+LLFastTimer::DeclareTimer FTM_SD_PARSE_READ_STREAM("LLSD Read Stream");
S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
{
XML_Status status;
@@ -373,10 +374,13 @@ S32 LLSDXMLParser::Impl::parse(std::istream& input, LLSD& data)
{
break;
}
- count = get_till_eol(input, (char *)buffer, BUFFER_SIZE);
- if (!count)
- {
- break;
+ { LLFastTimer _(FTM_SD_PARSE_READ_STREAM);
+
+ count = get_till_eol(input, (char *)buffer, BUFFER_SIZE);
+ if (!count)
+ {
+ break;
+ }
}
status = XML_ParseBuffer(mParser, count, false);
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index 99e61433c6..37733cf9ad 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -68,9 +68,11 @@ using namespace llsd;
# include <sys/utsname.h>
# include <stdint.h>
# include <Carbon/Carbon.h>
-# include <sys/wait.h>
-# include <string.h>
# include <stdexcept>
+# include <mach/host_info.h>
+# include <mach/mach_host.h>
+# include <mach/task.h>
+# include <mach/task_info.h>
#elif LL_LINUX
# include <errno.h>
# include <sys/utsname.h>
@@ -990,194 +992,88 @@ LLSD LLMemoryInfo::loadStatsMap()
stats.add("PrivateUsage KB", pmem.PrivateUsage/1024);
#elif LL_DARWIN
- uint64_t phys = 0;
-
- size_t len = sizeof(phys);
- if (sysctlbyname("hw.memsize", &phys, &len, NULL, 0) == 0)
- {
- stats.add("Total Physical KB", phys/1024);
- }
- else
- {
- LL_WARNS("LLMemoryInfo") << "Unable to collect hw.memsize memory information" << LL_ENDL;
- }
-
- FILE* pout = popen("vm_stat 2>&1", "r");
- if (! pout) // popen() couldn't run vm_stat
+ const vm_size_t pagekb(vm_page_size / 1024);
+
+ //
+ // Collect the vm_stat's
+ //
+
{
- // Save errno right away.
- int popen_errno(errno);
- LL_WARNS("LLMemoryInfo") << "Unable to collect vm_stat memory information: ";
- char buffer[256];
- if (0 == strerror_r(popen_errno, buffer, sizeof(buffer)))
+ vm_statistics_data_t vmstat;
+ mach_msg_type_number_t vmstatCount = HOST_VM_INFO_COUNT;
+
+ if (host_statistics(mach_host_self(), HOST_VM_INFO, (host_info_t) &vmstat, &vmstatCount) != KERN_SUCCESS)
{
- LL_CONT << buffer;
+ LL_WARNS("LLMemoryInfo") << "Unable to collect memory information" << LL_ENDL;
}
else
{
- LL_CONT << "errno " << popen_errno;
+ stats.add("Pages free KB", pagekb * vmstat.free_count);
+ stats.add("Pages active KB", pagekb * vmstat.active_count);
+ stats.add("Pages inactive KB", pagekb * vmstat.inactive_count);
+ stats.add("Pages wired KB", pagekb * vmstat.wire_count);
+
+ stats.add("Pages zero fill", vmstat.zero_fill_count);
+ stats.add("Page reactivations", vmstat.reactivations);
+ stats.add("Page-ins", vmstat.pageins);
+ stats.add("Page-outs", vmstat.pageouts);
+
+ stats.add("Faults", vmstat.faults);
+ stats.add("Faults copy-on-write", vmstat.cow_faults);
+
+ stats.add("Cache lookups", vmstat.lookups);
+ stats.add("Cache hits", vmstat.hits);
+
+ stats.add("Page purgeable count", vmstat.purgeable_count);
+ stats.add("Page purges", vmstat.purges);
+
+ stats.add("Page speculative reads", vmstat.speculative_count);
}
- LL_CONT << LL_ENDL;
}
- else // popen() launched vm_stat
+
+ //
+ // Collect the misc task info
+ //
+
{
- // Mach Virtual Memory Statistics: (page size of 4096 bytes)
- // Pages free: 462078.
- // Pages active: 142010.
- // Pages inactive: 220007.
- // Pages wired down: 159552.
- // "Translation faults": 220825184.
- // Pages copy-on-write: 2104153.
- // Pages zero filled: 167034876.
- // Pages reactivated: 65153.
- // Pageins: 2097212.
- // Pageouts: 41759.
- // Object cache: 841598 hits of 7629869 lookups (11% hit rate)
-
- // Intentionally don't pass the boost::no_except flag. These
- // boost::regex objects are constructed with string literals, so they
- // should be valid every time. If they become invalid, we WANT an
- // exception, hopefully even before the dev checks in.
- boost::regex pagesize_rx("\\(page size of ([0-9]+) bytes\\)");
- boost::regex stat_rx("(.+): +([0-9]+)\\.");
- boost::regex cache_rx("Object cache: ([0-9]+) hits of ([0-9]+) lookups "
- "\\(([0-9]+)% hit rate\\)");
- boost::cmatch matched;
- LLSD::Integer pagesizekb(4096/1024);
-
- // Here 'pout' is vm_stat's stdout. Search it for relevant data.
- char line[100];
- line[sizeof(line)-1] = '\0';
- while (fgets(line, sizeof(line)-1, pout))
+ task_events_info_data_t taskinfo;
+ unsigned taskinfoSize = sizeof(taskinfo);
+
+ if (task_info(mach_task_self(), TASK_EVENTS_INFO, (task_info_t) &taskinfo, &taskinfoSize) != KERN_SUCCESS)
{
- size_t linelen(strlen(line));
- // Truncate any trailing newline
- if (line[linelen - 1] == '\n')
- {
- line[--linelen] = '\0';
- }
- LL_DEBUGS("LLMemoryInfo") << line << LL_ENDL;
- if (regex_search_no_exc(line, matched, pagesize_rx))
- {
- // "Mach Virtual Memory Statistics: (page size of 4096 bytes)"
- std::string pagesize_str(matched[1].first, matched[1].second);
- try
- {
- // Reasonable to assume that pagesize will always be a
- // multiple of 1Kb?
- pagesizekb = boost::lexical_cast<LLSD::Integer>(pagesize_str)/1024;
- }
- catch (const boost::bad_lexical_cast&)
- {
- LL_WARNS("LLMemoryInfo") << "couldn't parse '" << pagesize_str
- << "' in vm_stat line: " << line << LL_ENDL;
- continue;
- }
- stats.add("page size", pagesizekb);
- }
- else if (regex_match_no_exc(line, matched, stat_rx))
- {
- // e.g. "Pages free: 462078."
- // Strip double-quotes off certain statistic names
- const char *key_begin(matched[1].first), *key_end(matched[1].second);
- if (key_begin[0] == '"' && key_end[-1] == '"')
- {
- ++key_begin;
- --key_end;
- }
- LLSD::String key(key_begin, key_end);
- LLSD::String value_str(matched[2].first, matched[2].second);
- LLSD::Integer value(0);
- try
- {
- value = boost::lexical_cast<LLSD::Integer>(value_str);
- }
- catch (const boost::bad_lexical_cast&)
- {
- LL_WARNS("LLMemoryInfo") << "couldn't parse '" << value_str
- << "' in vm_stat line: " << line << LL_ENDL;
- continue;
- }
- // Store this statistic.
- stats.add(key, value);
- // Is this in units of pages? If so, convert to Kb.
- static const LLSD::String pages("Pages ");
- if (key.substr(0, pages.length()) == pages)
- {
- // Synthesize a new key with kb in place of Pages
- LLSD::String kbkey("kb ");
- kbkey.append(key.substr(pages.length()));
- stats.add(kbkey, value * pagesizekb);
- }
- }
- else if (regex_match_no_exc(line, matched, cache_rx))
- {
- // e.g. "Object cache: 841598 hits of 7629869 lookups (11% hit rate)"
- static const char* cache_keys[] = { "cache hits", "cache lookups", "cache hit%" };
- std::vector<LLSD::Integer> cache_values;
- for (size_t i = 0; i < (sizeof(cache_keys)/sizeof(cache_keys[0])); ++i)
- {
- LLSD::String value_str(matched[i+1].first, matched[i+1].second);
- LLSD::Integer value(0);
- try
- {
- value = boost::lexical_cast<LLSD::Integer>(value_str);
- }
- catch (boost::bad_lexical_cast&)
- {
- LL_WARNS("LLMemoryInfo") << "couldn't parse '" << value_str
- << "' in vm_stat line: " << line << LL_ENDL;
- continue;
- }
- stats.add(cache_keys[i], value);
- }
- }
- else
- {
- LL_WARNS("LLMemoryInfo") << "unrecognized vm_stat line: " << line << LL_ENDL;
- }
+ LL_WARNS("LLMemoryInfo") << "Unable to collect task information" << LL_ENDL;
}
- int status(pclose(pout));
- if (status == -1) // pclose() couldn't retrieve rc
+ else
{
- // Save errno right away.
- int pclose_errno(errno);
- // The ECHILD error happens so frequently that unless filtered,
- // the warning below spams the log file. This is too bad, because
- // sometimes the logic above fails to produce any output derived
- // from vm_stat, but we've been unable to observe any specific
- // error indicating the problem.
- if (pclose_errno != ECHILD)
- {
- LL_WARNS("LLMemoryInfo") << "Unable to obtain vm_stat termination code: ";
- char buffer[256];
- if (0 == strerror_r(pclose_errno, buffer, sizeof(buffer)))
- {
- LL_CONT << buffer;
- }
- else
- {
- LL_CONT << "errno " << pclose_errno;
- }
- LL_CONT << LL_ENDL;
- }
+ stats.add("Task page-ins", taskinfo.pageins);
+ stats.add("Task copy-on-write faults", taskinfo.cow_faults);
+ stats.add("Task messages sent", taskinfo.messages_sent);
+ stats.add("Task messages received", taskinfo.messages_received);
+ stats.add("Task mach system call count", taskinfo.syscalls_mach);
+ stats.add("Task unix system call count", taskinfo.syscalls_unix);
+ stats.add("Task context switch count", taskinfo.csw);
}
- else // pclose() retrieved rc; analyze
+ }
+
+ //
+ // Collect the basic task info
+ //
+
+ {
+ task_basic_info_64_data_t taskinfo;
+ unsigned taskinfoSize = sizeof(taskinfo);
+
+ if (task_info(mach_task_self(), TASK_BASIC_INFO_64, (task_info_t) &taskinfo, &taskinfoSize) != KERN_SUCCESS)
{
- if (WIFEXITED(status))
- {
- int rc(WEXITSTATUS(status));
- if (rc != 0)
- {
- LL_WARNS("LLMemoryInfo") << "vm_stat terminated with rc " << rc << LL_ENDL;
- }
- }
- else if (WIFSIGNALED(status))
- {
- LL_WARNS("LLMemoryInfo") << "vm_stat terminated by signal " << WTERMSIG(status)
- << LL_ENDL;
- }
+ LL_WARNS("LLMemoryInfo") << "Unable to collect task information" << LL_ENDL;
+ }
+ else
+ {
+ stats.add("Basic suspend count", taskinfo.suspend_count);
+ stats.add("Basic virtual memory KB", taskinfo.virtual_size / 1024);
+ stats.add("Basic resident memory KB", taskinfo.resident_size / 1024);
+ stats.add("Basic new thread policy", taskinfo.policy);
}
}
diff --git a/indra/llcommon/llversionviewer.h b/indra/llcommon/llversionviewer.h
index 99c5412ae5..99c5412ae5 100755..100644
--- a/indra/llcommon/llversionviewer.h
+++ b/indra/llcommon/llversionviewer.h
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index a3caf79519..76760aa414 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -1034,8 +1034,11 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
}
+LLFastTimer::DeclareTimer FTM_INVENTORY_SD_DESERIALIZE("Inventory SD Deserialize");
+
bool LLInventoryItem::fromLLSD(const LLSD& sd)
{
+ LLFastTimer _(FTM_INVENTORY_SD_DESERIALIZE);
mInventoryType = LLInventoryType::IT_NONE;
mAssetUUID.setNull();
std::string w;
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 2893e746e9..2893e746e9 100755..100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
diff --git a/indra/llplugin/llpluginprocesschild.cpp b/indra/llplugin/llpluginprocesschild.cpp
index 0beb46d0e5..f8a282184e 100644
--- a/indra/llplugin/llpluginprocesschild.cpp
+++ b/indra/llplugin/llpluginprocesschild.cpp
@@ -410,7 +410,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
}
else if(message_name == "sleep_time")
{
- mSleepTime = parsed.getValueReal("time");
+ mSleepTime = llmax(parsed.getValueReal("time"), 1.0 / 100.0); // clamp to maximum of 100Hz
}
else if(message_name == "crash")
{
diff --git a/indra/llplugin/llpluginprocessparent.cpp b/indra/llplugin/llpluginprocessparent.cpp
index 315096d4fd..110fac0f23 100644
--- a/indra/llplugin/llpluginprocessparent.cpp
+++ b/indra/llplugin/llpluginprocessparent.cpp
@@ -927,6 +927,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
}
// Send initial sleep time
+ llassert_always(mSleepTime != 0.f);
setSleepTime(mSleepTime, true);
setState(STATE_RUNNING);
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index 998016f8f6..998016f8f6 100755..100644
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
diff --git a/indra/llui/llmenubutton.cpp b/indra/llui/llmenubutton.cpp
index eed0085273..50d59f79f4 100644
--- a/indra/llui/llmenubutton.cpp
+++ b/indra/llui/llmenubutton.cpp
@@ -35,9 +35,16 @@
static LLDefaultChildRegistry::Register<LLMenuButton> r("menu_button");
+void LLMenuButton::MenuPositions::declareValues()
+{
+ declare("topleft", MP_TOP_LEFT);
+ declare("topright", MP_TOP_RIGHT);
+ declare("bottomleft", MP_BOTTOM_LEFT);
+}
LLMenuButton::Params::Params()
-: menu_filename("menu_filename")
+: menu_filename("menu_filename"),
+ position("position", MP_BOTTOM_LEFT)
{
}
@@ -45,7 +52,7 @@ LLMenuButton::Params::Params()
LLMenuButton::LLMenuButton(const LLMenuButton::Params& p)
: LLButton(p),
mIsMenuShown(false),
- mMenuPosition(MP_BOTTOM_LEFT)
+ mMenuPosition(p.position)
{
std::string menu_filename = p.menu_filename;
diff --git a/indra/llui/llmenubutton.h b/indra/llui/llmenubutton.h
index 7b657595da..e2396e7fb2 100644
--- a/indra/llui/llmenubutton.h
+++ b/indra/llui/llmenubutton.h
@@ -35,21 +35,30 @@ class LLMenuButton
: public LLButton
{
public:
+ typedef enum e_menu_position
+ {
+ MP_TOP_LEFT,
+ MP_TOP_RIGHT,
+ MP_BOTTOM_LEFT
+ } EMenuPosition;
+
+ struct MenuPositions
+ : public LLInitParam::TypeValuesHelper<EMenuPosition, MenuPositions>
+ {
+ static void declareValues();
+ };
+
struct Params
: public LLInitParam::Block<Params, LLButton::Params>
{
// filename for it's toggleable menu
Optional<std::string> menu_filename;
+ Optional<EMenuPosition> position;
Params();
};
- typedef enum e_menu_position
- {
- MP_TOP_LEFT,
- MP_TOP_RIGHT,
- MP_BOTTOM_LEFT
- } EMenuPosition;
+
boost::signals2::connection setMouseDownCallback( const mouse_signal_t::slot_type& cb );
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp
index 8803d106ba..659a54cc6e 100644
--- a/indra/llui/llview.cpp
+++ b/indra/llui/llview.cpp
@@ -1655,15 +1655,19 @@ BOOL LLView::hasAncestor(const LLView* parentp) const
BOOL LLView::childHasKeyboardFocus( const std::string& childname ) const
{
- LLView *child = findChildView(childname, TRUE);
- if (child)
- {
- return gFocusMgr.childHasKeyboardFocus(child);
- }
- else
+ LLView *focus = dynamic_cast<LLView *>(gFocusMgr.getKeyboardFocus());
+
+ while (focus != NULL)
{
- return FALSE;
+ if (focus->getName() == childname)
+ {
+ return TRUE;
+ }
+
+ focus = focus->getParent();
}
+
+ return FALSE;
}
//-----------------------------------------------------------------------------
diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp
index 966f5b941e..966f5b941e 100755..100644
--- a/indra/newview/llassetuploadresponders.cpp
+++ b/indra/newview/llassetuploadresponders.cpp
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index f22b02093f..48edecc89c 100755
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -697,12 +697,8 @@ std::set<LLUUID> LLAvatarActions::getInventorySelectedUUIDs()
if (inventory_selected_uuids.empty())
{
LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
- LLInventoryPanel * inbox = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
- {
- inventory_selected_uuids = inbox->getRootFolder()->getSelectionList();
- }
-
+
+ inventory_selected_uuids = sidepanel_inventory->getInboxOrOutboxSelectionList();
}
return inventory_selected_uuids;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index ef846ec42e..ef846ec42e 100755..100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index d5f0648f3b..8e11d71048 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -237,16 +237,19 @@ const LLUUID LLFloaterWorldMap::sHomeID( "10000000-0000-0000-0000-000000000001"
LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
: LLFloater(key),
-mInventory(NULL),
-mInventoryObserver(NULL),
-mFriendObserver(NULL),
-mCompletingRegionName(),
-mCompletingRegionPos(),
-mWaitingForTracker(FALSE),
-mIsClosing(FALSE),
-mSetToUserPosition(TRUE),
-mTrackedLocation(0,0,0),
-mTrackedStatus(LLTracker::TRACKING_NOTHING)
+ mInventory(NULL),
+ mInventoryObserver(NULL),
+ mFriendObserver(NULL),
+ mCompletingRegionName(),
+ mCompletingRegionPos(),
+ mWaitingForTracker(FALSE),
+ mIsClosing(FALSE),
+ mSetToUserPosition(TRUE),
+ mTrackedLocation(0,0,0),
+ mTrackedStatus(LLTracker::TRACKING_NOTHING),
+ mListFriendCombo(NULL),
+ mListLandmarkCombo(NULL),
+ mListSearchResults(NULL)
{
gFloaterWorldMap = this;
@@ -281,17 +284,20 @@ BOOL LLFloaterWorldMap::postBuild()
avatar_combo->selectFirstItem();
avatar_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onAvatarComboPrearrange, this) );
avatar_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
+ mListFriendCombo = dynamic_cast<LLCtrlListInterface *>(avatar_combo);
LLSearchEditor *location_editor = getChild<LLSearchEditor>("location");
location_editor->setFocusChangedCallback(boost::bind(&LLFloaterWorldMap::onLocationFocusChanged, this, _1));
location_editor->setKeystrokeCallback( boost::bind(&LLFloaterWorldMap::onSearchTextEntry, this));
getChild<LLScrollListCtrl>("search_results")->setDoubleClickCallback( boost::bind(&LLFloaterWorldMap::onClickTeleportBtn, this));
+ mListSearchResults = childGetListInterface("search_results");
LLComboBox *landmark_combo = getChild<LLComboBox>( "landmark combo");
landmark_combo->selectFirstItem();
landmark_combo->setPrearrangeCallback( boost::bind(&LLFloaterWorldMap::onLandmarkComboPrearrange, this) );
landmark_combo->setTextEntryCallback( boost::bind(&LLFloaterWorldMap::onComboTextEntry, this) );
+ mListLandmarkCombo = dynamic_cast<LLCtrlListInterface *>(landmark_combo);
mCurZoomVal = log(LLWorldMapView::sMapScale)/log(2.f);
getChild<LLUICtrl>("zoom slider")->setValue(LLWorldMapView::sMapScale);
@@ -864,7 +870,7 @@ void LLFloaterWorldMap::friendsChanged()
// No longer really builds a list. Instead, just updates mAvatarCombo.
void LLFloaterWorldMap::buildAvatarIDList()
{
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (!list) return;
// Delete all but the "None" entry
@@ -894,7 +900,7 @@ void LLFloaterWorldMap::buildAvatarIDList()
void LLFloaterWorldMap::buildLandmarkIDLists()
{
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (!list) return;
// Delete all but the "None" entry
@@ -955,7 +961,7 @@ F32 LLFloaterWorldMap::getDistanceToDestination(const LLVector3d &destination,
void LLFloaterWorldMap::clearLocationSelection(BOOL clear_ui)
{
- LLCtrlListInterface *list = childGetListInterface("search_results");
+ LLCtrlListInterface *list = mListSearchResults;
if (list)
{
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
@@ -969,7 +975,7 @@ void LLFloaterWorldMap::clearLandmarkSelection(BOOL clear_ui)
{
if (clear_ui || !childHasKeyboardFocus("landmark combo"))
{
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (list)
{
list->selectByValue( "None" );
@@ -983,7 +989,7 @@ void LLFloaterWorldMap::clearAvatarSelection(BOOL clear_ui)
if (clear_ui || !childHasKeyboardFocus("friend combo"))
{
mTrackedStatus = LLTracker::TRACKING_NOTHING;
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (list)
{
list->selectByValue( "None" );
@@ -1051,7 +1057,7 @@ void LLFloaterWorldMap::onLandmarkComboPrearrange( )
return;
}
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (!list) return;
LLUUID current_choice = list->getCurrentID();
@@ -1087,7 +1093,7 @@ void LLFloaterWorldMap::onLandmarkComboCommit()
return;
}
- LLCtrlListInterface *list = childGetListInterface("landmark combo");
+ LLCtrlListInterface *list = mListLandmarkCombo;
if (!list) return;
LLUUID asset_id;
@@ -1134,7 +1140,7 @@ void LLFloaterWorldMap::onAvatarComboPrearrange( )
return;
}
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (!list) return;
LLUUID current_choice;
@@ -1159,7 +1165,7 @@ void LLFloaterWorldMap::onAvatarComboCommit()
return;
}
- LLCtrlListInterface *list = childGetListInterface("friend combo");
+ LLCtrlListInterface *list = mListFriendCombo;
if (!list) return;
const LLUUID& new_avatar_id = list->getCurrentID();
@@ -1553,7 +1559,7 @@ void LLFloaterWorldMap::updateSims(bool found_null_sim)
void LLFloaterWorldMap::onCommitSearchResult()
{
- LLCtrlListInterface *list = childGetListInterface("search_results");
+ LLCtrlListInterface *list = mListSearchResults;
if (!list) return;
LLSD selected_value = list->getSelectedValue();
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index 783d9f4819..e3b83b2579 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -39,6 +39,7 @@
#include "lltracker.h"
#include "llslurl.h"
+class LLCtrlListInterface;
class LLFriendObserver;
class LLInventoryModel;
class LLInventoryObserver;
@@ -190,6 +191,10 @@ private:
std::string mTrackedSimName;
std::string mTrackedAvatarName;
LLSLURL mSLURL;
+
+ LLCtrlListInterface * mListFriendCombo;
+ LLCtrlListInterface * mListLandmarkCombo;
+ LLCtrlListInterface * mListSearchResults;
};
extern LLFloaterWorldMap* gFloaterWorldMap;
diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp
index 7581fa91c5..f471caa65c 100644
--- a/indra/newview/llfolderview.cpp
+++ b/indra/newview/llfolderview.cpp
@@ -369,16 +369,6 @@ void LLFolderView::closeAllFolders()
arrangeAll();
}
-void LLFolderView::openFolder(const std::string& foldername)
-{
- LLFolderViewFolder* inv = findChild<LLFolderViewFolder>(foldername);
- if (inv)
- {
- setSelection(inv, FALSE, FALSE);
- inv->setOpen(TRUE);
- }
-}
-
void LLFolderView::openTopLevelFolders()
{
for (folders_t::iterator iter = mFolders.begin();
@@ -720,8 +710,10 @@ void LLFolderView::extendSelection(LLFolderViewItem* selection, LLFolderViewItem
mSignalSelectCallback = SIGNAL_KEYBOARD_FOCUS;
}
+static LLFastTimer::DeclareTimer FTM_SANITIZE_SELECTION("Sanitize Selection");
void LLFolderView::sanitizeSelection()
{
+ LLFastTimer _(FTM_SANITIZE_SELECTION);
// store off current item in case it is automatically deselected
// and we want to preserve context
LLFolderViewItem* original_selected_item = getCurSelectedItem();
@@ -2048,8 +2040,10 @@ void LLFolderView::removeItemID(const LLUUID& id)
mItemMap.erase(id);
}
+LLFastTimer::DeclareTimer FTM_GET_ITEM_BY_ID("Get FolderViewItem by ID");
LLFolderViewItem* LLFolderView::getItemByID(const LLUUID& id)
{
+ LLFastTimer _(FTM_GET_ITEM_BY_ID);
if (id == getListener()->getUUID())
{
return this;
diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h
index 0b92548fd0..705a76a7b4 100644
--- a/indra/newview/llfolderview.h
+++ b/indra/newview/llfolderview.h
@@ -108,7 +108,6 @@ public:
// Close all folders in the view
void closeAllFolders();
- void openFolder(const std::string& foldername);
void openTopLevelFolders();
virtual void toggleOpen() {};
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index f70e63ecdf..dac0c3032c 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -328,6 +328,8 @@ public:
virtual BOOL handleMouseUp( S32 x, S32 y, MASK mask );
virtual BOOL handleDoubleClick( S32 x, S32 y, MASK mask );
+ virtual LLView* findChildView(const std::string& name, BOOL recurse) const { return NULL; }
+
// virtual void handleDropped();
virtual void draw();
virtual BOOL handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index d5d40ca65d..1aa402802e 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -812,9 +812,7 @@ void LLInventoryPanel::openStartFolderOrMyInventory()
&& fchild->getListener()
&& fchild->getListener()->getUUID() == gInventory.getRootFolderID())
{
- const std::string& child_name = child->getName();
- mFolderRoot->openFolder(child_name);
- mFolderRoot->clearSelection(); // No need to keep it selected though!
+ fchild->setOpen(TRUE);
break;
}
}
diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp
index 00de6a86e1..b20f89aa7c 100644
--- a/indra/newview/lllogininstance.cpp
+++ b/indra/newview/lllogininstance.cpp
@@ -568,6 +568,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia
else
{
requested_options.append("basic-mode");
+ requested_options.append("inventory-basic");
}
#endif
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index afed306a28..afed306a28 100755..100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 35a7314cd5..35a7314cd5 100755..100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 27f341b4f6..bef809f3a7 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -154,10 +154,6 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
}
updateLocationCombo(false);
- LLUICtrl& mode_combo = getChildRef<LLUICtrl>("mode_combo");
- mode_combo.setValue(gSavedSettings.getString("SessionSettingsFile"));
- mode_combo.setCommitCallback(boost::bind(&LLPanelLogin::onModeChange, this, getChild<LLUICtrl>("mode_combo")->getValue(), _2));
-
LLComboBox* server_choice_combo = sInstance->getChild<LLComboBox>("server_combo");
server_choice_combo->setCommitCallback(onSelectServer, NULL);
server_choice_combo->setFocusLostCallback(boost::bind(onServerComboLostFocus, _1));
@@ -1025,32 +1021,6 @@ void LLPanelLogin::updateLoginPanelLinks()
sInstance->getChildView("forgot_password_text")->setVisible( system_grid);
}
-void LLPanelLogin::onModeChange(const LLSD& original_value, const LLSD& new_value)
-{
- if (original_value.asString() != new_value.asString())
- {
- LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(&LLPanelLogin::onModeChangeConfirm, this, original_value, new_value, _1, _2));
- }
-}
-
-void LLPanelLogin::onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- switch (option)
- {
- case 0:
- gSavedSettings.getControl("SessionSettingsFile")->set(new_value);
- LLAppViewer::instance()->forceQuit();
- break;
- case 1:
- // revert to original value
- getChild<LLUICtrl>("mode_combo")->setValue(original_value);
- break;
- default:
- break;
- }
-}
-
std::string canonicalize_username(const std::string& name)
{
std::string cname = name;
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index 11273453ba..b29b3af7ca 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -97,8 +97,6 @@ private:
static void onServerComboLostFocus(LLFocusableElement*);
static void updateServerCombo();
static void updateStartSLURL();
- void onModeChange(const LLSD& original_value, const LLSD& new_value);
- void onModeChangeConfirm(const LLSD& original_value, const LLSD& new_value, const LLSD& notification, const LLSD& response);
static void updateLoginPanelLinks();
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 1920cc2940..858f5cf575 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -572,28 +572,16 @@ void LLPanelMainInventory::updateItemcountText()
{
text = getString("ItemcountUnknown");
}
+
+ // *TODO: Cache the LLUICtrl* for the ItemcountText control
getChild<LLUICtrl>("ItemcountText")->setValue(text);
}
void LLPanelMainInventory::onFocusReceived()
{
LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
-
- if (inbox_panel)
- {
- inbox_panel->clearSelection();
- }
-
- LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox");
-
- if (outbox_panel)
- {
- outbox_panel->clearSelection();
- }
-
- sidepanel_inventory->updateVerbs();
+
+ sidepanel_inventory->clearSelections(false, true, true);
}
void LLPanelMainInventory::setFilterTextFromFilter()
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 069a46604d..05e45d86b8 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -1,251 +1,236 @@
-/**
- * @file llpanelmarketplaceinbox.cpp
- * @brief Panel for marketplace inbox
- *
-* $LicenseInfo:firstyear=2011&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2010, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llpanelmarketplaceinbox.h"
-#include "llpanelmarketplaceinboxinventory.h"
-
-#include "llappviewer.h"
-#include "llbutton.h"
-#include "llinventorypanel.h"
-#include "llfolderview.h"
-#include "llsidepanelinventory.h"
-#include "llviewercontrol.h"
-
-
-static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
-
-const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams()
-{
- return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceInbox>();
-}
-
-// protected
-LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
- : LLPanel(p)
- , mInventoryPanel(NULL)
-{
-}
-
-LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
-{
- if (getChild<LLButton>("inbox_btn")->getToggleState())
- {
- gSavedPerAccountSettings.setString("LastInventoryInboxExpand", LLDate::now().asString());
- }
-}
-
-// virtual
-BOOL LLPanelMarketplaceInbox::postBuild()
-{
- LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceInbox::handleLoginComplete, this));
-
- LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this));
-
- return TRUE;
-}
-
-void LLPanelMarketplaceInbox::onSelectionChange()
-{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
-
- sidepanel_inventory->updateVerbs();
-}
-
-
-void LLPanelMarketplaceInbox::handleLoginComplete()
-{
- // Set us up as the class to drive the badge value for the sidebar_inventory button
- LLSideTray::getInstance()->setTabButtonBadgeDriver("sidebar_inventory", this);
-}
-
-void LLPanelMarketplaceInbox::setupInventoryPanel()
-{
- LLView * inbox_inventory_placeholder = getChild<LLView>("inbox_inventory_placeholder");
- LLView * inbox_inventory_parent = inbox_inventory_placeholder->getParent();
-
- mInventoryPanel =
- LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_inbox_inventory.xml",
- inbox_inventory_parent,
- LLInventoryPanel::child_registry_t::instance());
-
- // Reshape the inventory to the proper size
- LLRect inventory_placeholder_rect = inbox_inventory_placeholder->getRect();
- mInventoryPanel->setShape(inventory_placeholder_rect);
-
- // Set the sort order newest to oldest, and a selection change callback
- mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
- mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this));
-
- // Set up the note to display when the inbox is empty
- mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryInboxNoItems");
-
- // Hide the placeholder text
- inbox_inventory_placeholder->setVisible(FALSE);
-}
-
-void LLPanelMarketplaceInbox::onFocusReceived()
-{
- LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- if (sidepanel_inventory)
- {
- LLInventoryPanel * inv_panel = sidepanel_inventory->getActivePanel();
-
- if (inv_panel)
- {
- inv_panel->clearSelection();
- }
-
- LLInventoryPanel * outbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_outbox");
-
- if (outbox_panel)
- {
- outbox_panel->clearSelection();
- }
-
- sidepanel_inventory->updateVerbs();
- }
-}
-
-BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
-{
- *accept = ACCEPT_NO;
- return TRUE;
-}
-
-U32 LLPanelMarketplaceInbox::getFreshItemCount() const
-{
-#if SUPPORTING_FRESH_ITEM_COUNT
-
- //
- // NOTE: When turning this on, be sure to test the no inbox/outbox case because this code probably
- // will return "2" for the Inventory and LIBRARY top-levels when that happens.
- //
-
- U32 fresh_item_count = 0;
-
- if (mInventoryPanel)
- {
- const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
-
- if (inbox_folder)
- {
- LLFolderViewFolder::folders_t::const_iterator folders_it = inbox_folder->getFoldersBegin();
- LLFolderViewFolder::folders_t::const_iterator folders_end = inbox_folder->getFoldersEnd();
-
- for (; folders_it != folders_end; ++folders_it)
- {
- const LLFolderViewFolder * folder_view = *folders_it;
- const LLInboxFolderViewFolder * inbox_folder_view = dynamic_cast<const LLInboxFolderViewFolder*>(folder_view);
-
- if (inbox_folder_view && inbox_folder_view->isFresh())
- {
- fresh_item_count++;
- }
- }
- }
- }
-
- return fresh_item_count;
-#else
- return getTotalItemCount();
-#endif
-}
-
-U32 LLPanelMarketplaceInbox::getTotalItemCount() const
-{
- U32 item_count = 0;
-
- if (mInventoryPanel)
- {
- const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
-
- if (inbox_folder)
- {
- item_count += inbox_folder->getFoldersCount();
- }
- }
-
- return item_count;
-}
-
-std::string LLPanelMarketplaceInbox::getBadgeString() const
-{
- std::string item_count_str("");
-
- // If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel
- if (getParent()->getVisible() &&
- (LLSideTray::getInstance()->getCollapsed() || !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")))
- {
- U32 item_count = getFreshItemCount();
-
- if (item_count)
- {
- item_count_str = llformat("%d", item_count);
- }
- }
-
- return item_count_str;
-}
-
-void LLPanelMarketplaceInbox::draw()
-{
- U32 item_count = getTotalItemCount();
-
- LLView * fresh_new_count_view = getChildView("inbox_fresh_new_count");
-
- if (item_count > 0)
- {
- std::string item_count_str = llformat("%d", item_count);
-
- LLStringUtil::format_map_t args;
- args["[NUM]"] = item_count_str;
- getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelWithArg", args));
-
-#if SUPPORTING_FRESH_ITEM_COUNT
- // set green text to fresh item count
- U32 fresh_item_count = getFreshItemCount();
- fresh_new_count_view->setVisible((fresh_item_count > 0));
-
- if (fresh_item_count > 0)
- {
- getChild<LLUICtrl>("inbox_fresh_new_count")->setTextArg("[NUM]", llformat("%d", fresh_item_count));
- }
-#else
- fresh_new_count_view->setVisible(FALSE);
-#endif
- }
- else
- {
- getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelNoArg"));
-
- fresh_new_count_view->setVisible(FALSE);
- }
-
- LLPanel::draw();
-}
+/**
+ * @file llpanelmarketplaceinbox.cpp
+ * @brief Panel for marketplace inbox
+ *
+* $LicenseInfo:firstyear=2011&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, Linden Research, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation;
+ * version 2.1 of the License only.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+ * $/LicenseInfo$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llpanelmarketplaceinbox.h"
+#include "llpanelmarketplaceinboxinventory.h"
+
+#include "llappviewer.h"
+#include "llbutton.h"
+#include "llinventorypanel.h"
+#include "llfolderview.h"
+#include "llsidepanelinventory.h"
+#include "llviewercontrol.h"
+
+
+static LLRegisterPanelClassWrapper<LLPanelMarketplaceInbox> t_panel_marketplace_inbox("panel_marketplace_inbox");
+
+const LLPanelMarketplaceInbox::Params& LLPanelMarketplaceInbox::getDefaultParams()
+{
+ return LLUICtrlFactory::getDefaultParams<LLPanelMarketplaceInbox>();
+}
+
+// protected
+LLPanelMarketplaceInbox::LLPanelMarketplaceInbox(const Params& p)
+ : LLPanel(p)
+ , mInventoryPanel(NULL)
+{
+}
+
+LLPanelMarketplaceInbox::~LLPanelMarketplaceInbox()
+{
+ if (getChild<LLButton>("inbox_btn")->getToggleState())
+ {
+ gSavedPerAccountSettings.setString("LastInventoryInboxExpand", LLDate::now().asString());
+ }
+}
+
+// virtual
+BOOL LLPanelMarketplaceInbox::postBuild()
+{
+ LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLPanelMarketplaceInbox::handleLoginComplete, this));
+
+ LLFocusableElement::setFocusReceivedCallback(boost::bind(&LLPanelMarketplaceInbox::onFocusReceived, this));
+
+ return TRUE;
+}
+
+void LLPanelMarketplaceInbox::onSelectionChange()
+{
+ LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+
+ sidepanel_inventory->updateVerbs();
+}
+
+
+void LLPanelMarketplaceInbox::handleLoginComplete()
+{
+ // Set us up as the class to drive the badge value for the sidebar_inventory button
+ LLSideTray::getInstance()->setTabButtonBadgeDriver("sidebar_inventory", this);
+}
+
+LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
+{
+ LLView * inbox_inventory_placeholder = getChild<LLView>("inbox_inventory_placeholder");
+ LLView * inbox_inventory_parent = inbox_inventory_placeholder->getParent();
+
+ mInventoryPanel =
+ LLUICtrlFactory::createFromFile<LLInventoryPanel>("panel_inbox_inventory.xml",
+ inbox_inventory_parent,
+ LLInventoryPanel::child_registry_t::instance());
+
+ // Reshape the inventory to the proper size
+ LLRect inventory_placeholder_rect = inbox_inventory_placeholder->getRect();
+ mInventoryPanel->setShape(inventory_placeholder_rect);
+
+ // Set the sort order newest to oldest, and a selection change callback
+ mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+ mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this));
+
+ // Set up the note to display when the inbox is empty
+ mInventoryPanel->getFilter()->setEmptyLookupMessage("InventoryInboxNoItems");
+
+ // Hide the placeholder text
+ inbox_inventory_placeholder->setVisible(FALSE);
+
+ return mInventoryPanel;
+}
+
+void LLPanelMarketplaceInbox::onFocusReceived()
+{
+ LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
+
+ sidepanel_inventory->clearSelections(true, false, true);
+}
+
+BOOL LLPanelMarketplaceInbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, std::string& tooltip_msg)
+{
+ *accept = ACCEPT_NO;
+ return TRUE;
+}
+
+U32 LLPanelMarketplaceInbox::getFreshItemCount() const
+{
+#if SUPPORTING_FRESH_ITEM_COUNT
+
+ //
+ // NOTE: When turning this on, be sure to test the no inbox/outbox case because this code probably
+ // will return "2" for the Inventory and LIBRARY top-levels when that happens.
+ //
+
+ U32 fresh_item_count = 0;
+
+ if (mInventoryPanel)
+ {
+ const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
+
+ if (inbox_folder)
+ {
+ LLFolderViewFolder::folders_t::const_iterator folders_it = inbox_folder->getFoldersBegin();
+ LLFolderViewFolder::folders_t::const_iterator folders_end = inbox_folder->getFoldersEnd();
+
+ for (; folders_it != folders_end; ++folders_it)
+ {
+ const LLFolderViewFolder * folder_view = *folders_it;
+ const LLInboxFolderViewFolder * inbox_folder_view = dynamic_cast<const LLInboxFolderViewFolder*>(folder_view);
+
+ if (inbox_folder_view && inbox_folder_view->isFresh())
+ {
+ fresh_item_count++;
+ }
+ }
+ }
+ }
+
+ return fresh_item_count;
+#else
+ return getTotalItemCount();
+#endif
+}
+
+U32 LLPanelMarketplaceInbox::getTotalItemCount() const
+{
+ U32 item_count = 0;
+
+ if (mInventoryPanel)
+ {
+ const LLFolderViewFolder * inbox_folder = mInventoryPanel->getRootFolder();
+
+ if (inbox_folder)
+ {
+ item_count += inbox_folder->getFoldersCount();
+ }
+ }
+
+ return item_count;
+}
+
+std::string LLPanelMarketplaceInbox::getBadgeString() const
+{
+ std::string item_count_str("");
+
+ // If the inbox is visible, and the side panel is collapsed or expanded and not the inventory panel
+ if (getParent()->getVisible() &&
+ (LLSideTray::getInstance()->getCollapsed() || !LLSideTray::getInstance()->isPanelActive("sidepanel_inventory")))
+ {
+ U32 item_count = getFreshItemCount();
+
+ if (item_count)
+ {
+ item_count_str = llformat("%d", item_count);
+ }
+ }
+
+ return item_count_str;
+}
+
+void LLPanelMarketplaceInbox::draw()
+{
+ U32 item_count = getTotalItemCount();
+
+ LLView * fresh_new_count_view = getChildView("inbox_fresh_new_count");
+
+ if (item_count > 0)
+ {
+ std::string item_count_str = llformat("%d", item_count);
+
+ LLStringUtil::format_map_t args;
+ args["[NUM]"] = item_count_str;
+ getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelWithArg", args));
+
+#if SUPPORTING_FRESH_ITEM_COUNT
+ // set green text to fresh item count
+ U32 fresh_item_count = getFreshItemCount();
+ fresh_new_count_view->setVisible((fresh_item_count > 0));
+
+ if (fresh_item_count > 0)
+ {
+ getChild<LLUICtrl>("inbox_fresh_new_count")->setTextArg("[NUM]", llformat("%d", fresh_item_count));
+ }
+#else
+ fresh_new_count_view->setVisible(FALSE);
+#endif
+ }
+ else
+ {
+ getChild<LLButton>("inbox_btn")->setLabel(getString("InboxLabelNoArg"));
+
+ fresh_new_count_view->setVisible(FALSE);
+ }
+
+ LLPanel::draw();
+}
diff --git a/indra/newview/llpanelmarketplaceinbox.h b/indra/newview/llpanelmarketplaceinbox.h
index 4ecea29304..7b4ed137db 100644
--- a/indra/newview/llpanelmarketplaceinbox.h
+++ b/indra/newview/llpanelmarketplaceinbox.h
@@ -55,7 +55,7 @@ public:
/*virtual*/ void draw();
- void setupInventoryPanel();
+ LLInventoryPanel * setupInventoryPanel();
U32 getFreshItemCount() const;
U32 getTotalItemCount() const;
diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp
index 74d0de3b30..d51a0d78fe 100644
--- a/indra/newview/llpanelmarketplaceoutbox.cpp
+++ b/indra/newview/llpanelmarketplaceoutbox.cpp
@@ -83,25 +83,8 @@ void LLPanelMarketplaceOutbox::handleLoginComplete()
void LLPanelMarketplaceOutbox::onFocusReceived()
{
LLSidepanelInventory * sidepanel_inventory = LLSideTray::getInstance()->getPanel<LLSidepanelInventory>("sidepanel_inventory");
-
- if (sidepanel_inventory)
- {
- LLInventoryPanel * inv_panel = sidepanel_inventory->getActivePanel();
-
- if (inv_panel)
- {
- inv_panel->clearSelection();
- }
-
- LLInventoryPanel * inbox_panel = sidepanel_inventory->findChild<LLInventoryPanel>("inventory_inbox");
-
- if (inbox_panel)
- {
- inbox_panel->clearSelection();
- }
-
- sidepanel_inventory->updateVerbs();
- }
+
+ sidepanel_inventory->clearSelections(true, true, false);
}
void LLPanelMarketplaceOutbox::onSelectionChange()
@@ -111,7 +94,7 @@ void LLPanelMarketplaceOutbox::onSelectionChange()
sidepanel_inventory->updateVerbs();
}
-void LLPanelMarketplaceOutbox::setupInventoryPanel()
+LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel()
{
LLView * outbox_inventory_placeholder = getChild<LLView>("outbox_inventory_placeholder");
LLView * outbox_inventory_parent = outbox_inventory_placeholder->getParent();
@@ -134,6 +117,8 @@ void LLPanelMarketplaceOutbox::setupInventoryPanel()
// Hide the placeholder text
outbox_inventory_placeholder->setVisible(FALSE);
+
+ return mInventoryPanel;
}
bool LLPanelMarketplaceOutbox::isOutboxEmpty() const
diff --git a/indra/newview/llpanelmarketplaceoutbox.h b/indra/newview/llpanelmarketplaceoutbox.h
index 1b502127ef..8e2c35914d 100644
--- a/indra/newview/llpanelmarketplaceoutbox.h
+++ b/indra/newview/llpanelmarketplaceoutbox.h
@@ -54,7 +54,7 @@ public:
/*virtual*/ BOOL postBuild();
- void setupInventoryPanel();
+ LLInventoryPanel * setupInventoryPanel();
bool isOutboxEmpty() const;
bool isSyncInProgress() const;
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 6f809ba3ca..54198cc577 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -132,6 +132,8 @@ private:
LLSidepanelInventory::LLSidepanelInventory()
: LLPanel()
, mItemPanel(NULL)
+ , mInventoryPanelInbox(NULL)
+ , mInventoryPanelOutbox(NULL)
, mPanelMainInventory(NULL)
, mInboxEnabled(false)
, mOutboxEnabled(false)
@@ -351,7 +353,7 @@ void LLSidepanelInventory::observeInboxModifications(const LLUUID& inboxID)
//
LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL);
- inbox->setupInventoryPanel();
+ mInventoryPanelInbox = inbox->setupInventoryPanel();
}
@@ -380,7 +382,7 @@ void LLSidepanelInventory::observeOutboxModifications(const LLUUID& outboxID)
//
LLPanelMarketplaceOutbox * outbox = getChild<LLPanelMarketplaceOutbox>(MARKETPLACE_OUTBOX_PANEL);
- outbox->setupInventoryPanel();
+ mInventoryPanelOutbox = outbox->setupInventoryPanel();
}
void LLSidepanelInventory::enableInbox(bool enabled)
@@ -529,14 +531,12 @@ void LLSidepanelInventory::onShopButtonClicked()
void LLSidepanelInventory::performActionOnSelection(const std::string &action)
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
- LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
+ LLFolderViewItem* current_item = mPanelMainInventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
if (!current_item)
{
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
+ if (mInventoryPanelInbox)
{
- current_item = inbox->getRootFolder()->getCurSelectedItem();
+ current_item = mInventoryPanelInbox->getRootFolder()->getCurSelectedItem();
}
if (!current_item)
@@ -545,7 +545,7 @@ void LLSidepanelInventory::performActionOnSelection(const std::string &action)
}
}
- current_item->getListener()->performAction(panel_main_inventory->getActivePanel()->getModel(), action);
+ current_item->getListener()->performAction(mPanelMainInventory->getActivePanel()->getModel(), action);
}
void LLSidepanelInventory::onWearButtonClicked()
@@ -687,19 +687,16 @@ void LLSidepanelInventory::updateVerbs()
bool LLSidepanelInventory::canShare()
{
- LLPanelMainInventory* panel_main_inventory =
- mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory");
-
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
+ LLInventoryPanel* inbox = mInventoryPanelInbox;
// Avoid flicker in the Recent tab while inventory is being loaded.
if ( (!inbox || inbox->getRootFolder()->getSelectionList().empty())
- && (panel_main_inventory && !panel_main_inventory->getActivePanel()->getRootFolder()->hasVisibleChildren()) )
+ && (mPanelMainInventory && !mPanelMainInventory->getActivePanel()->getRootFolder()->hasVisibleChildren()) )
{
return false;
}
- return ( (panel_main_inventory ? LLAvatarActions::canShareSelectedItems(panel_main_inventory->getActivePanel()) : false)
+ return ( (mPanelMainInventory ? LLAvatarActions::canShareSelectedItems(mPanelMainInventory->getActivePanel()) : false)
|| (inbox ? LLAvatarActions::canShareSelectedItems(inbox) : false) );
}
@@ -724,14 +721,13 @@ bool LLSidepanelInventory::canWearSelected()
LLInventoryItem *LLSidepanelInventory::getSelectedItem()
{
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
- LLFolderViewItem* current_item = panel_main_inventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
+ LLFolderViewItem* current_item = mPanelMainInventory->getActivePanel()->getRootFolder()->getCurSelectedItem();
+
if (!current_item)
{
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
+ if (mInventoryPanelInbox)
{
- current_item = inbox->getRootFolder()->getCurSelectedItem();
+ current_item = mInventoryPanelInbox->getRootFolder()->getCurSelectedItem();
}
if (!current_item)
@@ -748,14 +744,20 @@ U32 LLSidepanelInventory::getSelectedCount()
{
int count = 0;
- LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
- std::set<LLUUID> selection_list = panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList();
+ std::set<LLUUID> selection_list = mPanelMainInventory->getActivePanel()->getRootFolder()->getSelectionList();
count += selection_list.size();
- LLInventoryPanel* inbox = findChild<LLInventoryPanel>("inventory_inbox");
- if (inbox)
+ if ((count == 0) && mInboxEnabled && (mInventoryPanelInbox != NULL))
{
- selection_list = inbox->getRootFolder()->getSelectionList();
+ selection_list = mInventoryPanelInbox->getRootFolder()->getSelectionList();
+
+ count += selection_list.size();
+ }
+
+ if ((count == 0) && mOutboxEnabled && (mInventoryPanelOutbox != NULL))
+ {
+ selection_list = mInventoryPanelOutbox->getRootFolder()->getSelectionList();
+
count += selection_list.size();
}
@@ -779,3 +781,45 @@ BOOL LLSidepanelInventory::isMainInventoryPanelActive() const
{
return mInventoryPanel->getVisible();
}
+
+void LLSidepanelInventory::clearSelections(bool clearMain, bool clearInbox, bool clearOutbox)
+{
+ if (clearMain)
+ {
+ LLInventoryPanel * inv_panel = getActivePanel();
+
+ if (inv_panel)
+ {
+ inv_panel->clearSelection();
+ }
+ }
+
+ if (clearInbox && mInboxEnabled && (mInventoryPanelInbox != NULL))
+ {
+ mInventoryPanelInbox->clearSelection();
+ }
+
+ if (clearOutbox && mOutboxEnabled && (mInventoryPanelOutbox != NULL))
+ {
+ mInventoryPanelOutbox->clearSelection();
+ }
+
+ updateVerbs();
+}
+
+std::set<LLUUID> LLSidepanelInventory::getInboxOrOutboxSelectionList()
+{
+ std::set<LLUUID> inventory_selected_uuids;
+
+ if (mInboxEnabled && (mInventoryPanelInbox != NULL))
+ {
+ inventory_selected_uuids = mInventoryPanelInbox->getRootFolder()->getSelectionList();
+ }
+
+ if (inventory_selected_uuids.empty() && mOutboxEnabled && (mInventoryPanelOutbox != NULL))
+ {
+ inventory_selected_uuids = mInventoryPanelOutbox->getRootFolder()->getSelectionList();
+ }
+
+ return inventory_selected_uuids;
+}
diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h
index 9117e3bf27..f80a3a9dd3 100644
--- a/indra/newview/llsidepanelinventory.h
+++ b/indra/newview/llsidepanelinventory.h
@@ -58,6 +58,9 @@ public:
LLInventoryPanel* getActivePanel(); // Returns an active inventory panel, if any.
LLPanelMainInventory* getMainInventoryPanel() const { return mPanelMainInventory; }
BOOL isMainInventoryPanelActive() const;
+
+ void clearSelections(bool clearMain, bool clearInbox, bool clearOutbox);
+ std::set<LLUUID> getInboxOrOutboxSelectionList();
void showItemInfoPanel();
void showTaskInfoPanel();
@@ -95,6 +98,8 @@ protected:
//
private:
LLPanel* mInventoryPanel; // Main inventory view
+ LLInventoryPanel* mInventoryPanelInbox;
+ LLInventoryPanel* mInventoryPanelOutbox;
LLSidepanelItemInfo* mItemPanel; // Individual item view
LLSidepanelTaskInfo* mTaskPanel; // Individual in-world object view
LLPanelMainInventory* mPanelMainInventory;
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index e4bf668275..7991233ace 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -720,7 +720,13 @@ bool idle_startup()
timeout_count = 0;
+ // Login screen needs menus for preferences, but we can enter
+ // this startup phase more than once.
+ if (gLoginMenuBarView == NULL)
+ {
initialize_edit_menu();
+ init_menus();
+ }
if (show_connect_box)
{
@@ -755,19 +761,6 @@ bool idle_startup()
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
- // *NOTE: This is where LLViewerParcelMgr::getInstance() used to get allocated before becoming LLViewerParcelMgr::getInstance().
-
- // *NOTE: This is where gHUDManager used to bet allocated before becoming LLHUDManager::getInstance().
-
- // *NOTE: This is where gMuteList used to get allocated before becoming LLMuteList::getInstance().
-
- // Login screen needs menus for preferences, but we can enter
- // this startup phase more than once.
- if (gLoginMenuBarView == NULL)
- {
- init_menus();
- }
-
gViewerWindow->setNormalControlsVisible( FALSE );
gLoginMenuBarView->setVisible( TRUE );
gLoginMenuBarView->setEnabled( TRUE );
@@ -1562,6 +1555,12 @@ bool idle_startup()
}
}
+ LLSD inv_basic = response["inventory-basic"];
+ if(inv_basic.isDefined())
+ {
+ llinfos << "Basic inventory root folder id is " << inv_basic["folder_id"] << llendl;
+ }
+
LLSD buddy_list = response["buddy-list"];
if(buddy_list.isDefined())
{
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f6499e12de..ebd7c6c688 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -832,7 +832,8 @@ U32 feature_from_string(std::string feature)
};
-class LLAdvancedToggleFeature : public view_listener_t{
+class LLAdvancedToggleFeature : public view_listener_t
+{
bool handleEvent(const LLSD& userdata)
{
U32 feature = feature_from_string( userdata.asString() );
@@ -845,7 +846,8 @@ class LLAdvancedToggleFeature : public view_listener_t{
};
class LLAdvancedCheckFeature : public view_listener_t
-{bool handleEvent(const LLSD& userdata)
+{
+ bool handleEvent(const LLSD& userdata)
{
U32 feature = feature_from_string( userdata.asString() );
bool new_value = false;
@@ -7777,6 +7779,55 @@ class LLToggleUIHints : public view_listener_t
}
};
+class LLCheckSessionsSettings : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ std::string expected = userdata.asString();
+ return gSavedSettings.getString("SessionSettingsFile") == expected;
+ }
+};
+
+class LLChangeMode : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ std::string mode = userdata.asString();
+ if (mode == "basic")
+ {
+ if (gSavedSettings.getString("SessionSettingsFile") != "settings_minimal.xml")
+ {
+ LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(onModeChangeConfirm, "settings_minimal.xml", _1, _2));
+ }
+ return true;
+ }
+ else if (mode == "advanced")
+ {
+ if (gSavedSettings.getString("SessionSettingsFile") != "")
+ {
+ LLNotificationsUtil::add("ModeChange", LLSD(), LLSD(), boost::bind(onModeChangeConfirm, "", _1, _2));
+ }
+ return true;
+ }
+ return false;
+ }
+
+ static void onModeChangeConfirm(const std::string& new_session_settings_file, const LLSD& notification, const LLSD& response)
+ {
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ switch (option)
+ {
+ case 0:
+ gSavedSettings.getControl("SessionSettingsFile")->set(new_session_settings_file);
+ LLAppViewer::instance()->forceQuit();
+ break;
+ case 1:
+ default:
+ break;
+ }
+ }
+};
+
void LLUploadCostCalculator::calculateCost()
{
S32 upload_cost = LLGlobalEconomy::Singleton::getInstance()->getPriceUpload();
@@ -8266,6 +8317,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLEditableSelectedMono(), "EditableSelectedMono");
view_listener_t::addMenu(new LLToggleUIHints(), "ToggleUIHints");
+ view_listener_t::addMenu(new LLCheckSessionsSettings(), "CheckSessionSettings");
+ view_listener_t::addMenu(new LLChangeMode(), "ChangeMode");
commit.add("Destination.show", boost::bind(&toggle_destination_and_avatar_picker, 0));
commit.add("Avatar.show", boost::bind(&toggle_destination_and_avatar_picker, 1));
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 30216f02db..30216f02db 100755..100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
diff --git a/indra/newview/skins/default/xui/en/floater_model_preview.xml b/indra/newview/skins/default/xui/en/floater_model_preview.xml
index 1d4a1d4827..1d4a1d4827 100755..100644
--- a/indra/newview/skins/default/xui/en/floater_model_preview.xml
+++ b/indra/newview/skins/default/xui/en/floater_model_preview.xml
diff --git a/indra/newview/skins/default/xui/en/menu_mode_change.xml b/indra/newview/skins/default/xui/en/menu_mode_change.xml
new file mode 100644
index 0000000000..87d1a0a7a2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/menu_mode_change.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<toggleable_menu
+ name="Mode Change">
+ <menu_item_check
+ label="Basic"
+ name="BasicMode">
+ <on_check
+ function="CheckSessionSettings"
+ parameter="settings_minimal.xml" />
+ <on_click
+ function="ChangeMode"
+ parameter="basic"/>
+ </menu_item_check>
+ <menu_item_check
+ label="Advanced"
+ name="AdvancedMode">
+ <on_check
+ function="CheckSessionSettings"
+ parameter="" />
+ <on_click
+ function="ChangeMode"
+ parameter="advanced"/>
+ </menu_item_check>
+ </toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml
index 8d0f1437e6..0bc1be666e 100644
--- a/indra/newview/skins/default/xui/en/panel_login.xml
+++ b/indra/newview/skins/default/xui/en/panel_login.xml
@@ -117,33 +117,16 @@ label="Remember password"
name="connect_btn"
top="35"
width="90" />
- <text
- follows="left|bottom"
- font="SansSerifSmall"
- height="15"
- left_pad="10"
- name="mode_selection_text"
- top="20"
- width="130">
- Mode:
- </text>
-<combo_box
- follows="left|bottom"
+ <menu_button
+ left_pad="5"
+ top="35"
+ width="80"
height="23"
- max_chars="128"
+ label="Mode ▲"
+ name="mode_menu"
tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
- top_pad="0"
- name="mode_combo"
- width="110">
-<combo_box.item
- label="Basic"
- name="Basic"
- value="settings_minimal.xml" />
-<combo_box.item
- label="Advanced"
- name="Advanced"
- value="" />
-</combo_box>
+ menu_filename="menu_mode_change.xml"
+ />
<text
follows="left|bottom"
font="SansSerifSmall"
diff --git a/indra/newview/skins/default/xui/en/panel_status_bar.xml b/indra/newview/skins/default/xui/en/panel_status_bar.xml
index d756dfb7de..f51279adb4 100644
--- a/indra/newview/skins/default/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/default/xui/en/panel_status_bar.xml
@@ -77,6 +77,18 @@
top="0"
width="55" />
</panel>
+ <menu_button
+ follows="right|top"
+ image_color="0 0 0 0"
+ hover_glow_amount="0"
+ left_pad="2"
+ top="0"
+ width="55"
+ height="18"
+ label="Mode ▼"
+ tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
+ menu_filename="menu_mode_change.xml"
+ />
<text
type="string"
font="SansSerifSmall"
@@ -89,7 +101,7 @@
left_pad="0"
name="TimeText"
tool_tip="Current time (Pacific)"
- width="145">
+ width="70">
24:00 AM PST
</text>
<button
diff --git a/indra/newview/skins/minimal/xui/en/main_view.xml b/indra/newview/skins/minimal/xui/en/main_view.xml
index 6e8ad9adaf..ec2683880a 100644
--- a/indra/newview/skins/minimal/xui/en/main_view.xml
+++ b/indra/newview/skins/minimal/xui/en/main_view.xml
@@ -187,9 +187,9 @@
name="status_bar_container"
tab_stop="false"
height="30"
- left="-70"
+ left="-120"
top="0"
- width="70"
+ width="120"
visible="false"/>
<panel follows="top|bottom"
height="500"
diff --git a/indra/newview/skins/minimal/xui/en/panel_login.xml b/indra/newview/skins/minimal/xui/en/panel_login.xml
index 3903658e71..d89a0c6be1 100644
--- a/indra/newview/skins/minimal/xui/en/panel_login.xml
+++ b/indra/newview/skins/minimal/xui/en/panel_login.xml
@@ -118,33 +118,16 @@ label="Remember password"
name="connect_btn"
top="35"
width="90" />
- <text
- follows="left|bottom"
- font="SansSerifSmall"
- height="15"
- left_pad="10"
- name="mode_selection_text"
-top="20"
- width="130">
- Mode:
- </text>
-<combo_box
- follows="left|bottom"
- height="23"
- max_chars="128"
- top_pad="0"
- tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
- name="mode_combo"
- width="120">
-<combo_box.item
- label="Basic"
- name="Basic"
- value="settings_minimal.xml" />
-<combo_box.item
- label="Advanced"
- name="Advanced"
- value="" />
-</combo_box>
+ <menu_button
+left_pad="10"
+top="35"
+width="80"
+height="23"
+label="Mode ▲"
+name="mode_menu"
+tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
+menu_filename="menu_mode_change.xml"
+ />
</layout_panel>
<layout_panel
tab_stop="false"
diff --git a/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml b/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml
index 6dc1a1c9b0..e50911b8d2 100644
--- a/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml
+++ b/indra/newview/skins/minimal/xui/en/panel_navigation_bar.xml
@@ -63,7 +63,7 @@ width="31" />
mouse_opaque="false"
name="location_combo"
top_delta="0"
- width="440">
+ width="390">
</location_input>
<icon follows="right"
height="20"
diff --git a/indra/newview/skins/minimal/xui/en/panel_status_bar.xml b/indra/newview/skins/minimal/xui/en/panel_status_bar.xml
index 6ccd0e938d..c816d97eee 100644
--- a/indra/newview/skins/minimal/xui/en/panel_status_bar.xml
+++ b/indra/newview/skins/minimal/xui/en/panel_status_bar.xml
@@ -12,7 +12,7 @@
name="status"
top="19"
tab_stop="false"
- width="70">
+ width="120">
<panel.string
name="packet_loss_tooltip">
Packet Loss
@@ -33,6 +33,18 @@
name="buycurrencylabel">
L$ [AMT]
</panel.string>
+ <menu_button
+ follows="right|top"
+ image_color="0 0 0 0"
+ hover_glow_amount="0"
+ left="2"
+ top="7"
+ width="50"
+ height="18"
+ label="Mode ▼"
+ tool_tip="Select your mode. Choose Basic for fast, easy exploration and chat. Choose Advanced to access more features."
+ menu_filename="menu_mode_change.xml"
+ />
<button
follows="right|top"
height="16"
@@ -41,7 +53,7 @@
image_pressed="Pause_Press"
image_pressed_selected="Play_Press"
is_toggle="true"
- left="15"
+ left="65"
top="7"
name="media_toggle_btn"
tool_tip="Start/Stop All Media (Music, Video, Web pages)"