diff options
author | Jacek Antonelli | 2008-09-06 18:24:57 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-09-06 18:25:07 -0500 |
commit | 798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch) | |
tree | 1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llinventoryactions.cpp | |
parent | Second Life viewer sources 1.20.15 (diff) | |
download | meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2 meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz |
Second Life viewer sources 1.21.0-RC
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llinventoryactions.cpp | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/linden/indra/newview/llinventoryactions.cpp b/linden/indra/newview/llinventoryactions.cpp index 7f7a15f..cf95eef 100644 --- a/linden/indra/newview/llinventoryactions.cpp +++ b/linden/indra/newview/llinventoryactions.cpp | |||
@@ -85,15 +85,15 @@ | |||
85 | #include "lluictrlfactory.h" | 85 | #include "lluictrlfactory.h" |
86 | #include "llselectmgr.h" | 86 | #include "llselectmgr.h" |
87 | 87 | ||
88 | const char* NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not) | 88 | const std::string NEW_LSL_NAME = "New Script"; // *TODO:Translate? (probably not) |
89 | const char* NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not) | 89 | const std::string NEW_NOTECARD_NAME = "New Note"; // *TODO:Translate? (probably not) |
90 | const char* NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) | 90 | const std::string NEW_GESTURE_NAME = "New Gesture"; // *TODO:Translate? (probably not) |
91 | 91 | ||
92 | typedef LLMemberListener<LLPanelInventory> object_inventory_listener_t; | 92 | typedef LLMemberListener<LLPanelInventory> object_inventory_listener_t; |
93 | typedef LLMemberListener<LLInventoryView> inventory_listener_t; | 93 | typedef LLMemberListener<LLInventoryView> inventory_listener_t; |
94 | typedef LLMemberListener<LLInventoryPanel> inventory_panel_listener_t; | 94 | typedef LLMemberListener<LLInventoryPanel> inventory_panel_listener_t; |
95 | 95 | ||
96 | bool doToSelected(LLFolderView* folder, LLString action) | 96 | bool doToSelected(LLFolderView* folder, std::string action) |
97 | { | 97 | { |
98 | LLInventoryModel* model = &gInventory; | 98 | LLInventoryModel* model = &gInventory; |
99 | if ("rename" == action) | 99 | if ("rename" == action) |
@@ -169,7 +169,7 @@ class LLDoToSelectedPanel : public object_inventory_listener_t | |||
169 | { | 169 | { |
170 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 170 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
171 | { | 171 | { |
172 | LLString action = userdata.asString(); | 172 | std::string action = userdata.asString(); |
173 | LLPanelInventory *panel = mPtr; | 173 | LLPanelInventory *panel = mPtr; |
174 | LLFolderView* folder = panel->getRootFolder(); | 174 | LLFolderView* folder = panel->getRootFolder(); |
175 | if(!folder) return true; | 175 | if(!folder) return true; |
@@ -182,7 +182,7 @@ class LLDoToSelectedFloater : public inventory_listener_t | |||
182 | { | 182 | { |
183 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 183 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
184 | { | 184 | { |
185 | LLString action = userdata.asString(); | 185 | std::string action = userdata.asString(); |
186 | LLInventoryPanel *panel = mPtr->getPanel(); | 186 | LLInventoryPanel *panel = mPtr->getPanel(); |
187 | LLFolderView* folder = panel->getRootFolder(); | 187 | LLFolderView* folder = panel->getRootFolder(); |
188 | if(!folder) return true; | 188 | if(!folder) return true; |
@@ -195,7 +195,7 @@ class LLDoToSelected : public inventory_panel_listener_t | |||
195 | { | 195 | { |
196 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 196 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
197 | { | 197 | { |
198 | LLString action = userdata.asString(); | 198 | std::string action = userdata.asString(); |
199 | LLInventoryPanel *panel = mPtr; | 199 | LLInventoryPanel *panel = mPtr; |
200 | LLFolderView* folder = panel->getRootFolder(); | 200 | LLFolderView* folder = panel->getRootFolder(); |
201 | if(!folder) return true; | 201 | if(!folder) return true; |
@@ -212,7 +212,7 @@ class LLNewWindow : public inventory_listener_t | |||
212 | S32 left = 0 , top = 0; | 212 | S32 left = 0 , top = 0; |
213 | gFloaterView->getNewFloaterPosition(&left, &top); | 213 | gFloaterView->getNewFloaterPosition(&left, &top); |
214 | rect.setLeftTopAndSize(left, top, rect.getWidth(), rect.getHeight()); | 214 | rect.setLeftTopAndSize(left, top, rect.getWidth(), rect.getHeight()); |
215 | LLInventoryView* iv = new LLInventoryView("Inventory", | 215 | LLInventoryView* iv = new LLInventoryView(std::string("Inventory"), |
216 | rect, | 216 | rect, |
217 | mPtr->getActivePanel()->getModel()); | 217 | mPtr->getActivePanel()->getModel()); |
218 | iv->getActivePanel()->setFilterTypes(mPtr->getActivePanel()->getFilterTypes()); | 218 | iv->getActivePanel()->setFilterTypes(mPtr->getActivePanel()->getFilterTypes()); |
@@ -327,19 +327,19 @@ class LLEmptyTrashFloater : public inventory_listener_t | |||
327 | } | 327 | } |
328 | }; | 328 | }; |
329 | 329 | ||
330 | void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, LLString type, LLFolderBridge *self = NULL) | 330 | void do_create(LLInventoryModel *model, LLInventoryPanel *ptr, std::string type, LLFolderBridge *self = NULL) |
331 | { | 331 | { |
332 | if ("category" == type) | 332 | if ("category" == type) |
333 | { | 333 | { |
334 | LLUUID category; | 334 | LLUUID category; |
335 | if (self) | 335 | if (self) |
336 | { | 336 | { |
337 | category = model->createNewCategory(self->getUUID(), LLAssetType::AT_NONE, NULL); | 337 | category = model->createNewCategory(self->getUUID(), LLAssetType::AT_NONE, LLStringUtil::null); |
338 | } | 338 | } |
339 | else | 339 | else |
340 | { | 340 | { |
341 | category = model->createNewCategory(gAgent.getInventoryRootID(), | 341 | category = model->createNewCategory(gAgent.getInventoryRootID(), |
342 | LLAssetType::AT_NONE, NULL); | 342 | LLAssetType::AT_NONE, LLStringUtil::null); |
343 | } | 343 | } |
344 | model->notifyObservers(); | 344 | model->notifyObservers(); |
345 | ptr->setSelection(category, TRUE); | 345 | ptr->setSelection(category, TRUE); |
@@ -446,7 +446,7 @@ class LLDoCreate : public inventory_panel_listener_t | |||
446 | { | 446 | { |
447 | LLInventoryModel* model = mPtr->getModel(); | 447 | LLInventoryModel* model = mPtr->getModel(); |
448 | if(!model) return false; | 448 | if(!model) return false; |
449 | LLString type = userdata.asString(); | 449 | std::string type = userdata.asString(); |
450 | do_create(model, mPtr, type, LLFolderBridge::sSelf); | 450 | do_create(model, mPtr, type, LLFolderBridge::sSelf); |
451 | return true; | 451 | return true; |
452 | } | 452 | } |
@@ -458,7 +458,7 @@ class LLDoCreateFloater : public inventory_listener_t | |||
458 | { | 458 | { |
459 | LLInventoryModel* model = mPtr->getPanel()->getModel(); | 459 | LLInventoryModel* model = mPtr->getPanel()->getModel(); |
460 | if(!model) return false; | 460 | if(!model) return false; |
461 | LLString type = userdata.asString(); | 461 | std::string type = userdata.asString(); |
462 | do_create(model, mPtr->getPanel(), type); | 462 | do_create(model, mPtr->getPanel(), type); |
463 | return true; | 463 | return true; |
464 | } | 464 | } |
@@ -468,7 +468,7 @@ class LLSetSortBy : public inventory_listener_t | |||
468 | { | 468 | { |
469 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 469 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
470 | { | 470 | { |
471 | LLString sort_field = userdata.asString(); | 471 | std::string sort_field = userdata.asString(); |
472 | if (sort_field == "name") | 472 | if (sort_field == "name") |
473 | { | 473 | { |
474 | U32 order = mPtr->getActivePanel()->getSortOrder(); | 474 | U32 order = mPtr->getActivePanel()->getSortOrder(); |
@@ -534,7 +534,7 @@ class LLBeginIMSession : public inventory_panel_listener_t | |||
534 | std::set<LLUUID> selected_items; | 534 | std::set<LLUUID> selected_items; |
535 | panel->getRootFolder()->getSelectionList(selected_items); | 535 | panel->getRootFolder()->getSelectionList(selected_items); |
536 | 536 | ||
537 | LLString name; | 537 | std::string name; |
538 | static int session_num = 1; | 538 | static int session_num = 1; |
539 | 539 | ||
540 | LLDynamicArray<LLUUID> members; | 540 | LLDynamicArray<LLUUID> members; |
@@ -615,9 +615,7 @@ class LLBeginIMSession : public inventory_panel_listener_t | |||
615 | 615 | ||
616 | if (name.empty()) | 616 | if (name.empty()) |
617 | { | 617 | { |
618 | char buffer [50]; | 618 | name = llformat("Session %d", session_num++); |
619 | sprintf(buffer, "Session %d", session_num++); | ||
620 | name = buffer; | ||
621 | } | 619 | } |
622 | 620 | ||
623 | 621 | ||
@@ -645,7 +643,7 @@ class LLAttachObject : public inventory_panel_listener_t | |||
645 | folder->getSelectionList(selected_items); | 643 | folder->getSelectionList(selected_items); |
646 | LLUUID id = *selected_items.begin(); | 644 | LLUUID id = *selected_items.begin(); |
647 | 645 | ||
648 | LLString joint_name = userdata.asString(); | 646 | std::string joint_name = userdata.asString(); |
649 | LLVOAvatar *avatarp = gAgent.getAvatarObject(); | 647 | LLVOAvatar *avatarp = gAgent.getAvatarObject(); |
650 | LLViewerJointAttachment* attachmentp = NULL; | 648 | LLViewerJointAttachment* attachmentp = NULL; |
651 | for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); | 649 | for (LLVOAvatar::attachment_map_t::iterator iter = avatarp->mAttachmentPoints.begin(); |