From d6db0f8b297686c6ae97ace23d0714c4ae95b1f3 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 14 Oct 2009 01:51:49 +0000 Subject: EXT-1393 "none" does not appear in object group list EXT-1479 I18N: string in /en/widgets/location_input.xml wont honor its translation and made tabs height customizable reviewed by Richard --- indra/llui/lltabcontainer.cpp | 13 ++++++------ indra/llui/lltabcontainer.h | 5 ++++- indra/newview/app_settings/settings.xml | 11 ----------- indra/newview/llavataractions.cpp | 1 + indra/newview/llfloatergroups.cpp | 23 +++++++++++++--------- indra/newview/llfloatergroups.h | 3 +++ indra/newview/llfloaterregioninfo.cpp | 1 + indra/newview/lllocationinputctrl.cpp | 11 ++++++----- indra/newview/lllocationinputctrl.h | 2 ++ indra/newview/skins/default/xui/en/strings.xml | 5 ----- .../default/xui/en/widgets/location_input.xml | 3 ++- .../skins/default/xui/en/widgets/tab_container.xml | 1 + 12 files changed, 41 insertions(+), 38 deletions(-) (limited to 'indra') diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index b1067ad6f3..3ca05ff0ff 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -107,9 +107,10 @@ static LLDefaultChildRegistry::Register r2("tab_container"); LLTabContainer::Params::Params() : tab_width("tab_width"), - tab_position("tab_position"), tab_min_width("tab_min_width"), tab_max_width("tab_max_width"), + tab_height("tab_height"), + tab_position("tab_position"), hide_tabs("hide_tabs", false), tab_padding_right("tab_padding_right"), tab_top_image_unselected("tab_top_image_unselected"), @@ -136,6 +137,7 @@ LLTabContainer::LLTabContainer(const LLTabContainer::Params& p) mLockedTabCount(0), mMinTabWidth(0), mMaxTabWidth(p.tab_max_width), + mTabHeight(p.tab_height), mPrevArrowBtn(NULL), mNextArrowBtn(NULL), mIsVertical( p.tab_position == LEFT ), @@ -802,7 +804,6 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) static LLUICachedControl tabcntrv_pad ("UITabCntrvPad", 0); static LLUICachedControl tabcntr_button_panel_overlap ("UITabCntrButtonPanelOverlap", 0); - static LLUICachedControl tabcntr_tab_height ("UITabCntrTabHeight", 0); static LLUICachedControl tab_padding ("UITabPadding", 0); if (child->getParent() == this) { @@ -830,14 +831,14 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) { if( getTabPosition() == LLTabContainer::TOP ) { - S32 tab_height = mIsVertical ? BTN_HEIGHT : tabcntr_tab_height; + S32 tab_height = mIsVertical ? BTN_HEIGHT : mTabHeight; tab_panel_top = getRect().getHeight() - getTopBorderHeight() - (tab_height - tabcntr_button_panel_overlap); tab_panel_bottom = LLPANEL_BORDER_WIDTH; } else { tab_panel_top = getRect().getHeight() - getTopBorderHeight(); - tab_panel_bottom = (tabcntr_tab_height - tabcntr_button_panel_overlap); // Run to the edge, covering up the border + tab_panel_bottom = (mTabHeight - tabcntr_button_panel_overlap); // Run to the edge, covering up the border } } else @@ -886,13 +887,13 @@ void LLTabContainer::addTabPanel(const TabPanelParams& panel) } else if( getTabPosition() == LLTabContainer::TOP ) { - btn_rect.setLeftTopAndSize( 0, getRect().getHeight() - getTopBorderHeight() + tab_fudge, button_width, tabcntr_tab_height ); + btn_rect.setLeftTopAndSize( 0, getRect().getHeight() - getTopBorderHeight() + tab_fudge, button_width, mTabHeight); tab_img = mImageTopUnselected.get(); tab_selected_img = mImageTopSelected.get(); } else { - btn_rect.setOriginAndSize( 0, 0 + tab_fudge, button_width, tabcntr_tab_height ); + btn_rect.setOriginAndSize( 0, 0 + tab_fudge, button_width, mTabHeight); tab_img = mImageBottomUnselected.get(); tab_selected_img = mImageBottomSelected.get(); } diff --git a/indra/llui/lltabcontainer.h b/indra/llui/lltabcontainer.h index 7bbecc1abc..e3af5384b1 100644 --- a/indra/llui/lltabcontainer.h +++ b/indra/llui/lltabcontainer.h @@ -67,7 +67,9 @@ public: Optional tab_position; Optional tab_width, tab_min_width, - tab_max_width; + tab_max_width, + tab_height; + Optional hide_tabs; Optional tab_padding_right; @@ -246,6 +248,7 @@ private: S32 mMaxTabWidth; S32 mTotalTabWidth; + S32 mTabHeight; LLFrameTimer mDragAndDropDelayTimer; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index be48ebdf67..d05fd955db 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -9645,17 +9645,6 @@ Value 16 - UITabCntrTabHeight - - Comment - UI Tab Container Tab Height - Persist - 1 - Type - S32 - Value - 16 - UITabCntrTabHPad Comment diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 2b5e2369bb..2f67401301 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -255,6 +255,7 @@ void LLAvatarActions::inviteToGroup(const LLUUID& id) LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance("group_picker", LLSD(id)); if (widget) { + widget->removeNoneOption(); widget->center(); widget->setPowersMask(GP_MEMBER_INVITE); widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, id)); diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 3648898f28..45af515a86 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -89,15 +89,6 @@ BOOL LLFloaterGroupPicker::postBuild() list_ctrl->setContextMenu(LLScrollListCtrl::MENU_GROUP); } - // Remove group "none" from list. Group "none" is added in init_group_list(). - // Some UI elements use group "none", we need to manually delete it here. - // Group "none" ID is LLUUID:null. - LLCtrlListInterface* group_list = list_ctrl->getListInterface(); - if(group_list) - { - group_list->selectByValue(LLUUID::null); - group_list->operateOnSelection(LLCtrlListInterface::OP_DELETE); - } childSetAction("OK", onBtnOK, this); @@ -110,6 +101,20 @@ BOOL LLFloaterGroupPicker::postBuild() return TRUE; } +void LLFloaterGroupPicker::removeNoneOption() +{ + // Remove group "none" from list. Group "none" is added in init_group_list(). + // Some UI elements use group "none", we need to manually delete it here. + // Group "none" ID is LLUUID:null. + LLCtrlListInterface* group_list = getChild("group list")->getListInterface(); + if(group_list) + { + group_list->selectByValue(LLUUID::null); + group_list->operateOnSelection(LLCtrlListInterface::OP_DELETE); + } +} + + void LLFloaterGroupPicker::onBtnOK(void* userdata) { LLFloaterGroupPicker* self = (LLFloaterGroupPicker*)userdata; diff --git a/indra/newview/llfloatergroups.h b/indra/newview/llfloatergroups.h index 489238356d..ce3a470a23 100644 --- a/indra/newview/llfloatergroups.h +++ b/indra/newview/llfloatergroups.h @@ -72,6 +72,9 @@ public: static LLFloaterGroupPicker* findInstance(const LLSD& seed); static LLFloaterGroupPicker* createInstance(const LLSD& seed); + // for cases like inviting avatar to group we don't want the none option + void removeNoneOption(); + protected: void ok(); static void onBtnOK(void* userdata); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 0330a8c692..e15fdd3e35 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1522,6 +1522,7 @@ bool LLPanelEstateInfo::addAllowedGroup(const LLSD& notification, const LLSD& re LLFloaterGroupPicker* widget = LLFloaterReg::showTypedInstance("group_picker", LLSD(gAgent.getID())); if (widget) { + widget->removeNoneOption(); widget->setSelectGroupCallback(boost::bind(&LLPanelEstateInfo::addAllowedGroup2, this, _1)); if (parent_floater) { diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp index 16a10dc502..a3296dbffc 100644 --- a/indra/newview/lllocationinputctrl.cpp +++ b/indra/newview/lllocationinputctrl.cpp @@ -159,7 +159,9 @@ LLLocationInputCtrl::Params::Params() add_landmark_image_selected("add_landmark_image_selected"), add_landmark_button("add_landmark_button"), add_landmark_hpad("add_landmark_hpad", 0), - info_button("info_button") + info_button("info_button"), + add_landmark_tool_tip("add_landmark_tool_tip"), + edit_landmark_tool_tip("edit_landmark_tool_tip") { } @@ -170,7 +172,9 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mLocationContextMenu(NULL), mAddLandmarkBtn(NULL), mLandmarkImageOn(NULL), - mLandmarkImageOff(NULL) + mLandmarkImageOff(NULL), + mAddLandmarkTooltip(p.add_landmark_tool_tip), + mEditLandmarkTooltip(p.edit_landmark_tool_tip) { // Lets replace default LLLineEditor with LLLocationLineEditor // to make needed escaping while copying and cutting url @@ -261,9 +265,6 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p) mAddLandmarkObserver = new LLAddLandmarkObserver(this); gInventory.addObserver(mRemoveLandmarkObserver); gInventory.addObserver(mAddLandmarkObserver); - - mAddLandmarkTooltip = LLTrans::getString("location_ctrl_add_landmark"); - mEditLandmarkTooltip = LLTrans::getString("location_ctrl_edit_landmark"); } LLLocationInputCtrl::~LLLocationInputCtrl() diff --git a/indra/newview/lllocationinputctrl.h b/indra/newview/lllocationinputctrl.h index c74a294ca3..cd5c482005 100644 --- a/indra/newview/lllocationinputctrl.h +++ b/indra/newview/lllocationinputctrl.h @@ -66,6 +66,8 @@ public: Optional add_landmark_hpad; Optional add_landmark_button, info_button; + Optional add_landmark_tool_tip; + Optional edit_landmark_tool_tip; Params(); }; diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 071744c33a..f620e8f2d7 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2828,11 +2828,6 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Wild Wrinkles - - Add to My Landmarks - Edit My Landmark - (Loading...) - [APP_NAME] Update 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 defa6ff00d..d86103aedc 100644 --- a/indra/newview/skins/default/xui/en/widgets/location_input.xml +++ b/indra/newview/skins/default/xui/en/widgets/location_input.xml @@ -18,6 +18,8 @@ max_chars="20" follows="left|top" allow_new_values="true" + add_landmark_tool_tip="Add this to My Landmarks" + edit_landmark_tool_tip="Edit My Landmark" >