diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-01 17:52:30 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-01 17:52:30 +0000 |
commit | 1713a3552b7017cbf781f2effd448f2e8cfb9372 (patch) | |
tree | 1ffbfd1155ee84a9db937ba9cf1520c0248e6c92 /indra/newview | |
parent | cf9814bc05f17e233e5d03e63fc2e519512b3e58 (diff) |
merge -r 1879-1884 https://svn.aws.productengine.com/secondlife/pe/stable-2
* Major Bugs: EXT-1248 EXT-1127 EXT-844 EXT-1160
* Changes: EXT-1139 (places context menu)
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llchannelmanager.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lllandmarkactions.cpp | 25 | ||||
-rw-r--r-- | indra/newview/lllandmarkactions.h | 9 | ||||
-rw-r--r-- | indra/newview/llnotificationalerthandler.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lloutputmonitorctrl.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lloutputmonitorctrl.h | 4 | ||||
-rw-r--r-- | indra/newview/llpanelteleporthistory.cpp | 162 | ||||
-rw-r--r-- | indra/newview/llpanelteleporthistory.h | 26 | ||||
-rw-r--r-- | indra/newview/llscreenchannel.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 3 | ||||
-rw-r--r-- | indra/newview/lltoast.cpp | 27 | ||||
-rw-r--r-- | indra/newview/lltoast.h | 7 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_teleport_history_item.xml | 33 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml | 19 |
14 files changed, 271 insertions, 60 deletions
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index b4b680416c..c4619dc57a 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -77,7 +77,7 @@ LLScreenChannel* LLChannelManager::createNotificationChannel() p.channel_align = CA_RIGHT; // Getting a Channel for our notifications - return dynamic_cast<LLScreenChannel*> (LLChannelManager::getInstance()->createChannel(p)); + return dynamic_cast<LLScreenChannel*> (LLChannelManager::getInstance()->getChannel(p)); } //-------------------------------------------------------------------------- diff --git a/indra/newview/lllandmarkactions.cpp b/indra/newview/lllandmarkactions.cpp index 2ad83c76b5..0542199fc1 100644 --- a/indra/newview/lllandmarkactions.cpp +++ b/indra/newview/lllandmarkactions.cpp @@ -53,10 +53,15 @@ #include "llagentui.h" -class LLFetchlLandmarkByAgentPos : public LLInventoryCollectFunctor +class LLFetchlLandmarkByPos : public LLInventoryCollectFunctor { - +private: + LLVector3d mPos; public: + LLFetchlLandmarkByPos(const LLVector3d& pos) : + mPos(pos) + {} + /*virtual*/ bool operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if (!item || item->getType() != LLAssetType::AT_LANDMARK) @@ -69,11 +74,10 @@ public: LLVector3d landmark_global_pos; if (!landmark->getGlobalPos(landmark_global_pos)) return false; - LLVector3d a_pos = gAgent.getPositionGlobal(); //we have to round off each coordinates to compare positions properly - return llround(a_pos.mdV[VX]) == llround(landmark_global_pos.mdV[VX]) - && llround(a_pos.mdV[VY]) == llround(landmark_global_pos.mdV[VY]) - && llround(a_pos.mdV[VZ]) == llround(landmark_global_pos.mdV[VZ]); + return llround(mPos.mdV[VX]) == llround(landmark_global_pos.mdV[VX]) + && llround(mPos.mdV[VY]) == llround(landmark_global_pos.mdV[VY]) + && llround(mPos.mdV[VZ]) == llround(landmark_global_pos.mdV[VZ]); } }; @@ -147,12 +151,12 @@ bool LLLandmarkActions::landmarkAlreadyExists() } -LLViewerInventoryItem* LLLandmarkActions::findLandmarkForAgentPos() +LLViewerInventoryItem* LLLandmarkActions::findLandmarkForGlobalPos(const LLVector3d &pos) { // Determine whether there are landmarks pointing to the current parcel. LLInventoryModel::cat_array_t cats; LLInventoryModel::item_array_t items; - LLFetchlLandmarkByAgentPos is_current_pos_landmark; + LLFetchlLandmarkByPos is_current_pos_landmark(pos); gInventory.collectDescendentsIf(gInventory.getRootFolderID(), cats, items, @@ -167,6 +171,11 @@ LLViewerInventoryItem* LLLandmarkActions::findLandmarkForAgentPos() return items[0]; } +LLViewerInventoryItem* LLLandmarkActions::findLandmarkForAgentPos() +{ + return findLandmarkForGlobalPos(gAgent.getPositionGlobal()); +} + bool LLLandmarkActions::canCreateLandmarkHere() { LLParcel* agent_parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); diff --git a/indra/newview/lllandmarkactions.h b/indra/newview/lllandmarkactions.h index ce3ed76090..ab8cc4d6a5 100644 --- a/indra/newview/lllandmarkactions.h +++ b/indra/newview/lllandmarkactions.h @@ -53,6 +53,14 @@ public: static bool landmarkAlreadyExists(); /** + * @brief Searches landmark for global position. + * @return Returns landmark or NULL. + * + * *TODO: dzaporozhan: There can be many landmarks for single parcel. + */ + static LLViewerInventoryItem* findLandmarkForGlobalPos(const LLVector3d &pos); + + /** * @brief Searches landmark for agent global position. * @return Returns landmark or NULL. * @@ -60,6 +68,7 @@ public: */ static LLViewerInventoryItem* findLandmarkForAgentPos(); + /** * @brief Checks whether agent has rights to create landmark for current parcel. */ diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index 755f1235a6..1be03cef0b 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -55,7 +55,7 @@ LLAlertHandler::LLAlertHandler(e_notification_type type, const LLSD& id) : mIsMo // Getting a Channel for our notifications mChannel = LLChannelManager::getInstance()->getChannel(p); - mChannel->setShowToasts(true); + mChannel->setCanStoreToasts(false); } //-------------------------------------------------------------------------- diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp index 6e1dc6940e..d9cdf2e04f 100644 --- a/indra/newview/lloutputmonitorctrl.cpp +++ b/indra/newview/lloutputmonitorctrl.cpp @@ -129,7 +129,7 @@ void LLOutputMonitorCtrl::draw() const F32 LEVEL_1 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL * 2.f / 3.f; const F32 LEVEL_2 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL; - if (mIsParentVisible && getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) + if (getVisible() && mAutoUpdate && !mIsMuted && mSpeakerId.notNull()) { setPower(gVoiceClient->getCurrentPower(mSpeakerId)); setIsTalking(gVoiceClient->getIsSpeaking(mSpeakerId)); @@ -220,12 +220,6 @@ void LLOutputMonitorCtrl::draw() gl_rect_2d(0, monh, monw, 0, sColorBound, FALSE); } -void LLOutputMonitorCtrl::handleVisibilityChange(BOOL new_visibility) -{ - mIsParentVisible = new_visibility; - LLView::handleVisibilityChange(new_visibility); -} - void LLOutputMonitorCtrl::setSpeakerId(const LLUUID& speaker_id) { if (speaker_id.isNull()) return; diff --git a/indra/newview/lloutputmonitorctrl.h b/indra/newview/lloutputmonitorctrl.h index 0e213c4326..7a7b8bc3a1 100644 --- a/indra/newview/lloutputmonitorctrl.h +++ b/indra/newview/lloutputmonitorctrl.h @@ -72,8 +72,6 @@ public: // llview overrides virtual void draw(); - void handleVisibilityChange(BOOL new_visibility); - void setPower(F32 val); F32 getPower(F32 val) const { return mPower; } @@ -104,8 +102,6 @@ private: F32 mPower; bool mIsMuted; bool mIsTalking; - /** Stores flag whether parent is visible. If not it will not update indicator*/ - bool mIsParentVisible; LLPointer<LLUIImage> mImageMute; LLPointer<LLUIImage> mImageOff; LLPointer<LLUIImage> mImageOn; diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 32cccc4ac0..9754094aaa 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -42,11 +42,15 @@ #include "llaccordionctrltab.h" #include "llflatlistview.h" #include "lltextbox.h" +#include "llviewermenu.h" +#include "llviewerinventory.h" +#include "lllandmarkactions.h" +#include "llclipboard.h" class LLTeleportHistoryFlatItem : public LLPanel { public: - LLTeleportHistoryFlatItem(S32 index, const std::string ®ion_name); + LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name); virtual ~LLTeleportHistoryFlatItem() {}; virtual BOOL postBuild(); @@ -57,18 +61,23 @@ public: void onMouseEnter(S32 x, S32 y, MASK mask); void onMouseLeave(S32 x, S32 y, MASK mask); + virtual BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + + static void showPlaceInfoPanel(S32 index); private: void onInfoBtnClick(); LLButton* mInfoBtn; + LLTeleportHistoryPanel::ContextMenu *mContextMenu; S32 mIndex; std::string mRegionName; }; -LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, const std::string ®ion_name) +LLTeleportHistoryFlatItem::LLTeleportHistoryFlatItem(S32 index, LLTeleportHistoryPanel::ContextMenu *context_menu, const std::string ®ion_name) : LLPanel(), mIndex(index), + mContextMenu(context_menu), mRegionName(region_name) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history_item.xml"); @@ -109,15 +118,105 @@ void LLTeleportHistoryFlatItem::onMouseLeave(S32 x, S32 y, MASK mask) LLPanel::onMouseLeave(x, y, mask); } -void LLTeleportHistoryFlatItem::onInfoBtnClick() +// virtual +BOOL LLTeleportHistoryFlatItem::handleRightMouseDown(S32 x, S32 y, MASK mask) +{ + if (mContextMenu) + mContextMenu->show(this, mIndex, x, y); + + return LLPanel::handleRightMouseDown(x, y, mask); +} + +void LLTeleportHistoryFlatItem::showPlaceInfoPanel(S32 index) { LLSD params; - params["id"] = mIndex; + params["id"] = index; params["type"] = "teleport_history"; LLSideTray::getInstance()->showPanel("panel_places", params); } +void LLTeleportHistoryFlatItem::onInfoBtnClick() +{ + LLTeleportHistoryFlatItem::showPlaceInfoPanel(mIndex); +} + +LLTeleportHistoryPanel::ContextMenu::ContextMenu() : + mMenu(NULL) +{ +} + +void LLTeleportHistoryPanel::ContextMenu::show(LLView* spawning_view, S32 index, S32 x, S32 y) +{ + if (mMenu) + { + //preventing parent (menu holder) from deleting already "dead" context menus on exit + LLView* parent = mMenu->getParent(); + if (parent) + { + parent->removeChild(mMenu); + mMenu->setParent(NULL); + } + delete mMenu; + } + + mIndex = index; + mMenu = createMenu(); + + LLViewerInventoryItem *landmark = LLLandmarkActions::findLandmarkForGlobalPos( + LLTeleportHistoryStorage::getInstance()->getItems()[index].mGlobalPos); + + mMenu->setItemEnabled("Make Landmark", !landmark || landmark->getUUID().isNull()); + + mMenu->show(x, y); + LLMenuGL::showPopup(spawning_view, mMenu, x, y); +} + +LLContextMenu* LLTeleportHistoryPanel::ContextMenu::createMenu() +{ + // set up the callbacks for all of the avatar menu items + // (N.B. callbacks don't take const refs as mID is local scope) + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + + registrar.add("TeleportHistory.Teleport", boost::bind(&LLTeleportHistoryPanel::ContextMenu::onTeleport, this)); + registrar.add("TeleportHistory.MoreInformation",boost::bind(&LLTeleportHistoryPanel::ContextMenu::onInfo, this)); + registrar.add("TeleportHistory.Copy", boost::bind(&LLTeleportHistoryPanel::ContextMenu::onCopy, this)); + registrar.add("TeleportHistory.MakeLandmark", boost::bind(&LLTeleportHistoryPanel::ContextMenu::onMakeLandmark, this)); + + // create the context menu from the XUI + return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( + "menu_teleport_history_item.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); +} + +void LLTeleportHistoryPanel::ContextMenu::onTeleport() +{ + LLTeleportHistoryStorage::getInstance()->goToItem(mIndex); +} + +void LLTeleportHistoryPanel::ContextMenu::onInfo() +{ + LLTeleportHistoryFlatItem::showPlaceInfoPanel(mIndex); +} + +//static +void LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback(const std::string& slurl) +{ + gClipboard.copyFromString(utf8str_to_wstring(slurl)); +} + +void LLTeleportHistoryPanel::ContextMenu::onCopy() +{ + LLVector3d globalPos = LLTeleportHistoryStorage::getInstance()->getItems()[mIndex].mGlobalPos; + LLLandmarkActions::getSLURLfromPosGlobal(globalPos, + boost::bind(&LLTeleportHistoryPanel::ContextMenu::gotSLURLCallback, _1), false); +} + +void LLTeleportHistoryPanel::ContextMenu::onMakeLandmark() +{ + //FIXME: it creates landmark for current agent positon, not for the global position of item of teleport history + LLSideTray::getInstance()->showPanel("panel_places", LLSD().insert("type", "create_landmark")); +} + // Not yet implemented; need to remove buildPanel() from constructor when we switch //static LLRegisterPanelClassWrapper<LLTeleportHistoryPanel> t_teleport_history("panel_teleport_history"); @@ -126,6 +225,7 @@ LLTeleportHistoryPanel::LLTeleportHistoryPanel() mFilterSubString(LLStringUtil::null), mTeleportHistory(NULL), mHistoryAccordion(NULL), + mAccordionTabMenu(NULL), mLastSelectedScrollList(NULL) { LLUICtrlFactory::getInstance()->buildPanel(this, "panel_teleport_history.xml"); @@ -153,6 +253,8 @@ BOOL LLTeleportHistoryPanel::postBuild() if (dynamic_cast<LLAccordionCtrlTab*>(*iter)) { LLAccordionCtrlTab* tab = (LLAccordionCtrlTab*)*iter; + tab->setRightMouseDownCallback(boost::bind(&LLTeleportHistoryPanel::onAccordionTabRightClick, this, _1, _2, _3, _4)); + mItemContainers.put(tab); LLFlatListView* fl = getFlatListViewFromTab(tab); @@ -354,7 +456,7 @@ void LLTeleportHistoryPanel::showTeleportHistory() if (curr_flat_view) { - curr_flat_view->addItem(new LLTeleportHistoryFlatItem(index, (*iter).mTitle)); + curr_flat_view->addItem(new LLTeleportHistoryFlatItem(index, &mContextMenu, (*iter).mTitle)); } index--; @@ -411,6 +513,56 @@ void LLTeleportHistoryPanel::onDoubleClickItem(void* user_data) LLSideTray::getInstance()->showPanel("panel_places", key);*/ } +void LLTeleportHistoryPanel::onAccordionTabRightClick(LLView *view, S32 x, S32 y, MASK mask) +{ + LLAccordionCtrlTab *tab = (LLAccordionCtrlTab *) view; + + // If click occurred below the header, don't show this menu + if (y < tab->getRect().getHeight() - tab->getHeaderHeight() - tab->getPaddingBottom()) + return; + + if (mAccordionTabMenu) + { + //preventing parent (menu holder) from deleting already "dead" context menus on exit + LLView* parent = mAccordionTabMenu->getParent(); + if (parent) + { + parent->removeChild(mAccordionTabMenu); + mAccordionTabMenu->setParent(NULL); + } + delete mAccordionTabMenu; + } + + // set up the callbacks for all of the avatar menu items + // (N.B. callbacks don't take const refs as mID is local scope) + LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar; + + registrar.add("TeleportHistory.TabOpen", boost::bind(&LLTeleportHistoryPanel::onAccordionTabOpen, this, tab)); + registrar.add("TeleportHistory.TabClose", boost::bind(&LLTeleportHistoryPanel::onAccordionTabClose, this, tab)); + + // create the context menu from the XUI + mAccordionTabMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( + "menu_teleport_history_tab.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + + mAccordionTabMenu->setItemVisible("TabOpen", !tab->isExpanded() ? true : false); + mAccordionTabMenu->setItemVisible("TabClose", tab->isExpanded() ? true : false); + + mAccordionTabMenu->show(x, y); + LLMenuGL::showPopup(tab, mAccordionTabMenu, x, y); +} + +void LLTeleportHistoryPanel::onAccordionTabOpen(LLAccordionCtrlTab *tab) +{ + tab->setDisplayChildren(true); + mHistoryAccordion->arrange(); +} + +void LLTeleportHistoryPanel::onAccordionTabClose(LLAccordionCtrlTab *tab) +{ + tab->setDisplayChildren(false); + mHistoryAccordion->arrange(); +} + LLFlatListView* LLTeleportHistoryPanel::getFlatListViewFromTab(LLAccordionCtrlTab *tab) { for (child_list_const_iter_t iter = tab->beginChild(); iter != tab->endChild(); iter++) diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 66187e69c6..ebba25cfa5 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -37,6 +37,7 @@ #include "llpanelplacestab.h" #include "llteleporthistory.h" +#include "llmenugl.h" class LLTeleportHistoryStorage; class LLAccordionCtrl; @@ -46,6 +47,25 @@ class LLFlatListView; class LLTeleportHistoryPanel : public LLPanelPlacesTab { public: + class ContextMenu + { + public: + ContextMenu(); + void show(LLView* spawning_view, S32 index, S32 x, S32 y); + + private: + LLContextMenu* createMenu(); + void onTeleport(); + void onInfo(); + void onCopy(); + void onMakeLandmark(); + + static void gotSLURLCallback(const std::string& slurl); + + LLContextMenu* mMenu; + S32 mIndex; + }; + LLTeleportHistoryPanel(); virtual ~LLTeleportHistoryPanel(); @@ -59,6 +79,9 @@ public: private: static void onDoubleClickItem(void* user_data); + void onAccordionTabRightClick(LLView *view, S32 x, S32 y, MASK mask); + void onAccordionTabOpen(LLAccordionCtrlTab *tab); + void onAccordionTabClose(LLAccordionCtrlTab *tab); void showTeleportHistory(); void handleItemSelect(LLFlatListView* ); LLFlatListView* getFlatListViewFromTab(LLAccordionCtrlTab *); @@ -70,6 +93,9 @@ private: typedef LLDynamicArray<LLAccordionCtrlTab*> item_containers_t; item_containers_t mItemContainers; + + ContextMenu mContextMenu; + LLContextMenu* mAccordionTabMenu; }; #endif //LL_LLPANELTELEPORTHISTORY_H diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 06bdf64b19..8a96a5a1ae 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -66,7 +66,7 @@ LLScreenChannelBase::LLScreenChannelBase(const LLUUID& id) : ,mOverflowToastHidden(false) ,mIsHovering(false) ,mControlHovering(false) - ,mShowToasts(false) + ,mShowToasts(true) { mID = id; mOverflowFormatString = LLTrans::getString("OverflowInfoChannelString"); @@ -142,7 +142,7 @@ void LLScreenChannel::addToast(LLToast::Params p) { bool store_toast = false, show_toast = false; - show_toast = mWasStartUpToastShown && (mShowToasts || p.force_show); + mDisplayToastsAlways ? show_toast = true : show_toast = mWasStartUpToastShown && (mShowToasts || p.force_show); store_toast = !show_toast && p.can_be_stored && mCanStoreToasts; if(!show_toast && !store_toast) diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 2206e79c6f..669d8d1d70 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -111,7 +111,8 @@ BOOL LLSysWellWindow::postBuild() //--------------------------------------------------------------------------------- void LLSysWellWindow::setMinimized(BOOL minimize) { - setVisible(!minimize); + // we don't show empty Message Well window + setVisible(!minimize && !isWindowEmpty()); LLFloater::setMinimized(minimize); } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index ecaf4fb150..84931e4d2d 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -41,7 +41,7 @@ using namespace LLNotificationsUI; //-------------------------------------------------------------------------- -LLToast::LLToast(LLToast::Params p) : LLFloater(LLSD()), +LLToast::LLToast(LLToast::Params p) : LLModalDialog(LLSD(), p.is_modal), mPanel(p.panel), mTimerValue(p.timer_period), mNotificationID(p.notif_id), @@ -49,7 +49,6 @@ LLToast::LLToast(LLToast::Params p) : LLFloater(LLSD()), mCanFade(p.can_fade), mCanBeStored(p.can_be_stored), mHideBtnEnabled(p.enable_hide_btn), - mIsModal(p.is_modal), mHideBtn(NULL), mNotification(p.notification), mHideBtnPressed(false) @@ -67,13 +66,6 @@ LLToast::LLToast(LLToast::Params p) : LLFloater(LLSD()), mHideBtn->setClickedCallback(boost::bind(&LLToast::hide,this)); } - if(mIsModal) - { - gFocusMgr.setMouseCapture( this ); - gFocusMgr.setTopCtrl( this ); - setFocus(TRUE); - } - // init callbacks if present if(!p.on_delete_toast.empty()) mOnDeleteToastSignal.connect(p.on_delete_toast); @@ -104,11 +96,6 @@ void LLToast::setHideButtonEnabled(bool enabled) LLToast::~LLToast() { mOnToastDestroyedSignal(this); - if(mIsModal) - { - gFocusMgr.unlockFocus(); - gFocusMgr.releaseFocusIfNeeded( this ); - } } //-------------------------------------------------------------------------- @@ -205,18 +192,6 @@ void LLToast::draw() } //-------------------------------------------------------------------------- -void LLToast::setModal(bool modal) -{ - mIsModal = modal; - if(mIsModal) - { - gFocusMgr.setMouseCapture( this ); - gFocusMgr.setTopCtrl( this ); - setFocus(TRUE); - } -} - -//-------------------------------------------------------------------------- void LLToast::setVisible(BOOL show) { if(show) diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 2166351fd0..29c231a01d 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -35,7 +35,7 @@ #include "llpanel.h" -#include "llfloater.h" +#include "llmodaldialog.h" #include "lltimer.h" #include "llnotifications.h" @@ -51,7 +51,7 @@ namespace LLNotificationsUI * Represents toast pop-up. * This is a parent view for all toast panels. */ -class LLToast : public LLFloater +class LLToast : public LLModalDialog { public: typedef boost::function<void (LLToast* toast)> toast_callback_t; @@ -134,8 +134,6 @@ public: void setCanBeStored(bool can_be_stored) { mCanBeStored = can_be_stored; } // bool getCanBeStored() { return mCanBeStored; } - // - void setModal(bool modal); // Registers signals/callbacks for events @@ -171,7 +169,6 @@ private: LLColor4 mBgColor; bool mCanFade; - bool mIsModal; bool mCanBeStored; bool mHideBtnEnabled; bool mHideBtnPressed; diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml new file mode 100644 index 0000000000..d9cba27b88 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Teleport History Item Context Menu"> + <menu_item_call + label="Teleport" + layout="topleft" + name="Teleport"> + <menu_item_call.on_click + function="TeleportHistory.Teleport" /> + </menu_item_call> + <menu_item_call + label="More Information" + layout="topleft" + name="More Information"> + <menu_item_call.on_click + function="TeleportHistory.MoreInformation" /> + </menu_item_call> + <menu_item_call + label="Copy" + layout="topleft" + name="Copy"> + <menu_item_call.on_click + function="TeleportHistory.Copy" /> + </menu_item_call> + <menu_item_call + label="Make Landmark" + layout="topleft" + name="Make Landmark"> + <menu_item_call.on_click + function="TeleportHistory.MakeLandmark" /> + </menu_item_call> +</context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml new file mode 100644 index 0000000000..ecc1d8a954 --- /dev/null +++ b/indra/newview/skins/default/xui/en/menu_teleport_history_tab.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8" standalone="yes" ?> +<context_menu + layout="topleft" + name="Teleport History Item Context Menu"> + <menu_item_call + label="Open" + layout="topleft" + name="TabOpen"> + <menu_item_call.on_click + function="TeleportHistory.TabOpen" /> + </menu_item_call> + <menu_item_call + label="Close" + layout="topleft" + name="TabClose"> + <menu_item_call.on_click + function="TeleportHistory.TabClose" /> + </menu_item_call> +</context_menu> |