From d1f8328b1e3bc17b920dfc3f8bc1865dff19d039 Mon Sep 17 00:00:00 2001 From: angela Date: Wed, 11 Nov 2009 16:16:14 +0800 Subject: EXT-2051 Add tooltip to inventory items showing their full names --- indra/newview/llinventorypanel.cpp | 3 +++ indra/newview/llpanelobjectinventory.cpp | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 9a71e53441..8a1d8ee2d4 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -139,6 +139,7 @@ BOOL LLInventoryPanel::postBuild() p.name = getName(); p.rect = folder_rect; p.parent_panel = this; + p.tool_tip = p.name; mFolders = LLUICtrlFactory::create(p); mFolders->setAllowMultiSelect(mAllowMultiSelect); } @@ -493,6 +494,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) p.icon = new_listener->getIcon(); p.root = mFolders; p.listener = new_listener; + p.tool_tip = p.name; LLFolderViewFolder* folderp = LLUICtrlFactory::create(p); folderp->setItemSortOrder(mFolders->getSortOrder()); @@ -519,6 +521,7 @@ void LLInventoryPanel::buildNewViews(const LLUUID& id) params.root(mFolders); params.listener(new_listener); params.rect(LLRect (0, 0, 0, 0)); + params.tool_tip = params.name; itemp = LLUICtrlFactory::create (params); } } diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index a5e9407a41..b1fbf789c6 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1570,6 +1570,7 @@ void LLPanelObjectInventory::reset() p.name = "task inventory"; p.task_id = getTaskUUID(); p.parent_panel = this; + p.tool_tip= p.name; mFolders = LLUICtrlFactory::create(p); // this ensures that we never say "searching..." or "no items found" mFolders->getFilter()->setShowFolderState(LLInventoryFilter::SHOW_ALL_FOLDERS); @@ -1711,6 +1712,7 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root p.icon_open = LLUI::getUIImage("Inv_FolderOpen"); p.root = mFolders; p.listener = bridge; + p.tool_tip = p.name; new_folder = LLUICtrlFactory::create(p); new_folder->addToFolder(mFolders, mFolders); new_folder->toggleOpen(); @@ -1751,6 +1753,7 @@ void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* invento p.icon_open = LLUI::getUIImage("Inv_FolderOpen"); p.root = mFolders; p.listener = bridge; + p.tool_tip = p.name; view = LLUICtrlFactory::create(p); child_categories.put(new obj_folder_pair(obj, (LLFolderViewFolder*)view)); @@ -1764,6 +1767,7 @@ void LLPanelObjectInventory::createViewsForCategory(InventoryObjectList* invento params.root(mFolders); params.listener(bridge); params.rect(LLRect()); + params.tool_tip = params.name; view = LLUICtrlFactory::create (params); } view->addToFolder(folder, mFolders); -- cgit v1.2.3 From f884941a8f182b43d8bb0030b17b686fa311eaee Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 11 Nov 2009 14:53:13 -0800 Subject: use "LLViewerTexture::EBoostLevel" to replace "S32" for texture boost level. --- indra/newview/llviewertexture.cpp | 8 +++----- indra/newview/llviewertexture.h | 17 ++++++++--------- indra/newview/llviewertexturelist.cpp | 26 ++++++++++++++++---------- indra/newview/llviewertexturelist.h | 14 ++++++++------ indra/newview/llworldmipmap.cpp | 2 +- 5 files changed, 36 insertions(+), 31 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 9923c9ac74..fc4a2b0c0c 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -206,33 +206,31 @@ LLPointer LLViewerTextureManager::getLocalTexture(const U32 wid LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTexture( const LLUUID &image_id, BOOL usemipmaps, - S32 boost_priority, + LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, LLGLenum primary_format, LLHost request_from_host) { - llassert_always(boost_priority >= LLViewerTexture::BOOST_NONE) ; return gTextureList.getImage(image_id, usemipmaps, boost_priority, texture_type, internal_format, primary_format, request_from_host) ; } LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromFile( const std::string& filename, BOOL usemipmaps, - S32 boost_priority, + LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, LLGLenum primary_format, const LLUUID& force_id) { - llassert_always(boost_priority >= LLViewerTexture::BOOST_NONE) ; return gTextureList.getImageFromFile(filename, usemipmaps, boost_priority, texture_type, internal_format, primary_format, force_id) ; } //static LLViewerFetchedTexture* LLViewerTextureManager::getFetchedTextureFromUrl(const std::string& url, BOOL usemipmaps, - S32 boost_priority, + LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, LLGLenum primary_format, diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index bde87d1dd5..141979052d 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -107,12 +107,11 @@ public: enum EBoostLevel { - //skip 0 and 1 to avoid mistakenly mixing boost level with boolean numbers. - BOOST_NONE = 2, - BOOST_AVATAR_BAKED = 3, - BOOST_AVATAR = 4, - BOOST_CLOUDS = 5, - BOOST_SCULPTED = 6, + BOOST_NONE = 0, + BOOST_AVATAR_BAKED = 1, + BOOST_AVATAR = 2, + BOOST_CLOUDS = 3, + BOOST_SCULPTED = 4, BOOST_HIGH = 10, BOOST_TERRAIN = 11, // has to be high priority for minimap / low detail @@ -668,7 +667,7 @@ public: static LLViewerFetchedTexture* getFetchedTexture(const LLUUID &image_id, BOOL usemipmap = TRUE, - S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -677,7 +676,7 @@ public: static LLViewerFetchedTexture* getFetchedTextureFromFile(const std::string& filename, BOOL usemipmap = TRUE, - S32 boost_priority = LLViewerTexture::BOOST_NONE, + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -686,7 +685,7 @@ public: static LLViewerFetchedTexture* getFetchedTextureFromUrl(const std::string& url, BOOL usemipmap = TRUE, - S32 boost_priority = LLViewerTexture::BOOST_NONE, + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp index 081b7cc483..703a13976c 100644 --- a/indra/newview/llviewertexturelist.cpp +++ b/indra/newview/llviewertexturelist.cpp @@ -325,7 +325,7 @@ void LLViewerTextureList::restoreGL() LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& filename, BOOL usemipmaps, - S32 boost_priority, + LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, LLGLenum primary_format, @@ -345,7 +345,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string& LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& url, BOOL usemipmaps, - S32 boost_priority, + LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, LLGLenum primary_format, @@ -411,7 +411,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string& LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, BOOL usemipmaps, - S32 boost_priority, + LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, LLGLenum primary_format, @@ -441,7 +441,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id, //when this function is called, there is no such texture in the gTextureList with image_id. LLViewerFetchedTexture* LLViewerTextureList::createImage(const LLUUID &image_id, BOOL usemipmaps, - S32 boost_priority, + LLViewerTexture::EBoostLevel boost_priority, S8 texture_type, LLGLint internal_format, LLGLenum primary_format, @@ -1346,7 +1346,7 @@ LLUIImagePtr LLUIImageList::getUIImageByID(const LLUUID& image_id, S32 priority) const BOOL use_mips = FALSE; const LLRect scale_rect = LLRect::null; - return loadUIImageByID(image_id, use_mips, scale_rect, priority); + return loadUIImageByID(image_id, use_mips, scale_rect, (LLViewerTexture::EBoostLevel)priority); } LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priority) @@ -1360,21 +1360,27 @@ LLUIImagePtr LLUIImageList::getUIImage(const std::string& image_name, S32 priori const BOOL use_mips = FALSE; const LLRect scale_rect = LLRect::null; - return loadUIImageByName(image_name, image_name, use_mips, scale_rect, priority); + return loadUIImageByName(image_name, image_name, use_mips, scale_rect, (LLViewerTexture::EBoostLevel)priority); } LLUIImagePtr LLUIImageList::loadUIImageByName(const std::string& name, const std::string& filename, - BOOL use_mips, const LLRect& scale_rect, S32 boost_priority ) + BOOL use_mips, const LLRect& scale_rect, LLViewerTexture::EBoostLevel boost_priority ) { - if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI; + if (boost_priority == LLViewerTexture::BOOST_NONE) + { + boost_priority = LLViewerTexture::BOOST_UI; + } LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTextureFromFile(filename, MIPMAP_NO, boost_priority); return loadUIImage(imagep, name, use_mips, scale_rect); } LLUIImagePtr LLUIImageList::loadUIImageByID(const LLUUID& id, - BOOL use_mips, const LLRect& scale_rect, S32 boost_priority) + BOOL use_mips, const LLRect& scale_rect, LLViewerTexture::EBoostLevel boost_priority) { - if (boost_priority == 0) boost_priority = LLViewerFetchedTexture::BOOST_UI; + if (boost_priority == LLViewerTexture::BOOST_NONE) + { + boost_priority = LLViewerTexture::BOOST_UI; + } LLViewerFetchedTexture* imagep = LLViewerTextureManager::getFetchedTexture(id, MIPMAP_NO, boost_priority); return loadUIImage(imagep, id.asString(), use_mips, scale_rect); } diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h index 3c9c81a689..028f8441ab 100644 --- a/indra/newview/llviewertexturelist.h +++ b/indra/newview/llviewertexturelist.h @@ -130,7 +130,7 @@ private: LLViewerFetchedTexture * getImage(const LLUUID &image_id, BOOL usemipmap = TRUE, - S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -139,7 +139,7 @@ private: LLViewerFetchedTexture * getImageFromFile(const std::string& filename, BOOL usemipmap = TRUE, - S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -148,7 +148,7 @@ private: LLViewerFetchedTexture* getImageFromUrl(const std::string& url, BOOL usemipmap = TRUE, - BOOL level_immediate = FALSE, // Get the requested level immediately upon creation. + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -157,7 +157,7 @@ private: LLViewerFetchedTexture* createImage(const LLUUID &image_id, BOOL usemipmap = TRUE, - S32 boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_NONE, // Get the requested level immediately upon creation. S8 texture_type = LLViewerTexture::FETCHED_TEXTURE, LLGLint internal_format = 0, LLGLenum primary_format = 0, @@ -228,9 +228,11 @@ public: static void onUIImageLoaded( BOOL success, LLViewerFetchedTexture *src_vi, LLImageRaw* src, LLImageRaw* src_aux, S32 discard_level, BOOL final, void* userdata ); private: LLUIImagePtr loadUIImageByName(const std::string& name, const std::string& filename, - BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0); + BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); LLUIImagePtr loadUIImageByID(const LLUUID& id, - BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, S32 boost_priority = 0); + BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null, + LLViewerTexture::EBoostLevel boost_priority = LLViewerTexture::BOOST_UI); LLUIImagePtr loadUIImage(LLViewerFetchedTexture* imagep, const std::string& name, BOOL use_mips = FALSE, const LLRect& scale_rect = LLRect::null); diff --git a/indra/newview/llworldmipmap.cpp b/indra/newview/llworldmipmap.cpp index 8d3165b98c..9897f40c4e 100644 --- a/indra/newview/llworldmipmap.cpp +++ b/indra/newview/llworldmipmap.cpp @@ -196,7 +196,7 @@ LLPointer LLWorldMipmap::loadObjectsTile(U32 grid_x, U32 // END DEBUG //LL_INFOS("World Map") << "LLWorldMipmap::loadObjectsTile(), URL = " << imageurl << LL_ENDL; - LLPointer img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, TRUE, FALSE, LLViewerTexture::LOD_TEXTURE); + LLPointer img = LLViewerTextureManager::getFetchedTextureFromUrl(imageurl, TRUE, LLViewerTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE); img->setBoostLevel(LLViewerTexture::BOOST_MAP); // Return the smart pointer -- cgit v1.2.3 From 816133718eb4e274bfa20ac86dba34faf59155b1 Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 11 Nov 2009 15:09:28 -0800 Subject: Fix bad XML causing UI images not to load. --- indra/newview/skins/default/textures/textures.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 57239f9e7f..4c4b6a3899 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -532,7 +532,7 @@ - -- cgit v1.2.3 From 3732d41a108b21de537c8179d06e6e2d7ebda995 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 11 Nov 2009 15:23:08 -0800 Subject: EXT-950 Minimized floaters default to a bad location onscreen EXT-2298 [BSI] Busy mode response shows as "|TOKEN COPY BusyModeResponse|" in General prefs while offline --- indra/newview/llstartup.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 64dcd7b97f..2c59d62b4b 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -873,6 +873,9 @@ bool idle_startup() gViewerWindow->getWindow()->show(); display_startup(); + //DEV-10530. do cleanup. remove at some later date. jan-2009 + LLFloaterPreference::cleanupBadSetting(); + // DEV-16927. The following code removes errant keystrokes that happen while the window is being // first made visible. #ifdef _WIN32 @@ -1900,9 +1903,6 @@ bool idle_startup() //DEV-17797. get null folder. Any items found here moved to Lost and Found LLInventoryModel::findLostItems(); - //DEV-10530. do cleanup. remove at some later date. jan-2009 - LLFloaterPreference::cleanupBadSetting(); - LLStartUp::setStartupState( STATE_PRECACHE ); timeout.reset(); return FALSE; -- cgit v1.2.3 From e3690313a2868d5e7164226e867a4e2ee7a8677e Mon Sep 17 00:00:00 2001 From: richard Date: Wed, 11 Nov 2009 16:47:23 -0800 Subject: EXT-2049 - tighten up indentations on inventory --- indra/newview/llfolderviewitem.cpp | 4 +++- indra/newview/llfolderviewitem.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 6fdaefd21a..5db35d5f70 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -388,7 +388,9 @@ BOOL LLFolderViewItem::addToFolder(LLFolderViewFolder* folder, LLFolderView* roo // makes sure that this view and it's children are the right size. S32 LLFolderViewItem::arrange( S32* width, S32* height, S32 filter_generation) { - mIndentation = mParentFolder ? mParentFolder->getIndentation() + LEFT_INDENTATION : 0; + mIndentation = getParentFolder() && getParentFolder()->getParentFolder() + ? mParentFolder->getIndentation() + LEFT_INDENTATION + : 0; if (mLabelWidthDirty) { mLabelWidth = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + getLabelFontForStyle(mLabelStyle)->getWidth(mSearchableLabel); diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 62a4b9a187..7c429fc76e 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -110,7 +110,7 @@ public: // layout constants static const S32 LEFT_PAD = 5; - static const S32 LEFT_INDENTATION = 13; + static const S32 LEFT_INDENTATION = 8; static const S32 ICON_PAD = 2; static const S32 ICON_WIDTH = 16; static const S32 TEXT_PAD = 1; -- cgit v1.2.3 From 14fb8d400edf0ea71290195b6bf41b7d580157af Mon Sep 17 00:00:00 2001 From: James Cook Date: Wed, 11 Nov 2009 17:44:15 -0800 Subject: EXT-2368 Group inspector now shows no Join/Leave buttons until data is fetched --- indra/newview/llinspectgroup.cpp | 3 ++- indra/newview/skins/default/xui/en/inspect_group.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llinspectgroup.cpp b/indra/newview/llinspectgroup.cpp index c78bcd6afe..7fd7b69021 100644 --- a/indra/newview/llinspectgroup.cpp +++ b/indra/newview/llinspectgroup.cpp @@ -216,7 +216,8 @@ void LLInspectGroup::requestUpdate() getChild("group_details")->setValue(""); getChild("group_cost")->setValue(""); // Must have a visible button so the inspector can take focus - getChild("leave_btn")->setVisible(true); + getChild("view_profile_btn")->setVisible(true); + getChild("leave_btn")->setVisible(false); getChild("join_btn")->setVisible(false); // Make a new request for properties diff --git a/indra/newview/skins/default/xui/en/inspect_group.xml b/indra/newview/skins/default/xui/en/inspect_group.xml index e5e5007c56..f48af2f97e 100644 --- a/indra/newview/skins/default/xui/en/inspect_group.xml +++ b/indra/newview/skins/default/xui/en/inspect_group.xml @@ -31,7 +31,7 @@ use_ellipses="true" width="240" word_wrap="false"> - Grumpity's Grumpy Group of Moose + Grumpity's Grumpy Group of Moose Date: Thu, 12 Nov 2009 12:59:04 +0200 Subject: final fix for (EXT-989) IM chiclets should expand to show active voice indicator (EXT-988) Change indication of unread messges in chiclets fixed chiclets' behavior in the Message Well Window --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 44 ++++++++++++++++------ indra/newview/llsyswellwindow.cpp | 9 +++-- .../skins/default/xui/en/panel_activeim_row.xml | 42 +++++++++++++++++++-- 3 files changed, 77 insertions(+), 18 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index b919195fb2..e416151748 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -54,10 +54,12 @@ static LLDefaultChildRegistry::Register t1("chiclet_panel"); static LLDefaultChildRegistry::Register t2("chiclet_notification"); static LLDefaultChildRegistry::Register t3("chiclet_im_p2p"); static LLDefaultChildRegistry::Register t4("chiclet_im_group"); +static LLDefaultChildRegistry::Register t5("chiclet_im_adhoc"); static const LLRect CHICLET_RECT(0, 25, 25, 0); -static const LLRect CHICLET_ICON_RECT(0, 24, 24, 0); +static const LLRect CHICLET_ICON_RECT(0, 22, 22, 0); static const LLRect VOICE_INDICATOR_RECT(25, 25, 45, 0); +static const S32 OVERLAY_ICON_SHIFT = 2; // used for shifting of an overlay icon for new massages in a chiclet // static const S32 LLChicletPanel::s_scroll_ratio = 10; @@ -217,13 +219,15 @@ LLIMChiclet::LLIMChiclet(const LLIMChiclet::Params& p) icon_params.visible = false; icon_params.image = LLUI::getUIImage(p.new_messages_icon_name); mNewMessagesIcon = LLUICtrlFactory::create(icon_params); + addChild(mNewMessagesIcon); + // adjust size and position of an icon LLRect chiclet_rect = p.rect; - LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.mTop, chiclet_rect.mRight, chiclet_rect.getHeight()/2); - // shift an icon a little bit to the right and up corner of a chiclet - overlay_icon_rect.translate(overlay_icon_rect.getWidth()/5, overlay_icon_rect.getHeight()/5); + LLRect overlay_icon_rect = LLRect(chiclet_rect.getWidth()/2, chiclet_rect.getHeight(), chiclet_rect.getWidth(), chiclet_rect.getHeight()/2); mNewMessagesIcon->setRect(overlay_icon_rect); - addChild(mNewMessagesIcon); + + // shift an icon a little bit to the right and up corner of a chiclet + overlay_icon_rect.translate(OVERLAY_ICON_SHIFT, OVERLAY_ICON_SHIFT); setShowCounter(false); } @@ -602,6 +606,9 @@ BOOL LLAdHocChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) LLIMGroupChiclet::Params::Params() : group_icon("group_icon") +, unread_notifications("unread_notifications") +, speaker("speaker") +, show_speaker("show_speaker") { rect(CHICLET_RECT); @@ -880,19 +887,34 @@ BOOL LLChicletPanel::postBuild() void LLChicletPanel::onCurrentVoiceChannelChanged(const LLUUID& session_id) { - for(chiclet_list_t::iterator it = mChicletList.begin(); it != mChicletList.end(); ++it) + static LLUUID s_previous_active_voice_session_id; + + std::list chiclets = LLIMChiclet::sFindChicletsSignal(session_id); + + for(std::list::iterator it = chiclets.begin(); it != chiclets.end(); ++it) { LLIMChiclet* chiclet = dynamic_cast(*it); if(chiclet) { - if(chiclet->getSessionId() == session_id) + chiclet->setShowSpeaker(true); + } + } + + if(!s_previous_active_voice_session_id.isNull() && s_previous_active_voice_session_id != session_id) + { + chiclets = LLIMChiclet::sFindChicletsSignal(s_previous_active_voice_session_id); + + for(std::list::iterator it = chiclets.begin(); it != chiclets.end(); ++it) + { + LLIMChiclet* chiclet = dynamic_cast(*it); + if(chiclet) { - chiclet->setShowSpeaker(true); - continue; + chiclet->setShowSpeaker(false); } - chiclet->setShowSpeaker(false); - } + } } + + s_previous_active_voice_session_id = session_id; } S32 LLChicletPanel::calcChickletPanleWidth() diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 4422c4b672..2fb6550107 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -501,14 +501,14 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& switch (im_chiclet_type) { case LLIMChiclet::TYPE_GROUP: + mChiclet = getChild("group_chiclet"); + break; case LLIMChiclet::TYPE_AD_HOC: - mChiclet = getChild("group_chiclet"); - childSetVisible("p2p_chiclet", false); + mChiclet = getChild("adhoc_chiclet"); break; case LLIMChiclet::TYPE_UNKNOWN: // assign mChiclet a non-null value anyway case LLIMChiclet::TYPE_IM: - mChiclet = getChild("p2p_chiclet"); - childSetVisible("group_chiclet", false); + mChiclet = getChild("p2p_chiclet"); break; } @@ -517,6 +517,7 @@ LLSysWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& mChiclet->setSessionId(sessionId); mChiclet->setIMSessionName(name); mChiclet->setOtherParticipantId(otherParticipantId); + mChiclet->setVisible(true); LLTextBox* contactName = getChild("contact_name"); contactName->setValue(name); diff --git a/indra/newview/skins/default/xui/en/panel_activeim_row.xml b/indra/newview/skins/default/xui/en/panel_activeim_row.xml index 8b815b0f71..5562ec8406 100644 --- a/indra/newview/skins/default/xui/en/panel_activeim_row.xml +++ b/indra/newview/skins/default/xui/en/panel_activeim_row.xml @@ -15,7 +15,16 @@ top="3" left="5" height="25" - width="25"> + width="25" + visible="false" + speaker.name="speaker_p2p" + speaker.width="20" + speaker.height="25" + speaker.left="25" + speaker.top="25" + speaker.auto_update="true" + speaker.draw_border="false" + speaker.visible="false"> + width="25" + visible="false" + speaker.name="speaker_grp" + speaker.width="20" + speaker.height="25" + speaker.left="25" + speaker.top="25" + speaker.auto_update="true" + speaker.draw_border="false" + speaker.visible="false"> + + Date: Thu, 12 Nov 2009 13:29:27 +0200 Subject: Fixed Low bug EXT-2345-There is wrong direction arrow in IM window, after this window has been closed and restored (refer to screenshot) --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 54fc6f02fb..5ea900e46d 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -211,6 +211,7 @@ BOOL LLIMFloater::postBuild() } mControlPanel->setSessionId(mSessionID); + mControlPanel->setVisible(gSavedSettings.getBOOL("IMShowControlPanel")); LLButton* slide_left = getChild("slide_left_btn"); slide_left->setVisible(mControlPanel->getVisible()); @@ -356,8 +357,6 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) LLDockControl::TOP, boost::bind(&LLIMFloater::getAllowedRect, floater, _1))); } - floater->childSetVisible("panel_im_control_panel", gSavedSettings.getBOOL("IMShowControlPanel")); - return floater; } -- cgit v1.2.3 From 01d90c3d3e90321be326db04ecd2e09328cb189e Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 12 Nov 2009 14:25:34 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) increased chat bar text field to compensate changes in changeset: 4652 : d0832cfa71c6 (for EXT-2356 Replace Log button in bottom tray with up arrow) --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index 1ef845b769..a77094e942 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -27,7 +27,7 @@ name="chat_box" tool_tip="Press Enter to say, Ctrl+Enter to shout" top="0" - width="250" /> + width="279" /> Date: Thu, 12 Nov 2009 21:17:31 +0800 Subject: add optional style params in setText function --- indra/newview/llchatmsgbox.cpp | 4 ++-- indra/newview/llchatmsgbox.h | 2 +- indra/newview/llexpandabletextbox.cpp | 4 ++-- indra/newview/llexpandabletextbox.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchatmsgbox.cpp b/indra/newview/llchatmsgbox.cpp index 12626e3b43..bb0ec2db27 100644 --- a/indra/newview/llchatmsgbox.cpp +++ b/indra/newview/llchatmsgbox.cpp @@ -84,7 +84,7 @@ LLChatMsgBox::LLChatMsgBox(const Params& p) : mBlockSpacing(p.block_spacing) {} -void LLChatMsgBox::addText( const LLStringExplicit& text ) +void LLChatMsgBox::addText( const LLStringExplicit& text , const LLStyle::Params& input_params ) { S32 length = getLength(); // if there is existing text, add a separator @@ -94,5 +94,5 @@ void LLChatMsgBox::addText( const LLStringExplicit& text ) insertSegment(new ChatSeparator(length - 1, length - 1)); } // prepend newline only if there is some existing text - appendText(text, length > 0); + appendText(text, length > 0, input_params); } diff --git a/indra/newview/llchatmsgbox.h b/indra/newview/llchatmsgbox.h index df29db58c3..9e16616729 100644 --- a/indra/newview/llchatmsgbox.h +++ b/indra/newview/llchatmsgbox.h @@ -61,7 +61,7 @@ protected: friend class LLUICtrlFactory; public: - void addText(const LLStringExplicit &text); + void addText(const LLStringExplicit &text, const LLStyle::Params& input_params = LLStyle::Params()); private: S32 mBlockSpacing; diff --git a/indra/newview/llexpandabletextbox.cpp b/indra/newview/llexpandabletextbox.cpp index 424d635321..6d7da107ac 100644 --- a/indra/newview/llexpandabletextbox.cpp +++ b/indra/newview/llexpandabletextbox.cpp @@ -129,12 +129,12 @@ void LLExpandableTextBox::LLTextBoxEx::reshape(S32 width, S32 height, BOOL calle } } -void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text) +void LLExpandableTextBox::LLTextBoxEx::setText(const LLStringExplicit& text,const LLStyle::Params& input_params) { // LLTextBox::setText will obliterate the expander segment, so make sure // we generate it again by clearing mExpanderVisible mExpanderVisible = false; - LLTextBox::setText(text); + LLTextBox::setText(text, input_params); // text contents have changed, segments are cleared out // so hide the expander and determine if we need it diff --git a/indra/newview/llexpandabletextbox.h b/indra/newview/llexpandabletextbox.h index 3fe646c29c..7c989cfa50 100644 --- a/indra/newview/llexpandabletextbox.h +++ b/indra/newview/llexpandabletextbox.h @@ -60,7 +60,7 @@ protected: // adds or removes "More" link as needed /*virtual*/ void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); - /*virtual*/ void setText(const LLStringExplicit& text); + /*virtual*/ void setText(const LLStringExplicit& text, const LLStyle::Params& input_params = LLStyle::Params()); /** * Returns difference between text box height and text height. -- cgit v1.2.3 From 11fc2da6fa5fba0bb659dd97f8533e4529aece06 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 12 Nov 2009 21:20:18 +0800 Subject: make color and font affecting both nearby chat and toasts --- indra/newview/CMakeLists.txt | 2 + indra/newview/llchathistory.cpp | 12 +- indra/newview/llchathistory.h | 4 +- indra/newview/llchatitemscontainerctrl.cpp | 57 ++++++-- indra/newview/llchatitemscontainerctrl.h | 6 +- indra/newview/llimfloater.cpp | 7 +- indra/newview/llnearbychat.cpp | 107 ++------------- indra/newview/llnearbychat.h | 6 +- indra/newview/llnearbychathandler.cpp | 9 +- indra/newview/llnotificationtiphandler.cpp | 1 + indra/newview/llviewerchat.cpp | 203 +++++++++++++++++++++++++++++ indra/newview/llviewerchat.h | 53 ++++++++ indra/newview/llviewermessage.cpp | 9 +- 13 files changed, 350 insertions(+), 126 deletions(-) create mode 100644 indra/newview/llviewerchat.cpp create mode 100644 indra/newview/llviewerchat.h (limited to 'indra/newview') diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 13c381edae..eb4e914e70 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -445,6 +445,7 @@ set(viewer_SOURCE_FILES llviewerassettype.cpp llvieweraudio.cpp llviewercamera.cpp + llviewerchat.cpp llviewercontrol.cpp llviewercontrollistener.cpp llviewerdisplay.cpp @@ -942,6 +943,7 @@ set(viewer_HEADER_FILES llvieweraudio.h llviewerbuild.h llviewercamera.h + llviewerchat.h llviewercontrol.h llviewercontrollistener.h llviewerdisplay.h diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2ccd6b7d35..cc014e3c28 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -330,7 +330,7 @@ LLView* LLChatHistory::getHeader(const LLChat& chat) return header; } -void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& style_params) +void LLChatHistory::appendWidgetMessage(const LLChat& chat) { LLView* view = NULL; std::string view_text; @@ -370,7 +370,17 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& sty appendWidget(p, view_text, false); //Append the text message + + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLViewerChat::getChatColor(chat,txt_color); + LLFontGL* fontp = LLViewerChat::getChatFont(); + std::string message = chat.mText + '\n'; + + LLStyle::Params style_params; + style_params.color(txt_color); + style_params.font(fontp); + appendText(message, FALSE, style_params); mLastFromName = chat.mFromName; diff --git a/indra/newview/llchathistory.h b/indra/newview/llchathistory.h index 3789ebff4e..891d9c6c77 100644 --- a/indra/newview/llchathistory.h +++ b/indra/newview/llchathistory.h @@ -34,7 +34,7 @@ #define LLCHATHISTORY_H_ #include "lltexteditor.h" -#include "llchat.h" +#include "llviewerchat.h" //Chat log widget allowing addition of a message as a widget class LLChatHistory : public LLTextEditor @@ -111,7 +111,7 @@ class LLChatHistory : public LLTextEditor * @param time time of a message. * @param message message itself. */ - void appendWidgetMessage(const LLChat& chat, LLStyle::Params& style_params); + void appendWidgetMessage(const LLChat& chat); private: std::string mLastFromName; diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp index 63b9fd8e66..d2e3247250 100644 --- a/indra/newview/llchatitemscontainerctrl.cpp +++ b/indra/newview/llchatitemscontainerctrl.cpp @@ -120,10 +120,10 @@ std::string LLNearbyChatToastPanel::appendTime() -void LLNearbyChatToastPanel::addText (const std::string& message) +void LLNearbyChatToastPanel::addText (const std::string& message , const LLStyle::Params& input_params) { LLChatMsgBox* msg_text = getChild("msg_text", false); - msg_text->addText(message); + msg_text->addText(message , input_params); mMessages.push_back(message); } @@ -134,9 +134,34 @@ void LLNearbyChatToastPanel::init(LLSD& notification) mText = notification["message"].asString(); // UTF-8 line of text mFromName = notification["from"].asString(); // agent or object name mFromID = notification["from_id"].asUUID(); // agent id or object id + int sType = notification["source"].asInteger(); mSourceType = (EChatSourceType)sType; - + + std::string color_name = notification["text_color"].asString(); + + mTextColor = LLUIColorTable::instance().getColor(color_name); + mTextColor.mV[VALPHA] =notification["color_alpha"].asReal(); + + S32 font_size = notification["font_size"].asInteger(); + switch(font_size) + { + case 0: + mFont = LLFontGL::getFontSansSerifSmall(); + break; + default: + case 1: + mFont = LLFontGL::getFontSansSerif(); + break; + case 2: + mFont = LLFontGL::getFontSansSerifBig(); + break; + } + + LLStyle::Params style_params; + style_params.color(mTextColor); + style_params.font(mFont); + std::string str_sender; if(gAgentID != mFromID) @@ -144,13 +169,13 @@ void LLNearbyChatToastPanel::init(LLSD& notification) else str_sender = LLTrans::getString("You");; - caption->getChild("sender_name", false)->setText(str_sender); + caption->getChild("sender_name", false)->setText(str_sender , style_params); - caption->getChild("msg_time", false)->setText(appendTime()); + caption->getChild("msg_time", false)->setText(appendTime() , style_params ); LLChatMsgBox* msg_text = getChild("msg_text", false); - msg_text->setText(mText); + msg_text->setText(mText, style_params); LLUICtrl* msg_inspector = caption->getChild("msg_inspector"); if(mSourceType != CHAT_SOURCE_AGENT) @@ -171,7 +196,15 @@ void LLNearbyChatToastPanel::setMessage (const LLChat& chat_msg) notification["from_id"] = chat_msg.mFromID; notification["time"] = chat_msg.mTime; notification["source"] = (S32)chat_msg.mSourceType; - + + std::string r_color_name="White"; + F32 r_color_alpha = 1.0f; + LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha); + + notification["text_color"] = r_color_name; + notification["color_alpha"] = r_color_alpha; + + notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ; init(notification); } @@ -201,11 +234,17 @@ void LLNearbyChatToastPanel::setWidth(S32 width) text_box->reshape(width - msg_left_offset - msg_right_offset,100/*its not magic number, we just need any number*/); LLChatMsgBox* msg_text = getChild("msg_text", false); + + LLStyle::Params style_params; + style_params.color(mTextColor); + style_params.font(mFont); + + if(mText.length()) - msg_text->setText(mText); + msg_text->setText(mText, style_params); for(size_t i=0;iaddText(mMessages[i]); + msg_text->addText(mMessages[i] , style_params); setRect(LLRect(getRect().mLeft, getRect().mTop, getRect().mLeft + width , getRect().mBottom)); snapToMessageHeight (); diff --git a/indra/newview/llchatitemscontainerctrl.h b/indra/newview/llchatitemscontainerctrl.h index 8fb045b6d9..a65bfedd09 100644 --- a/indra/newview/llchatitemscontainerctrl.h +++ b/indra/newview/llchatitemscontainerctrl.h @@ -36,7 +36,7 @@ #include "llpanel.h" #include "llscrollbar.h" #include "string" -#include "llchat.h" +#include "llviewerchat.h" #include "lltoastpanel.h" typedef enum e_show_item_header @@ -59,7 +59,7 @@ public: const LLUUID& getFromID() const { return mFromID;} - void addText (const std::string& message); + void addText (const std::string& message , const LLStyle::Params& input_params = LLStyle::Params()); void setMessage (const LLChat& msg); void setWidth (S32 width); void snapToMessageHeight (); @@ -89,6 +89,8 @@ private: std::string mFromName; // agent or object name LLUUID mFromID; // agent id or object id EChatSourceType mSourceType; + LLColor4 mTextColor; + LLFontGL* mFont; std::vector mMessages; diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 5a2331aa06..2504e1e916 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -463,7 +463,7 @@ void LLIMFloater::updateMessages() if (messages.size()) { - LLUIColor chat_color = LLUIColorTable::instance().getColor("IMChatColor"); +// LLUIColor chat_color = LLUIColorTable::instance().getColor("IMChatColor"); std::ostringstream message; std::list::const_reverse_iterator iter = messages.rbegin(); @@ -476,14 +476,11 @@ void LLIMFloater::updateMessages() LLUUID from_id = msg["from_id"].asUUID(); std::string from = from_id != gAgentID ? msg["from"].asString() : LLTrans::getString("You"); std::string message = msg["message"].asString(); - LLStyle::Params style_params; - style_params.color(chat_color); LLChat chat(message); chat.mFromID = from_id; chat.mFromName = from; - - mChatHistory->appendWidgetMessage(chat, style_params); + mChatHistory->appendWidgetMessage(chat); mLastMessageIndex = msg["index"].asInteger(); } diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index ac806d7106..85db69174d 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -132,120 +132,31 @@ void LLNearbyChat::applySavedVariables() } } -LLColor4 nearbychat_get_text_color(const LLChat& chat) -{ - LLColor4 text_color; - - if(chat.mMuted) - { - text_color.setVec(0.8f, 0.8f, 0.8f, 1.f); - } - else - { - switch(chat.mSourceType) - { - case CHAT_SOURCE_SYSTEM: - text_color = LLUIColorTable::instance().getColor("SystemChatColor"); - break; - case CHAT_SOURCE_AGENT: - if (chat.mFromID.isNull()) - { - text_color = LLUIColorTable::instance().getColor("SystemChatColor"); - } - else - { - if(gAgentID == chat.mFromID) - { - text_color = LLUIColorTable::instance().getColor("UserChatColor"); - } - else - { - text_color = LLUIColorTable::instance().getColor("AgentChatColor"); - } - } - break; - case CHAT_SOURCE_OBJECT: - if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) - { - text_color = LLUIColorTable::instance().getColor("ScriptErrorColor"); - } - else if ( chat.mChatType == CHAT_TYPE_OWNER ) - { - text_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor"); - } - else - { - text_color = LLUIColorTable::instance().getColor("ObjectChatColor"); - } - break; - default: - text_color.setToWhite(); - } - - if (!chat.mPosAgent.isExactlyZero()) - { - LLVector3 pos_agent = gAgent.getPositionAgent(); - F32 distance = dist_vec(pos_agent, chat.mPosAgent); - if (distance > gAgent.getNearChatRadius()) - { - // diminish far-off chat - text_color.mV[VALPHA] = 0.8f; - } - } - } - - return text_color; -} - -void LLNearbyChat::add_timestamped_line(const LLChat& chat, const LLColor4& color) -{ - S32 font_size = gSavedSettings.getS32("ChatFontSize"); - - const LLFontGL* fontp = NULL; - switch(font_size) - { - case 0: - fontp = LLFontGL::getFontSansSerifSmall(); - break; - default: - case 1: - fontp = LLFontGL::getFontSansSerif(); - break; - case 2: - fontp = LLFontGL::getFontSansSerifBig(); - break; - } - - LLStyle::Params style_params; - style_params.color(color); - style_params.font(fontp); - LLUUID uuid = chat.mFromID; - std::string from = chat.mFromName; - std::string message = chat.mText; - mChatHistory->appendWidgetMessage(chat, style_params); -} - void LLNearbyChat::addMessage(const LLChat& chat) { - LLColor4 color = nearbychat_get_text_color(chat); - if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) { if(gSavedSettings.getBOOL("ShowScriptErrors") == FALSE) return; if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat")) { + + LLColor4 txt_color; + + LLViewerChat::getChatColor(chat,txt_color); + LLFloaterScriptDebug::addScriptLine(chat.mText, chat.mFromName, - color, + txt_color, chat.mFromID); return; } } - // could flash the chat button in the status bar here. JC if (!chat.mMuted) - add_timestamped_line(chat, color); + { + mChatHistory->appendWidgetMessage(chat); + } } void LLNearbyChat::onNearbySpeakers() diff --git a/indra/newview/llnearbychat.h b/indra/newview/llnearbychat.h index cb4654654a..3303c388af 100644 --- a/indra/newview/llnearbychat.h +++ b/indra/newview/llnearbychat.h @@ -35,7 +35,7 @@ #include "lldockablefloater.h" #include "llscrollbar.h" -#include "llchat.h" +#include "llviewerchat.h" class LLResizeBar; class LLChatHistory; @@ -47,8 +47,7 @@ public: ~LLNearbyChat(); BOOL postBuild (); - void addMessage (const LLChat& message); - + void addMessage (const LLChat& message); void onNearbyChatContextMenuItemClicked(const LLSD& userdata); bool onNearbyChatCheckContextMenuItem(const LLSD& userdata); @@ -64,7 +63,6 @@ private: void getAllowedRect (LLRect& rect); void onNearbySpeakers (); - void add_timestamped_line(const LLChat& chat, const LLColor4& color); private: diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index e10c506f08..d1cd92ad68 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -351,7 +351,14 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) notification["time"] = chat_msg.mTime; notification["source"] = (S32)chat_msg.mSourceType; notification["chat_type"] = (S32)chat_msg.mChatType; - + + std::string r_color_name = "White"; + F32 r_color_alpha = 1.0f; + LLViewerChat::getChatColor( chat_msg, r_color_name, r_color_alpha); + + notification["text_color"] = r_color_name; + notification["color_alpha"] = r_color_alpha; + notification["font_size"] = (S32)LLViewerChat::getChatFontSize() ; channel->addNotification(notification); } diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index 823c92a94e..60a27d5154 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -91,6 +91,7 @@ bool LLTipHandler::processNotification(const LLSD& notify) if(nearby_chat) { LLChat chat_msg(notification->getMessage()); + chat_msg.mSourceType = CHAT_SOURCE_SYSTEM; nearby_chat->addMessage(chat_msg); // don't show toast if Nearby Chat is opened diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp new file mode 100644 index 0000000000..d65a060bbc --- /dev/null +++ b/indra/newview/llviewerchat.cpp @@ -0,0 +1,203 @@ +/** + * @file llviewerchat.cpp + * @brief Builds menus out of items. + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-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 "llviewerchat.h" + +// newview includes +#include "llagent.h" // gAgent +#include "lluicolortable.h" +#include "llviewercontrol.h" // gSavedSettings + +// LLViewerChat + +//static +void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color) +{ + if(chat.mMuted) + { + r_color= LLUIColorTable::instance().getColor("LtGray"); + } + else + { + switch(chat.mSourceType) + { + case CHAT_SOURCE_SYSTEM: + r_color = LLUIColorTable::instance().getColor("SystemChatColor"); + break; + case CHAT_SOURCE_AGENT: + if (chat.mFromID.isNull()) + { + r_color = LLUIColorTable::instance().getColor("SystemChatColor"); + } + else + { + if(gAgentID == chat.mFromID) + { + r_color = LLUIColorTable::instance().getColor("UserChatColor"); + } + else + { + r_color = LLUIColorTable::instance().getColor("AgentChatColor"); + } + } + break; + case CHAT_SOURCE_OBJECT: + if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) + { + r_color = LLUIColorTable::instance().getColor("ScriptErrorColor"); + } + else if ( chat.mChatType == CHAT_TYPE_OWNER ) + { + r_color = LLUIColorTable::instance().getColor("llOwnerSayChatColor"); + } + else + { + r_color = LLUIColorTable::instance().getColor("ObjectChatColor"); + } + break; + default: + r_color.setToWhite(); + } + + if (!chat.mPosAgent.isExactlyZero()) + { + LLVector3 pos_agent = gAgent.getPositionAgent(); + F32 distance = dist_vec(pos_agent, chat.mPosAgent); + if (distance > gAgent.getNearChatRadius()) + { + // diminish far-off chat + r_color.mV[VALPHA] = 0.8f; + } + } + } +} + + +//static +void LLViewerChat::getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha) +{ + if(chat.mMuted) + { + r_color_name = "LtGray"; + } + else + { + switch(chat.mSourceType) + { + case CHAT_SOURCE_SYSTEM: + r_color_name = "SystemChatColor"; + break; + + case CHAT_SOURCE_AGENT: + if (chat.mFromID.isNull()) + { + r_color_name = "SystemChatColor"; + } + else + { + if(gAgentID == chat.mFromID) + { + r_color_name = "UserChatColor"; + } + else + { + r_color_name = "AgentChatColor"; + } + } + break; + + case CHAT_SOURCE_OBJECT: + if (chat.mChatType == CHAT_TYPE_DEBUG_MSG) + { + r_color_name = "ScriptErrorColor"; + } + else if ( chat.mChatType == CHAT_TYPE_OWNER ) + { + r_color_name = "llOwnerSayChatColor"; + } + else + { + r_color_name = "ObjectChatColor"; + } + break; + default: + r_color_name = "White"; + } + + if (!chat.mPosAgent.isExactlyZero()) + { + LLVector3 pos_agent = gAgent.getPositionAgent(); + F32 distance = dist_vec(pos_agent, chat.mPosAgent); + if (distance > gAgent.getNearChatRadius()) + { + // diminish far-off chat + r_color_alpha = 0.8f; + } + else + { + r_color_alpha = 1.0f; + } + } + } + +} + + +//static +LLFontGL* LLViewerChat::getChatFont() +{ + S32 font_size = gSavedSettings.getS32("ChatFontSize"); + LLFontGL* fontp = NULL; + switch(font_size) + { + case 0: + fontp = LLFontGL::getFontSansSerifSmall(); + break; + default: + case 1: + fontp = LLFontGL::getFontSansSerif(); + break; + case 2: + fontp = LLFontGL::getFontSansSerifBig(); + break; + } + + return fontp; + +} + +//static +S32 LLViewerChat::getChatFontSize() +{ + return gSavedSettings.getS32("ChatFontSize"); +} diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h new file mode 100644 index 0000000000..d8840d5dd2 --- /dev/null +++ b/indra/newview/llviewerchat.h @@ -0,0 +1,53 @@ +/** + * @file llviewerchat.h + * @brief wrapper of LLChat in viewer + * + * $LicenseInfo:firstyear=2002&license=viewergpl$ + * + * Copyright (c) 2002-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_LLVIEWERCHAT_H +#define LL_LLVIEWERCHAT_H + +#include "llchat.h" +#include "llfontgl.h" +#include "v4color.h" + + +class LLViewerChat +{ +public: + static void getChatColor(const LLChat& chat, LLColor4& r_color); + static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha); + static LLFontGL* getChatFont(); + static S32 getChatFontSize(); + + + +}; + +#endif diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index a90790c59a..921868d448 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -43,7 +43,7 @@ #include "llfloaterbump.h" #include "llassetstorage.h" #include "llcachename.h" -#include "llchat.h" + #include "lldbstrings.h" #include "lleconomy.h" #include "llfilepicker.h" @@ -115,6 +115,7 @@ #include "llui.h" // for make_ui_sound #include "lluploaddialog.h" #include "llviewercamera.h" +#include "llviewerchat.h" #include "llviewergenericmessage.h" #include "llviewerinventory.h" #include "llviewermenu.h" @@ -2232,7 +2233,7 @@ void process_decline_callingcard(LLMessageSystem* msg, void**) void process_chat_from_simulator(LLMessageSystem *msg, void **user_data) { - LLChat chat; + LLChat chat; std::string mesg; std::string from_name; U8 source_temp; @@ -2832,7 +2833,7 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) // Chat the "back" SLURL. (DEV-4907) LLChat chat("Teleport completed from " + gAgent.getTeleportSourceSLURL()); chat.mSourceType = CHAT_SOURCE_SYSTEM; - LLFloaterChat::addChatHistory(chat); + LLFloaterChat::addChatHistory(chat); // Set the new position avatarp->setPositionAgent(agent_pos); @@ -4604,7 +4605,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp if (caution) { LLChat chat(notice.getString()); - LLFloaterChat::addChat(chat, FALSE, FALSE); + // LLFloaterChat::addChat(chat, FALSE, FALSE); } } } -- cgit v1.2.3 From 2e01e2bfbd52aa599e8faa5f65b8861f989bee85 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 12 Nov 2009 15:24:58 +0200 Subject: no ticket, fixed IM message counting and firing new message balloon --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 7 ++++++- indra/newview/llimview.cpp | 6 +----- 2 files changed, 7 insertions(+), 6 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index b919195fb2..b5119790c0 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -830,8 +830,13 @@ LLChicletPanel::~LLChicletPanel() void im_chiclet_callback(LLChicletPanel* panel, const LLSD& data){ LLUUID session_id = data["session_id"].asUUID(); - S32 unread = data["num_unread"].asInteger(); + LLUUID from_id = data["from_id"].asUUID(); + const std::string from = data["from"].asString(); + + //we do not show balloon (indicator of new messages) for system messages and our own messages + if (from_id.isNull() || from_id == gAgentID || SYSTEM_FROM == from) return; + S32 unread = data["num_unread"].asInteger(); LLIMFloater* im_floater = LLIMFloater::findInstance(session_id); if (im_floater && im_floater->getVisible()) { diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index be5fbdbbf8..9c38d9c5fc 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -439,11 +439,7 @@ bool LLIMModel::addMessage(const LLUUID& session_id, const std::string& from, co addToHistory(session_id, from, from_id, utf8_text); if (log2file) logToFile(session_id, from, from_id, utf8_text); - //we do not count system messages and our messages - if (from_id.notNull() && from_id != gAgentID && SYSTEM_FROM != from) - { - session->mNumUnread++; - } + session->mNumUnread++; // notify listeners LLSD arg; -- cgit v1.2.3 From 79e6171b266f15e5d332e7eacdc9807add48f0da Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 12 Nov 2009 13:50:03 +0000 Subject: EXT-2363: Rename 'Friends Conference' to 'Ad-hoc Conference' --- indra/newview/skins/default/xui/en/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index ea66bfa197..761c17cfd2 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2863,7 +2863,7 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. Connecting... - Friends Conference + Ad-hoc Conference Inventory item offered -- cgit v1.2.3 From 4d616fdfaebca4aedce84f5d694dcd495ac4222c Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 12 Nov 2009 16:46:44 +0200 Subject: no ticket, removed misleading warning message about supposedly non-existent session --HG-- branch : product-engine --- indra/newview/llimfloater.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 5ea900e46d..059912d5d4 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -120,11 +120,7 @@ void LLIMFloater::newIMCallback(const LLSD& data){ LLUUID session_id = data["session_id"].asUUID(); LLIMFloater* floater = LLFloaterReg::findTypedInstance("impanel", session_id); - if (floater == NULL) - { - llwarns << "new_im_callback for non-existent session_id " << session_id << llendl; - return; - } + if (floater == NULL) return; // update if visible, otherwise will be updated when opened if (floater->getVisible()) -- cgit v1.2.3 From b4a3b65a602ad56baf761a8426093eda585bc572 Mon Sep 17 00:00:00 2001 From: angela Date: Thu, 12 Nov 2009 23:02:41 +0800 Subject: fix merge error --- indra/newview/llchathistory.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 6d8d11ad2b..2b050f3eb5 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -338,11 +338,22 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) LLView* view = NULL; std::string view_text = "\n[" + formatCurrentTime() + "] " + chat.mFromName + ": "; + LLInlineViewSegment::Params p; p.force_newline = true; p.left_pad = mLeftWidgetPad; p.right_pad = mRightWidgetPad; + + LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); + LLViewerChat::getChatColor(chat,txt_color); + LLFontGL* fontp = LLViewerChat::getChatFont(); + + LLStyle::Params style_params; + style_params.color(txt_color); + style_params.font(fontp); + + if (mLastFromName == chat.mFromName) { view = getSeparator(); @@ -357,6 +368,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) else p.top_pad = mTopHeaderPad; p.bottom_pad = mBottomHeaderPad; + } p.view = view; @@ -371,18 +383,8 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) appendWidget(p, view_text, false); //Append the text message - - LLColor4 txt_color = LLUIColorTable::instance().getColor("White"); - LLViewerChat::getChatColor(chat,txt_color); - LLFontGL* fontp = LLViewerChat::getChatFont(); - - std::string message = chat.mText + '\n'; - - LLStyle::Params style_params; - style_params.color(txt_color); - style_params.font(fontp); - appendText(message, FALSE, style_params); + appendText(chat.mText, FALSE, style_params); mLastFromName = chat.mFromName; blockUndo(); -- cgit v1.2.3 From 86c63e36b59d502f48acc935874050bbe361caf0 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Thu, 12 Nov 2009 17:36:17 +0200 Subject: Fixed major bug EXT-2400-Viewer crashes on right button click upon IM P2P chiclet. Removed call to non-existing child --HG-- branch : product-engine --- indra/newview/llchiclet.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 12bbc29858..fd86192650 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -427,7 +427,6 @@ void LLIMP2PChiclet::updateMenuItems() bool is_friend = LLAvatarActions::isFriend(getOtherParticipantId()); mPopupMenu->getChild("Add Friend")->setEnabled(!is_friend); - mPopupMenu->getChild("Remove Friend")->setEnabled(is_friend); } BOOL LLIMP2PChiclet::handleRightMouseDown(S32 x, S32 y, MASK mask) -- cgit v1.2.3 From fcb99c30407d6ccbae17ea4c3d17a65037ca6a5c Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Thu, 12 Nov 2009 17:43:23 +0200 Subject: Work on major sub-task EXT-991 (Update bottom bar behavior on resize) Code refuctored: - moved code to process Borrom Bar shrinking into separate method - unified code to process a hiding of the Bottom Tray's buttons Code is ready to process shrink after min width is reached & be synchronized with user hidden buttons --HG-- branch : product-engine --- indra/newview/llbottomtray.cpp | 264 ++++++++++++++++++++--------------------- indra/newview/llbottomtray.h | 2 + 2 files changed, 128 insertions(+), 138 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 204d7d23fa..291f645ea2 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -238,22 +238,22 @@ void LLBottomTray::showBottomTrayContextMenu(S32 x, S32 y, MASK mask) void LLBottomTray::showGestureButton(BOOL visible) { - mGesturePanel->setVisible(visible); + showTrayButton(RS_BUTTON_GESTURES, visible); } void LLBottomTray::showMoveButton(BOOL visible) { - mMovementPanel->setVisible(visible); + showTrayButton(RS_BUTTON_MOVEMENT, visible); } void LLBottomTray::showCameraButton(BOOL visible) { - mCamPanel->setVisible(visible); + showTrayButton(RS_BUTTON_CAMERA, visible); } void LLBottomTray::showSnapshotButton(BOOL visible) { - mSnapshotPanel->setVisible(visible); + showTrayButton(RS_BUTTON_SNAPSHOT, visible); } namespace @@ -365,8 +365,6 @@ void LLBottomTray::reshape(S32 width, S32 height, BOOL called_from_parent) void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width) { mResizeState = RS_NORESIZE; - MASK compensative_view_item_mask = RS_CHATBAR_INPUT; - LLPanel* compansative_view = mNearbyChatBar; S32 delta_width = new_width - cur_width; // if (delta_width == 0) return; @@ -386,153 +384,113 @@ void LLBottomTray::updateResizeState(S32 new_width, S32 cur_width) << ", chiclet_panel_min_width: " << chiclet_panel_min_width << llendl; - bool still_should_be_processed = true; // bottom tray is narrowed if (shrink) { - S32 compensative_delta_width = 0; - if (chiclet_panel_width > chiclet_panel_min_width) - { - // we have some space to decrease chiclet panel - S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; - mResizeState |= RS_CHICLET_PANEL; - - S32 delta_panel = llmin(-delta_width, panel_delta_min); + processWidthDecreased(delta_width); + } + // bottom tray is widen + else + { + processWidthIncreased(delta_width); + } - lldebugs << "delta_width: " << delta_width - << ", panel_delta_min: " << panel_delta_min - << ", delta_panel: " << delta_panel - << llendl; + lldebugs << "New resize state: " << mResizeState << llendl; +} - // is chiclet panel width enough to process resizing? - delta_width += panel_delta_min; +void LLBottomTray::processWidthDecreased(S32 delta_width) +{ + bool still_should_be_processed = true; - still_should_be_processed = delta_width < 0; + const S32 chiclet_panel_width = mChicletPanel->getParent()->getRect().getWidth(); + const S32 chiclet_panel_min_width = mChicletPanel->getMinWidth(); - mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); - log(mChicletPanel, "after processing panel decreasing via chiclet panel"); + if (chiclet_panel_width > chiclet_panel_min_width) + { + // we have some space to decrease chiclet panel + S32 panel_delta_min = chiclet_panel_width - chiclet_panel_min_width; + mResizeState |= RS_CHICLET_PANEL; - lldebugs << "RS_CHICLET_PANEL" - << ", delta_width: " << delta_width - << llendl; - } - - if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width) - { - // we have some space to decrease chatbar panel - S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width; - mResizeState |= RS_CHATBAR_INPUT; + S32 delta_panel = llmin(-delta_width, panel_delta_min); - S32 delta_panel = llmin(-delta_width, panel_delta_min); + lldebugs << "delta_width: " << delta_width + << ", panel_delta_min: " << panel_delta_min + << ", delta_panel: " << delta_panel + << llendl; - // is chatbar panel width enough to process resizing? - delta_width += panel_delta_min; - + // is chiclet panel width enough to process resizing? + delta_width += panel_delta_min; - still_should_be_processed = delta_width < 0; + still_should_be_processed = delta_width < 0; - mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight()); + mChicletPanel->getParent()->reshape(mChicletPanel->getParent()->getRect().getWidth() - delta_panel, mChicletPanel->getParent()->getRect().getHeight()); + log(mChicletPanel, "after processing panel decreasing via chiclet panel"); - lldebugs << "RS_CHATBAR_INPUT" - << ", delta_panel: " << delta_panel - << ", delta_width: " << delta_width - << llendl; + lldebugs << "RS_CHICLET_PANEL" + << ", delta_width: " << delta_width + << llendl; + } - log(mChicletPanel, "after nearby was processed"); + const S32 chatbar_panel_width = mNearbyChatBar->getRect().getWidth(); + const S32 chatbar_panel_min_width = mNearbyChatBar->getMinWidth(); + if (still_should_be_processed && chatbar_panel_width > chatbar_panel_min_width) + { + // we have some space to decrease chatbar panel + S32 panel_delta_min = chatbar_panel_width - chatbar_panel_min_width; + mResizeState |= RS_CHATBAR_INPUT; - } - if (still_should_be_processed) - { - mResizeState |= compensative_view_item_mask; + S32 delta_panel = llmin(-delta_width, panel_delta_min); - if (mSnapshotPanel->getVisible()) - { - mResizeState |= RS_BUTTON_SNAPSHOT; - delta_width += mSnapshotPanel->getRect().getWidth(); - - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_SNAPSHOT" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showSnapshotButton(false); - } + // is chatbar panel width enough to process resizing? + delta_width += panel_delta_min; - if (delta_width < 0 && mCamPanel->getVisible()) - { - mResizeState |= RS_BUTTON_CAMERA; - delta_width += mCamPanel->getRect().getWidth(); - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_CAMERA" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showCameraButton(false); - } - if (delta_width < 0 && mMovementPanel->getVisible()) - { - mResizeState |= RS_BUTTON_MOVEMENT; - delta_width += mMovementPanel->getRect().getWidth(); - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_MOVEMENT" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showMoveButton(false); - } + still_should_be_processed = delta_width < 0; - if (delta_width < 0 && mGesturePanel->getVisible()) - { - mResizeState |= RS_BUTTON_GESTURES; - delta_width += mGesturePanel->getRect().getWidth(); - if (delta_width > 0) - { - compensative_delta_width += delta_width; - } - lldebugs << "RS_BUTTON_GESTURES" - << ", compensative_delta_width: " << compensative_delta_width - << ", delta_width: " << delta_width - << llendl; - showGestureButton(false); - } + mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - delta_panel, mNearbyChatBar->getRect().getHeight()); - if (delta_width < 0) - { - llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl; - } + lldebugs << "RS_CHATBAR_INPUT" + << ", delta_panel: " << delta_panel + << ", delta_width: " << delta_width + << llendl; - if (compensative_delta_width != 0) - { - if (compansative_view) log(compansative_view, "before applying compensative width: "); - compansative_view->reshape(compansative_view->getRect().getWidth() + compensative_delta_width, compansative_view->getRect().getHeight() ); - if (compansative_view) log(compansative_view, "after applying compensative width: "); - lldebugs << compensative_delta_width << llendl; + log(mChicletPanel, "after nearby was processed"); - } - } } - // bottom tray is widen - else + + S32 buttons_freed_width = 0; + if (still_should_be_processed) { - processWidthIncreased(delta_width); - } + processHideButton(RS_BUTTON_SNAPSHOT, &delta_width, &buttons_freed_width); - lldebugs << "New resize state: " << mResizeState << llendl; -} + if (delta_width < 0) + { + processHideButton(RS_BUTTON_CAMERA, &delta_width, &buttons_freed_width); + } -void LLBottomTray::processWidthDecreased(S32 delta_width) -{ + if (delta_width < 0) + { + processHideButton(RS_BUTTON_MOVEMENT, &delta_width, &buttons_freed_width); + } + if (delta_width < 0) + { + processHideButton(RS_BUTTON_GESTURES, &delta_width, &buttons_freed_width); + } + + if (delta_width < 0) + { + llwarns << "WARNING: there is no enough room for bottom tray, resizing still should be processed" << llendl; + } + + if (buttons_freed_width > 0) + { + log(mNearbyChatBar, "before applying compensative width"); + mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() + buttons_freed_width, mNearbyChatBar->getRect().getHeight() ); + log(mNearbyChatBar, "after applying compensative width"); + lldebugs << buttons_freed_width << llendl; + } + } } void LLBottomTray::processWidthIncreased(S32 delta_width) @@ -591,9 +549,9 @@ void LLBottomTray::processWidthIncreased(S32 delta_width) chatbar_shrink_width = chatbar_available_shrink_width; } - log(mNearbyChatBar, "increase width: before applying compensative width: "); + log(mNearbyChatBar, "increase width: before applying compensative width"); mNearbyChatBar->reshape(mNearbyChatBar->getRect().getWidth() - chatbar_shrink_width, mNearbyChatBar->getRect().getHeight() ); - if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width: "); + if (mNearbyChatBar) log(mNearbyChatBar, "after applying compensative width"); lldebugs << chatbar_shrink_width << llendl; // 3. use width available via decreasing of chiclet panel @@ -642,24 +600,42 @@ bool LLBottomTray::processShowButton(EResizeState shown_object_type, S32* availa *available_width -= required_width; *buttons_required_width += required_width; - switch (shown_object_type) - { - case RS_BUTTON_GESTURES: showGestureButton(true); break; - case RS_BUTTON_MOVEMENT: showMoveButton(true); break; - case RS_BUTTON_CAMERA: showCameraButton(true); break; - case RS_BUTTON_SNAPSHOT: showSnapshotButton(true); break; - default: - llwarns << "Unexpected type of button to be shown: " << shown_object_type << llendl; - } + showTrayButton(shown_object_type, true); lldebugs << "processing object type: " << shown_object_type - << ", buttons_required_width: " << buttons_required_width + << ", buttons_required_width: " << *buttons_required_width << llendl; } } return can_be_shown; } +void LLBottomTray::processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width) +{ + LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + if (NULL == panel) + { + lldebugs << "There is no object to process for state: " << shown_object_type << llendl; + return; + } + + if (panel->getVisible()) + { + *required_width += panel->getRect().getWidth(); + + if (*required_width > 0) + { + *buttons_freed_width += *required_width; + } + + showTrayButton(shown_object_type, false); + + lldebugs << "processing object type: " << shown_object_type + << ", buttons_freed_width: " << *buttons_freed_width + << llendl; + } +} + bool LLBottomTray::canButtonBeShown(LLPanel* panel) const { bool can_be_shown = !panel->getVisible(); @@ -677,4 +653,16 @@ void LLBottomTray::initStateProcessedObjectMap() mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_CAMERA, mCamPanel)); mStateProcessedObjectMap.insert(std::make_pair(RS_BUTTON_SNAPSHOT, mSnapshotPanel)); } + +void LLBottomTray::showTrayButton(EResizeState shown_object_type, bool visible) +{ + LLPanel* panel = mStateProcessedObjectMap[shown_object_type]; + if (NULL == panel) + { + lldebugs << "There is no object to show for state: " << shown_object_type << llendl; + return; + } + + panel->setVisible(visible); +} //EOF diff --git a/indra/newview/llbottomtray.h b/indra/newview/llbottomtray.h index 6509fea63d..2972a2b1ac 100644 --- a/indra/newview/llbottomtray.h +++ b/indra/newview/llbottomtray.h @@ -102,8 +102,10 @@ private: void processWidthIncreased(S32 delta_width); void log(LLView* panel, const std::string& descr); bool processShowButton(EResizeState shown_object_type, S32* available_width, S32* buttons_required_width); + void processHideButton(EResizeState shown_object_type, S32* required_width, S32* buttons_freed_width); bool canButtonBeShown(LLPanel* panel) const; void initStateProcessedObjectMap(); + void showTrayButton(EResizeState shown_object_type, bool visible); MASK mResizeState; -- cgit v1.2.3 From a4375f8a3023912bbb11e8c76ef574807dc1afde Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 12 Nov 2009 15:46:51 +0000 Subject: DEV-41324 DEV-41331: Improvements to the Avaline voice workflow. Don't show the "Start IM" button in the incoming call request for an Avaline call. And display the phone number of the incoming call as the avatar name, instead of "(???) (???)". --- indra/newview/llimview.cpp | 5 +++++ indra/newview/llpanelimcontrolpanel.cpp | 13 +++++++++---- indra/newview/llvoiceclient.cpp | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 23767d119d..ac21c5f4b0 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1260,6 +1260,11 @@ BOOL LLIncomingCallDialog::postBuild() call_type = getString("VoiceInviteAdHoc"); } + // check to see if this is an Avaline call + LLUUID session_id = mPayload["session_id"].asUUID(); + bool is_avatar = LLVoiceClient::getInstance()->isParticipantAvatar(session_id); + childSetVisible("Start IM", is_avatar); // no IM for avaline + LLUICtrl* caller_name_widget = getChild("caller name"); caller_name_widget->setValue(caller_name + " " + call_type); LLAvatarIconCtrl* icon = getChild("avatar_icon"); diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 1770138b3e..9cd949c9cc 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -174,10 +174,8 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) getChild("avatar_icon")->setValue(mAvatarID); - // Fetch the currect name - gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4)); - - // Disable profile button if participant is not realy SL avatar + // Disable most profile buttons if the participant is + // not really an SL avatar (e.g., an Avaline caller). LLIMModel::LLIMSession* im_session = im_model.findIMSession(session_id); if( im_session && !im_session->mOtherParticipantIsAvatar ) @@ -188,6 +186,13 @@ void LLPanelIMControlPanel::setSessionId(const LLUUID& session_id) childSetEnabled("share_btn", FALSE); childSetEnabled("teleport_btn", FALSE); childSetEnabled("pay_btn", FALSE); + + getChild("avatar_name")->setValue(im_session->mName); + } + else + { + // If the participant is an avatar, fetch the currect name + gCacheName->get(mAvatarID, FALSE, boost::bind(&LLPanelIMControlPanel::nameUpdatedCallback, this, _1, _2, _3, _4)); } } diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp index 39d4bb0c02..e50ff99205 100644 --- a/indra/newview/llvoiceclient.cpp +++ b/indra/newview/llvoiceclient.cpp @@ -1598,7 +1598,7 @@ void LLVoiceClient::stateMachine() } else { - LL_WARNS("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL; + LL_WARNS_ONCE("Voice") << "region doesn't have ParcelVoiceInfoRequest capability. This is normal for a short time after teleporting, but bad if it persists for very long." << LL_ENDL; } } } -- cgit v1.2.3 From eddda09e1da61a5958edd7af42a931f7ffb26e4b Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Thu, 12 Nov 2009 17:54:22 +0200 Subject: Fixed Major sub-task EXT-2398-Mini inspector should be opened by DOUBLE-click on the IM message header not by single-click --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index d1922cfd6e..43a1aeaefb 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -131,7 +131,7 @@ public: menu = LLUICtrlFactory::getInstance()->createFromFile("menu_object_icon.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mPopupMenuHandleObject = menu->getHandle(); - setMouseDownCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); + setDoubleClickCallback(boost::bind(&LLChatHistoryHeader::onHeaderPanelClick, this, _2, _3, _4)); return LLPanel::postBuild(); } -- cgit v1.2.3 From e8c3eb438ca113b123d640755588fb0705c2bdb0 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 12 Nov 2009 18:15:17 +0200 Subject: Fixed minor bug EXT-1499 (Finalize the Home panel and add tooltips to the tab grabs)- changed one icon I forgot about in yesterday's fix. --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_sidetray_home_tab.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') 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 9636e32187..566fc95230 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 @@ -227,7 +227,7 @@ right="-10" top="10" width="20" - image_name="TabIcon_Inventory_Selected"/> + image_name="TabIcon_Things_Selected"/> Date: Thu, 12 Nov 2009 18:48:02 +0200 Subject: fixed major bugs (EXT-2392) No "login" toast appears with overall number of unresolved interactive notifications (EXT-2391) Notifications overflow toast is broken --HG-- branch : product-engine --- indra/newview/app_settings/settings.xml | 4 ++-- indra/newview/llscreenchannel.cpp | 5 ---- indra/newview/skins/default/xui/en/panel_toast.xml | 28 ++++++---------------- 3 files changed, 9 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 15c9499bbc..38f14793d9 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3563,7 +3563,7 @@ Type S32 Value - 400 + 305 HelpUseLocal @@ -4895,7 +4895,7 @@ Type S32 Value - 350 + 305 NotificationToastLifeTime diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index b667fbf5fd..8825a64853 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -456,7 +456,6 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) mOverflowToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::closeOverflowToastPanel, this)); LLTextBox* text_box = mOverflowToastPanel->getChild("toast_text"); - LLIconCtrl* icon = mOverflowToastPanel->getChild("icon"); std::string text = llformat(mOverflowFormatString.c_str(),mHiddenToastsNum); if(mHiddenToastsNum == 1) { @@ -474,7 +473,6 @@ void LLScreenChannel::createOverflowToast(S32 bottom, F32 timer) text_box->setValue(text); text_box->setVisible(TRUE); - icon->setVisible(TRUE); mOverflowToastPanel->setVisible(TRUE); } @@ -532,7 +530,6 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) mStartUpToastPanel->setOnFadeCallback(boost::bind(&LLScreenChannel::onStartUpToastHide, this)); LLTextBox* text_box = mStartUpToastPanel->getChild("toast_text"); - LLIconCtrl* icon = mStartUpToastPanel->getChild("icon"); std::string mStartUpFormatString; @@ -555,8 +552,6 @@ void LLScreenChannel::createStartUpToast(S32 notif_num, F32 timer) text_box->setValue(text); text_box->setVisible(TRUE); - icon->setVisible(TRUE); - addChild(mStartUpToastPanel); mStartUpToastPanel->setVisible(TRUE); diff --git a/indra/newview/skins/default/xui/en/panel_toast.xml b/indra/newview/skins/default/xui/en/panel_toast.xml index 7f7777586c..f16329f8d7 100644 --- a/indra/newview/skins/default/xui/en/panel_toast.xml +++ b/indra/newview/skins/default/xui/en/panel_toast.xml @@ -1,7 +1,7 @@ - + - - + top="5" + width="260"> Toast text; - --> + + + + + - + + thumb_image_disabled="SliderThumb_Disabled" + track_image_horizontal="SliderTrack_Horiz" + track_image_vertical="SliderTrack_Vert" + track_highlight_horizontal_image="SliderTrack_Horiz" + track_highlight_vertical_image="SliderTrack_Vert" /> -- cgit v1.2.3 From 978dd80c963911372b0d311fec01b9d4de279c11 Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Thu, 12 Nov 2009 19:54:45 +0200 Subject: Implemented major sub-task EXT-2364 (Items in group/ad-hoc IM participant list (avatar names) should be reshaped when adding/removing the "(Moderator)" label) --HG-- branch : product-engine --- indra/newview/llavatarlistitem.cpp | 15 +++++++++++++++ indra/newview/llavatarlistitem.h | 2 ++ indra/newview/llparticipantlist.cpp | 2 ++ 3 files changed, 19 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp index 7df278d887..c670a65bcc 100644 --- a/indra/newview/llavatarlistitem.cpp +++ b/indra/newview/llavatarlistitem.cpp @@ -311,3 +311,18 @@ void LLAvatarListItem::onNameCache(const std::string& first_name, const std::str mAvatarName->setValue(name); mAvatarName->setToolTip(name); } + +void LLAvatarListItem::reshapeAvatarName() +{ + S32 width_delta = 0; + width_delta += mShowProfileBtn ? mProfileBtnWidth : 0; + width_delta += mSpeakingIndicator->getVisible() ? mSpeakingIndicatorWidth : 0; + width_delta += mAvatarIcon->getVisible() ? mIconWidth : 0; + width_delta += mShowInfoBtn ? mInfoBtnWidth : 0; + width_delta += mLastInteractionTime->getVisible() ? mLastInteractionTime->getRect().getWidth() : 0; + + S32 height = mAvatarName->getRect().getHeight(); + S32 width = getRect().getWidth() - width_delta; + + mAvatarName->reshape(width, height); +} diff --git a/indra/newview/llavatarlistitem.h b/indra/newview/llavatarlistitem.h index d379797a46..9d48101a44 100644 --- a/indra/newview/llavatarlistitem.h +++ b/indra/newview/llavatarlistitem.h @@ -82,6 +82,8 @@ public: void setContextMenu(ContextMenu* menu) { mContextMenu = menu; } + void reshapeAvatarName(); + private: typedef enum e_online_status { diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index f5367c0477..13bd059d45 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -130,6 +130,7 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) { name.erase(found, moderator_indicator_len); item->setName(name); + item->reshapeAvatarName(); } } } @@ -151,6 +152,7 @@ void LLParticipantList::onAvatarListRefreshed(LLUICtrl* ctrl, const LLSD& param) name += " "; name += moderator_indicator; item->setName(name); + item->reshapeAvatarName(); } } } -- cgit v1.2.3 From 700085a093c71023703b43ca19e7ba114f2183ff Mon Sep 17 00:00:00 2001 From: Lynx Linden Date: Thu, 12 Nov 2009 18:03:01 +0000 Subject: EXT-2367: Fixed potential NULL dereference crash in voice chat. --- indra/newview/llimpanel.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 0b8b5935f8..87b801d73b 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -848,8 +848,11 @@ void LLFloaterIMPanel::processSessionUpdate(const LLSD& session_update) } - //update the speakers dropdown too - mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated); + //update the speakers dropdown too, if it's available + if (mSpeakerPanel) + { + mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated); + } } } -- cgit v1.2.3 From 74d5a6605bac7ae76889ce3697fc8f59d982d675 Mon Sep 17 00:00:00 2001 From: Andrew Dyukov Date: Thu, 12 Nov 2009 20:23:43 +0200 Subject: Fixed normal bug EXT-2375 (Nearby Chat: Click on object name spawns Person Inspector instead of Object Inspector) --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 43a1aeaefb..046e1d92dc 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -167,7 +167,15 @@ public: void onHeaderPanelClick(S32 x, S32 y, MASK mask) { - LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID)); + if (mSourceType == CHAT_SOURCE_OBJECT) + { + LLFloaterReg::showInstance("inspect_object", LLSD().insert("object_id", mAvatarID)); + } + else if (mSourceType == CHAT_SOURCE_AGENT) + { + LLFloaterReg::showInstance("inspect_avatar", LLSD().insert("avatar_id", mAvatarID)); + } + //if chat source is system, you may add "else" here to define behaviour. } const LLUUID& getAvatarId () const { return mAvatarID;} -- cgit v1.2.3 From 02d1776bbc1bbfd7e555bd018dee6b5a31ec0ffa Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Thu, 12 Nov 2009 19:43:23 +0000 Subject: try fixing mysterious layout issue. --- indra/newview/skins/default/xui/en/floater_outgoing_call.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml index 6713700372..f1fa1a8dba 100644 --- a/indra/newview/skins/default/xui/en/floater_outgoing_call.xml +++ b/indra/newview/skins/default/xui/en/floater_outgoing_call.xml @@ -60,6 +60,7 @@ Leaving [CURRENT_CHAT]. - Date: Thu, 12 Nov 2009 18:25:42 -0800 Subject: Couple LLMimeDiscoveryResponder more tightly with LLViewerMediaImpl. This should fix DEV-41596, as well as other potential problems. --- indra/newview/llviewermedia.cpp | 95 ++++++++++++++++++++++++++++++++++++----- indra/newview/llviewermedia.h | 5 ++- 2 files changed, 89 insertions(+), 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 493457704b..69d4da373e 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -135,9 +135,19 @@ public: LLMimeDiscoveryResponder( viewer_media_t media_impl) : mMediaImpl(media_impl), mInitialized(false) - {} - + { + if(mMediaImpl->mMimeTypeProbe != NULL) + { + llerrs << "impl already has an outstanding responder" << llendl; + } + + mMediaImpl->mMimeTypeProbe = this; + } + ~LLMimeDiscoveryResponder() + { + disconnectOwner(); + } virtual void completedHeader(U32 status, const std::string& reason, const LLSD& content) { @@ -149,23 +159,54 @@ public: virtual void error( U32 status, const std::string& reason ) { + llwarns << "responder failed with status " << status << ", reason " << reason << llendl; + if(mMediaImpl) + { + mMediaImpl->mMediaSourceFailed = true; + } // completeAny(status, "none/none"); } void completeAny(U32 status, const std::string& mime_type) { - if(!mInitialized && ! mime_type.empty()) + // the call to initializeMedia may disconnect the responder, which will clear mMediaImpl. + // Make a local copy so we can call loadURI() afterwards. + LLViewerMediaImpl *impl = mMediaImpl; + + if(impl && !mInitialized && ! mime_type.empty()) { - if(mMediaImpl->initializeMedia(mime_type)) + if(impl->initializeMedia(mime_type)) { mInitialized = true; - mMediaImpl->loadURI(); + impl->loadURI(); + disconnectOwner(); } } } + + void cancelRequest() + { + disconnectOwner(); + } + +private: + void disconnectOwner() + { + if(mMediaImpl) + { + if(mMediaImpl->mMimeTypeProbe != this) + { + llerrs << "internal error: mMediaImpl->mMimeTypeProbe != this" << llendl; + } - public: - viewer_media_t mMediaImpl; + mMediaImpl->mMimeTypeProbe = NULL; + } + mMediaImpl = NULL; + } + + +public: + LLViewerMediaImpl *mMediaImpl; bool mInitialized; }; static LLViewerMedia::impl_list sViewerMediaImplList; @@ -708,6 +749,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id, mIsDisabled(false), mIsParcelMedia(false), mProximity(-1), + mMimeTypeProbe(NULL), mIsUpdated(false) { @@ -811,7 +853,9 @@ void LLViewerMediaImpl::destroyMediaSource() { oldImage->setPlaying(FALSE) ; } - + + cancelMimeTypeProbe(); + if(mMediaSource) { delete mMediaSource; @@ -1316,6 +1360,8 @@ void LLViewerMediaImpl::unload() ////////////////////////////////////////////////////////////////////////////////////////// void LLViewerMediaImpl::navigateTo(const std::string& url, const std::string& mime_type, bool rediscover_type, bool server_request) { + cancelMimeTypeProbe(); + if(mMediaURL != url) { // Don't carry media play state across distinct URLs. @@ -1358,6 +1404,12 @@ void LLViewerMediaImpl::navigateInternal() // Helpful to have media urls in log file. Shouldn't be spammy. llinfos << "media id= " << mTextureId << " url=" << mMediaURL << " mime_type=" << mMimeType << llendl; + if(mMimeTypeProbe != NULL) + { + llwarns << "MIME type probe already in progress -- bailing out." << llendl; + return; + } + if(mNavigateServerRequest) { setNavState(MEDIANAVSTATE_SERVER_SENT); @@ -1390,7 +1442,7 @@ void LLViewerMediaImpl::navigateInternal() if(scheme.empty() || "http" == scheme || "https" == scheme) { - LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this)); + LLHTTPClient::getHeaderOnly( mMediaURL, new LLMimeDiscoveryResponder(this), 10.0f); } else if("data" == scheme || "file" == scheme || "about" == scheme) { @@ -1521,7 +1573,15 @@ void LLViewerMediaImpl::update() { if(mMediaSource == NULL) { - if(mPriority != LLPluginClassMedia::PRIORITY_UNLOADED) + if(mPriority == LLPluginClassMedia::PRIORITY_UNLOADED) + { + // This media source should not be loaded. + } + else if(mMimeTypeProbe != NULL) + { + // this media source is doing a MIME type probe -- don't try loading it again. + } + else { // This media may need to be loaded. if(sMediaCreateTimer.hasExpired()) @@ -2120,6 +2180,21 @@ void LLViewerMediaImpl::setNavState(EMediaNavState state) } } +void LLViewerMediaImpl::cancelMimeTypeProbe() +{ + if(mMimeTypeProbe != NULL) + { + // There doesn't seem to be a way to actually cancel an outstanding request. + // Simulate it by telling the LLMimeDiscoveryResponder not to write back any results. + mMimeTypeProbe->cancelRequest(); + + // The above should already have set mMimeTypeProbe to NULL. + if(mMimeTypeProbe != NULL) + { + llerrs << "internal error: mMimeTypeProbe is not NULL after cancelling request." << llendl; + } + } +} void LLViewerMediaImpl::addObject(LLVOVolume* obj) { diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 3f5f3ca746..719deb28bf 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -48,6 +48,7 @@ class LLUUID; class LLViewerMediaTexture; class LLMediaEntry; class LLVOVolume ; +class LLMimeDiscoveryResponder; typedef LLPointer viewer_media_t; /////////////////////////////////////////////////////////////////////////////// @@ -294,6 +295,7 @@ public: EMediaNavState getNavState() { return mMediaNavState; } void setNavState(EMediaNavState state); + void cancelMimeTypeProbe(); public: // a single media url with some data and an impl. LLPluginClassMedia* mMediaSource; @@ -331,7 +333,8 @@ public: bool mIsDisabled; bool mIsParcelMedia; S32 mProximity; - + LLMimeDiscoveryResponder *mMimeTypeProbe; + private: BOOL mIsUpdated ; std::list< LLVOVolume* > mObjectList ; -- cgit v1.2.3 From 20c0a0b68f82908bc73872ec132775e8c69cca4d Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 12 Nov 2009 19:24:31 -0800 Subject: Test intentionally not-found LLUICtrl. --- indra/newview/llfloatertestinspectors.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llfloatertestinspectors.cpp b/indra/newview/llfloatertestinspectors.cpp index 8af011c17a..e68faba712 100644 --- a/indra/newview/llfloatertestinspectors.cpp +++ b/indra/newview/llfloatertestinspectors.cpp @@ -53,6 +53,8 @@ LLFloaterTestInspectors::~LLFloaterTestInspectors() BOOL LLFloaterTestInspectors::postBuild() { + getChild("intentionally-not-found"); + // getChild("avatar_2d_btn")->setCommitCallback( // boost::bind(&LLFloaterTestInspectors::onClickAvatar2D, this)); getChild("avatar_3d_btn")->setCommitCallback( -- cgit v1.2.3 From 01f1eaf7e0faaa3ecde36ac28a346fed53a571fd Mon Sep 17 00:00:00 2001 From: angela Date: Fri, 13 Nov 2009 15:19:37 +0800 Subject: fix style readonlycolor overwriting color --- indra/newview/llchathistory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2b050f3eb5..69e1f8d428 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -351,6 +351,7 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) LLStyle::Params style_params; style_params.color(txt_color); + style_params.readonly_color(txt_color); style_params.font(fontp); @@ -383,7 +384,6 @@ void LLChatHistory::appendWidgetMessage(const LLChat& chat) appendWidget(p, view_text, false); //Append the text message - appendText(chat.mText, FALSE, style_params); mLastFromName = chat.mFromName; -- cgit v1.2.3 From d116185bfd1d64c7108e75ea1a7745f08cb2a3d0 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Fri, 13 Nov 2009 12:26:57 +0200 Subject: Fixed Low bug EXT-2404-Nearby Chat: There is redundant semicolon in the log for system messages --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 046e1d92dc..5efecfa78f 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -53,7 +53,7 @@ std::string formatCurrentTime() time_t utc_time; utc_time = time_corrected(); std::string timeStr ="["+ LLTrans::getString("TimeHour")+"]:[" - +LLTrans::getString("TimeMin")+"] "; + +LLTrans::getString("TimeMin")+"]"; LLSD substitution; @@ -344,7 +344,9 @@ LLView* LLChatHistory::getHeader(const LLChat& chat,const LLStyle::Params& style void LLChatHistory::appendWidgetMessage(const LLChat& chat, LLStyle::Params& style_params) { LLView* view = NULL; - std::string view_text = "\n[" + formatCurrentTime() + "] " + chat.mFromName + ": "; + std::string view_text = "\n[" + formatCurrentTime() + "] "; + if (utf8str_trim(chat.mFromName).size() != 0 && chat.mFromName != SYSTEM_FROM) + view_text += chat.mFromName + ": "; LLInlineViewSegment::Params p; p.force_newline = true; -- cgit v1.2.3 From 05d2f3f7647269ffca2da8cba9bd6b91b56a1905 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Fri, 13 Nov 2009 12:32:06 +0200 Subject: No ticket. A little refactoring. --HG-- branch : product-engine --- indra/newview/lltoastimpanel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp index 9370e318cf..1ea5f515b7 100644 --- a/indra/newview/lltoastimpanel.cpp +++ b/indra/newview/lltoastimpanel.cpp @@ -69,7 +69,7 @@ LLToastIMPanel::LLToastIMPanel(LLToastIMPanel::Params &p) : LLToastPanel(p.notif mNotification = p.notification; // if message comes from the system - there shouldn't be a reply btn - if(p.from == "Second Life") + if(p.from == SYSTEM_FROM) { mAvatar->setVisible(FALSE); sys_msg_icon->setVisible(TRUE); -- cgit v1.2.3 From eb1484a0c9b6a075c900371cc5d7e8c4c0a4f93f Mon Sep 17 00:00:00 2001 From: Andrew Polunin Date: Fri, 13 Nov 2009 12:37:52 +0200 Subject: implemented normal task EXT-2175 Set up functionality for \"Leave Selected Group\" option --HG-- branch : product-engine --- indra/newview/llpanelpeople.cpp | 2 +- .../skins/default/xui/en/menu_people_groups_view_sort.xml | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelpeople.cpp b/indra/newview/llpanelpeople.cpp index 9ba94c8ca9..ba30a4710a 100644 --- a/indra/newview/llpanelpeople.cpp +++ b/indra/newview/llpanelpeople.cpp @@ -519,7 +519,6 @@ BOOL LLPanelPeople::postBuild() LLPanel* groups_panel = getChild(GROUP_TAB_NAME); groups_panel->childSetAction("activate_btn", boost::bind(&LLPanelPeople::onActivateButtonClicked, this)); groups_panel->childSetAction("plus_btn", boost::bind(&LLPanelPeople::onGroupPlusButtonClicked, this)); - groups_panel->childSetAction("minus_btn", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); LLPanel* friends_panel = getChild(FRIENDS_TAB_NAME); friends_panel->childSetAction("add_btn", boost::bind(&LLPanelPeople::onAddFriendWizButtonClicked, this)); @@ -568,6 +567,7 @@ BOOL LLPanelPeople::postBuild() LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar; registrar.add("People.Group.Plus.Action", boost::bind(&LLPanelPeople::onGroupPlusMenuItemClicked, this, _2)); + registrar.add("People.Group.Minus.Action", boost::bind(&LLPanelPeople::onGroupMinusButtonClicked, this)); registrar.add("People.Friends.ViewSort.Action", boost::bind(&LLPanelPeople::onFriendsViewSortMenuItemClicked, this, _2)); registrar.add("People.Nearby.ViewSort.Action", boost::bind(&LLPanelPeople::onNearbyViewSortMenuItemClicked, this, _2)); registrar.add("People.Groups.ViewSort.Action", boost::bind(&LLPanelPeople::onGroupsViewSortMenuItemClicked, this, _2)); diff --git a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml index 6dd44255bf..304492bedb 100644 --- a/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml +++ b/indra/newview/skins/default/xui/en/menu_people_groups_view_sort.xml @@ -13,15 +13,11 @@ function="CheckControl" parameter="GroupListShowIcons" /> - - - - + + -- cgit v1.2.3 From bed508f9ef3bce8fb67669ab60b01cd4119a7f76 Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Fri, 13 Nov 2009 12:58:05 +0200 Subject: EXT-2339 Chat : Nearby chat does not show full text - increase max_length to 512 --HG-- branch : product-engine --- indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml index a77094e942..ecf35523cd 100644 --- a/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml +++ b/indra/newview/skins/default/xui/en/panel_nearby_chat_bar.xml @@ -23,7 +23,7 @@ layout="topleft" left_delta="7" left="0" - max_length="254" + max_length="512" name="chat_box" tool_tip="Press Enter to say, Ctrl+Enter to shout" top="0" -- cgit v1.2.3 From b256d57b0dbdd39dd36abcdb51a6b70698c60bba Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Fri, 13 Nov 2009 12:59:19 +0200 Subject: No ticket. Fix to prevent crash. --HG-- branch : product-engine --- indra/newview/llimpanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index 0b8b5935f8..3178658faa 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -849,7 +849,8 @@ void LLFloaterIMPanel::processSessionUpdate(const LLSD& session_update) //update the speakers dropdown too - mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated); + if (mSpeakerPanel) + mSpeakerPanel->setVoiceModerationCtrlMode(voice_moderated); } } -- cgit v1.2.3 From 9e11895c258d4dc7bc141804d8b7aa2762de4013 Mon Sep 17 00:00:00 2001 From: Eugene Kondrashev Date: Fri, 13 Nov 2009 13:10:30 +0200 Subject: No ticket. Fixed crash caused by wierdly coded std::map by MS --HG-- branch : product-engine --- indra/newview/llspeakers.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview') diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp index 2ed82b7d62..261bdbcfc0 100644 --- a/indra/newview/llspeakers.cpp +++ b/indra/newview/llspeakers.cpp @@ -359,6 +359,9 @@ void LLSpeakerMgr::updateSpeakerList() LLPointer LLSpeakerMgr::findSpeaker(const LLUUID& speaker_id) { + //In some conditions map causes crash if it is empty(Windows only), adding check (EK) + if (mSpeakers.size() == 0) + return NULL; speaker_map_t::iterator found_it = mSpeakers.find(speaker_id); if (found_it == mSpeakers.end()) { -- cgit v1.2.3 From 0c7a4b6a7d2675a916efacfb9f2f1a6098c027dd Mon Sep 17 00:00:00 2001 From: Yuri Chebotarev Date: Fri, 13 Nov 2009 13:49:14 +0200 Subject: EXT-2342 Script : Fails to work in Alpha 6 ok toast for objects are back... also add object inspector to nearby chat object context menu --HG-- branch : product-engine --- indra/newview/llchathistory.cpp | 4 ++++ indra/newview/llnearbychathandler.cpp | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 5efecfa78f..f228373063 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -84,6 +84,10 @@ public: if (level == "profile") { + LLSD params; + params["object_id"] = getAvatarId(); + + LLFloaterReg::showInstance("inspect_object", params); } else if (level == "block") { diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index b4e0ab198a..f3b63c8616 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -332,7 +332,8 @@ void LLNearbyChatHandler::processChat(const LLChat& chat_msg) //only messages from AGENTS if(CHAT_SOURCE_OBJECT == chat_msg.mSourceType) { - return;//dn't show toast for messages from objects + if(chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG) + return;//ok for now we don't skip messeges from object, so skip only debug messages } LLUUID id; -- cgit v1.2.3 From a3dbbeef702317b86de09592412a9d55d3de5991 Mon Sep 17 00:00:00 2001 From: Dmitry Oleshko Date: Fri, 13 Nov 2009 13:55:09 +0200 Subject: fix of normal bug (EXT-2411) Toast for a group notification has bigger width, than other toasts fixed panel's size in XML. Also formatted XML according to standards using viewer's XML util. --HG-- branch : product-engine --- .../skins/default/xui/en/panel_group_notify.xml | 194 +++++++++++++-------- 1 file changed, 117 insertions(+), 77 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/panel_group_notify.xml b/indra/newview/skins/default/xui/en/panel_group_notify.xml index ef3120174e..984a799b41 100644 --- a/indra/newview/skins/default/xui/en/panel_group_notify.xml +++ b/indra/newview/skins/default/xui/en/panel_group_notify.xml @@ -1,77 +1,117 @@ - - - - 4 - - - - - Sender Name / Group Name - - - - subject - - - datetime - - - - - - Attachment - - - - + + + --> - + + + --> function="MediaCtrl.CommitURL"/> - + - + + + + width="16" + auto_resize="false" + user_resize="false"> + + - + + - + + + --> - + + + --> + -- cgit v1.2.3 From f9cacc57e28a2dcbe5801c71becbb8e2b8eae3e4 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 13 Nov 2009 12:36:41 -0800 Subject: EXT-2491 IM text does not appear in private IMs --- indra/newview/llimfloater.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview') diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 0f32d0b313..1467e4e0e0 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -479,6 +479,7 @@ void LLIMFloater::updateMessages() LLChat chat; chat.mFromID = from_id; chat.mFromName = from; + chat.mText = message; mChatHistory->appendWidgetMessage(chat); -- cgit v1.2.3 From 2e70e4e2d7adbca52884186975623e26ab7fb9fb Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 13 Nov 2009 12:59:17 -0800 Subject: Add functionality to nearby media floater: parcel media & autoplay This change implements the enabling/disabling of parcel media, as well as setting the user's autoplay preference. I still am quite confused by this UI, so we'll need to play with it a bit to ensure it is what we want to present to users. This adds a few helpers to llviewerparcelmedia to get the name and URL of media. --- indra/newview/llviewermedia.cpp | 6 ++++-- indra/newview/llviewermedia.h | 3 +++ indra/newview/llviewerparcelmedia.cpp | 26 ++++++++++++++++++++++++++ indra/newview/llviewerparcelmedia.h | 2 ++ 4 files changed, 35 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 69d4da373e..36fef07989 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -54,6 +54,8 @@ #include // for SkinFolder listener #include +/*static*/ const char* LLViewerMedia::AUTO_PLAY_MEDIA_SETTING = "AutoPlayMedia"; + // Move this to its own file. LLViewerMediaEventEmitter::~LLViewerMediaEventEmitter() @@ -313,7 +315,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s // If (the media was already loaded OR the media was set to autoplay) AND this update didn't come from this agent, // do a navigate. - if((was_loaded || (media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia"))) && !update_from_self) + if((was_loaded || (media_entry->getAutoPlay() && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING))) && !update_from_self) { needs_navigate = (media_entry->getCurrentURL() != previous_url); } @@ -330,7 +332,7 @@ viewer_media_t LLViewerMedia::updateMediaImpl(LLMediaEntry* media_entry, const s media_impl->setHomeURL(media_entry->getHomeURL()); - if(media_entry->getAutoPlay() && gSavedSettings.getBOOL("AutoPlayMedia")) + if(media_entry->getAutoPlay() && gSavedSettings.getBOOL(AUTO_PLAY_MEDIA_SETTING)) { needs_navigate = true; } diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h index 719deb28bf..639aed4b8a 100644 --- a/indra/newview/llviewermedia.h +++ b/indra/newview/llviewermedia.h @@ -74,6 +74,9 @@ class LLViewerMedia LOG_CLASS(LLViewerMedia); public: + // String to get/set media autoplay in gSavedSettings + static const char *AUTO_PLAY_MEDIA_SETTING; + typedef std::vector impl_list; // Special case early init for just web browser component diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp index 336d7f684e..7559fd8e72 100644 --- a/indra/newview/llviewerparcelmedia.cpp +++ b/indra/newview/llviewerparcelmedia.cpp @@ -324,10 +324,36 @@ std::string LLViewerParcelMedia::getMimeType() { return sMediaImpl.notNull() ? sMediaImpl->getMimeType() : "none/none"; } + +//static +std::string LLViewerParcelMedia::getURL() +{ + std::string url; + if(sMediaImpl.notNull()) + url = sMediaImpl->getMediaURL(); + + if (url.empty()) + url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaCurrentURL(); + + if (url.empty()) + url = LLViewerParcelMgr::getInstance()->getAgentParcel()->getMediaURL(); + + return url; +} + +//static +std::string LLViewerParcelMedia::getName() +{ + if(sMediaImpl.notNull()) + return sMediaImpl->getName(); + return ""; +} + viewer_media_t LLViewerParcelMedia::getParcelMedia() { return sMediaImpl; } + ////////////////////////////////////////////////////////////////////////////////////////// // static void LLViewerParcelMedia::processParcelMediaCommandMessage( LLMessageSystem *msg, void ** ) diff --git a/indra/newview/llviewerparcelmedia.h b/indra/newview/llviewerparcelmedia.h index 3f7f898356..19e1ef78d4 100644 --- a/indra/newview/llviewerparcelmedia.h +++ b/indra/newview/llviewerparcelmedia.h @@ -71,6 +71,8 @@ class LLViewerParcelMedia : public LLViewerMediaObserver static LLPluginClassMediaOwner::EMediaStatus getStatus(); static std::string getMimeType(); + static std::string getURL(); + static std::string getName(); static viewer_media_t getParcelMedia(); static void processParcelMediaCommandMessage( LLMessageSystem *msg, void ** ); -- cgit v1.2.3 From 39c53fcf0eb718b0a3d1f43a3c9ee1a38ffef49f Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 13 Nov 2009 13:05:56 -0800 Subject: Clear the media texture to black instead of almost-black. --- indra/newview/llviewermedia.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 69d4da373e..513fae41eb 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -1704,7 +1704,7 @@ LLViewerMediaTexture* LLViewerMediaImpl::updatePlaceholderImage() // MEDIAOPT: seems insane that we actually have to make an imageraw then // immediately discard it LLPointer raw = new LLImageRaw(texture_width, texture_height, texture_depth); - raw->clear(0x0f, 0x0f, 0x0f, 0xff); + raw->clear(0x00, 0x00, 0x00, 0xff); int discard_level = 0; // ask media source for correct GL image format constants -- cgit v1.2.3 From d191143cbc3aef7cd68cad98e480fb656c9e8c01 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 13 Nov 2009 13:47:18 -0800 Subject: Special-case a "401" status ("auth required") in LLMimeDiscoveryResponder::error() to be treated as a mime type of "text/html" instead of a failure. --- indra/newview/llviewermedia.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp index 513fae41eb..b4164a94e8 100644 --- a/indra/newview/llviewermedia.cpp +++ b/indra/newview/llviewermedia.cpp @@ -159,12 +159,21 @@ public: virtual void error( U32 status, const std::string& reason ) { - llwarns << "responder failed with status " << status << ", reason " << reason << llendl; - if(mMediaImpl) + if(status == 401) + { + // This is the "you need to authenticate" status. + // Treat this like an html page. + completeAny(status, "text/html"); + } + else { - mMediaImpl->mMediaSourceFailed = true; + llwarns << "responder failed with status " << status << ", reason " << reason << llendl; + + if(mMediaImpl) + { + mMediaImpl->mMediaSourceFailed = true; + } } - // completeAny(status, "none/none"); } void completeAny(U32 status, const std::string& mime_type) -- cgit v1.2.3 From 21357c482256be27780ebf46749b5ccad1c96a9d Mon Sep 17 00:00:00 2001 From: Erica Date: Fri, 13 Nov 2009 14:28:58 -0800 Subject: fixing media texture image names - removing file extention --- indra/newview/skins/default/textures/textures.xml | 56 +++++++++++------------ 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index eea2dfb1a1..d5293bdbb5 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -23,13 +23,13 @@ - - - + + + - - - + + + @@ -109,9 +109,9 @@ - - - + + + @@ -338,12 +338,12 @@ - - - - - - + + + + + + @@ -425,12 +425,12 @@ - - - - - - + + + + + + @@ -449,9 +449,9 @@ - - - + + + @@ -531,7 +531,7 @@ - + @@ -563,9 +563,9 @@ - - - + + + -- cgit v1.2.3 From 6cb4b27897462582428e9d469feb6bf8c9335b06 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 13 Nov 2009 14:48:24 -0800 Subject: Fix for DEV-42161 (LLViewerMediaImpl::navigateInternal spam when editing object properties). Made LLPanelMediaSettingsGeneral::updateMediaPreview() only do a navigate when the URL actually changes. --- indra/newview/llpanelmediasettingsgeneral.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp index 2cf56d5571..ad8a379cc1 100644 --- a/indra/newview/llpanelmediasettingsgeneral.cpp +++ b/indra/newview/llpanelmediasettingsgeneral.cpp @@ -322,13 +322,19 @@ void LLPanelMediaSettingsGeneral::updateMediaPreview() { if ( mHomeURL->getValue().asString().length() > 0 ) { - mPreviewMedia->navigateTo( mHomeURL->getValue().asString() ); + if(mPreviewMedia->getCurrentNavUrl() != mHomeURL->getValue().asString()) + { + mPreviewMedia->navigateTo( mHomeURL->getValue().asString() ); + } } else // new home URL will be empty if media is deleted so display a // "preview goes here" data url page { - mPreviewMedia->navigateTo( CHECKERBOARD_DATA_URL ); + if(mPreviewMedia->getCurrentNavUrl() != CHECKERBOARD_DATA_URL) + { + mPreviewMedia->navigateTo( CHECKERBOARD_DATA_URL ); + } }; } -- cgit v1.2.3 From a4addf39e5293e008b534c9c1cfcad14956afe1a Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Fri, 13 Nov 2009 15:09:59 -0800 Subject: Small mods based on code review feedback from James --- indra/newview/llpanelprimmediacontrols.cpp | 59 +++++++++++++++--------------- 1 file changed, 29 insertions(+), 30 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llpanelprimmediacontrols.cpp b/indra/newview/llpanelprimmediacontrols.cpp index 9744d9ac0d..12ad070efd 100644 --- a/indra/newview/llpanelprimmediacontrols.cpp +++ b/indra/newview/llpanelprimmediacontrols.cpp @@ -117,34 +117,34 @@ LLPanelPrimMediaControls::~LLPanelPrimMediaControls() BOOL LLPanelPrimMediaControls::postBuild() { - mMediaRegion = getChild("media_region"); assert(mMediaRegion); - mBackCtrl = getChild("back"); assert(mBackCtrl); - mFwdCtrl = getChild("fwd"); assert(mFwdCtrl); - mReloadCtrl = getChild("reload"); assert(mReloadCtrl); - mPlayCtrl = getChild("play"); assert(mPlayCtrl); - mPauseCtrl = getChild("pause"); assert(mPauseCtrl); - mStopCtrl = getChild("stop"); assert(mStopCtrl); - mMediaStopCtrl = getChild("media_stop"); assert(mMediaStopCtrl); - mHomeCtrl = getChild("home"); assert(mHomeCtrl); - mUnzoomCtrl = getChild("close"); assert(mUnzoomCtrl); // This is actually "unzoom" - mOpenCtrl = getChild("new_window"); assert(mOpenCtrl); - mZoomCtrl = getChild("zoom_frame"); assert(mZoomCtrl); - mMediaProgressPanel = getChild("media_progress_indicator"); assert(mMediaProgressPanel); - mMediaProgressBar = getChild("media_progress_bar"); assert(mMediaProgressBar); - mMediaAddressCtrl = getChild("media_address"); assert(mMediaAddressCtrl); - mMediaAddress = getChild("media_address_url"); assert(mMediaAddress); - mMediaPlaySliderPanel = getChild("media_play_position"); assert(mMediaPlaySliderPanel); - mMediaPlaySliderCtrl = getChild("media_play_slider"); assert(mMediaPlaySliderCtrl); - mVolumeCtrl = getChild("media_volume"); assert(mVolumeCtrl); - mVolumeBtn = getChild("media_volume_button"); assert(mVolumeBtn); - mVolumeUpCtrl = getChild("volume_up"); assert(mVolumeUpCtrl); - mVolumeDownCtrl = getChild("volume_down"); assert(mVolumeDownCtrl); - mWhitelistIcon = getChild("media_whitelist_flag"); assert(mWhitelistIcon); - mSecureLockIcon = getChild("media_secure_lock_flag"); assert(mSecureLockIcon); - mMediaControlsStack = getChild("media_controls"); assert(mMediaControlsStack); - mLeftBookend = getChild("left_bookend"); assert(mLeftBookend); - mRightBookend = getChild("right_bookend"); assert(mRightBookend); - mBackgroundImage = LLUI::getUIImage(getString("control_background_image_name")); assert(mBackgroundImage); + mMediaRegion = getChild("media_region"); + mBackCtrl = getChild("back"); + mFwdCtrl = getChild("fwd"); + mReloadCtrl = getChild("reload"); + mPlayCtrl = getChild("play"); + mPauseCtrl = getChild("pause"); + mStopCtrl = getChild("stop"); + mMediaStopCtrl = getChild("media_stop"); + mHomeCtrl = getChild("home"); + mUnzoomCtrl = getChild("close"); // This is actually "unzoom" + mOpenCtrl = getChild("new_window"); + mZoomCtrl = getChild("zoom_frame"); + mMediaProgressPanel = getChild("media_progress_indicator"); + mMediaProgressBar = getChild("media_progress_bar"); + mMediaAddressCtrl = getChild("media_address"); + mMediaAddress = getChild("media_address_url"); + mMediaPlaySliderPanel = getChild("media_play_position"); + mMediaPlaySliderCtrl = getChild("media_play_slider"); + mVolumeCtrl = getChild("media_volume"); + mVolumeBtn = getChild("media_volume_button"); + mVolumeUpCtrl = getChild("volume_up"); + mVolumeDownCtrl = getChild("volume_down"); + mWhitelistIcon = getChild("media_whitelist_flag"); + mSecureLockIcon = getChild("media_secure_lock_flag"); + mMediaControlsStack = getChild("media_controls"); + mLeftBookend = getChild("left_bookend"); + mRightBookend = getChild("right_bookend"); + mBackgroundImage = LLUI::getUIImage(getString("control_background_image_name")); // These are currently removed...but getChild creates a "dummy" widget. // This class handles them missing. @@ -729,8 +729,7 @@ bool LLPanelPrimMediaControls::isMouseOver() getWindow()->getCursorPosition(&cursor_pos_window); getWindow()->convertCoords(cursor_pos_window, &cursor_pos_gl); - //FIXME: rewrite as LLViewQuery or get hover set from LLViewerWindow? - if(mMediaControlsStack && mMediaControlsStack->getVisible()) + if(mMediaControlsStack->getVisible()) { mMediaControlsStack->screenPointToLocal(cursor_pos_gl.mX, cursor_pos_gl.mY, &x, &y); -- cgit v1.2.3 From 3abee9a4506ed225f15934ab82881e16fa5f9113 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 13 Nov 2009 15:56:46 -0800 Subject: Fix for nearby chat toasts occluding the bottom bar. --- indra/newview/llnearbychathandler.cpp | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llnearbychathandler.cpp b/indra/newview/llnearbychathandler.cpp index cd77f59ee1..458845fff3 100644 --- a/indra/newview/llnearbychathandler.cpp +++ b/indra/newview/llnearbychathandler.cpp @@ -63,8 +63,6 @@ class LLNearbyChatScreenChannel: public LLScreenChannelBase public: LLNearbyChatScreenChannel(const LLUUID& id):LLScreenChannelBase(id) { mStopProcessing = false;}; - void init (S32 channel_left, S32 channel_right); - void addNotification (LLSD& notification); void arrangeToasts (); void showToastsBottom (); @@ -120,15 +118,6 @@ protected: bool mStopProcessing; }; -void LLNearbyChatScreenChannel::init(S32 channel_left, S32 channel_right) -{ - S32 channel_top = gViewerWindow->getWorldViewRectRaw().getHeight(); - S32 channel_bottom = gViewerWindow->getWorldViewRectRaw().mBottom; - setRect(LLRect(channel_left, channel_top, channel_right, channel_bottom)); - setVisible(TRUE); -} - - void LLNearbyChatScreenChannel::createOverflowToast(S32 bottom, F32 timer) { //we don't need overflow toast in nearby chat -- cgit v1.2.3 From c8ed7710c5305d1a1ec65a04543e3a2b1aad24f1 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Fri, 13 Nov 2009 15:57:38 -0800 Subject: Backed out changeset db8e08f8ba36 adding main_view.xml change rev 4863 back --- indra/newview/skins/default/xui/en/main_view.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/skins/default/xui/en/main_view.xml b/indra/newview/skins/default/xui/en/main_view.xml index 08f7ee456e..9e35c95d45 100644 --- a/indra/newview/skins/default/xui/en/main_view.xml +++ b/indra/newview/skins/default/xui/en/main_view.xml @@ -51,6 +51,13 @@ name="main_view" user_resize="true" width="500"> + -