summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp82
1 files changed, 46 insertions, 36 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 36d9e7935f..dfa775c292 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -134,11 +134,12 @@ LLMenuGL *gPopupMenuView = NULL;
LLMenuBarGL *gLoginMenuBarView = NULL;
// Pie menus
-LLContextMenu *gPieSelf = NULL;
-LLContextMenu *gPieAvatar = NULL;
-LLContextMenu *gPieObject = NULL;
-LLContextMenu *gPieAttachment = NULL;
-LLContextMenu *gPieLand = NULL;
+LLContextMenu *gMenuAvatarSelf = NULL;
+LLContextMenu *gMenuAvatarOther = NULL;
+LLContextMenu *gMenuObject = NULL;
+LLContextMenu *gMenuAttachmentSelf = NULL;
+LLContextMenu *gMenuAttachmentOther = NULL;
+LLContextMenu *gMenuLand = NULL;
const std::string SAVE_INTO_INVENTORY("Save Object Back to My Inventory");
const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents");
@@ -146,7 +147,6 @@ const std::string SAVE_INTO_TASK_INVENTORY("Save Object Back to Object Contents"
LLMenuGL* gAttachSubMenu = NULL;
LLMenuGL* gDetachSubMenu = NULL;
LLMenuGL* gTakeOffClothes = NULL;
-LLContextMenu* gPieRate = NULL;
LLContextMenu* gAttachScreenPieMenu = NULL;
LLContextMenu* gAttachPieMenu = NULL;
LLContextMenu* gAttachBodyPartPieMenus[8];
@@ -376,25 +376,31 @@ void init_menus()
gMenuHolder->addChild( gPopupMenuView );
///
- /// Pie menus
+ /// Context menus
///
- gPieSelf = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_self.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ const widget_registry_t& registry =
+ LLViewerMenuHolderGL::child_registry_t::instance();
+ gMenuAvatarSelf = LLUICtrlFactory::createFromFile<LLContextMenu>(
+ "menu_avatar_self.xml", gMenuHolder, registry);
+ gMenuAvatarOther = LLUICtrlFactory::createFromFile<LLContextMenu>(
+ "menu_avatar_other.xml", gMenuHolder, registry);
- // TomY TODO: what shall we do about these?
gDetachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach HUD", true);
gDetachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Detach", true);
- gPieAvatar = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_avatar.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
-
- gPieObject = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_object.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ gMenuObject = LLUICtrlFactory::createFromFile<LLContextMenu>(
+ "menu_object.xml", gMenuHolder, registry);
gAttachScreenPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach HUD");
gAttachPieMenu = gMenuHolder->getChild<LLContextMenu>("Object Attach");
- gPieRate = gMenuHolder->getChild<LLContextMenu>("Rate Menu");
- gPieAttachment = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_attachment.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ gMenuAttachmentSelf = LLUICtrlFactory::createFromFile<LLContextMenu>(
+ "menu_attachment_self.xml", gMenuHolder, registry);
+ gMenuAttachmentOther = LLUICtrlFactory::createFromFile<LLContextMenu>(
+ "menu_attachment_other.xml", gMenuHolder, registry);
- gPieLand = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>("menu_pie_land.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance());
+ gMenuLand = LLUICtrlFactory::createFromFile<LLContextMenu>(
+ "menu_land.xml", gMenuHolder, registry);
///
/// set up the colors
@@ -403,12 +409,13 @@ void init_menus()
LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
- gPieSelf->setBackgroundColor( context_menu_color );
- gPieAvatar->setBackgroundColor( context_menu_color );
- gPieObject->setBackgroundColor( context_menu_color );
- gPieAttachment->setBackgroundColor( context_menu_color );
+ gMenuAvatarSelf->setBackgroundColor( context_menu_color );
+ gMenuAvatarOther->setBackgroundColor( context_menu_color );
+ gMenuObject->setBackgroundColor( context_menu_color );
+ gMenuAttachmentSelf->setBackgroundColor( context_menu_color );
+ gMenuAttachmentOther->setBackgroundColor( context_menu_color );
- gPieLand->setBackgroundColor( context_menu_color );
+ gMenuLand->setBackgroundColor( context_menu_color );
color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
gPopupMenuView->setBackgroundColor( color );
@@ -2263,20 +2270,23 @@ void cleanup_menus()
delete gMenuParcelObserver;
gMenuParcelObserver = NULL;
- delete gPieSelf;
- gPieSelf = NULL;
+ delete gMenuAvatarSelf;
+ gMenuAvatarSelf = NULL;
+
+ delete gMenuAvatarOther;
+ gMenuAvatarOther = NULL;
- delete gPieAvatar;
- gPieAvatar = NULL;
+ delete gMenuObject;
+ gMenuObject = NULL;
- delete gPieObject;
- gPieObject = NULL;
+ delete gMenuAttachmentSelf;
+ gMenuAttachmentSelf = NULL;
- delete gPieAttachment;
- gPieAttachment = NULL;
+ delete gMenuAttachmentOther;
+ gMenuAttachmentSelf = NULL;
- delete gPieLand;
- gPieLand = NULL;
+ delete gMenuLand;
+ gMenuLand = NULL;
delete gMenuBarView;
gMenuBarView = NULL;
@@ -2519,8 +2529,6 @@ void handle_object_edit()
void handle_object_inspect()
{
- // Disable sidepanel inspector
- /*
LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection();
LLViewerObject* selected_objectp = selection->getFirstRootObject();
if (selected_objectp)
@@ -2529,9 +2537,11 @@ void handle_object_inspect()
key["task"] = "task";
LLSideTray::getInstance()->showPanel("sidepanel_inventory", key);
}
- */
+ /*
+ // Old floater properties
LLFloaterReg::showInstance("inspect", LLSD());
+ */
}
//---------------------------------------------------------------------------
@@ -4911,7 +4921,7 @@ class LLEditDelete : public view_listener_t
// When deleting an object we may not actually be done
// Keep selection so we know what to delete when confirmation is needed about the delete
- gPieObject->hide();
+ gMenuObject->hide();
return true;
}
};
@@ -4944,7 +4954,7 @@ void handle_object_delete()
// When deleting an object we may not actually be done
// Keep selection so we know what to delete when confirmation is needed about the delete
- gPieObject->hide();
+ gMenuObject->hide();
return;
}
@@ -6006,7 +6016,7 @@ public:
protected:
virtual void done()
{
- gPieAttachment->buildDrawLabels();
+ gMenuAttachmentSelf->buildDrawLabels();
gInventory.removeObserver(this);
delete this;
}