diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-17 18:58:39 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-17 18:58:39 +0000 |
commit | c17152c21eff9a165c92c8bf07678c4bca1c8a99 (patch) | |
tree | 6a4b2180de18e0dc7a5a18a1bda7b37242c4a5f8 | |
parent | 8331c1a83776abcfeeec4629d9dfbdd2c689d14f (diff) | |
parent | d59038e53587b97d2fc98115d28f8b83da5f5d1b (diff) |
PE merge.
-rw-r--r-- | indra/llui/llurlentry.cpp | 58 | ||||
-rw-r--r-- | indra/llui/llurlentry.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterinventory.cpp | 36 | ||||
-rw-r--r-- | indra/newview/llfloaterinventory.h | 4 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 31 | ||||
-rw-r--r-- | indra/newview/llpanelmaininventory.h | 3 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/de/panel_profile.xml | 6 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_inventory.xml | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/panel_main_inventory.xml | 63 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 14 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/fr/panel_profile.xml | 4 |
11 files changed, 153 insertions, 83 deletions
diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index 35428e4227..e8e3459673 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -310,7 +310,6 @@ LLUrlEntryAgent::LLUrlEntryAgent() boost::regex::perl|boost::regex::icase); mMenuName = "menu_url_agent.xml"; mIcon = "Generic_Person"; - mTooltip = LLTrans::getString("TooltipAgentUrl"); mColor = LLUIColorTable::instance().getColor("AgentLinkColor"); } @@ -323,6 +322,38 @@ void LLUrlEntryAgent::onAgentNameReceived(const LLUUID& id, callObservers(id.asString(), first + " " + last); } +std::string LLUrlEntryAgent::getTooltip(const std::string &string) const +{ + // return a tooltip corresponding to the URL type instead of the generic one + std::string url = getUrl(string); + + if (LLStringUtil::endsWith(url, "/mute")) + { + return LLTrans::getString("TooltipAgentMute"); + } + if (LLStringUtil::endsWith(url, "/unmute")) + { + return LLTrans::getString("TooltipAgentUnmute"); + } + if (LLStringUtil::endsWith(url, "/im")) + { + return LLTrans::getString("TooltipAgentIM"); + } + if (LLStringUtil::endsWith(url, "/pay")) + { + return LLTrans::getString("TooltipAgentPay"); + } + if (LLStringUtil::endsWith(url, "/offerteleport")) + { + return LLTrans::getString("TooltipAgentOfferTeleport"); + } + if (LLStringUtil::endsWith(url, "/requestfriend")) + { + return LLTrans::getString("TooltipAgentRequestFriend"); + } + return LLTrans::getString("TooltipAgentUrl"); +} + std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCallback &cb) { if (!gCacheName) @@ -346,6 +377,31 @@ std::string LLUrlEntryAgent::getLabel(const std::string &url, const LLUrlLabelCa } else if (gCacheName->getFullName(agent_id, full_name)) { + // customize label string based on agent SLapp suffix + if (LLStringUtil::endsWith(url, "/mute")) + { + return LLTrans::getString("SLappAgentMute") + " " + full_name; + } + if (LLStringUtil::endsWith(url, "/unmute")) + { + return LLTrans::getString("SLappAgentUnmute") + " " + full_name; + } + if (LLStringUtil::endsWith(url, "/im")) + { + return LLTrans::getString("SLappAgentIM") + " " + full_name; + } + if (LLStringUtil::endsWith(url, "/pay")) + { + return LLTrans::getString("SLappAgentPay") + " " + full_name; + } + if (LLStringUtil::endsWith(url, "/offerteleport")) + { + return LLTrans::getString("SLappAgentOfferTeleport") + " " + full_name; + } + if (LLStringUtil::endsWith(url, "/requestfriend")) + { + return LLTrans::getString("SLappAgentRequestFriend") + " " + full_name; + } return full_name; } else diff --git a/indra/llui/llurlentry.h b/indra/llui/llurlentry.h index c947ef7259..84d0968779 100644 --- a/indra/llui/llurlentry.h +++ b/indra/llui/llurlentry.h @@ -169,6 +169,7 @@ class LLUrlEntryAgent : public LLUrlEntryBase public: LLUrlEntryAgent(); /*virtual*/ std::string getLabel(const std::string &url, const LLUrlLabelCallback &cb); + /*virtual*/ std::string getTooltip(const std::string &string) const; private: void onAgentNameReceived(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group); diff --git a/indra/newview/llfloaterinventory.cpp b/indra/newview/llfloaterinventory.cpp index 844f0ac509..6842d3dc74 100644 --- a/indra/newview/llfloaterinventory.cpp +++ b/indra/newview/llfloaterinventory.cpp @@ -64,42 +64,6 @@ BOOL LLFloaterInventory::postBuild() return TRUE; } - -void LLFloaterInventory::draw() -{ - updateTitle(); - LLFloater::draw(); -} - -void LLFloaterInventory::updateTitle() -{ - LLLocale locale(LLLocale::USER_LOCALE); - std::string item_count_string; - LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); - - LLStringUtil::format_map_t string_args; - string_args["[ITEM_COUNT]"] = item_count_string; - string_args["[FILTER]"] = mPanelMainInventory->getFilterText(); - - if (LLInventoryModel::backgroundFetchActive()) - { - setTitle(getString("TitleFetching", string_args)); - } - else if (LLInventoryModel::isEverythingFetched()) - { - setTitle(getString("TitleCompleted", string_args)); - } - else - { - setTitle(getString("Title")); - } -} - -void LLFloaterInventory::changed(U32 mask) -{ - updateTitle(); -} - LLInventoryPanel* LLFloaterInventory::getPanel() { if (mPanelMainInventory) diff --git a/indra/newview/llfloaterinventory.h b/indra/newview/llfloaterinventory.h index b661c391a7..473d2b189d 100644 --- a/indra/newview/llfloaterinventory.h +++ b/indra/newview/llfloaterinventory.h @@ -63,13 +63,9 @@ public: static void cleanup(); // Inherited functionality - /*virtual*/ void changed(U32 mask); - /*virtual*/ void draw(); /*virtual*/ void onOpen(const LLSD& key); LLInventoryPanel* getPanel(); -protected: - void updateTitle(); private: LLPanelMainInventory* mPanelMainInventory; }; diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 421c9df9a1..d40141c91d 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -44,6 +44,7 @@ #include "llfiltereditor.h" #include "llfloaterreg.h" #include "llpreviewtexture.h" +#include "llresmgr.h" #include "llscrollcontainer.h" #include "llsdserialize.h" #include "llspinctrl.h" @@ -538,7 +539,7 @@ BOOL LLPanelMainInventory::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, // virtual void LLPanelMainInventory::changed(U32) { - // empty, but must have this defined for abstract base class. + updateItemcountText(); } @@ -550,6 +551,34 @@ void LLPanelMainInventory::draw() mFilterEditor->setText(mFilterSubString); } LLPanel::draw(); + updateItemcountText(); +} + +void LLPanelMainInventory::updateItemcountText() +{ + LLLocale locale(LLLocale::USER_LOCALE); + std::string item_count_string; + LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); + + LLStringUtil::format_map_t string_args; + string_args["[ITEM_COUNT]"] = item_count_string; + string_args["[FILTER]"] = getFilterText(); + + std::string text = ""; + + if (LLInventoryModel::backgroundFetchActive()) + { + text = getString("ItemcountFetching", string_args); + } + else if (LLInventoryModel::isEverythingFetched()) + { + text = getString("ItemcountCompleted", string_args); + } + else + { + text = getString("ItemcountUnknown"); + } + childSetText("ItemcountText",text); } void LLPanelMainInventory::setFilterTextFromFilter() diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index d9ea0da2da..b43e057f83 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -113,7 +113,8 @@ protected: void setSortBy(const LLSD& userdata); void saveTexture(const LLSD& userdata); bool isSaveTextureEnabled(const LLSD& userdata); - + void updateItemcountText(); + private: LLFloaterInventoryFinder* getFinder(); diff --git a/indra/newview/skins/default/xui/de/panel_profile.xml b/indra/newview/skins/default/xui/de/panel_profile.xml index cb598f89f6..cda2788e40 100644 --- a/indra/newview/skins/default/xui/de/panel_profile.xml +++ b/indra/newview/skins/default/xui/de/panel_profile.xml @@ -41,10 +41,10 @@ </scroll_container> </layout_panel> <layout_panel name="profile_buttons_panel"> - <button label="Freund hinzufügen" name="add_friend" tool_tip="Bieten Sie dem Einwohner die Freundschaft an" width="109"/> - <button label="IM" name="im" tool_tip="Instant Messenger öffnen" width="24"/> + <button label="Freund hinzufügen" name="add_friend" tool_tip="Bieten Sie dem Einwohner die Freundschaft an"/> + <button label="IM" name="im" tool_tip="Instant Messenger öffnen"/> <button label="Anrufen" name="call" tool_tip="Diesen Einwohner anrufen"/> - <button label="Karte" name="show_on_map_btn" tool_tip="Einwohner auf Karte anzeigen" width="36"/> + <button label="Karte" name="show_on_map_btn" tool_tip="Einwohner auf Karte anzeigen"/> <button label="Teleportieren" name="teleport" tool_tip="Teleport anbieten"/> <button label="▼" name="overflow_btn" tool_tip="Dem Einwohner Geld geben oder Inventar an den Einwohner schicken"/> </layout_panel> diff --git a/indra/newview/skins/default/xui/en/floater_inventory.xml b/indra/newview/skins/default/xui/en/floater_inventory.xml index 0d381fe5cb..ba2e0d3277 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory.xml @@ -14,22 +14,6 @@ single_instance="false" title="MY INVENTORY" width="467"> - <floater.string - name="Title"> - MY INVENTORY - </floater.string> - <floater.string - name="TitleFetching"> - MY INVENTORY (Fetching [ITEM_COUNT] Items...) [FILTER] - </floater.string> - <floater.string - name="TitleCompleted"> - MY INVENTORY ([ITEM_COUNT] Items) [FILTER] - </floater.string> - <floater.string - name="Fetched"> - Fetched - </floater.string> <panel bottom="560" class="panel_main_inventory" diff --git a/indra/newview/skins/default/xui/en/panel_main_inventory.xml b/indra/newview/skins/default/xui/en/panel_main_inventory.xml index 50983d2976..c7768c6eb6 100644 --- a/indra/newview/skins/default/xui/en/panel_main_inventory.xml +++ b/indra/newview/skins/default/xui/en/panel_main_inventory.xml @@ -10,9 +10,34 @@ name="main inventory panel" width="330"> <panel.string - name="Title"> - Things + name="Itemcount"> </panel.string> + <panel.string + name="ItemcountFetching"> + Fetching [ITEM_COUNT] Items... [FILTER] + </panel.string> + <panel.string + name="ItemcountCompleted"> + [ITEM_COUNT] Items [FILTER] + </panel.string> + <panel.string + name="ItemcountUnknown"> + + </panel.string> + <text + type="string" + length="1" + follows="left|top" + height="13" + layout="topleft" + left="12" + name="ItemcountText" + font="SansSerifMedium" + text_color="EmphasisColor" + top_pad="0" + width="300"> + Items: + </text> <menu_bar bg_visible="false" follows="left|top|right" @@ -21,8 +46,8 @@ left="10" mouse_opaque="false" name="Inventory Menu" - top="0" - visible="true" + top="+10" + visible="true" width="290"> <menu height="101" @@ -377,30 +402,30 @@ <filter_editor text_pad_left="10" follows="left|top|right" - height="23" + height="23" label="Filter Inventory" layout="topleft" left="10" -max_length="300" + max_length="300" name="inventory search editor" - top="26" + top="+31" width="303" /> <tab_container - bg_opaque_color="DkGray2" + bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" background_visible="true" background_opaque="true" -follows="all" -halign="center" - height="305" - layout="topleft" - left="6" - name="inventory filter tabs" - tab_height="30" - tab_position="top" - tab_min_width="100" - top_pad="10" - width="315"> + follows="all" + halign="center" + height="300" + layout="topleft" + left="6" + name="inventory filter tabs" + tab_height="30" + tab_position="top" + tab_min_width="100" + top_pad="10" + width="315"> <inventory_panel bg_opaque_color="DkGray2" bg_alpha_color="DkGray2" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index da39f13726..75eb1792ee 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -81,6 +81,12 @@ <string name="TooltipHttpUrl">Click to view this web page</string> <string name="TooltipSLURL">Click to view this location's information</string> <string name="TooltipAgentUrl">Click to view this Resident's profile</string> + <string name="TooltipAgentMute">Click to mute this Resident</string> + <string name="TooltipAgentUnmute">Click to unmute this Resident</string> + <string name="TooltipAgentIM">Click to IM this Resident</string> + <string name="TooltipAgentPay">Click to Pay this Resident</string> + <string name="TooltipAgentOfferTeleport">Click to offer a teleport request to this Resident</string> + <string name="TooltipAgentRequestFriend">Click to send a friend request to this Resident</string> <string name="TooltipGroupUrl">Click to view this group's description</string> <string name="TooltipEventUrl">Click to view this event's description</string> <string name="TooltipClassifiedUrl">Click to view this classified</string> @@ -97,6 +103,14 @@ <string name="SLurlLabelTeleport">Teleport to</string> <string name="SLurlLabelShowOnMap">Show Map for</string> + <!-- label strings for secondlife:///app/agent SLapps --> + <string name="SLappAgentMute">Mute</string> + <string name="SLappAgentUnmute">Unmute</string> + <string name="SLappAgentIM">IM</string> + <string name="SLappAgentPay">Pay</string> + <string name="SLappAgentOfferTeleport">Offer Teleport to </string> + <string name="SLappAgentRequestFriend">Friend Request </string> + <!-- ButtonToolTips, llfloater.cpp --> <string name="BUTTON_CLOSE_DARWIN">Close (⌘W)</string> <string name="BUTTON_CLOSE_WIN">Close (Ctrl+W)</string> diff --git a/indra/newview/skins/default/xui/fr/panel_profile.xml b/indra/newview/skins/default/xui/fr/panel_profile.xml index 8cb4641937..f801aee312 100644 --- a/indra/newview/skins/default/xui/fr/panel_profile.xml +++ b/indra/newview/skins/default/xui/fr/panel_profile.xml @@ -42,8 +42,8 @@ </layout_panel> <layout_panel name="profile_buttons_panel"> <button label="Devenir amis" name="add_friend" tool_tip="Proposer à un résident de devenir votre ami"/> - <button label="IM" name="im" tool_tip="Ouvrir une session IM" width="30"/> - <button label="Appeler" name="call" tool_tip="Appeler ce résident" width="60"/> + <button label="IM" name="im" tool_tip="Ouvrir une session IM"/> + <button label="Appeler" name="call" tool_tip="Appeler ce résident"/> <button label="Carte" name="show_on_map_btn" tool_tip="Afficher le résident sur la carte"/> <button label="Téléporter" name="teleport" tool_tip="Proposez une téléportation"/> <button label="▼" name="overflow_btn" tool_tip="Payer ou partager l'inventaire avec le résident"/> |