summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-01-28 12:05:01 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-01-28 12:05:01 +0200
commit20d70dca947eb4ce9f9d059df5a26811fb61dbbe (patch)
treec4ed5ca7ddd0d54da0161d5d2ba73db1e1f87b04 /indra
parent8f7064a8711d55188bdbb032ba9ee84dbd189f76 (diff)
MAINT-4824 FIXED Show remaining time before resident's name
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloaterland.cpp28
-rwxr-xr-xindra/newview/llnamelistctrl.cpp9
-rwxr-xr-xindra/newview/llnamelistctrl.h5
-rwxr-xr-xindra/newview/skins/default/xui/en/floater_about_land.xml6
4 files changed, 25 insertions, 23 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 4165c7addc..3655f1ed3d 100755
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -2410,33 +2410,33 @@ void LLPanelLandAccess::refresh()
cit != parcel->mAccessList.end(); ++cit)
{
const LLAccessEntry& entry = (*cit).second;
- std::string suffix;
+ std::string prefix;
if (entry.mTime != 0)
{
LLStringUtil::format_map_t args;
S32 now = time(NULL);
S32 seconds = entry.mTime - now;
if (seconds < 0) seconds = 0;
- suffix.assign(" (");
+ prefix.assign(" (");
if (seconds >= 120)
{
args["[MINUTES]"] = llformat("%d", (seconds/60));
std::string buf = parent_floater->getString ("Minutes", args);
- suffix.append(buf);
+ prefix.append(buf);
}
else if (seconds >= 60)
{
- suffix.append("1 " + parent_floater->getString("Minute"));
+ prefix.append("1 " + parent_floater->getString("Minute"));
}
else
{
args["[SECONDS]"] = llformat("%d", seconds);
std::string buf = parent_floater->getString ("Seconds", args);
- suffix.append(buf);
+ prefix.append(buf);
}
- suffix.append(" " + parent_floater->getString("Remaining") + ")");
+ prefix.append(" " + parent_floater->getString("Remaining") + ") ");
}
- mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
+ mListAccess->addNameItem(entry.mID, ADD_DEFAULT, TRUE, "", prefix);
}
mListAccess->sortByName(TRUE);
}
@@ -2456,33 +2456,33 @@ void LLPanelLandAccess::refresh()
cit != parcel->mBanList.end(); ++cit)
{
const LLAccessEntry& entry = (*cit).second;
- std::string suffix;
+ std::string prefix;
if (entry.mTime != 0)
{
LLStringUtil::format_map_t args;
S32 now = time(NULL);
S32 seconds = entry.mTime - now;
if (seconds < 0) seconds = 0;
- suffix.assign(" (");
+ prefix.assign(" (");
if (seconds >= 120)
{
args["[MINUTES]"] = llformat("%d", (seconds/60));
std::string buf = parent_floater->getString ("Minutes", args);
- suffix.append(buf);
+ prefix.append(buf);
}
else if (seconds >= 60)
{
- suffix.append("1 " + parent_floater->getString("Minute"));
+ prefix.append("1 " + parent_floater->getString("Minute"));
}
else
{
args["[SECONDS]"] = llformat("%d", seconds);
std::string buf = parent_floater->getString ("Seconds", args);
- suffix.append(buf);
+ prefix.append(buf);
}
- suffix.append(" " + parent_floater->getString("Remaining") + ")");
+ prefix.append(" " + parent_floater->getString("Remaining") + ") ");
}
- mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, suffix);
+ mListBanned->addNameItem(entry.mID, ADD_DEFAULT, TRUE, "", prefix);
}
mListBanned->sortByName(TRUE);
}
diff --git a/indra/newview/llnamelistctrl.cpp b/indra/newview/llnamelistctrl.cpp
index 54e4c6c1da..79988a0800 100755
--- a/indra/newview/llnamelistctrl.cpp
+++ b/indra/newview/llnamelistctrl.cpp
@@ -70,7 +70,7 @@ LLNameListCtrl::LLNameListCtrl(const LLNameListCtrl::Params& p)
// public
LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPosition pos,
- BOOL enabled, const std::string& suffix)
+ BOOL enabled, const std::string& suffix, const std::string& prefix)
{
//LL_INFOS() << "LLNameListCtrl::addNameItem " << agent_id << LL_ENDL;
@@ -79,7 +79,7 @@ LLScrollListItem* LLNameListCtrl::addNameItem(const LLUUID& agent_id, EAddPositi
item.enabled = enabled;
item.target = INDIVIDUAL;
- return addNameItemRow(item, pos, suffix);
+ return addNameItemRow(item, pos, suffix, prefix);
}
// virtual, public
@@ -291,7 +291,8 @@ LLScrollListItem* LLNameListCtrl::addElement(const LLSD& element, EAddPosition p
LLScrollListItem* LLNameListCtrl::addNameItemRow(
const LLNameListCtrl::NameItem& name_item,
EAddPosition pos,
- const std::string& suffix)
+ const std::string& suffix,
+ const std::string& prefix)
{
LLUUID id = name_item.value().asUUID();
LLNameListItem* item = new LLNameListItem(name_item,name_item.target() == GROUP);
@@ -365,7 +366,7 @@ LLScrollListItem* LLNameListCtrl::addNameItemRow(
LLScrollListCell* cell = item->getColumn(mNameColumnIndex);
if (cell)
{
- cell->setValue(fullname);
+ cell->setValue(prefix + fullname);
}
dirtyColumns();
diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h
index 2c40eeaaca..515962df7d 100755
--- a/indra/newview/llnamelistctrl.h
+++ b/indra/newview/llnamelistctrl.h
@@ -129,11 +129,12 @@ public:
// Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary.
LLScrollListItem* addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM,
- BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null);
+ BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null, const std::string& prefix = LLStringUtil::null);
LLScrollListItem* addNameItem(NameItem& item, EAddPosition pos = ADD_BOTTOM);
/*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL);
- LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null);
+ LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null,
+ const std::string& prefix = LLStringUtil::null);
// Add a user to the list by name. It will be added, the name
// requested from the cache, and updated as necessary.
diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml
index a660e812cc..d72937ac63 100755
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -23,15 +23,15 @@
</floater.string>
<floater.string
name="Minutes">
- [MINUTES] minutes
+ [MINUTES] min.
</floater.string>
<floater.string
name="Minute">
- minute
+ min.
</floater.string>
<floater.string
name="Seconds">
- [SECONDS] seconds
+ [SECONDS] sec.
</floater.string>
<floater.string
name="Remaining">