From 52aeaa32841e7d0b37abab0a2a2540c2be2f16b7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 7 Jul 2009 00:53:05 +0000 Subject: Merge skinning-14 to viewer-2, including refactoring many floaters to register them with LLFloaterReg, support for introspection of ParamBlock based UI widgets to dump XML schema, splitting llfolderview.cpp into three separate files to unravel dependencies and skeleton for for LLListView widget. Resolved conflicts in these files: lldraghandle.h, lluictrl.h, llchiclet.cpp, llfolderview.h/cpp, lliinventorybridge.cpp, llpanelpicks.cpp, llviewermenu.cpp, floater_mute.xml, floater_preferences.xml, notifications.xml, panel_preferences_audio.xml, panel_preferences_graphics1.xml, panel_region_general.xml svn merge -r124961:126284 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-14 --- indra/newview/llviewertexteditor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index f4989ec4fe..399b7c6bc1 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -39,7 +39,7 @@ #include "llinventory.h" #include "llinventorybridge.h" #include "llinventorymodel.h" -#include "llinventoryview.h" +#include "llfloaterinventory.h" #include "llviewertexteditor.h" @@ -64,7 +64,7 @@ #include "llappviewer.h" // for gPacificDaylightTime -static LLDefaultWidgetRegistry::Register r("text_editor"); +static LLDefaultChildRegistry::Register r("text_editor"); ///---------------------------------------------------------------------------- /// Class LLEmbeddedNotecardOpener -- cgit v1.2.3 From 77f56a3f3db72b2938eadb0868fc7be975dabafa Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Fri, 10 Jul 2009 22:02:26 +0000 Subject: merge QAR-1579: texture-cleanup-1. --- indra/newview/llviewertexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 399b7c6bc1..23f3f46570 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -54,7 +54,7 @@ #include "lltooldraganddrop.h" #include "lltrans.h" #include "llviewercontrol.h" -#include "llviewerimagelist.h" +#include "llviewertexturelist.h" #include "llviewerwindow.h" #include "llviewerinventory.h" #include "lluictrlfactory.h" -- cgit v1.2.3 From f5ba6df4c2dc5a5e0842ed028dd4de01406dca3b Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 24 Jul 2009 16:20:15 +0000 Subject: svn merge -r 127369:127511 svn+ssh://svn.lindenlab.com/svn/linden/branches/avatar-pipeline/landmark-permissions__merge__viewer2.0.0.3-r127280 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3 includes post-merge fix for DEV-36563 : Remove mAcceptsCallingCardNames For DEV-36496 : Viewer merge for Landmark & Callingcard Permissions [VIEWER] For DEV-36563 : Remove mAcceptsCallingCardNames Test plans - EXTERNAL * [ Test against a 1.30 server ] * Test various permissions operations - both on items in inventory, and rezzed items and items that are embedded in objects. * Test creating landmarks. Test plans - INTERNAL * Test against any inventory permissions smoke tests. * See test plans in QAR-1644 for full Landmark&Callingcard Permissions test plan. --- indra/newview/llviewertexteditor.cpp | 199 ++++++++++++++++++----------------- 1 file changed, 105 insertions(+), 94 deletions(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 23f3f46570..902b59c732 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -44,6 +44,7 @@ #include "llviewertexteditor.h" #include "llfloaterchat.h" +#include "llfloateravatarinfo.h" #include "llfloaterworldmap.h" #include "llnotify.h" #include "llpreview.h" @@ -372,47 +373,61 @@ void LLEmbeddedItems::bindEmbeddedChars( const LLFontGL* font ) const const char* img_name; switch( item->getType() ) { - case LLAssetType::AT_TEXTURE: - if(item->getInventoryType() == LLInventoryType::IT_SNAPSHOT) - { - img_name = "inv_item_snapshot.tga"; - } - else - { - img_name = "inv_item_texture.tga"; - } + case LLAssetType::AT_TEXTURE: + if(item->getInventoryType() == LLInventoryType::IT_SNAPSHOT) + { + img_name = "inv_item_snapshot.tga"; + } + else + { + img_name = "inv_item_texture.tga"; + } - break; - case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break; - case LLAssetType::AT_LANDMARK: - if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED) - { - img_name = "inv_item_landmark_visited.tga"; - } - else - { - img_name = "inv_item_landmark.tga"; - } - break; - case LLAssetType::AT_CLOTHING: img_name = "inv_item_clothing.tga"; break; - case LLAssetType::AT_OBJECT: - if (item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) - { - img_name = "inv_item_object_multi.tga"; - } - else + break; + case LLAssetType::AT_SOUND: img_name = "inv_item_sound.tga"; break; + case LLAssetType::AT_LANDMARK: + if (item->getFlags() & LLInventoryItem::II_FLAGS_LANDMARK_VISITED) + { + img_name = "inv_item_landmark_visited.tga"; + } + else + { + img_name = "inv_item_landmark.tga"; + } + break; + case LLAssetType::AT_CALLINGCARD: { - img_name = "inv_item_object.tga"; + BOOL online; + online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); + if (online) + { + img_name = "inv_item_callingcard_online.tga"; break; + } + else + { + img_name = "inv_item_callingcard_offline.tga"; break; + } + break; } - break; - case LLAssetType::AT_NOTECARD: img_name = "inv_item_notecard.tga"; break; - case LLAssetType::AT_LSL_TEXT: img_name = "inv_item_script.tga"; break; - case LLAssetType::AT_BODYPART: img_name = "inv_item_skin.tga"; break; - case LLAssetType::AT_ANIMATION: img_name = "inv_item_animation.tga";break; - case LLAssetType::AT_GESTURE: img_name = "inv_item_gesture.tga"; break; - //TODO need img_name - case LLAssetType::AT_FAVORITE: img_name = "inv_item_landmark.tga"; break; - default: llassert(0); continue; + case LLAssetType::AT_CLOTHING: img_name = "inv_item_clothing.tga"; break; + case LLAssetType::AT_OBJECT: + if (item->getFlags() & LLInventoryItem::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS) + { + img_name = "inv_item_object_multi.tga"; + } + else + { + img_name = "inv_item_object.tga"; + } + break; + case LLAssetType::AT_NOTECARD: img_name = "inv_item_notecard.tga"; break; + case LLAssetType::AT_LSL_TEXT: img_name = "inv_item_script.tga"; break; + case LLAssetType::AT_BODYPART: img_name = "inv_item_skin.tga"; break; + case LLAssetType::AT_ANIMATION: img_name = "inv_item_animation.tga";break; + case LLAssetType::AT_GESTURE: img_name = "inv_item_gesture.tga"; break; + //TODO need img_name + case LLAssetType::AT_FAVORITE: img_name = "inv_item_landmark.tga"; break; + default: llassert(0); continue; } LLUIImagePtr image = LLUI::getUIImage(img_name); @@ -1019,8 +1034,6 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) } -// Allow calling cards to be dropped onto text fields. Append the name and -// a carriage return. // virtual BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, @@ -1043,33 +1056,17 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, { switch( cargo_type ) { - case DAD_CALLINGCARD: - if(acceptsCallingCardNames()) - { - if (drop) - { - LLInventoryItem *item = (LLInventoryItem *)cargo_data; - std::string name = item->getName(); - appendText(name, true, true); - } - *accept = ACCEPT_YES_COPY_SINGLE; - } - else - { - *accept = ACCEPT_NO; - } - break; - - case DAD_TEXTURE: - case DAD_SOUND: - case DAD_LANDMARK: - case DAD_SCRIPT: - case DAD_CLOTHING: - case DAD_OBJECT: - case DAD_NOTECARD: - case DAD_BODYPART: - case DAD_ANIMATION: - case DAD_GESTURE: + case DAD_CALLINGCARD: + case DAD_TEXTURE: + case DAD_SOUND: + case DAD_LANDMARK: + case DAD_SCRIPT: + case DAD_CLOTHING: + case DAD_OBJECT: + case DAD_NOTECARD: + case DAD_BODYPART: + case DAD_ANIMATION: + case DAD_GESTURE: { LLInventoryItem *item = (LLInventoryItem *)cargo_data; if( item && allowsEmbeddedItems() ) @@ -1101,8 +1098,8 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, { // *TODO: Translate tooltip_msg.assign("Only items with unrestricted\n" - "'next owner' permissions \n" - "can be attached to notecards."); + "'next owner' permissions \n" + "can be attached to notecards."); } } } @@ -1113,9 +1110,9 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, break; } - default: - *accept = ACCEPT_NO; - break; + default: + *accept = ACCEPT_NO; + break; } } else @@ -1301,32 +1298,36 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLInventoryItem* item, llwchar wc) switch( item->getType() ) { - case LLAssetType::AT_TEXTURE: - openEmbeddedTexture( item, wc ); - return TRUE; + case LLAssetType::AT_TEXTURE: + openEmbeddedTexture( item, wc ); + return TRUE; - case LLAssetType::AT_SOUND: - openEmbeddedSound( item, wc ); - return TRUE; + case LLAssetType::AT_SOUND: + openEmbeddedSound( item, wc ); + return TRUE; - case LLAssetType::AT_NOTECARD: - openEmbeddedNotecard( item, wc ); - return TRUE; + case LLAssetType::AT_NOTECARD: + openEmbeddedNotecard( item, wc ); + return TRUE; - case LLAssetType::AT_LANDMARK: - openEmbeddedLandmark( item, wc ); - return TRUE; + case LLAssetType::AT_LANDMARK: + openEmbeddedLandmark( item, wc ); + return TRUE; - case LLAssetType::AT_LSL_TEXT: - case LLAssetType::AT_CLOTHING: - case LLAssetType::AT_OBJECT: - case LLAssetType::AT_BODYPART: - case LLAssetType::AT_ANIMATION: - case LLAssetType::AT_GESTURE: - showCopyToInvDialog( item, wc ); - return TRUE; - default: - return FALSE; + case LLAssetType::AT_CALLINGCARD: + openEmbeddedCallingcard( item, wc ); + return TRUE; + + case LLAssetType::AT_LSL_TEXT: + case LLAssetType::AT_CLOTHING: + case LLAssetType::AT_OBJECT: + case LLAssetType::AT_BODYPART: + case LLAssetType::AT_ANIMATION: + case LLAssetType::AT_GESTURE: + showCopyToInvDialog( item, wc ); + return TRUE; + default: + return FALSE; } } @@ -1376,6 +1377,16 @@ void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc copyInventory(item, gInventoryCallbacks.registerCB(mInventoryCallback)); } +void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc ) +{ + if(item && !item->getCreatorUUID().isNull()) + { + BOOL online; + online = LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID()); + LLFloaterAvatarInfo::showFromFriend(item->getCreatorUUID(), online); + } +} + void LLViewerTextEditor::showUnsavedAlertDialog( LLInventoryItem* item ) { LLSD payload; -- cgit v1.2.3 From e97f7728a90dd66014f6b3f0cd5e8d4c71f48691 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 30 Jul 2009 23:22:41 +0000 Subject: merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1170 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1187 -> viewer-2.0.0-3 --- indra/newview/llviewertexteditor.cpp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 902b59c732..0fadba1364 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -47,11 +47,13 @@ #include "llfloateravatarinfo.h" #include "llfloaterworldmap.h" #include "llnotify.h" +#include "llpanelplaces.h" #include "llpreview.h" #include "llpreviewtexture.h" #include "llpreviewnotecard.h" #include "llpreviewlandmark.h" #include "llscrollbar.h" +#include "llsidetray.h" #include "lltooldraganddrop.h" #include "lltrans.h" #include "llviewercontrol.h" @@ -1365,11 +1367,22 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLInventoryItem* item, llwchar wc { if (!item) return; - LLPreviewLandmark* preview = LLFloaterReg::showTypedInstance("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES); - if (preview) + + LLSD key; + key["type"] = "landmark"; + key["id"] = item->getUUID(); + + LLPanelPlaces *panel = dynamic_cast(LLSideTray::getInstance()->showPanel("panel_places", key)); + if (panel) { - preview->setItem( item ); + panel->setItem(item); } + +// LLPreviewLandmark* preview = LLFloaterReg::showTypedInstance("preview_landmark", LLSD(item->getUUID()), TAKE_FOCUS_YES); +// if (preview) +// { +// preview->setItem( item ); +// } } void LLViewerTextEditor::openEmbeddedNotecard( LLInventoryItem* item, llwchar wc ) -- cgit v1.2.3