From 4fb7fd9fffde08ffad4b2fe8f5ead5e500d76419 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 2 Dec 2009 17:45:42 -0500 Subject: For EXT-3030: Gestures in outfits do not deactivate when another outfit is worn --HG-- branch : avatar-pipeline --- indra/newview/llappearancemgr.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c7f05d99f7..d91b9d7ea4 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -512,6 +512,21 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append) { const LLUUID cof = getCOF(); + // Deactivate currently active gestures in the COF, if replacing outfit + if (!append) + { + LLInventoryModel::item_array_t gest_items; + getDescendentsOfAssetType(cof, gest_items, LLAssetType::AT_GESTURE, false); + for(S32 i = 0; i < gest_items.count(); ++i) + { + LLViewerInventoryItem *gest_item = gest_items.get(i); + if ( LLGestureManager::instance().isGestureActive( gest_item->getLinkedUUID()) ) + { + LLGestureManager::instance().deactivateGesture( gest_item->getLinkedUUID() ); + } + } + } + // Collect and filter descendents to determine new COF contents. // - Body parts: always include COF contents as a fallback in case any -- cgit v1.2.3 From eeb1970f79d34de3c8d531ae7d7da52d30246c36 Mon Sep 17 00:00:00 2001 From: Paul Guslisty Date: Thu, 3 Dec 2009 11:57:58 +0200 Subject: fixed normal bug EXT-3038 (Verb buttons in avatar profile panel don't have tool-tips) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_my_profile.xml | 2 ++ indra/newview/skins/default/xui/en/panel_picks.xml | 3 +++ 2 files changed, 5 insertions(+) diff --git a/indra/newview/skins/default/xui/en/panel_my_profile.xml b/indra/newview/skins/default/xui/en/panel_my_profile.xml index fe3e010cf9..3c87331199 100644 --- a/indra/newview/skins/default/xui/en/panel_my_profile.xml +++ b/indra/newview/skins/default/xui/en/panel_my_profile.xml @@ -416,6 +416,7 @@ left="10" label="Edit Profile" name="edit_profile_btn" + tool_tip="Edit your personal information" width="130" /> Date: Fri, 4 Dec 2009 14:00:52 +0200 Subject: Work on normal task EXT-3081 (Separate Message Well on Notifications Well and IM Well) -- removed member pointer to Notification Well Icon from the LLBottomTray -- placed Well counter over the Icon, made center-aligned --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 9 ++++++--- indra/newview/llbottomtray.h | 2 -- indra/newview/llsyswellwindow.cpp | 4 +++- indra/newview/skins/default/xui/en/panel_bottomtray.xml | 16 ++++++++-------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index d80aa66257..8c793873f4 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -54,21 +54,24 @@ template class LLBottomTray* LLSingleton::getInstance(); LLBottomTray::LLBottomTray(const LLSD&) : mChicletPanel(NULL), - mNotificationWell(NULL), mSpeakPanel(NULL), mSpeakBtn(NULL), mNearbyChatBar(NULL), mToolbarStack(NULL) , mMovementButton(NULL) , mResizeState(RS_NORESIZE) -// Add more members +, mBottomTrayContextMenu(NULL) +, mMovementPanel(NULL) +, mCamPanel(NULL) +, mSnapshotPanel(NULL) +, mGesturePanel(NULL) +, mCamButton(NULL) { mFactoryMap["chat_bar"] = LLCallbackMap(LLBottomTray::createNearbyChatBar, NULL); LLUICtrlFactory::getInstance()->buildPanel(this,"panel_bottomtray.xml"); mChicletPanel = getChild("chiclet_list"); - mNotificationWell = getChild("notification_well"); mChicletPanel->setChicletClickedCallback(boost::bind(&LLBottomTray::onChicletClick,this,_1)); diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index a86f7846e3..fa204ee9ea 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -66,7 +66,6 @@ public: BOOL postBuild(); LLChicletPanel* getChicletPanel() {return mChicletPanel;} - LLNotificationChiclet* getSysWell() {return mNotificationWell;} LLNearbyChatBar* getNearbyChatBar() {return mNearbyChatBar;} void onCommitGesture(LLUICtrl* ctrl); @@ -189,7 +188,6 @@ protected: LLIMChiclet* createIMChiclet(const LLUUID& session_id); LLChicletPanel* mChicletPanel; - LLNotificationChiclet* mNotificationWell; LLPanel* mSpeakPanel; LLSpeakButton* mSpeakBtn; LLNearbyChatBar* mNearbyChatBar; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 6b7c4049f4..a64c200b92 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -46,6 +46,8 @@ #include "llnotificationmanager.h" +static std::string NOTIFICATION_WELL_ANCHOR_NAME = "notification_well_panel"; + //--------------------------------------------------------------------------------- LLSysWellWindow::LLSysWellWindow(const LLSD& key) : LLDockableFloater(NULL, key), mChannel(NULL), @@ -251,7 +253,7 @@ void LLSysWellWindow::setVisible(BOOL visible) if (NULL == getDockControl() && getDockTongue().notNull()) { setDockControl(new LLDockControl( - LLBottomTray::getInstance()->getSysWell(), this, + LLBottomTray::getInstance()->getChild(NOTIFICATION_WELL_ANCHOR_NAME), this, getDockTongue(), LLDockControl::TOP, boost::bind(&LLSysWellWindow::getAllowedRect, this, _1))); } diff --git a/indra/newview/skins/default/xui/en/panel_bottomtray.xml b/indra/newview/skins/default/xui/en/panel_bottomtray.xml index 621dbdec61..2796b4a1f7 100644 --- a/indra/newview/skins/default/xui/en/panel_bottomtray.xml +++ b/indra/newview/skins/default/xui/en/panel_bottomtray.xml @@ -320,8 +320,8 @@ as for parent layout_panel (chiclet_list_panel) to resize bottom tray properly. min_height="28" top="0" name="notification_well_panel" - width="54" - min_width="54" + width="34" + min_width="34" user_resize="false"> + width="34"> + + - Date: Fri, 4 Dec 2009 18:33:13 +0200 Subject: =?UTF-8?q?implemented=20EXT-700=20=E2=80=9C"Offer"=20notification?= =?UTF-8?q?s=20should=20be=20accessible=20via=20chiclet=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationhandler.h | 5 +++++ indra/newview/llnotificationhandlerutil.cpp | 13 ++++++++++++- indra/newview/llnotificationofferhandler.cpp | 21 +++++++++++++++++++++ indra/newview/llviewermessage.cpp | 8 ++++++-- .../newview/skins/default/xui/en/notifications.xml | 4 ++-- 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/indra/newview/llnotificationhandler.h b/indra/newview/llnotificationhandler.h index da8928321a..5c240aa54a 100644 --- a/indra/newview/llnotificationhandler.h +++ b/indra/newview/llnotificationhandler.h @@ -265,6 +265,11 @@ public: */ static bool canLogToIM(const LLNotificationPtr& notification); + /** + * Checks sufficient conditions to spawn IM session. + */ + static bool canSpawnIMSession(const LLNotificationPtr& notification); + /** * Writes notification message to IM session. */ diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 857b7e9796..0fbc6575e8 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -43,7 +43,10 @@ using namespace LLNotificationsUI; const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( "ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER( - "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived"); + "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived"), + ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), + USER_GIVE_ITEM("UserGiveItem"), OFFER_FRIENDSHIP("OfferFriendship"), + FRIENDSHIP_ACCEPTED("FriendshipAccepted"); // static bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) @@ -53,6 +56,14 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) || PAYMENT_RECIVED == notification->getName(); } +// static +bool LLHandlerUtil::canSpawnIMSession(const LLNotificationPtr& notification) +{ + return ADD_FRIEND_WITH_MESSAGE == notification->getName() + || OFFER_FRIENDSHIP == notification->getName() + || FRIENDSHIP_ACCEPTED == notification->getName(); +} + // static void LLHandlerUtil::logToIM(const EInstantMessage& session_type, const std::string& session_name, const std::string& from_name, diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 4f353bf6a5..b7f95ae2fa 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -40,6 +40,7 @@ #include "llnotificationmanager.h" #include "llnotifications.h" #include "llscriptfloater.h" +#include "llimview.h" using namespace LLNotificationsUI; @@ -101,6 +102,26 @@ bool LLOfferHandler::processNotification(const LLSD& notify) } else { + if (LLHandlerUtil::canSpawnIMSession(notification)) + { + const std::string name = notification->getSubstitutions().has( + "NAME") ? notification->getSubstitutions()["NAME"] + : notification->getSubstitutions()["[NAME]"]; + + LLUUID from_id = notification->getPayload()["from_id"]; + + LLUUID session_id = LLIMMgr::computeSessionID( + IM_NOTHING_SPECIAL, from_id); + + LLIMModel::LLIMSession* session = + LLIMModel::instance().findIMSession(session_id); + if (session == NULL) + { + LLIMMgr::instance().addSession(name, IM_NOTHING_SPECIAL, + from_id); + } + } + LLToastNotifyPanel* notify_box = new LLToastNotifyPanel(notification); LLToast::Params p; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 76cc9bf335..c44cebe877 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2074,13 +2074,17 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) case IM_INVENTORY_ACCEPTED: { args["NAME"] = name; - LLNotificationsUtil::add("InventoryAccepted", args); + LLSD payload; + payload["from_id"] = from_id; + LLNotificationsUtil::add("InventoryAccepted", args, payload); break; } case IM_INVENTORY_DECLINED: { args["NAME"] = name; - LLNotificationsUtil::add("InventoryDeclined", args); + LLSD payload; + payload["from_id"] = from_id; + LLNotificationsUtil::add("InventoryDeclined", args, payload); break; } // TODO: _DEPRECATED suffix as part of vote removal - DEV-24856 diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index f48cc6d4bf..0d7351395a 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4499,14 +4499,14 @@ You don't have permission to copy this. + type="offer"> [NAME] received your inventory offer. + type="offer"> [NAME] declined your inventory offer. -- cgit v1.2.3 From 6d8fd3114349b9efa14d39fab5c77b886b6eda1b Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Fri, 4 Dec 2009 18:09:29 +0200 Subject: Implemented normal priority task EXT-2311 (Filter in side panels should highlight results). Added missing highlighting to people/group lists and teleport history. Btw, the "none" group list entry now gets hidden when user types a filter. --HG-- branch : product-engine --- indra/newview/CMakeLists.txt | 2 ++ indra/newview/llavatarlist.cpp | 11 ++++++++++- indra/newview/llavatarlistitem.cpp | 29 ++++++++++++++++++----------- indra/newview/llavatarlistitem.h | 5 +++++ indra/newview/llgrouplist.cpp | 26 +++++++++++++------------- indra/newview/llgrouplist.h | 6 ++++-- indra/newview/llpanelteleporthistory.cpp | 18 +++++++++++------- 7 files changed, 63 insertions(+), 34 deletions(-) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index dd3fc10fa2..61aecdbfb6 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -410,6 +410,7 @@ set(viewer_SOURCE_FILES lltexturestats.cpp lltexturestatsuploader.cpp lltextureview.cpp + lltextutil.cpp lltoast.cpp lltoastalertpanel.cpp lltoastgroupnotifypanel.cpp @@ -911,6 +912,7 @@ set(viewer_HEADER_FILES lltexturestats.h lltexturestatsuploader.h lltextureview.h + lltextutil.h lltoast.h lltoastalertpanel.h lltoastgroupnotifypanel.h diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp index 202fbdebd4..3bd4f898c8 100644 --- a/indra/newview/llavatarlist.cpp +++ b/indra/newview/llavatarlist.cpp @@ -262,9 +262,18 @@ void LLAvatarList::refresh() bool dirty = add_limit_exceeded || (have_filter && !have_names); setDirty(dirty); - // Refreshed all items, lets send refresh_complete signal. + // Refreshed all items. if(!dirty) { + // Highlight items matching the filter. + std::vector items; + getItems(items); + for( std::vector::const_iterator it = items.begin(); it != items.end(); it++) + { + static_cast(*it)->setHighlight(mNameFilter); + } + + // Send refresh_complete signal. std::vector cur_values; getValues(cur_values); mRefreshCompleteSignal(this, LLSD((S32)cur_values.size())); diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 59ed391c06..072eebdf2d 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -40,6 +40,7 @@ #include "llagent.h" #include "lloutputmonitorctrl.h" #include "llavatariconctrl.h" +#include "lltextutil.h" #include "llbutton.h" LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/) @@ -155,13 +156,8 @@ void LLAvatarListItem::setOnline(bool online) mOnlineStatus = (EOnlineStatus) online; // Change avatar name font style depending on the new online status. - LLStyle::Params style_params; - style_params.color = online ? LLColor4::white : LLColor4::grey; - - // Rebuild the text to change its style. - std::string text = mAvatarName->getText(); - mAvatarName->setText(LLStringUtil::null); - mAvatarName->appendText(text, false, style_params); + mAvatarNameStyle.color = online ? LLColor4::white : LLColor4::grey; + setNameInternal(mAvatarName->getText(), mHighlihtSubstring); // Make the icon fade if the avatar goes offline. mAvatarIcon->setColor(online ? LLColor4::white : LLColor4::smoke); @@ -169,8 +165,12 @@ void LLAvatarListItem::setOnline(bool online) void LLAvatarListItem::setName(const std::string& name) { - mAvatarName->setValue(name); - mAvatarName->setToolTip(name); + setNameInternal(name, mHighlihtSubstring); +} + +void LLAvatarListItem::setHighlight(const std::string& highlight) +{ + setNameInternal(mAvatarName->getText(), mHighlihtSubstring = highlight); } void LLAvatarListItem::setAvatarId(const LLUUID& id, bool ignore_status_changes) @@ -310,11 +310,18 @@ const std::string LLAvatarListItem::getAvatarName() const return mAvatarName->getValue(); } +//== PRIVATE SECITON ========================================================== + +void LLAvatarListItem::setNameInternal(const std::string& name, const std::string& highlight) +{ + LLTextUtil::textboxSetHighlightedVal(mAvatarName, mAvatarNameStyle, name, highlight); + mAvatarName->setToolTip(name); +} + void LLAvatarListItem::onNameCache(const std::string& first_name, const std::string& last_name) { std::string name = first_name + " " + last_name; - mAvatarName->setValue(name); - mAvatarName->setToolTip(name); + setName(name); } void LLAvatarListItem::reshapeAvatarName() diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index a7b080098d..cb015a5461 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -37,6 +37,7 @@ #include "lloutputmonitorctrl.h" #include "llbutton.h" #include "lltextbox.h" +#include "llstyle.h" #include "llcallingcard.h" // for LLFriendObserver @@ -71,6 +72,7 @@ public: void setOnline(bool online); void setName(const std::string& name); + void setHighlight(const std::string& highlight); // XXX ugly name void setAvatarId(const LLUUID& id, bool ignore_status_changes = false); void setLastInteractionTime(U32 secs_since); //Show/hide profile/info btn, translating speaker indicator and avatar name coordinates accordingly @@ -112,6 +114,7 @@ private: E_UNKNOWN, } EOnlineStatus; + void setNameInternal(const std::string& name, const std::string& highlight); void onNameCache(const std::string& first_name, const std::string& last_name); std::string formatSeconds(U32 secs); @@ -119,12 +122,14 @@ private: LLAvatarIconCtrl* mAvatarIcon; LLTextBox* mAvatarName; LLTextBox* mLastInteractionTime; + LLStyle::Params mAvatarNameStyle; LLButton* mInfoBtn; LLButton* mProfileBtn; ContextMenu* mContextMenu; LLUUID mAvatarId; + std::string mHighlihtSubstring; // substring to highlight EOnlineStatus mOnlineStatus; //Flag indicating that info/profile button shouldn't be shown at all. //Speaker indicator and avatar name coords are translated accordingly diff --git a/indra/newview/llgrouplist.cpp b/indra/newview/llgrouplist.cpp index 97cf139f1d..80b706a215 100644 --- a/indra/newview/llgrouplist.cpp +++ b/indra/newview/llgrouplist.cpp @@ -44,6 +44,7 @@ #include "llagent.h" #include "llgroupactions.h" #include "llfloaterreg.h" +#include "lltextutil.h" #include "llviewercontrol.h" // for gSavedSettings static LLDefaultChildRegistry::Register r("group_list"); @@ -133,17 +134,17 @@ void LLGroupList::refresh() const LLGroupData& group_data = gAgent.mGroups.get(i); if (have_filter && !findInsensitive(group_data.mName, mNameFilter)) continue; - addNewItem(id, group_data.mName, group_data.mInsigniaID, highlight_id == id, ADD_BOTTOM); + addNewItem(id, group_data.mName, group_data.mInsigniaID, ADD_BOTTOM); } // Sort the list. sort(); - // add "none" to list at top + // Add "none" to list at top if filter not set (what's the point of filtering "none"?). + if (!have_filter) { std::string loc_none = LLTrans::getString("GroupsNone"); - if (have_filter || findInsensitive(loc_none, mNameFilter)) - addNewItem(LLUUID::null, loc_none, LLUUID::null, highlight_id.isNull(), ADD_TOP); + addNewItem(LLUUID::null, loc_none, LLUUID::null, ADD_TOP); } selectItemByUUID(highlight_id); @@ -171,12 +172,12 @@ void LLGroupList::toggleIcons() // PRIVATE Section ////////////////////////////////////////////////////////////////////////// -void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, BOOL is_bold, EAddPosition pos) +void LLGroupList::addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, EAddPosition pos) { LLGroupListItem* item = new LLGroupListItem(); - item->setName(name); item->setGroupID(id); + item->setName(name, mNameFilter); item->setGroupIconID(icon_id); // item->setContextMenu(mContextMenu); @@ -267,10 +268,10 @@ void LLGroupListItem::onMouseLeave(S32 x, S32 y, MASK mask) LLPanel::onMouseLeave(x, y, mask); } -void LLGroupListItem::setName(const std::string& name) +void LLGroupListItem::setName(const std::string& name, const std::string& highlight) { mGroupName = name; - mGroupNameBox->setValue(name); + LLTextUtil::textboxSetHighlightedVal(mGroupNameBox, mGroupNameStyle, name, highlight); mGroupNameBox->setToolTip(name); } @@ -308,6 +309,8 @@ void LLGroupListItem::setGroupIconVisible(bool visible) ////////////////////////////////////////////////////////////////////////// void LLGroupListItem::setActive(bool active) { + // *BUG: setName() overrides the style params. + // Active group should be bold. LLFontDescriptor new_desc(mGroupNameBox->getDefaultFont()->getFontDesc()); @@ -316,15 +319,12 @@ void LLGroupListItem::setActive(bool active) // is predefined as bold (SansSerifSmallBold, for example) new_desc.setStyle(active ? LLFontGL::BOLD : LLFontGL::NORMAL); LLFontGL* new_font = LLFontGL::getFont(new_desc); - LLStyle::Params style_params; - style_params.font = new_font; + mGroupNameStyle.font = new_font; // *NOTE: You cannot set the style on a text box anymore, you must // rebuild the text. This will cause problems if the text contains // hyperlinks, as their styles will be wrong. - std::string text = mGroupNameBox->getText(); - mGroupNameBox->setText(LLStringUtil::null); - mGroupNameBox->appendText(text, false, style_params); + mGroupNameBox->setText(mGroupName, mGroupNameStyle); } void LLGroupListItem::onInfoBtnClick() diff --git a/indra/newview/llgrouplist.h b/indra/newview/llgrouplist.h index 8dbc13997c..41b4d01711 100644 --- a/indra/newview/llgrouplist.h +++ b/indra/newview/llgrouplist.h @@ -37,6 +37,7 @@ #include "llflatlistview.h" #include "llpanel.h" #include "llpointer.h" +#include "llstyle.h" /** * Auto-updating list of agent groups. @@ -66,7 +67,7 @@ public: private: void setDirty(bool val = true) { mDirty = val; } void refresh(); - void addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, BOOL is_bold, EAddPosition pos = ADD_BOTTOM); + void addNewItem(const LLUUID& id, const std::string& name, const LLUUID& icon_id, EAddPosition pos = ADD_BOTTOM); bool handleEvent(LLPointer event, const LLSD& userdata); // called on agent group list changes bool mShowIcons; @@ -90,7 +91,7 @@ public: const LLUUID& getGroupID() const { return mGroupID; } const std::string& getGroupName() const { return mGroupName; } - void setName(const std::string& name); + void setName(const std::string& name, const std::string& highlight = LLStringUtil::null); void setGroupID(const LLUUID& group_id); void setGroupIconID(const LLUUID& group_icon_id); void setGroupIconVisible(bool visible); @@ -106,6 +107,7 @@ private: LLButton* mInfoBtn; std::string mGroupName; + LLStyle::Params mGroupNameStyle; static S32 sIconWidth; // icon width + padding }; diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 523487fa14..b3e8588efc 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -38,6 +38,8 @@ #include "llsidetray.h" #include "llworldmap.h" #include "llteleporthistorystorage.h" +#include "lltextutil.h" + #include "llaccordionctrl.h" #include "llaccordionctrltab.h" #include "llflatlistview.h" @@ -57,7 +59,7 @@ static const std::string COLLAPSED_BY_USER = "collapsed_by_user"; class LLTeleportHistoryFlatItem : public LLPanel { public: - LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name); + LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl); virtual ~LLTeleportHistoryFlatItem() {}; virtual BOOL postBuild(); @@ -82,13 +84,15 @@ private: S32 mIndex; std::string mRegionName; + std::string mHighlight; }; -LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name) +LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name, const std::string &hl) : LLPanel(), mIndex(index), mContextMenu(context_menu), - mRegionName(region_name) + mRegionName(region_name), + mHighlight(hl) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history_item.xml"); } @@ -96,8 +100,7 @@ LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistor //virtual BOOL LLTeleportHistoryFlatItem::postBuild() { - LLTextBox *region = getChild("region"); - region->setValue(mRegionName); + LLTextUtil::textboxSetHighlightedVal(getChild("region"), LLStyle::Params(), mRegionName, mHighlight); mProfileBtn = getChild("profile_btn"); @@ -521,7 +524,7 @@ void LLTeleportHistoryPanel::refresh() if (curr_flat_view) { - LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle); + LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(mCurrentItem, &mContextMenu, items[mCurrentItem].mTitle, mFilterSubString); curr_flat_view->addItem(item); if (mLastSelectedItemIndex == mCurrentItem) @@ -568,7 +571,8 @@ void LLTeleportHistoryPanel::replaceItem(S32 removed_index) const LLTeleportHistoryStorage::slurl_list_t& history_items = mTeleportHistory->getItems(); LLTeleportHistoryFlatItem* item = new LLTeleportHistoryFlatItem(history_items.size(), // index will be decremented inside loop below &mContextMenu, - history_items[history_items.size() - 1].mTitle); // Most recent item, it was + history_items[history_items.size() - 1].mTitle, // Most recent item, it was + mFilterSubString); // added instead of removed fv->addItem(item, LLUUID::null, ADD_TOP); -- cgit v1.2.3 From 9b89325cc9a02c3305eb32148cc8de7dccf8808b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Dec 2009 11:42:17 -0500 Subject: EXT-3124 : Add lookup for finding all linked items to an item Filter now works correctly. Made some naming changes (e.g. setFilterType -> setFilterObjectType) so that what you choose to filter by is more explicit. --HG-- branch : avatar-pipeline --- indra/newview/llfolderview.cpp | 4 +- indra/newview/llfolderview.h | 2 +- indra/newview/llinventoryfilter.cpp | 147 ++++++++++++++++++++++----------- indra/newview/llinventoryfilter.h | 21 ++--- indra/newview/llinventorypanel.cpp | 7 +- indra/newview/llinventorypanel.h | 4 +- indra/newview/llpanelmaininventory.cpp | 10 ++- 7 files changed, 129 insertions(+), 66 deletions(-) diff --git a/indra/newview/llfolderview.cpp b/indra/newview/llfolderview.cpp index ab49739d58..8bea8850b6 100644 --- a/indra/newview/llfolderview.cpp +++ b/indra/newview/llfolderview.cpp @@ -2217,9 +2217,9 @@ void LLFolderView::setFilterPermMask( PermissionMask filter_perm_mask ) mFilter->setFilterPermissions(filter_perm_mask); } -U32 LLFolderView::getFilterTypes() const +U32 LLFolderView::getFilterObjectTypes() const { - return mFilter->getFilterTypes(); + return mFilter->getFilterObjectTypes(); } PermissionMask LLFolderView::getFilterPermissions() const diff --git a/indra/newview/llfolderview.h b/indra/newview/llfolderview.h index bbd92b487f..8e9dd923a0 100644 --- a/indra/newview/llfolderview.h +++ b/indra/newview/llfolderview.h @@ -116,7 +116,7 @@ public: // filter is never null LLInventoryFilter* getFilter(); const std::string getFilterSubString(BOOL trim = FALSE); - U32 getFilterTypes() const; + U32 getFilterObjectTypes() const; PermissionMask getFilterPermissions() const; // JAMESDEBUG use getFilter()->getShowFolderState(); //LLInventoryFilter::EFolderShow getShowFolderState(); diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp index e5851bb624..4c5e4d5607 100644 --- a/indra/newview/llinventoryfilter.cpp +++ b/indra/newview/llinventoryfilter.cpp @@ -46,12 +46,13 @@ LLInventoryFilter::FilterOps::FilterOps() : mFilterObjectTypes(0xffffffffffffffffULL), + mFilterCategoryTypes(0xffffffffffffffffULL), mMinDate(time_min()), mMaxDate(time_max()), mHoursAgo(0), mShowFolderState(SHOW_NON_EMPTY_FOLDERS), mPermissions(PERM_NONE), - mFilterType(FILTERTYPE_ITEM), + mFilterTypes(FILTERTYPE_OBJECT), mFilterUUID(LLUUID::null) { } @@ -128,36 +129,45 @@ BOOL LLInventoryFilter::checkAgainstFilterType(const LLFolderViewItem* item) if (!object) return FALSE; - switch (mFilterOps.mFilterType) + const U32 filterTypes = mFilterOps.mFilterTypes; + + // Pass if this item's type is of the correct filter type + if (filterTypes & FILTERTYPE_OBJECT) { - case FILTERTYPE_ITEM: - { - // If it has no type, pass it, unless it's a link. - if (object_type == LLInventoryType::IT_NONE) - { - return !object->getIsLinkType(); - } - return (1LL << object_type & mFilterOps.mFilterObjectTypes) != U64(0); - } - // Pass if this item is a category of the filter type, or - // if its parent is a category of the filter type. - case FILTERTYPE_CATEGORY: + // If it has no type, pass it, unless it's a link. + if (object_type == LLInventoryType::IT_NONE) { - LLUUID cat_id = object_id; - if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY) - { - cat_id = object->getParentUUID(); - } - const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); - if (!cat) return FALSE; - return (1LL << cat->getPreferredType() & mFilterOps.mFilterObjectTypes) != U64(0); + if (object->getIsLinkType()) + return FALSE; } - case FILTERTYPE_UUID: + if ((1LL << object_type & mFilterOps.mFilterObjectTypes) == U64(0)) + return FALSE; + } + + // Pass if this item is a category of the filter type, or + // if its parent is a category of the filter type. + if (filterTypes & FILTERTYPE_CATEGORY) + { + LLUUID cat_id = object_id; + if (listener->getInventoryType() != LLInventoryType::IT_CATEGORY) { - return (object->getLinkedUUID() == mFilterOps.mFilterUUID); + cat_id = object->getParentUUID(); } + const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id); + if (!cat) + return FALSE; + if ((1LL << cat->getPreferredType() & mFilterOps.mFilterCategoryTypes) == U64(0)) + return FALSE; } - return FALSE; + + // Pass if this item is the target UUID or if it links to the target UUID + if (filterTypes & FILTERTYPE_UUID) + { + if (object->getLinkedUUID() != mFilterOps.mFilterUUID) + return FALSE; + } + + return TRUE; } @@ -204,7 +214,7 @@ BOOL LLInventoryFilter::isModifiedAndClear() return ret; } -void LLInventoryFilter::setFilterTypes(U64 types, EFilterType filter_type) +void LLInventoryFilter::setFilterObjectTypes(U64 types) { if (mFilterOps.mFilterObjectTypes != types) { @@ -229,14 +239,49 @@ void LLInventoryFilter::setFilterTypes(U64 types, EFilterType filter_type) setModified(FILTER_MORE_RESTRICTIVE); } } - mFilterOps.mFilterType = filter_type; + mFilterOps.mFilterTypes |= FILTERTYPE_OBJECT; +} + +void LLInventoryFilter::setFilterCategoryTypes(U64 types) +{ + if (mFilterOps.mFilterCategoryTypes != types) + { + // keep current items only if no type bits getting turned off + BOOL fewer_bits_set = (mFilterOps.mFilterCategoryTypes & ~types); + BOOL more_bits_set = (~mFilterOps.mFilterCategoryTypes & types); + + mFilterOps.mFilterCategoryTypes = types; + if (more_bits_set && fewer_bits_set) + { + // neither less or more restrive, both simultaneously + // so we need to filter from scratch + setModified(FILTER_RESTART); + } + else if (more_bits_set) + { + // target is only one of all requested types so more type bits == less restrictive + setModified(FILTER_LESS_RESTRICTIVE); + } + else if (fewer_bits_set) + { + setModified(FILTER_MORE_RESTRICTIVE); + } + } + mFilterOps.mFilterTypes |= FILTERTYPE_CATEGORY; } void LLInventoryFilter::setFilterUUID(const LLUUID& object_id) { + if (mFilterOps.mFilterUUID == LLUUID::null) + { + setModified(FILTER_MORE_RESTRICTIVE); + } + else + { + setModified(FILTER_RESTART); + } mFilterOps.mFilterUUID = object_id; - mFilterOps.mFilterType = FILTERTYPE_UUID; - setModified(FILTER_RESTART); + mFilterOps.mFilterTypes = FILTERTYPE_UUID; } void LLInventoryFilter::setFilterSubString(const std::string& string) @@ -244,9 +289,11 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) if (mFilterSubString != string) { // hitting BACKSPACE, for example - BOOL less_restrictive = mFilterSubString.size() >= string.size() && !mFilterSubString.substr(0, string.size()).compare(string); + const BOOL less_restrictive = mFilterSubString.size() >= string.size() && !mFilterSubString.substr(0, string.size()).compare(string); + // appending new characters - BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString); + const BOOL more_restrictive = mFilterSubString.size() < string.size() && !string.substr(0, mFilterSubString.size()).compare(mFilterSubString); + mFilterSubString = string; LLStringUtil::toUpper(mFilterSubString); LLStringUtil::trimHead(mFilterSubString); @@ -263,6 +310,14 @@ void LLInventoryFilter::setFilterSubString(const std::string& string) { setModified(FILTER_RESTART); } + + // Cancel out UUID once the search string is modified + if (mFilterOps.mFilterTypes == FILTERTYPE_UUID) + { + mFilterOps.mFilterTypes &= ~FILTERTYPE_UUID; + mFilterOps.mFilterUUID == LLUUID::null; + setModified(FILTER_RESTART); + } } } @@ -445,7 +500,7 @@ void LLInventoryFilter::setModified(EFilterBehavior behavior) } } -BOOL LLInventoryFilter::isFilterWith(LLInventoryType::EType t) const +BOOL LLInventoryFilter::isFilterObjectTypesWith(LLInventoryType::EType t) const { return mFilterOps.mFilterObjectTypes & (1LL << t); } @@ -465,7 +520,7 @@ const std::string& LLInventoryFilter::getFilterText() S32 num_filter_types = 0; mFilterText.clear(); - if (isFilterWith(LLInventoryType::IT_ANIMATION)) + if (isFilterObjectTypesWith(LLInventoryType::IT_ANIMATION)) { //filtered_types += " Animations,"; filtered_types += LLTrans::getString("Animations"); @@ -480,7 +535,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_CALLINGCARD)) + if (isFilterObjectTypesWith(LLInventoryType::IT_CALLINGCARD)) { //filtered_types += " Calling Cards,"; filtered_types += LLTrans::getString("Calling Cards"); @@ -494,7 +549,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_WEARABLE)) + if (isFilterObjectTypesWith(LLInventoryType::IT_WEARABLE)) { //filtered_types += " Clothing,"; filtered_types += LLTrans::getString("Clothing"); @@ -508,7 +563,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_GESTURE)) + if (isFilterObjectTypesWith(LLInventoryType::IT_GESTURE)) { //filtered_types += " Gestures,"; filtered_types += LLTrans::getString("Gestures"); @@ -522,7 +577,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_LANDMARK)) + if (isFilterObjectTypesWith(LLInventoryType::IT_LANDMARK)) { //filtered_types += " Landmarks,"; filtered_types += LLTrans::getString("Landmarks"); @@ -536,7 +591,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_NOTECARD)) + if (isFilterObjectTypesWith(LLInventoryType::IT_NOTECARD)) { //filtered_types += " Notecards,"; filtered_types += LLTrans::getString("Notecards"); @@ -550,7 +605,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_OBJECT) && isFilterWith(LLInventoryType::IT_ATTACHMENT)) + if (isFilterObjectTypesWith(LLInventoryType::IT_OBJECT) && isFilterObjectTypesWith(LLInventoryType::IT_ATTACHMENT)) { //filtered_types += " Objects,"; filtered_types += LLTrans::getString("Objects"); @@ -564,7 +619,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_LSL)) + if (isFilterObjectTypesWith(LLInventoryType::IT_LSL)) { //filtered_types += " Scripts,"; filtered_types += LLTrans::getString("Scripts"); @@ -578,7 +633,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_SOUND)) + if (isFilterObjectTypesWith(LLInventoryType::IT_SOUND)) { //filtered_types += " Sounds,"; filtered_types += LLTrans::getString("Sounds"); @@ -592,7 +647,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_TEXTURE)) + if (isFilterObjectTypesWith(LLInventoryType::IT_TEXTURE)) { //filtered_types += " Textures,"; filtered_types += LLTrans::getString("Textures"); @@ -606,7 +661,7 @@ const std::string& LLInventoryFilter::getFilterText() filtered_by_all_types = FALSE; } - if (isFilterWith(LLInventoryType::IT_SNAPSHOT)) + if (isFilterObjectTypesWith(LLInventoryType::IT_SNAPSHOT)) { //filtered_types += " Snapshots,"; filtered_types += LLTrans::getString("Snapshots"); @@ -649,7 +704,7 @@ const std::string& LLInventoryFilter::getFilterText() void LLInventoryFilter::toLLSD(LLSD& data) const { - data["filter_types"] = (LLSD::Integer)getFilterTypes(); + data["filter_types"] = (LLSD::Integer)getFilterObjectTypes(); data["min_date"] = (LLSD::Integer)getMinDate(); data["max_date"] = (LLSD::Integer)getMaxDate(); data["hours_ago"] = (LLSD::Integer)getHoursAgo(); @@ -664,7 +719,7 @@ void LLInventoryFilter::fromLLSD(LLSD& data) { if(data.has("filter_types")) { - setFilterTypes((U32)data["filter_types"].asInteger()); + setFilterObjectTypes((U32)data["filter_types"].asInteger()); } if(data.has("min_date") && data.has("max_date")) @@ -703,7 +758,7 @@ void LLInventoryFilter::fromLLSD(LLSD& data) } } -U32 LLInventoryFilter::getFilterTypes() const +U32 LLInventoryFilter::getFilterObjectTypes() const { return mFilterOps.mFilterObjectTypes; } diff --git a/indra/newview/llinventoryfilter.h b/indra/newview/llinventoryfilter.h index 47407eb86c..d65fb8f27c 100644 --- a/indra/newview/llinventoryfilter.h +++ b/indra/newview/llinventoryfilter.h @@ -58,10 +58,10 @@ public: enum EFilterType { - FILTERTYPE_NONE, - FILTERTYPE_ITEM, // normal default search-by-item-type - FILTERTYPE_CATEGORY, // search by folder type - FILTERTYPE_UUID // find the object with UUID and any links to it + FILTERTYPE_NONE = 0, + FILTERTYPE_OBJECT = 1, // normal default search-by-object-type + FILTERTYPE_CATEGORY = 2, // search by folder type + FILTERTYPE_UUID = 4 // find the object with UUID and any links to it }; // REFACTOR: Change this to an enum. @@ -82,10 +82,10 @@ public: // +-------------------------------------------------------------------+ // + Parameters // +-------------------------------------------------------------------+ - void setFilterTypes(U64 types, EFilterType filter_type = FILTERTYPE_ITEM); - U32 getFilterTypes() const; - BOOL isFilterWith(LLInventoryType::EType t) const; - + void setFilterObjectTypes(U64 types); + U32 getFilterObjectTypes() const; + BOOL isFilterObjectTypesWith(LLInventoryType::EType t) const; + void setFilterCategoryTypes(U64 types); void setFilterUUID(const LLUUID &object_id); void setFilterSubString(const std::string& string); @@ -153,9 +153,10 @@ private: struct FilterOps { FilterOps(); - EFilterType mFilterType; + U32 mFilterTypes; - U64 mFilterObjectTypes; // For _ITEM or _CATEGORY + U64 mFilterObjectTypes; // For _ITEM + U64 mFilterCategoryTypes; // For _ITEM LLUUID mFilterUUID; // for UUID time_t mMinDate; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 932c72f4cb..54f528de8d 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -209,8 +209,11 @@ LLInventoryFilter* LLInventoryPanel::getFilter() void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType filter_type) { - getFilter()->setFilterTypes(types, filter_type); -} + if (filter_type == LLInventoryFilter::FILTERTYPE_OBJECT) + getFilter()->setFilterObjectTypes(types); + if (filter_type == LLInventoryFilter::FILTERTYPE_CATEGORY) + getFilter()->setFilterCategoryTypes(types); +} void LLInventoryPanel::setFilterPermMask(PermissionMask filter_perm_mask) { diff --git a/indra/newview/llinventorypanel.h b/indra/newview/llinventorypanel.h index 56f7b39480..cbbd433c1d 100644 --- a/indra/newview/llinventorypanel.h +++ b/indra/newview/llinventorypanel.h @@ -126,8 +126,8 @@ public: void setSelectCallback(const LLFolderView::signal_t::slot_type& cb) { if (mFolders) mFolders->setSelectCallback(cb); } void clearSelection(); LLInventoryFilter* getFilter(); - void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_ITEM); - U32 getFilterTypes() const { return mFolders->getFilterTypes(); } + void setFilterTypes(U64 filter, LLInventoryFilter::EFilterType = LLInventoryFilter::FILTERTYPE_OBJECT); + U32 getFilterObjectTypes() const { return mFolders->getFilterObjectTypes(); } void setFilterPermMask(PermissionMask filter_perm_mask); U32 getFilterPermMask() const { return mFolders->getFilterPermissions(); } void setFilterSubString(const std::string& string); diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 3fd83bd784..1f7e0c3a95 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -653,7 +653,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() return; // Get data needed for filter display - U32 filter_types = mFilter->getFilterTypes(); + U32 filter_types = mFilter->getFilterObjectTypes(); std::string filter_string = mFilter->getFilterSubString(); LLInventoryFilter::EFolderShow show_folders = mFilter->getShowFolderState(); U32 hours = mFilter->getHoursAgo(); @@ -973,9 +973,13 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { return; } - const LLUUID& item_id = current_item->getListener()->getUUID(); - mActivePanel->getFilter()->setFilterUUID(item_id); + const std::string &item_name = current_item->getListener()->getName(); + LLInventoryFilter *filter = mActivePanel->getFilter(); + filter->setFilterSubString(item_name); + mFilterEditor->setText(item_name); + filter->setFilterUUID(item_id); + filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); } } -- cgit v1.2.3 From 1a7013d5cf63006ff9f4d30b21c4f369915de332 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 4 Dec 2009 19:28:27 +0200 Subject: Implemented normal task EXT-2832 (Hide "undock" icon on the floaters). --HG-- branch : product-engine --- indra/llui/llfloater.cpp | 12 ------------ indra/llui/llfloater.h | 3 --- indra/newview/skins/default/textures/textures.xml | 3 --- indra/newview/skins/default/xui/en/strings.xml | 1 - indra/newview/skins/default/xui/en/widgets/floater.xml | 2 -- 5 files changed, 21 deletions(-) diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index a63187678e..fd7b64af02 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -74,7 +74,6 @@ std::string LLFloater::sButtonNames[BUTTON_COUNT] = "llfloater_minimize_btn", //BUTTON_MINIMIZE "llfloater_tear_off_btn", //BUTTON_TEAR_OFF "llfloater_dock_btn", //BUTTON_DOCK - "llfloater_undock_btn", //BUTTON_UNDOCK "llfloater_help_btn" //BUTTON_HELP }; @@ -91,7 +90,6 @@ std::string LLFloater::sButtonToolTipsIndex[BUTTON_COUNT]= "BUTTON_MINIMIZE", //"Minimize", //BUTTON_MINIMIZE "BUTTON_TEAR_OFF", //"Tear Off", //BUTTON_TEAR_OFF "BUTTON_DOCK", - "BUTTON_UNDOCK", "BUTTON_HELP" }; @@ -102,7 +100,6 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] = LLFloater::onClickMinimize, //BUTTON_MINIMIZE LLFloater::onClickTearOff, //BUTTON_TEAR_OFF LLFloater::onClickDock, //BUTTON_DOCK - LLFloater::onClickDock, //BUTTON_UNDOCK LLFloater::onClickHelp //BUTTON_HELP }; @@ -179,14 +176,12 @@ LLFloater::Params::Params() minimize_image("minimize_image"), tear_off_image("tear_off_image"), dock_image("dock_image"), - undock_image("undock_image"), help_image("help_image"), close_pressed_image("close_pressed_image"), restore_pressed_image("restore_pressed_image"), minimize_pressed_image("minimize_pressed_image"), tear_off_pressed_image("tear_off_pressed_image"), dock_pressed_image("dock_pressed_image"), - undock_pressed_image("undock_pressed_image"), help_pressed_image("help_pressed_image"), open_callback("open_callback"), close_callback("close_callback") @@ -1395,12 +1390,10 @@ void LLFloater::setCanDock(bool b) if(mCanDock) { mButtonsEnabled[BUTTON_DOCK] = !mDocked; - mButtonsEnabled[BUTTON_UNDOCK] = mDocked; } else { mButtonsEnabled[BUTTON_DOCK] = FALSE; - mButtonsEnabled[BUTTON_UNDOCK] = FALSE; } } updateButtons(); @@ -1412,7 +1405,6 @@ void LLFloater::setDocked(bool docked, bool pop_on_undock) { mDocked = docked; mButtonsEnabled[BUTTON_DOCK] = !mDocked; - mButtonsEnabled[BUTTON_UNDOCK] = mDocked; updateButtons(); storeDockStateControl(); @@ -1864,8 +1856,6 @@ LLUIImage* LLFloater::getButtonImage(const Params& p, EFloaterButton e) return p.tear_off_image; case BUTTON_DOCK: return p.dock_image; - case BUTTON_UNDOCK: - return p.undock_image; case BUTTON_HELP: return p.help_image; } @@ -1887,8 +1877,6 @@ LLUIImage* LLFloater::getButtonPressedImage(const Params& p, EFloaterButton e) return p.tear_off_pressed_image; case BUTTON_DOCK: return p.dock_pressed_image; - case BUTTON_UNDOCK: - return p.undock_pressed_image; case BUTTON_HELP: return p.help_pressed_image; } diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index b5c835cb47..daf558de24 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -90,7 +90,6 @@ public: BUTTON_MINIMIZE, BUTTON_TEAR_OFF, BUTTON_DOCK, - BUTTON_UNDOCK, BUTTON_HELP, BUTTON_COUNT }; @@ -121,14 +120,12 @@ public: minimize_image, tear_off_image, dock_image, - undock_image, help_image; Optional close_pressed_image, restore_pressed_image, minimize_pressed_image, tear_off_pressed_image, dock_pressed_image, - undock_pressed_image, help_pressed_image; Optional open_callback, diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index fbb910b847..771726d466 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -204,9 +204,6 @@ with the same filename but different name - - - diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index e47ec1ebda..194e359e10 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -88,7 +88,6 @@ Minimize Tear Off Dock - Undock Show Help diff --git a/indra/newview/skins/default/xui/en/widgets/floater.xml b/indra/newview/skins/default/xui/en/widgets/floater.xml index 2263866471..70ee9fc3b8 100644 --- a/indra/newview/skins/default/xui/en/widgets/floater.xml +++ b/indra/newview/skins/default/xui/en/widgets/floater.xml @@ -13,13 +13,11 @@ minimize_image="Icon_Minimize_Foreground" tear_off_image="tearoffbox.tga" dock_image="Icon_Dock_Foreground" - undock_image="Icon_Undock_Foreground" help_image="Icon_Help_Foreground" close_pressed_image="Icon_Close_Press" restore_pressed_image="Icon_Restore_Press" minimize_pressed_image="Icon_Minimize_Press" tear_off_pressed_image="tearoff_pressed.tga" dock_pressed_image="Icon_Dock_Press" - undock_pressed_image="Icon_Undock_Press" help_pressed_image="Icon_Help_Press" /> -- cgit v1.2.3 From ae6911d094bcfaa730fd77f3c55c9ea5fa02b229 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Fri, 4 Dec 2009 20:01:16 +0200 Subject: No ticket. Removed check is current voice channel active when "Leave Call" button in Voice Control Panel (EXT-2986). --HG-- branch : product-engine --- indra/newview/llcallfloater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index ad59c780f3..895b4ed80e 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -127,7 +127,7 @@ void LLCallFloater::onOpen(const LLSD& /*key*/) void LLCallFloater::leaveCall() { LLVoiceChannel* voice_channel = LLVoiceChannel::getCurrentVoiceChannel(); - if (voice_channel && voice_channel->isActive()) + if (voice_channel) { voice_channel->deactivate(); } -- cgit v1.2.3 From 92a1ecd5fdfff2490cb563e83baff88fc6120882 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Dec 2009 13:44:25 -0500 Subject: EXT-3124 : Add lookup for finding all linked items to an item Filter string now highlights when doing this search. --HG-- branch : avatar-pipeline --- indra/llui/llsearcheditor.cpp | 9 +++++++++ indra/llui/llsearcheditor.h | 1 + indra/newview/llpanelmaininventory.cpp | 1 + 3 files changed, 11 insertions(+) diff --git a/indra/llui/llsearcheditor.cpp b/indra/llui/llsearcheditor.cpp index fad2b7bc99..6fa99df82e 100644 --- a/indra/llui/llsearcheditor.cpp +++ b/indra/llui/llsearcheditor.cpp @@ -141,6 +141,15 @@ void LLSearchEditor::clear() } } +//virtual +void LLSearchEditor::setFocus( BOOL b ) +{ + if (mSearchEditor) + { + mSearchEditor->setFocus(b); + } +} + void LLSearchEditor::onClearButtonClick(const LLSD& data) { setText(LLStringUtil::null); diff --git a/indra/llui/llsearcheditor.h b/indra/llui/llsearcheditor.h index f395e7e816..bd2d595174 100644 --- a/indra/llui/llsearcheditor.h +++ b/indra/llui/llsearcheditor.h @@ -83,6 +83,7 @@ public: virtual BOOL setLabelArg( const std::string& key, const LLStringExplicit& text ); virtual void setLabel( const LLStringExplicit &new_label ); virtual void clear(); + virtual void setFocus( BOOL b ); void setKeystrokeCallback( commit_callback_t cb ) { mKeystrokeCallback = cb; } diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 1f7e0c3a95..2a56a6011e 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -978,6 +978,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) LLInventoryFilter *filter = mActivePanel->getFilter(); filter->setFilterSubString(item_name); mFilterEditor->setText(item_name); + mFilterEditor->setFocus(TRUE); filter->setFilterUUID(item_id); filter->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS); } -- cgit v1.2.3 From c28fd45839b0a1924c80bc289a90e4756e677472 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Fri, 4 Dec 2009 20:46:04 +0200 Subject: omg fix for two omg crtical bugs... EXT-3109 Viewer crashes when attempting to select group role EXT-3130 Viewer crashes after pressing "New Role" button in group profile also a bit fix layout --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_group_roles.xml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_group_roles.xml b/indra/newview/skins/default/xui/en/panel_group_roles.xml index 5bae5c2711..a5bab3232c 100644 --- a/indra/newview/skins/default/xui/en/panel_group_roles.xml +++ b/indra/newview/skins/default/xui/en/panel_group_roles.xml @@ -367,7 +367,7 @@ things in this group. There's a broad variety of Abilities. + Date: Mon, 7 Dec 2009 13:13:11 +0200 Subject: Fixed normal bug EXT-3128 ("Ability to add friend" isn't disabled from "choose resident" ("+" btn) menu when resident is already a friend) --HG-- branch : product-engine --- indra/newview/llfloateravatarpicker.cpp | 53 +++++++++++++++++++++++++++++++-- indra/newview/llfloateravatarpicker.h | 9 +++++- indra/newview/llpanelpeople.cpp | 18 +++++++++++ indra/newview/llpanelpeople.h | 1 + 4 files changed, 78 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp index 07bb6f832b..6e3d5499a2 100644 --- a/indra/newview/llfloateravatarpicker.cpp +++ b/indra/newview/llfloateravatarpicker.cpp @@ -140,9 +140,14 @@ BOOL LLFloaterAvatarPicker::postBuild() return TRUE; } +void LLFloaterAvatarPicker::setOkBtnEnableCb(validate_callback_t cb) +{ + mOkButtonValidateSignal.connect(cb); +} + void LLFloaterAvatarPicker::onTabChanged() { - childSetEnabled("ok_btn", visibleItemsSelected()); + childSetEnabled("ok_btn", isSelectBtnEnabled()); } // Destroys the object @@ -175,6 +180,10 @@ void LLFloaterAvatarPicker::onBtnSelect(void* userdata) { LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata; + // If select btn not enabled then do not callback + if (!self || !self->isSelectBtnEnabled()) + return; + if(self->mCallback) { std::string acvtive_panel_name; @@ -244,7 +253,7 @@ void LLFloaterAvatarPicker::onList(LLUICtrl* ctrl, void* userdata) LLFloaterAvatarPicker* self = (LLFloaterAvatarPicker*)userdata; if (self) { - self->childSetEnabled("ok_btn", self->visibleItemsSelected()); + self->childSetEnabled("ok_btn", self->isSelectBtnEnabled()); } } @@ -477,3 +486,43 @@ BOOL LLFloaterAvatarPicker::handleKeyHere(KEY key, MASK mask) return LLFloater::handleKeyHere(key, mask); } + +bool LLFloaterAvatarPicker::isSelectBtnEnabled() +{ + bool ret_val = visibleItemsSelected(); + + if ( ret_val && mOkButtonValidateSignal.num_slots() ) + { + std::string acvtive_panel_name; + LLScrollListCtrl* list = NULL; + LLPanel* active_panel = childGetVisibleTab("ResidentChooserTabs"); + + if(active_panel) + { + acvtive_panel_name = active_panel->getName(); + } + + if(acvtive_panel_name == "SearchPanel") + { + list = getChild("SearchResults"); + } + else if(acvtive_panel_name == "NearMePanel") + { + list = getChild("NearMe"); + } + else if (acvtive_panel_name == "FriendsPanel") + { + list = getChild("Friends"); + } + + if(list) + { + std::vector avatar_ids; + std::vector avatar_names; + getSelectedAvatarData(list, avatar_names, avatar_ids); + return mOkButtonValidateSignal(avatar_ids); + } + } + + return ret_val; +} diff --git a/indra/newview/llfloateravatarpicker.h b/indra/newview/llfloateravatarpicker.h index b8ace985d9..13e491834e 100644 --- a/indra/newview/llfloateravatarpicker.h +++ b/indra/newview/llfloateravatarpicker.h @@ -40,6 +40,9 @@ class LLFloaterAvatarPicker : public LLFloater { public: + typedef boost::signals2::signal&), boost_boolean_combiner> validate_signal_t; + typedef validate_signal_t::slot_type validate_callback_t; + // Call this to select an avatar. // The callback function will be called with an avatar name and UUID. typedef void(*callback_t)(const std::vector&, const std::vector&, void*); @@ -53,6 +56,8 @@ public: virtual BOOL postBuild(); + void setOkBtnEnableCb(validate_callback_t cb); + static void processAvatarPickerReply(class LLMessageSystem* msg, void**); private: @@ -65,7 +70,8 @@ private: static void onBtnClose(void* userdata); static void onList(class LLUICtrl* ctrl, void* userdata); void onTabChanged(); - + bool isSelectBtnEnabled(); + void populateNearMe(); void populateFriend(); BOOL visibleItemsSelected() const; // Returns true if any items in the current tab are selected. @@ -83,6 +89,7 @@ private: void (*mCallback)(const std::vector& name, const std::vector& id, void* userdata); void* mCallbackUserdata; + validate_signal_t mOkButtonValidateSignal; }; #endif diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 9c7e3952f5..1e4682701e 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -1003,10 +1003,28 @@ void LLPanelPeople::onAddFriendButtonClicked() } } +bool LLPanelPeople::isItemsFreeOfFriends(const std::vector& uuids) +{ + const LLAvatarTracker& av_tracker = LLAvatarTracker::instance(); + for ( std::vector::const_iterator + id = uuids.begin(), + id_end = uuids.end(); + id != id_end; ++id ) + { + if (av_tracker.isBuddy (*id)) + { + return false; + } + } + return true; +} + void LLPanelPeople::onAddFriendWizButtonClicked() { // Show add friend wizard. LLFloaterAvatarPicker* picker = LLFloaterAvatarPicker::show(onAvatarPicked, NULL, FALSE, TRUE); + // Need to disable 'ok' button when friend occurs in selection + if (picker) picker->setOkBtnEnableCb(boost::bind(&LLPanelPeople::isItemsFreeOfFriends, this, _1)); LLFloater* root_floater = gFloaterView->getParentFloater(this); if (root_floater) { diff --git a/indra/newview/llpanelpeople.h b/indra/newview/llpanelpeople.h index bd1b155947..a9cc6d0ccb 100644 --- a/indra/newview/llpanelpeople.h +++ b/indra/newview/llpanelpeople.h @@ -72,6 +72,7 @@ private: void updateRecentList(); bool isFriendOnline(const LLUUID& id); + bool isItemsFreeOfFriends(const std::vector& uuids); void updateButtons(); std::string getActiveTabName() const; -- cgit v1.2.3 From d53bee8b6e2077ffb16e63746c51d11e58912e9c Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Mon, 7 Dec 2009 14:29:36 +0200 Subject: Fixed low bug EXT-3023('Edit' in Pick Info does nothing after saving changes to pick) --HG-- branch : product-engine --- indra/newview/llpanelpicks.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index cc6e88a9d2..59a68bc12d 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -161,6 +161,9 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) std::string name, second_name; gCacheName->getName(getAvatarId(),name,second_name); childSetTextArg("pick_title", "[NAME]",name); + + // Save selection, to be able to edit same item after saving changes. See EXT-3023. + LLUUID selected_id = mPicksList->getSelectedValue()[PICK_ID]; mPicksList->clear(); @@ -186,6 +189,10 @@ void LLPanelPicks::processProperties(void* data, EAvatarProcessorType type) mPicksList->addItem(picture, pick_value); + // Restore selection by item id. + if ( pick_id == selected_id ) + mPicksList->selectItemByValue(pick_value); + picture->setDoubleClickCallback(boost::bind(&LLPanelPicks::onDoubleClickPickItem, this, _1)); picture->setRightMouseUpCallback(boost::bind(&LLPanelPicks::onRightMouseUpItem, this, _1, _2, _3, _4)); picture->setMouseUpCallback(boost::bind(&LLPanelPicks::updateButtons, this)); -- cgit v1.2.3 From cf24b4062396eab77a4424e050d6fb7de28f5bdb Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Fri, 4 Dec 2009 21:56:12 +0200 Subject: Fixed major bug EXT-3094 "Content of accordions disappears after collapsing all folders in My "Landmarks" tab and switching to "Teleport history" tab and back" - Fixed applying filter to Teleport History tab in Places panel. --HG-- branch : product-engine --- indra/newview/llpanelteleporthistory.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index b3e8588efc..43f80f6d6a 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -319,11 +319,8 @@ void LLTeleportHistoryPanel::draw() // virtual void LLTeleportHistoryPanel::onSearchEdit(const std::string& string) { - if (sFilterSubString != string) - { - sFilterSubString = string; - showTeleportHistory(); - } + sFilterSubString = string; + showTeleportHistory(); } // virtual -- cgit v1.2.3 From b725027713912c5baaa3d812db939247cec2fae1 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 4 Dec 2009 12:00:30 -0800 Subject: EXT-1498 Can't adjust nav bar info button location in XML Removed C++ code overriding the location. Trivial, not reviewed. --- indra/newview/lllocationinputctrl.cpp | 7 +------ indra/newview/skins/default/xui/en/widgets/location_input.xml | 9 ++++++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 758d8ff903..98ca339f0c 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -810,13 +810,8 @@ void LLLocationInputCtrl::updateWidgetlayout() { const LLRect& rect = getLocalRect(); const LLRect& hist_btn_rect = mButton->getRect(); - LLRect info_btn_rect = mInfoBtn->getRect(); - // info button - info_btn_rect.setOriginAndSize( - 2, (rect.getHeight() - info_btn_rect.getHeight()) / 2, - info_btn_rect.getWidth(), info_btn_rect.getHeight()); - mInfoBtn->setRect(info_btn_rect); + // Info button is set in the XUI XML location_input.xml // "Add Landmark" button LLRect al_btn_rect = mAddLandmarkBtn->getRect(); diff --git a/indra/newview/skins/default/xui/en/widgets/location_input.xml b/indra/newview/skins/default/xui/en/widgets/location_input.xml index 0e2700cb80..17fb58764b 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -22,9 +22,12 @@ > - Date: Fri, 4 Dec 2009 13:34:27 -0800 Subject: EXT-2854 (small addition) Localizability: consistency to a few places when referring generically to a choice of - Select one - --- indra/newview/skins/default/xui/en/floater_sell_land.xml | 2 +- indra/newview/skins/default/xui/en/panel_classified.xml | 2 +- indra/newview/skins/default/xui/en/panel_group_general.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/floater_sell_land.xml b/indra/newview/skins/default/xui/en/floater_sell_land.xml index e6a78563f3..409f46b960 100644 --- a/indra/newview/skins/default/xui/en/floater_sell_land.xml +++ b/indra/newview/skins/default/xui/en/floater_sell_land.xml @@ -182,7 +182,7 @@ width="130"> Date: Fri, 4 Dec 2009 16:38:12 -0500 Subject: DEV-43463: skip() instead of commenting out lllogin_tests --- .../viewer_components/login/tests/lllogin_test.cpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/indra/viewer_components/login/tests/lllogin_test.cpp b/indra/viewer_components/login/tests/lllogin_test.cpp index 6255f7ed15..c2b86d3a1c 100644 --- a/indra/viewer_components/login/tests/lllogin_test.cpp +++ b/indra/viewer_components/login/tests/lllogin_test.cpp @@ -29,6 +29,20 @@ #include "llevents.h" #include "stringize.h" +#if LL_WINDOWS +#define skipwin(arg) skip(arg) +#define skipmac(arg) +#define skiplinux(arg) +#elif LL_DARWIN +#define skipwin(arg) +#define skipmac(arg) skip(arg) +#define skiplinux(arg) +#elif LL_LINUX +#define skipwin(arg) +#define skipmac(arg) +#define skiplinux(arg) skip(arg) +#endif + /***************************************************************************** * Helper classes *****************************************************************************/ @@ -231,10 +245,10 @@ namespace tut ensure_equals("Online state", listener.lastEvent()["state"].asString(), "online"); } - /* template<> template<> void llviewerlogin_object::test<2>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Tests a successful login in with delayed responses. // Also includes 'failure' that cause the login module @@ -327,6 +341,7 @@ namespace tut template<> template<> void llviewerlogin_object::test<3>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test completed response, that fails to login. set_test_name("LLLogin valid response, failure (eg. bad credentials)"); @@ -374,6 +389,7 @@ namespace tut template<> template<> void llviewerlogin_object::test<4>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test incomplete response, that end the attempt. set_test_name("LLLogin valid response, failure (eg. bad credentials)"); @@ -417,10 +433,10 @@ namespace tut ensure_equals("Failed to offline", listener.lastEvent()["state"].asString(), "offline"); } - *FIX:Mani Disabled unit boost::coro is patched template<> template<> void llviewerlogin_object::test<5>() { + skipwin("Re-enable when Boost updated for Windows"); DEBUG; // Test SRV request timeout. set_test_name("LLLogin SRV timeout testing"); @@ -453,5 +469,4 @@ namespace tut ensure_equals("SRV Failure", listener.lastEvent()["change"].asString(), "fail.login"); } -*/ } -- cgit v1.2.3 From f644dde8c9239e45348279229ded70620c3297d4 Mon Sep 17 00:00:00 2001 From: Erica Date: Fri, 4 Dec 2009 13:55:20 -0800 Subject: Added back forward home button art to sidetray home buttons --- .../default/xui/en/panel_sidetray_home_tab.xml | 49 +++++++++++----------- 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml index 4b841b0a09..605058825e 100644 --- a/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml +++ b/indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml @@ -28,44 +28,43 @@ top="0" user_resize="false" width="313"> - - - -- cgit v1.2.3 From 01f61d4d9e7763cbbf9e21673cb23f71a792e9c4 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 4 Dec 2009 17:00:59 -0500 Subject: EXT-2510 wrong initial hair color First try at a fix - some weirdness with when we actually should be setting the mesh color or not. Fix is untested as the build is broken. Committing for now so we can re-sync with viewer-2. Will be post-reviewed. --HG-- branch : avatar-pipeline --- indra/newview/llvoavatar.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index db450939b9..93b0ad4a5b 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -6002,8 +6002,7 @@ void LLVOAvatar::updateMeshTextures() } } else if (mBakedTextureDatas[i].mTexLayerSet - && !other_culled - && (i != BAKED_HAIR || mSupportsAlphaLayers)) // ! BACKWARDS COMPATIBILITY ! workaround for old viewers. + && !other_culled) { mBakedTextureDatas[i].mTexLayerSet->createComposite(); mBakedTextureDatas[i].mTexLayerSet->setUpdatesEnabled( TRUE ); @@ -6015,9 +6014,10 @@ void LLVOAvatar::updateMeshTextures() } } - // ! BACKWARDS COMPATIBILITY ! - // Workaround for viewing avatars from old viewers that haven't baked hair textures. - if (!mSupportsAlphaLayers) + // set texture and color of hair manually if we are not using a baked image. + // This can happen while loading hair for yourself, or for clients that did not + // bake a hair texture. Still needed for yourself after 1.22 is depricated. + if (!is_layer_baked[BAKED_HAIR] || self_customizing) { const LLColor4 color = mTexHairColor ? mTexHairColor->getColor() : LLColor4(1,1,1,1); LLViewerTexture* hair_img = getImage( TEX_HAIR, 0 ); -- cgit v1.2.3 From 6e50ea94d2aae2653d5de3e4e160a2c4c0557f3b Mon Sep 17 00:00:00 2001 From: Ramzi Linden Date: Fri, 4 Dec 2009 14:02:14 -0800 Subject: L10N: use better, consistent language in a preference about IMs. --- indra/newview/skins/default/xui/en/panel_preferences_chat.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 3aa5d3fae4..fff53c1de2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -332,7 +332,7 @@ control_name="ChatWindow" name="chat_window" top_pad="10" - tool_tip="Show chat in multiple windows(by default) or in one multi-tabbed window (requires restart)" + tool_tip="Show your Instant Messages in separate windows, or in one window with many tabs (Requires restart)" width="331"> Date: Fri, 4 Dec 2009 14:05:30 -0800 Subject: L10N: fix a typo. Use natural, consistent language in tool_tips about Picks. --- indra/newview/skins/default/xui/en/panel_picks.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_picks.xml b/indra/newview/skins/default/xui/en/panel_picks.xml index 52bc72fe86..4facedc7ea 100644 --- a/indra/newview/skins/default/xui/en/panel_picks.xml +++ b/indra/newview/skins/default/xui/en/panel_picks.xml @@ -106,7 +106,7 @@ layout="topleft" left_pad="15" name="new_btn" - tool_tip="Create new pick or classified at current location" + tool_tip="Create a new pick or classified at the current location" top="5" width="18" /> - - - - Date: Tue, 8 Dec 2009 10:51:33 +0000 Subject: DEV-43439: Added support for GRID substitution variable. The Home side panel URL, specified in settings.xml, now additionally supports a [GRID] substitution variable, with potential values equal to: "None", "Agni", "Aditi", etc. --- indra/newview/llviewerhelputil.cpp | 19 +++++-------------- indra/newview/llviewerhome.cpp | 2 ++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp index 2642b2378e..0a03012af6 100644 --- a/indra/newview/llviewerhelputil.cpp +++ b/indra/newview/llviewerhelputil.cpp @@ -32,23 +32,14 @@ */ #include "llviewerprecompiledheaders.h" +#include "llviewerhelputil.h" -#include "llversionviewer.h" -#include "llviewerversion.h" - -//#include "llfloaterhelpbrowser.h" -//#include "llfloaterreg.h" -//#include "llfocusmgr.h" -//#include "llviewercontrol.h" -//#include "llappviewer.h" - +#include "llcontrol.h" #include "llstring.h" -#include "lluri.h" #include "llsys.h" - -#include "llcontrol.h" - -#include "llviewerhelputil.h" +#include "lluri.h" +#include "llversionviewer.h" +#include "llviewerversion.h" ////////////////////////////////////////////// diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp index ee1e46dc59..4556c3c5b1 100644 --- a/indra/newview/llviewerhome.cpp +++ b/indra/newview/llviewerhome.cpp @@ -40,6 +40,7 @@ #include "llsd.h" #include "llviewerversion.h" #include "llviewercontrol.h" +#include "llviewernetwork.h" //static std::string LLViewerHome::getHomeURL() @@ -52,6 +53,7 @@ std::string LLViewerHome::getHomeURL() substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName")); substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["AUTH_KEY"] = LLURI::escape(getAuthKey()); + substitution["GRID"] = LLViewerLogin::getInstance()->getGridLabel(); std::string homeURL = gSavedSettings.getString("HomeSidePanelURL"); LLStringUtil::format(homeURL, substitution); -- cgit v1.2.3 From b133ed1ae0d6f7d1dd3738174895231c9a7aea2b Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 8 Dec 2009 11:22:45 +0000 Subject: EXT-2427: Added an About > Report Bug menu This menu brings up the Help Browser with the report_bug topic. To support this, I've created a new ShowHelp function that can be accessed from XUI. You can supply an optional help topic parameter, or if you specify no parameter then the default (F1) help is shown. --- indra/newview/llviewermenu.cpp | 26 +++++++++++++++++----- indra/newview/skins/default/xui/en/menu_login.xml | 3 +-- indra/newview/skins/default/xui/en/menu_viewer.xml | 11 +++++++-- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index e68594ed6f..bf4d0c78e6 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5521,11 +5521,6 @@ class LLShowFloater : public view_listener_t { LLFloaterScriptDebug::show(LLUUID::null); } - else if (floater_name == "help f1") - { - LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->getTopicFromFocus()); - } else if (floater_name == "complaint reporter") { // Prevent menu from appearing in screen shot. @@ -5562,6 +5557,26 @@ class LLFloaterVisible : public view_listener_t } }; +class LLShowHelp : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + std::string help_topic = userdata.asString(); + + LLViewerHelp* vhelp = LLViewerHelp::getInstance(); + if (help_topic.empty()) + { + vhelp->showTopic(vhelp->getTopicFromFocus()); + } + else + { + vhelp->showTopic(help_topic); + } + + return true; + } +}; + class LLShowSidetrayPanel : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -7925,6 +7940,7 @@ void initialize_menus() // Generic actions view_listener_t::addMenu(new LLShowFloater(), "ShowFloater"); + view_listener_t::addMenu(new LLShowHelp(), "ShowHelp"); view_listener_t::addMenu(new LLPromptShowURL(), "PromptShowURL"); view_listener_t::addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); view_listener_t::addMenu(new LLToggleControl(), "ToggleControl"); diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index a22dc80f4e..9b439c16e0 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -45,8 +45,7 @@ name="Second Life Help" shortcut="F1"> + function="ShowHelp" /> + function="ShowHelp" /> + + + Date: Tue, 8 Dec 2009 12:20:22 +0000 Subject: EXT-2350: Added a help link to login panel. There is now a new "Need help logging in?" link on the right-hand side of the login panel. Clicking on this brings up the help browser with the pre_login_help topic (the same as pressing F1). --- indra/newview/llpanellogin.cpp | 14 +++++++++++++- indra/newview/llpanellogin.h | 1 + indra/newview/skins/default/textures/textures.xml | 4 ++-- indra/newview/skins/default/xui/en/panel_login.xml | 15 +++++++++++++-- 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index d80d5c3d2e..e73c65e252 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -71,7 +71,6 @@ #include "llmediactrl.h" #include "llrootview.h" - #include "llfloatertos.h" #include "lltrans.h" #include "llglheaders.h" @@ -260,6 +259,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, LLTextBox* create_new_account_text = getChild("create_new_account_text"); create_new_account_text->setClickedCallback(onClickNewAccount, NULL); + + LLTextBox* need_help_text = getChild("login_help"); + need_help_text->setClickedCallback(onClickHelp, NULL); #endif // get the web browser control @@ -963,6 +965,16 @@ void LLPanelLogin::onClickForgotPassword(void*) } } +//static +void LLPanelLogin::onClickHelp(void*) +{ + if (sInstance) + { + LLViewerHelp* vhelp = LLViewerHelp::getInstance(); + vhelp->showTopic(vhelp->getTopicFromFocus()); + } +} + // static void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data) { diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index acb2001c22..e3d30d7d0c 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -96,6 +96,7 @@ private: // static bool newAccountAlertCallback(const LLSD& notification, const LLSD& response); static void onClickVersion(void*); static void onClickForgotPassword(void*); + static void onClickHelp(void*); static void onPassKey(LLLineEditor* caller, void* user_data); static void onSelectServer(LLUICtrl*, void*); static void onServerComboLostFocus(LLFocusableElement*); diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 7e309d2bad..6f9801491a 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -194,8 +194,8 @@ with the same filename but different name - - + + diff --git a/indra/newview/skins/default/xui/en/panel_login.xml b/indra/newview/skins/default/xui/en/panel_login.xml index efe26d3887..22977b2274 100644 --- a/indra/newview/skins/default/xui/en/panel_login.xml +++ b/indra/newview/skins/default/xui/en/panel_login.xml @@ -167,8 +167,8 @@ text_color="EmphasisColor" halign="right" height="16" - top="17" - left_pad="10" + top="12" + left_pad="5" right="-10" name="create_new_account_text" width="180"> @@ -185,6 +185,17 @@ width="180"> Forgot your name or password? + + Need help logging in? + Date: Tue, 8 Dec 2009 14:56:19 +0000 Subject: DEV-43439: Created new LLVersionInfo API. Renamed llviewerversion to llversioninfo, to avoid confusion with llversionviewer in llcommon (llversion is already used by llwindow). Created new LLVersionInfo class with the following methods: static S32 getMajor(); static S32 getMinor(); static S32 getPatch(); static S32 getBuild(); static const std::string &getVersion(); static const std::string &getShortVersion(); static const std::string &getChannel(); All viewer code has been updated to use this API. Viewer code no longer directly includes llversionviewer.h from llcommon. --- indra/newview/CMakeLists.txt | 4 +- indra/newview/llappviewer.cpp | 33 ++++---- indra/newview/llcurrencyuimanager.cpp | 18 ++--- indra/newview/llfloaterabout.cpp | 15 ++-- indra/newview/llfloaterreporter.cpp | 6 +- indra/newview/llpanellogin.cpp | 13 +-- indra/newview/llstartup.cpp | 8 +- indra/newview/llversioninfo.cpp | 109 ++++++++++++++++++++++++++ indra/newview/llversioninfo.h | 71 +++++++++++++++++ indra/newview/llviewercontrol.cpp | 1 - indra/newview/llviewerhelp.cpp | 1 - indra/newview/llviewerhelputil.cpp | 13 ++- indra/newview/llviewerhome.cpp | 4 +- indra/newview/llviewermedia.cpp | 4 +- indra/newview/llviewerprecompiledheaders.h | 1 - indra/newview/tests/llviewerhelputil_test.cpp | 8 +- 16 files changed, 244 insertions(+), 65 deletions(-) create mode 100644 indra/newview/llversioninfo.cpp create mode 100644 indra/newview/llversioninfo.h diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 9f525d82b9..f41505a82d 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -448,6 +448,7 @@ set(viewer_SOURCE_FILES llurlsimstring.cpp llurlwhitelist.cpp llvectorperfoptions.cpp + llversioninfo.cpp llviewchildren.cpp llviewerassetstorage.cpp llviewerassettype.cpp @@ -497,7 +498,6 @@ set(viewer_SOURCE_FILES llviewertextureanim.cpp llviewertexturelist.cpp llviewerthrottle.cpp - llviewerversion.cpp llviewervisualparam.cpp llviewerwindow.cpp llviewerwindowlistener.cpp @@ -953,6 +953,7 @@ set(viewer_HEADER_FILES llurlsimstring.h llurlwhitelist.h llvectorperfoptions.h + llversioninfo.h llviewchildren.h llviewerassetstorage.h llviewerassettype.h @@ -999,7 +1000,6 @@ set(viewer_HEADER_FILES llviewertextureanim.h llviewertexturelist.h llviewerthrottle.h - llviewerversion.h llviewervisualparam.h llviewerwindow.h llviewerwindowlistener.h diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6bbc1eaa6a..508badcc6f 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -35,8 +35,7 @@ #include "llappviewer.h" // Viewer includes -#include "llversionviewer.h" -#include "llviewerversion.h" +#include "llversioninfo.h" #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" @@ -650,7 +649,7 @@ bool LLAppViewer::init() // Build a string representing the current version number. gCurrentVersion = llformat("%s %s", gSavedSettings.getString("VersionChannelName").c_str(), - llGetViewerVersion().c_str()); + LLVersionInfo::getVersion().c_str()); ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// @@ -1871,7 +1870,7 @@ bool LLAppViewer::initConfiguration() gSavedSettings.setString("ClientSettingsFile", gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, getSettingsFilename("Default", "Global"))); - gSavedSettings.setString("VersionChannelName", LL_CHANNEL); + gSavedSettings.setString("VersionChannelName", LLVersionInfo::getChannel()); #ifndef LL_RELEASE_FOR_DOWNLOAD // provide developer build only overrides for these control variables that are not @@ -2482,10 +2481,10 @@ void LLAppViewer::writeSystemInfo() gDebugInfo["SLLog"] = LLError::logFileName(); gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); - gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; - gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; - gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; - gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; + gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor(); + gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor(); + gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::getPatch(); + gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::getBuild(); gDebugInfo["CAFilename"] = gDirUtilp->getCAFile(); @@ -2519,7 +2518,7 @@ void LLAppViewer::writeSystemInfo() // Dump some debugging info LL_INFOS("SystemInfo") << LLTrans::getString("APP_NAME") - << " version " << llGetViewerShortVersion() << LL_ENDL; + << " version " << LLVersionInfo::getShortVersion() << LL_ENDL; // Dump the local time and time zone time_t now; @@ -2573,10 +2572,10 @@ void LLAppViewer::handleViewerCrash() //to check against no matter what gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); - gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; - gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; - gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; - gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; + gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor(); + gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor(); + gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::getPatch(); + gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::getBuild(); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if ( parcel && parcel->getMusicURL()[0]) @@ -4150,10 +4149,10 @@ void LLAppViewer::handleLoginComplete() // Store some data to DebugInfo in case of a freeze. gDebugInfo["ClientInfo"]["Name"] = gSavedSettings.getString("VersionChannelName"); - gDebugInfo["ClientInfo"]["MajorVersion"] = LL_VERSION_MAJOR; - gDebugInfo["ClientInfo"]["MinorVersion"] = LL_VERSION_MINOR; - gDebugInfo["ClientInfo"]["PatchVersion"] = LL_VERSION_PATCH; - gDebugInfo["ClientInfo"]["BuildVersion"] = LL_VERSION_BUILD; + gDebugInfo["ClientInfo"]["MajorVersion"] = LLVersionInfo::getMajor(); + gDebugInfo["ClientInfo"]["MinorVersion"] = LLVersionInfo::getMinor(); + gDebugInfo["ClientInfo"]["PatchVersion"] = LLVersionInfo::getPatch(); + gDebugInfo["ClientInfo"]["BuildVersion"] = LLVersionInfo::getBuild(); LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); if ( parcel && parcel->getMusicURL()[0]) diff --git a/indra/newview/llcurrencyuimanager.cpp b/indra/newview/llcurrencyuimanager.cpp index 544711a862..00c05445e1 100644 --- a/indra/newview/llcurrencyuimanager.cpp +++ b/indra/newview/llcurrencyuimanager.cpp @@ -36,7 +36,7 @@ #include "lltextbox.h" #include "lllineeditor.h" #include "llviewercontrol.h" -#include "llversionviewer.h" +#include "llversioninfo.h" #include "llcurrencyuimanager.h" @@ -170,10 +170,10 @@ void LLCurrencyUIManager::Impl::updateCurrencyInfo() gAgent.getSecureSessionID().asString()); keywordArgs.appendInt("currencyBuy", mUserCurrencyBuy); keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName")); - keywordArgs.appendInt("viewerMajorVersion", LL_VERSION_MAJOR); - keywordArgs.appendInt("viewerMinorVersion", LL_VERSION_MINOR); - keywordArgs.appendInt("viewerPatchVersion", LL_VERSION_PATCH); - keywordArgs.appendInt("viewerBuildVersion", LL_VERSION_BUILD); + keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::getMajor()); + keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::getMinor()); + keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::getPatch()); + keywordArgs.appendInt("viewerBuildVersion", LLVersionInfo::getBuild()); LLXMLRPCValue params = LLXMLRPCValue::createArray(); params.append(keywordArgs); @@ -244,10 +244,10 @@ void LLCurrencyUIManager::Impl::startCurrencyBuy(const std::string& password) keywordArgs.appendString("password", password); } keywordArgs.appendString("viewerChannel", gSavedSettings.getString("VersionChannelName")); - keywordArgs.appendInt("viewerMajorVersion", LL_VERSION_MAJOR); - keywordArgs.appendInt("viewerMinorVersion", LL_VERSION_MINOR); - keywordArgs.appendInt("viewerPatchVersion", LL_VERSION_PATCH); - keywordArgs.appendInt("viewerBuildVersion", LL_VERSION_BUILD); + keywordArgs.appendInt("viewerMajorVersion", LLVersionInfo::getMajor()); + keywordArgs.appendInt("viewerMinorVersion", LLVersionInfo::getMinor()); + keywordArgs.appendInt("viewerPatchVersion", LLVersionInfo::getPatch()); + keywordArgs.appendInt("viewerBuildVersion", LLVersionInfo::getBuild()); LLXMLRPCValue params = LLXMLRPCValue::createArray(); params.append(keywordArgs); diff --git a/indra/newview/llfloaterabout.cpp b/indra/newview/llfloaterabout.cpp index b2588cc01b..e80499688e 100644 --- a/indra/newview/llfloaterabout.cpp +++ b/indra/newview/llfloaterabout.cpp @@ -45,8 +45,7 @@ #include "llviewercontrol.h" #include "llviewerstats.h" #include "llviewerregion.h" -#include "llversionviewer.h" -#include "llviewerversion.h" +#include "llversioninfo.h" #include "llweb.h" // Linden library includes @@ -212,12 +211,12 @@ LLSD LLFloaterAbout::getInfo() // LLFloaterAbout. LLSD info; LLSD version; - version.append(LL_VERSION_MAJOR); - version.append(LL_VERSION_MINOR); - version.append(LL_VERSION_PATCH); - version.append(LL_VERSION_BUILD); + version.append(LLVersionInfo::getMajor()); + version.append(LLVersionInfo::getMinor()); + version.append(LLVersionInfo::getPatch()); + version.append(LLVersionInfo::getBuild()); info["VIEWER_VERSION"] = version; - info["VIEWER_VERSION_STR"] = llGetViewerVersion(); + info["VIEWER_VERSION_STR"] = LLVersionInfo::getVersion(); info["BUILD_DATE"] = __DATE__; info["BUILD_TIME"] = __TIME__; info["CHANNEL"] = gSavedSettings.getString("VersionChannelName"); @@ -285,7 +284,7 @@ static std::string get_viewer_release_notes_url() { LLSD query; query["channel"] = gSavedSettings.getString("VersionChannelName"); - query["version"] = llGetViewerVersion(); + query["version"] = LLVersionInfo::getVersion(); std::ostringstream url; url << LLTrans::getString("RELEASE_NOTES_BASE_URL") << LLURI::mapToQueryString(query); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index be821ad43b..408303a1e0 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -75,7 +75,7 @@ #include "llfloateravatarpicker.h" #include "lldir.h" #include "llselectmgr.h" -#include "llviewerversion.h" +#include "llversioninfo.h" #include "lluictrlfactory.h" #include "llviewernetwork.h" @@ -608,7 +608,7 @@ LLSD LLFloaterReporter::gatherReport() std::ostringstream details; - details << "V" << llGetViewerVersion() << std::endl << std::endl; // client version moved to body of email for abuse reports + details << "V" << LLVersionInfo::getVersion() << std::endl << std::endl; // client version moved to body of email for abuse reports std::string object_name = childGetText("object_name"); if (!object_name.empty() && !mOwnerName.empty()) @@ -626,7 +626,7 @@ LLSD LLFloaterReporter::gatherReport() std::string version_string; version_string = llformat( "%s %s %s %s %s", - llGetViewerShortVersion().c_str(), + LLVersionInfo::getShortVersion().c_str(), platform, gSysCPU.getFamily().c_str(), gGLManager.mGLRenderer.c_str(), diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index e73c65e252..a729b8c06f 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -39,7 +39,6 @@ #include "llfontgl.h" #include "llmd5.h" #include "llsecondlifeurls.h" -#include "llversionviewer.h" #include "v4color.h" #include "llbutton.h" @@ -57,7 +56,7 @@ #include "llui.h" #include "lluiconstants.h" #include "llurlsimstring.h" -#include "llviewerversion.h" +#include "llversioninfo.h" #include "llviewerhelp.h" #include "llviewertexturelist.h" #include "llviewermenu.h" // for handle_preferences() @@ -247,8 +246,9 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, getChild("login_widgets")->setDefaultBtn("connect_btn"); std::string channel = gSavedSettings.getString("VersionChannelName"); - std::string version = llformat("%s (%s)", llGetViewerShortVersion().c_str(), - llGetViewerBuildVersion().c_str()); + std::string version = llformat("%s (%d)", + LLVersionInfo::getShortVersion().c_str(), + LLVersionInfo::getBuild()); LLTextBox* channel_text = getChild("channel_text"); channel_text->setTextArg("[CHANNEL]", channel); // though not displayed channel_text->setTextArg("[VERSION]", version); @@ -740,8 +740,9 @@ void LLPanelLogin::loadLoginPage() } // Channel and Version - std::string version = llformat("%s (%s)", llGetViewerShortVersion().c_str(), - llGetViewerBuildVersion().c_str()); + std::string version = llformat("%s (%d)", + LLVersionInfo::getShortVersion().c_str(), + LLVersionInfo::getBuild()); char* curl_channel = curl_escape(gSavedSettings.getString("VersionChannelName").c_str(), 0); char* curl_version = curl_escape(version.c_str(), 0); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 58df2ffb19..be0c92a76d 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -77,7 +77,7 @@ #include "llsecondlifeurls.h" #include "llstring.h" #include "lluserrelations.h" -#include "llversionviewer.h" +#include "llversioninfo.h" #include "llviewercontrol.h" #include "llvfs.h" #include "llxorcipher.h" // saved password, MAC address @@ -542,9 +542,9 @@ bool idle_startup() if(!start_messaging_system( message_template_path, port, - LL_VERSION_MAJOR, - LL_VERSION_MINOR, - LL_VERSION_PATCH, + LLVersionInfo::getMajor(), + LLVersionInfo::getMinor(), + LLVersionInfo::getPatch(), FALSE, std::string(), responder, diff --git a/indra/newview/llversioninfo.cpp b/indra/newview/llversioninfo.cpp new file mode 100644 index 0000000000..148931d3ad --- /dev/null +++ b/indra/newview/llversioninfo.cpp @@ -0,0 +1,109 @@ +/** + * @file llversioninfo.cpp + * @brief Routines to access the viewer version and build information + * @author Martin Reddy + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" +#include "llversioninfo.h" + +#include "llversionviewer.h" + +// +// Set the version numbers in indra/llcommon/llversionviewer.h +// + +//static +S32 LLVersionInfo::getMajor() +{ + return LL_VERSION_MAJOR; +} + +//static +S32 LLVersionInfo::getMinor() +{ + return LL_VERSION_MINOR; +} + +//static +S32 LLVersionInfo::getPatch() +{ + return LL_VERSION_PATCH; +} + +//static +S32 LLVersionInfo::getBuild() +{ + return LL_VERSION_BUILD; +} + +//static +const std::string &LLVersionInfo::getVersion() +{ + static std::string version(""); + + if (version.empty()) + { + // cache the version string + std::ostringstream stream; + stream << LL_VERSION_MAJOR << "." + << LL_VERSION_MINOR << "." + << LL_VERSION_PATCH << "." + << LL_VERSION_BUILD; + version = stream.str(); + } + + return version; +} + +//static +const std::string &LLVersionInfo::getShortVersion() +{ + static std::string version(""); + + if (version.empty()) + { + // cache the version string + std::ostringstream stream; + stream << LL_VERSION_MAJOR << "." + << LL_VERSION_MINOR << "." + << LL_VERSION_PATCH; + version = stream.str(); + } + + return version; +} + +//static +const std::string &LLVersionInfo::getChannel() +{ + static std::string name(LL_CHANNEL); + return name; +} diff --git a/indra/newview/llversioninfo.h b/indra/newview/llversioninfo.h new file mode 100644 index 0000000000..b05109e478 --- /dev/null +++ b/indra/newview/llversioninfo.h @@ -0,0 +1,71 @@ +/** + * @file llversioninfo.h + * @brief Routines to access the viewer version and build information + * @author Martin Reddy + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * + * Copyright (c) 2009, Linden Research, Inc. + * + * Second Life Viewer Source Code + * The source code in this file ("Source Code") is provided by Linden Lab + * to you under the terms of the GNU General Public License, version 2.0 + * ("GPL"), unless you have obtained a separate licensing agreement + * ("Other License"), formally executed by you and Linden Lab. Terms of + * the GPL can be found in doc/GPL-license.txt in this distribution, or + * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 + * + * There are special exceptions to the terms and conditions of the GPL as + * it is applied to this Source Code. View the full text of the exception + * in the file doc/FLOSS-exception.txt in this software distribution, or + * online at + * http://secondlifegrid.net/programs/open_source/licensing/flossexception + * + * By copying, modifying or distributing this software, you acknowledge + * that you have read and understood your obligations described above, + * and agree to abide by those obligations. + * + * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO + * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, + * COMPLETENESS OR PERFORMANCE. + * $/LicenseInfo$ + */ + +#ifndef LL_LLVERSIONINFO_H +#define LL_LLVERSIONINFO_H + +#include + +/// +/// This API provides version information for the viewer. This +/// includes access to the major, minor, patch, and build integer +/// values, as well as human-readable string representations. All +/// viewer code that wants to query the current version should +/// use this API. +/// +class LLVersionInfo +{ +public: + /// return the major verion number as an integer + static S32 getMajor(); + + /// return the minor verion number as an integer + static S32 getMinor(); + + /// return the patch verion number as an integer + static S32 getPatch(); + + /// return the build number as an integer + static S32 getBuild(); + + /// return the full viewer version as a string like "2.0.0.200030" + static const std::string &getVersion(); + + /// return the viewer version as a string like "2.0.0" + static const std::string &getShortVersion(); + + /// return the channel name, e.g. "Second Life" + static const std::string &getChannel(); +}; + +#endif diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 5e23a7e114..6339d23fa7 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -67,7 +67,6 @@ #include "lloverlaybar.h" #include "llkeyboard.h" #include "llerrorcontrol.h" -#include "llversionviewer.h" #include "llappviewer.h" #include "llvosurfacepatch.h" #include "llvowlsky.h" diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index 056260791c..297c0cc111 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -37,7 +37,6 @@ #include "llfloaterreg.h" #include "llfocusmgr.h" #include "llviewercontrol.h" -#include "llversionviewer.h" #include "llappviewer.h" #include "lllogininstance.h" diff --git a/indra/newview/llviewerhelputil.cpp b/indra/newview/llviewerhelputil.cpp index 0a03012af6..df08470518 100644 --- a/indra/newview/llviewerhelputil.cpp +++ b/indra/newview/llviewerhelputil.cpp @@ -38,8 +38,7 @@ #include "llstring.h" #include "llsys.h" #include "lluri.h" -#include "llversionviewer.h" -#include "llviewerversion.h" +#include "llversioninfo.h" ////////////////////////////////////////////// @@ -78,11 +77,11 @@ std::string LLViewerHelpUtil::buildHelpURL( const std::string &topic, substitution["CHANNEL"] = helpURLEncode(savedSettings.getString("VersionChannelName")); - substitution["VERSION"] = helpURLEncode(llGetViewerVersion()); - substitution["VERSION_MAJOR"] = buildHelpVersion(LL_VERSION_MAJOR); - substitution["VERSION_MINOR"] = buildHelpVersion(LL_VERSION_MINOR); - substitution["VERSION_PATCH"] = buildHelpVersion(LL_VERSION_PATCH); - substitution["VERSION_BUILD"] = buildHelpVersion(LL_VERSION_BUILD); + substitution["VERSION"] = helpURLEncode(LLVersionInfo::getVersion()); + substitution["VERSION_MAJOR"] = buildHelpVersion(LLVersionInfo::getMajor()); + substitution["VERSION_MINOR"] = buildHelpVersion(LLVersionInfo::getMinor()); + substitution["VERSION_PATCH"] = buildHelpVersion(LLVersionInfo::getPatch()); + substitution["VERSION_BUILD"] = buildHelpVersion(LLVersionInfo::getBuild()); substitution["OS"] = helpURLEncode(osinfo.getOSStringSimple()); diff --git a/indra/newview/llviewerhome.cpp b/indra/newview/llviewerhome.cpp index 4556c3c5b1..58630978c4 100644 --- a/indra/newview/llviewerhome.cpp +++ b/indra/newview/llviewerhome.cpp @@ -38,7 +38,7 @@ #include "llui.h" #include "lluri.h" #include "llsd.h" -#include "llviewerversion.h" +#include "llversioninfo.h" #include "llviewercontrol.h" #include "llviewernetwork.h" @@ -49,7 +49,7 @@ std::string LLViewerHome::getHomeURL() // this value from settings.xml and support various substitutions LLSD substitution; - substitution["VERSION"] = llGetViewerVersion(); + substitution["VERSION"] = LLVersionInfo::getVersion(); substitution["CHANNEL"] = LLURI::escape(gSavedSettings.getString("VersionChannelName")); substitution["LANGUAGE"] = LLUI::getLanguage(); substitution["AUTH_KEY"] = LLURI::escape(getAuthKey()); diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index a206768d33..952de00272 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -37,11 +37,11 @@ #include "llviewermediafocus.h" #include "llmimetypes.h" #include "llmediaentry.h" +#include "llversioninfo.h" #include "llviewercontrol.h" #include "llviewertexture.h" #include "llviewerparcelmedia.h" #include "llviewerparcelmgr.h" -#include "llviewerversion.h" #include "llviewertexturelist.h" #include "llvovolume.h" #include "llpluginclassmedia.h" @@ -446,7 +446,7 @@ std::string LLViewerMedia::getCurrentUserAgent() // http://www.mozilla.org/build/revised-user-agent-strings.html std::ostringstream codec; codec << "SecondLife/"; - codec << llGetViewerVersion(); + codec << LLVersionInfo::getVersion(); codec << " (" << channel << "; " << skin_name << " skin)"; llinfos << codec.str() << llendl; diff --git a/indra/newview/llviewerprecompiledheaders.h b/indra/newview/llviewerprecompiledheaders.h index 86f59b6e2f..6a0ad5757f 100644 --- a/indra/newview/llviewerprecompiledheaders.h +++ b/indra/newview/llviewerprecompiledheaders.h @@ -109,7 +109,6 @@ #include "llthread.h" #include "lltimer.h" #include "lluuidhashmap.h" -//#include "llversionviewer.h" //#include "processor.h" #include "stdenums.h" #include "stdtypes.h" diff --git a/indra/newview/tests/llviewerhelputil_test.cpp b/indra/newview/tests/llviewerhelputil_test.cpp index 90e3e7a7e0..68743357a6 100644 --- a/indra/newview/tests/llviewerhelputil_test.cpp +++ b/indra/newview/tests/llviewerhelputil_test.cpp @@ -36,7 +36,7 @@ #include "../test/lltut.h" #include "../llviewerhelputil.h" -#include "../llviewerversion.h" +#include "../llversioninfo.h" #include "llcontrol.h" #include "llsys.h" @@ -76,7 +76,11 @@ std::string LLControlGroup::getString(const std::string& name) return test_stringvec[name]; } -const std::string &llGetViewerVersion() +S32 LLVersionInfo::getMajor() { return 2; } +S32 LLVersionInfo::getMinor() { return 0; } +S32 LLVersionInfo::getPatch() { return 0; } +S32 LLVersionInfo::getBuild() { return 200099; } +const std::string &LLVersionInfo::getVersion() { static std::string version = "2.0.0.200099"; return version; -- cgit v1.2.3 From 0c607a6b88eef34987fdbd79843b693548f4adec Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Tue, 8 Dec 2009 15:16:04 +0000 Subject: DEV-43679: Pass god mode through to search. The state of gAgent.isGodlike() is now passed through to the Search web pages via a new g=[0|1] query parameter. --- indra/newview/llfloatersearch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 4d3724a758..2c618263ec 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -144,6 +144,10 @@ void LLFloaterSearch::search(const LLSD &key) // add the current localization information url += "&lang=" + LLUI::getLanguage(); + // add the user's god status + std::string godlike = gAgent.isGodlike() ? "1" : "0"; + url += "&g=" + godlike; + // and load the URL in the web view mBrowser->navigateTo(url); } -- cgit v1.2.3 From 9093b73a6ec8e2164a27a8df859527e7d1d6d8a5 Mon Sep 17 00:00:00 2001 From: Lis Pardi Date: Tue, 8 Dec 2009 12:10:14 -0500 Subject: EXT-2821 Rename icons/parcel_lght_* and parcel_drk_* to something sensible --- indra/newview/skins/default/textures/textures.xml | 86 +++++++++++----------- .../skins/default/xui/en/panel_landmark_info.xml | 6 +- .../xui/en/panel_media_settings_security.xml | 4 +- .../skins/default/xui/en/panel_place_profile.xml | 46 ++++++------ .../default/xui/en/panel_preferences_sound.xml | 30 ++++---- .../skins/default/xui/en/panel_status_bar.xml | 4 +- .../default/xui/en/widgets/location_input.xml | 16 ++-- .../default/xui/en/widgets/output_monitor.xml | 2 +- 8 files changed, 97 insertions(+), 97 deletions(-) diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index b1116dc0d2..49c1202d87 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -335,49 +335,49 @@ with the same filename but different name - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/indra/newview/skins/default/xui/en/panel_landmark_info.xml b/indra/newview/skins/default/xui/en/panel_landmark_info.xml index a219e30b8b..68e58b27ec 100644 --- a/indra/newview/skins/default/xui/en/panel_landmark_info.xml +++ b/indra/newview/skins/default/xui/en/panel_landmark_info.xml @@ -46,13 +46,13 @@ + value="Parcel_PG_Dark" /> + value="Parcel_M_Dark" /> + value="Parcel_R_Dark" /> + - diff --git a/indra/newview/skins/default/xui/en/inspect_remote_object.xml b/indra/newview/skins/default/xui/en/inspect_remote_object.xml index b5f2abf52a..ef3dd844cd 100644 --- a/indra/newview/skins/default/xui/en/inspect_remote_object.xml +++ b/indra/newview/skins/default/xui/en/inspect_remote_object.xml @@ -6,10 +6,10 @@ - Test Object Name That Is Really Long + word_wrap="true" + width="291"> + Test Object Name That Is Really Long OMG so long I can't believe how long the name of this object is, I mean really. + top_pad="12"> Owner: Longavatarname Johnsonlongstonnammer - Location: - + --> http://slurl.com/Ahern/50/50/50 -- cgit v1.2.3 From 0bfee2e4e064d25f902934a7fed48eb06aa236ba Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 8 Dec 2009 15:20:41 -0800 Subject: EXT-2980 Made location history menu items XML-configurable Reviewed with Leyla --- indra/newview/llnavigationbar.cpp | 46 ++++++++++++++++------ .../xui/en/widgets/teleport_history_menu_item.xml | 12 ++++++ 2 files changed, 45 insertions(+), 13 deletions(-) create mode 100644 indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml diff --git a/indra/newview/llnavigationbar.cpp b/indra/newview/llnavigationbar.cpp index e65b7d8a0c..9797c01371 100644 --- a/indra/newview/llnavigationbar.cpp +++ b/indra/newview/llnavigationbar.cpp @@ -82,9 +82,24 @@ public: struct Params : public LLInitParam::Block { - Mandatory item_type; - - Params() {} + Mandatory item_type; + Optional back_item_font, + current_item_font, + forward_item_font; + Optional back_item_image, + forward_item_image; + Optional image_hpad, + image_vpad; + Params() + : item_type(), + back_item_font("back_item_font"), + current_item_font("current_item_font"), + forward_item_font("forward_item_font"), + back_item_image("back_item_image"), + forward_item_image("forward_item_image"), + image_hpad("image_hpad"), + image_vpad("image_vpad") + {} }; /*virtual*/ void draw(); @@ -97,33 +112,38 @@ private: static const S32 ICON_WIDTH = 16; static const S32 ICON_HEIGHT = 16; - static const std::string ICON_IMG_BACKWARD; - static const std::string ICON_IMG_FORWARD; LLIconCtrl* mArrowIcon; }; -const std::string LLTeleportHistoryMenuItem::ICON_IMG_BACKWARD("teleport_history_backward.tga"); -const std::string LLTeleportHistoryMenuItem::ICON_IMG_FORWARD("teleport_history_forward.tga"); +static LLDefaultChildRegistry::Register r("teleport_history_menu_item"); + LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) : LLMenuItemCallGL(p), mArrowIcon(NULL) { // Set appearance depending on the item type. - if (p.item_type == TYPE_CURRENT) + if (p.item_type == TYPE_BACKWARD) + { + setFont( p.back_item_font ); + setLabel(std::string(" ") + std::string(p.label)); + } + else if (p.item_type == TYPE_CURRENT) { - setFont(LLFontGL::getFontSansSerifBold()); + setFont( p.current_item_font ); } else { - setFont(LLFontGL::getFontSansSerif()); + setFont( p.forward_item_font ); setLabel(std::string(" ") + std::string(p.label)); } LLIconCtrl::Params icon_params; icon_params.name("icon"); - icon_params.rect(LLRect(0, ICON_HEIGHT, ICON_WIDTH, 0)); + LLRect rect(0, ICON_HEIGHT, ICON_WIDTH, 0); + rect.translate( p.image_hpad, p.image_vpad ); + icon_params.rect( rect ); icon_params.mouse_opaque(false); icon_params.follows.flags(FOLLOWS_LEFT | FOLLOWS_TOP); icon_params.visible(false); @@ -132,9 +152,9 @@ LLTeleportHistoryMenuItem::LLTeleportHistoryMenuItem(const Params& p) // no image for the current item if (p.item_type == TYPE_BACKWARD) - mArrowIcon->setValue(ICON_IMG_BACKWARD); + mArrowIcon->setValue( p.back_item_image() ); else if (p.item_type == TYPE_FORWARD) - mArrowIcon->setValue(ICON_IMG_FORWARD); + mArrowIcon->setValue( p.forward_item_image() ); addChild(mArrowIcon); } diff --git a/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml new file mode 100644 index 0000000000..eaa68f5690 --- /dev/null +++ b/indra/newview/skins/default/xui/en/widgets/teleport_history_menu_item.xml @@ -0,0 +1,12 @@ + + + -- cgit v1.2.3 From ae493ad72ffb6b5272cfb636a76a516a784e67f1 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 8 Dec 2009 16:13:48 -0800 Subject: EXT-3118 disabled Alerts appear to be enabled in Preferences Wasn't rebuilding the list of alerts on Preferences open Cleaned up some formatting in llfloaterpreference.cpp --- indra/newview/llfloaterpreference.cpp | 63 +++++++++++++++-------------------- indra/newview/llfloaterpreference.h | 4 +-- 2 files changed, 27 insertions(+), 40 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 1c1f27a259..ab27375b87 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -251,7 +251,7 @@ bool callback_skip_dialogs(const LLSD& notification, const LLSD& response, LLFlo { floater->setAllIgnored(); LLFirstUse::disableFirstUse(); - LLFloaterPreference::buildLists(floater); + floater->buildPopupLists(); } } return false; @@ -266,7 +266,7 @@ bool callback_reset_dialogs(const LLSD& notification, const LLSD& response, LLFl { floater->resetAllIgnored(); LLFirstUse::resetFirstUse(); - LLFloaterPreference::buildLists(floater); + floater->buildPopupLists(); } } return false; @@ -391,6 +391,7 @@ LLFloaterPreference::~LLFloaterPreference() ctrl_window_size->setCurrentByIndex(i); } } + void LLFloaterPreference::draw() { BOOL has_first_selected = (getChildRef("disabled_popups").getFirstSelected()!=NULL); @@ -548,17 +549,17 @@ void LLFloaterPreference::cancel() void LLFloaterPreference::onOpen(const LLSD& key) { gAgent.sendAgentUserInfoRequest(); + /////////////////////////// From LLPanelGeneral ////////////////////////// // if we have no agent, we can't let them choose anything // if we have an agent, then we only let them choose if they have a choice - bool canChoose = gAgent.getID().notNull() && - (gAgent.isMature() || gAgent.isGodlike()); + bool can_choose_maturity = + gAgent.getID().notNull() && (gAgent.isMature() || gAgent.isGodlike()); LLComboBox* maturity_combo = getChild("maturity_desired_combobox"); - if (canChoose) - { - + if (can_choose_maturity) + { // if they're not adult or a god, they shouldn't see the adult selection, so delete it if (!gAgent.isAdult() && !gAgent.isGodlike()) { @@ -568,8 +569,7 @@ void LLFloaterPreference::onOpen(const LLSD& key) maturity_combo->remove(0); } childSetVisible("maturity_desired_combobox", true); - childSetVisible("maturity_desired_textbox", false); - + childSetVisible("maturity_desired_textbox", false); } else { @@ -577,6 +577,10 @@ void LLFloaterPreference::onOpen(const LLSD& key) childSetVisible("maturity_desired_combobox", false); } + // Enabled/disabled popups, might have been changed by user actions + // while preferences floater was closed. + buildPopupLists(); + LLPanelLogin::setAlwaysRefresh(true); refresh(); @@ -717,14 +721,6 @@ void LLFloaterPreference::updateMeterText(LLUICtrl* ctrl) m1->setVisible(two_digits); m2->setVisible(!two_digits); } -/* -void LLFloaterPreference::onClickClearCache() -{ - // flag client cache for clearing next time the client runs - gSavedSettings.setBOOL("PurgeCacheOnNextStartup", TRUE); - LLNotificationsUtil::add("CacheWillClear"); -} -*/ void LLFloaterPreference::onClickBrowserClearCache() { @@ -794,12 +790,13 @@ void LLFloaterPreference::refreshSkin(void* data) self->getChild("skin_selection", true)->setValue(sSkin); } -// static -void LLFloaterPreference::buildLists(void* data) + +void LLFloaterPreference::buildPopupLists() { - LLPanel*self = (LLPanel*)data; - LLScrollListCtrl& disabled_popups = self->getChildRef("disabled_popups"); - LLScrollListCtrl& enabled_popups = self->getChildRef("enabled_popups"); + LLScrollListCtrl& disabled_popups = + getChildRef("disabled_popups"); + LLScrollListCtrl& enabled_popups = + getChildRef("enabled_popups"); disabled_popups.deleteAllItems(); enabled_popups.deleteAllItems(); @@ -861,8 +858,7 @@ void LLFloaterPreference::buildLists(void* data) } void LLFloaterPreference::refreshEnabledState() -{ - +{ LLCheckBoxCtrl* ctrl_reflections = getChild("Reflections"); LLRadioGroup* radio_reflection_detail = getChild("ReflectionDetailRadio"); @@ -1111,7 +1107,7 @@ void LLFloaterPreference::onClickEnablePopup() LLUI::sSettingGroups["ignores"]->setBOOL(notification_name, TRUE); } - buildLists(this); + buildPopupLists(); } void LLFloaterPreference::onClickDisablePopup() @@ -1128,8 +1124,9 @@ void LLFloaterPreference::onClickDisablePopup() LLUI::sSettingGroups["ignores"]->setBOOL(notification_name, FALSE); } - buildLists(this); + buildPopupLists(); } + void LLFloaterPreference::resetAllIgnored() { for (LLNotifications::TemplateMap::const_iterator iter = LLNotifications::instance().templatesBegin(); @@ -1428,17 +1425,11 @@ BOOL LLPanelPreference::postBuild() } } - ////////////////////////Panel Popups///////////////// - if(hasChild("disabled_popups") && hasChild("enabled_popups")) - { - LLFloaterPreference::buildLists(this); - } - ////// + if(hasChild("online_visibility") && hasChild("send_im_to_email")) { childSetText("email_address",getString("log_in_to_change") ); -// childSetText("busy_response", getString("log_in_to_change")); - +// childSetText("busy_response", getString("log_in_to_change")); } @@ -1573,8 +1564,7 @@ void LLPanelPreference::saveSettings() { view_stack.push_back(*iter); } - } - + } } void LLPanelPreference::cancel() @@ -1607,4 +1597,3 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data) if (control) control->set(LLSD(FALSE)); } - diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index a30422564a..d292f3bb7b 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -85,7 +85,6 @@ protected: void onBtnCancel(); void onBtnApply(); -// void onClickClearCache(); void onClickBrowserClearCache(); // if the custom settings box is clicked @@ -141,7 +140,7 @@ public: static void initWindowSizeControls(LLPanel* panelp); - static void buildLists(void* data); + void buildPopupLists(); static void refreshSkin(void* data); static void cleanupBadSetting(); static F32 sAspectRatio; @@ -153,7 +152,6 @@ private: bool mOriginalHideOnlineStatus; std::string mDirectoryVisibility; - }; class LLPanelPreference : public LLPanel -- cgit v1.2.3 From a65473957f16f9cfba8ed10b87218d65d64519ef Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 8 Dec 2009 16:28:34 -0800 Subject: Back out EXT-2827 Unable to delete object when select face of object May cause right-click delete to fail - testing that Backed out changeset: 1f8e1e73f9f4 --- indra/newview/llselectmgr.cpp | 13 +------------ indra/newview/llviewermenu.cpp | 20 -------------------- .../default/xui/en/floater_animation_preview.xml | 4 ++-- 3 files changed, 3 insertions(+), 34 deletions(-) diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index c8b86118be..1605838b94 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5753,19 +5753,8 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - bool can_delete = false; - LLViewerObject* obj = const_cast(this)->mSelectedObjects->getFirstDeleteableObject() ; // HACK: casting away constness - MG // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) - if (obj!= NULL) - { - // all the faces needs to be selected - if(const_cast(this)->mSelectedObjects->contains(obj,SELECT_ALL_TES )) - { - can_delete = true; - } - } - - return can_delete; + return const_cast(this)->mSelectedObjects->getFirstDeleteableObject() != NULL; // HACK: casting away constness - MG } //----------------------------------------------------------------------------- diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 066395aedf..0b40492391 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2422,12 +2422,6 @@ class LLObjectEnableReportAbuse : public view_listener_t bool handleEvent(const LLSD& userdata) { bool new_value = LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 0; -/* // all the faces needs to be selected - if(LLSelectMgr::getInstance()->getSelection()->contains(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(),SELECT_ALL_TES )) - { - new_value = true; - } - */ return new_value; } }; @@ -2816,7 +2810,6 @@ BOOL enable_has_attachments(void*) bool enable_object_mute() { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); - bool new_value = (object != NULL); if (new_value) { @@ -2829,19 +2822,6 @@ bool enable_object_mute() BOOL is_self = avatar->isSelf(); new_value = !is_linden && !is_self; } - else - { - if( LLSelectMgr::getInstance()->getSelection()->contains(object,SELECT_ALL_TES )) - { - new_value = true; - } - else - { - new_value = false; - } - - } - } return new_value; } diff --git a/indra/newview/skins/default/xui/en/floater_animation_preview.xml b/indra/newview/skins/default/xui/en/floater_animation_preview.xml index 26ace7b617..4f4288b654 100644 --- a/indra/newview/skins/default/xui/en/floater_animation_preview.xml +++ b/indra/newview/skins/default/xui/en/floater_animation_preview.xml @@ -525,7 +525,7 @@ Maximum animation length is [MAX_LENGTH] seconds. We recommend BVH files exported from Poser 4.