diff options
Diffstat (limited to 'indra/newview')
109 files changed, 946 insertions, 524 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index be6bce8054..492d70a956 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -104,6 +104,7 @@ set(viewer_SOURCE_FILES llclassifiedstatsresponder.cpp llcloud.cpp llcolorswatch.cpp + llcommanddispatcherlistener.cpp llcommandhandler.cpp llcommandlineparser.cpp llcompilequeue.cpp @@ -227,7 +228,6 @@ set(viewer_SOURCE_FILES llgroupactions.cpp llgrouplist.cpp llgroupmgr.cpp - llgroupnotify.cpp llhomelocationresponder.cpp llhudeffect.cpp llhudeffectbeam.cpp @@ -298,7 +298,6 @@ set(viewer_SOURCE_FILES llnotificationofferhandler.cpp llnotificationscripthandler.cpp llnotificationtiphandler.cpp - llnotify.cpp lloutputmonitorctrl.cpp lloverlaybar.cpp llpanelavatar.cpp @@ -324,6 +323,7 @@ set(viewer_SOURCE_FILES llpanellandmarks.cpp llpanellandmedia.cpp llpanellogin.cpp + llpanelloginlistener.cpp llpanellookinfo.cpp llpanelmaininventory.cpp llpanelmediasettingsgeneral.cpp @@ -444,6 +444,7 @@ set(viewer_SOURCE_FILES lluploaddialog.cpp llurl.cpp llurldispatcher.cpp + llurldispatcherlistener.cpp llurlhistory.cpp llurllineeditorctrl.cpp llurlsimstring.cpp @@ -611,6 +612,7 @@ set(viewer_HEADER_FILES llclassifiedstatsresponder.h llcloud.h llcolorswatch.h + llcommanddispatcherlistener.h llcommandhandler.h llcommandlineparser.h llcompilequeue.h @@ -734,7 +736,6 @@ set(viewer_HEADER_FILES llgroupactions.h llgrouplist.h llgroupmgr.h - llgroupnotify.h llhomelocationresponder.h llhudeffect.h llhudeffectbeam.h @@ -800,7 +801,6 @@ set(viewer_HEADER_FILES llnetmap.h llnotificationhandler.h llnotificationmanager.h - llnotify.h lloutputmonitorctrl.h lloverlaybar.h llpanelavatar.h @@ -826,6 +826,7 @@ set(viewer_HEADER_FILES llpanellandmarks.h llpanellandmedia.h llpanellogin.h + llpanelloginlistener.h llpanellookinfo.h llpanelmaininventory.h llpanelmediasettingsgeneral.h @@ -950,6 +951,7 @@ set(viewer_HEADER_FILES lluploaddialog.h llurl.h llurldispatcher.h + llurldispatcherlistener.h llurlhistory.h llurllineeditorctrl.h llurlsimstring.h diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp index 3114a37ada..1e2eac39eb 100644 --- a/indra/newview/llagentwearables.cpp +++ b/indra/newview/llagentwearables.cpp @@ -41,7 +41,6 @@ #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llviewerregion.h" #include "llvoavatarself.h" #include "llwearable.h" diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9a1b749ba7..2fc7a630ae 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -39,7 +39,6 @@ #include "llfeaturemanager.h" #include "lluictrlfactory.h" #include "lltexteditor.h" -#include "llalertdialog.h" #include "llerrorcontrol.h" #include "llviewertexturelist.h" #include "llgroupmgr.h" @@ -109,7 +108,6 @@ #include "apr_dso.h" #include <boost/lexical_cast.hpp> -#include "llnotify.h" #include "llviewerkeyboard.h" #include "lllfsthread.h" #include "llworkerthread.h" diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 1d03cc8823..a2322e28b4 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -39,7 +39,6 @@ #include "llcompilequeue.h" #include "llfloaterbuycurrency.h" #include "llfilepicker.h" -#include "llnotify.h" #include "llinventoryobserver.h" #include "llinventorypanel.h" #include "llpermissionsflags.h" diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp index 5af023f565..5f90a7627f 100644 --- a/indra/newview/llavataractions.cpp +++ b/indra/newview/llavataractions.cpp @@ -62,9 +62,6 @@ #include "llimfloater.h" #include "lltrans.h" -// callback connection to auto-call when the IM floater initializes -boost::signals2::connection gAdhocAutoCall; - // static void LLAvatarActions::requestFriendshipDialog(const LLUUID& id, const std::string& name) { @@ -250,8 +247,8 @@ void LLAvatarActions::startAdhocCall(const std::vector<LLUUID>& ids) // always open IM window when connecting to voice LLIMFloater::show(session_id); - // start the call once the floater has fully initialized - gAdhocAutoCall = LLIMModel::getInstance()->addSessionInitializedCallback(callbackAutoStartCall); + // start the call once the session has fully initialized + gIMMgr->autoStartCallOnStartup(session_id); make_ui_sound("UISndStartIM"); } @@ -467,17 +464,6 @@ bool LLAvatarActions::callbackAddFriend(const LLSD& notification, const LLSD& re } // static -void LLAvatarActions::callbackAutoStartCall(const LLSD& data) -{ - // start the adhoc voice call now the IM panel has initialized - LLUUID session_id = data["session_id"].asUUID(); - gIMMgr->startCall(session_id); - - // and deschedule this callback as its work is done now - gAdhocAutoCall.disconnect(); -} - -// static void LLAvatarActions::requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message) { const LLUUID calling_card_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_CALLINGCARD); diff --git a/indra/newview/llavataractions.h b/indra/newview/llavataractions.h index 4c9851a48d..2dd2a4c4b1 100644 --- a/indra/newview/llavataractions.h +++ b/indra/newview/llavataractions.h @@ -139,7 +139,6 @@ private: static bool handleRemove(const LLSD& notification, const LLSD& response); static bool handlePay(const LLSD& notification, const LLSD& response, LLUUID avatar_id); static void callback_invite_to_group(LLUUID group_id, LLUUID id); - static void callbackAutoStartCall(const LLSD& data); // Just request friendship, no dialog. static void requestFriendship(const LLUUID& target_id, const std::string& target_name, const std::string& message); diff --git a/indra/newview/llcallfloater.cpp b/indra/newview/llcallfloater.cpp index d9fc4d54ab..4ab5ea1812 100644 --- a/indra/newview/llcallfloater.cpp +++ b/indra/newview/llcallfloater.cpp @@ -35,6 +35,7 @@ #include "llcallfloater.h" +#include "llagent.h" #include "llagentdata.h" // for gAgentID #include "llavatarlist.h" #include "llbottomtray.h" @@ -165,9 +166,19 @@ void LLCallFloater::updateSession() mVoiceType = VC_PEER_TO_PEER; break; case IM_SESSION_CONFERENCE_START: - mVoiceType = VC_AD_HOC_CHAT; + case IM_SESSION_GROUP_START: + case IM_SESSION_INVITE: + if (gAgent.isInGroup(session_id)) + { + mVoiceType = VC_GROUP_CHAT; + } + else + { + mVoiceType = VC_AD_HOC_CHAT; + } break; default: + llwarning("Failed to determine voice call IM type", 0); mVoiceType = VC_GROUP_CHAT; break; } diff --git a/indra/newview/llcallingcard.cpp b/indra/newview/llcallingcard.cpp index 714bd20ab8..82413878ad 100644 --- a/indra/newview/llcallingcard.cpp +++ b/indra/newview/llcallingcard.cpp @@ -55,7 +55,6 @@ #include "llinventorymodel.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llresmgr.h" #include "llimview.h" #include "llviewercontrol.h" diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp index 415c118ff1..cbb566b3a7 100644 --- a/indra/newview/llchannelmanager.cpp +++ b/indra/newview/llchannelmanager.cpp @@ -228,3 +228,14 @@ void LLChannelManager::muteAllChannels(bool mute) } } +void LLChannelManager::killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher) +{ + LLScreenChannel + * screen_channel = + dynamic_cast<LLScreenChannel*> (findChannelByID(channel_id)); + if (screen_channel != NULL) + { + screen_channel->killMatchedToasts(matcher); + } +} + diff --git a/indra/newview/llchannelmanager.h b/indra/newview/llchannelmanager.h index 4b66a1ef89..c2be39122f 100644 --- a/indra/newview/llchannelmanager.h +++ b/indra/newview/llchannelmanager.h @@ -109,6 +109,11 @@ public: */ void muteAllChannels(bool mute); + /** + * Kills matched toasts from specified toast screen channel. + */ + void killToastsFromChannel(const LLUUID& channel_id, const LLScreenChannel::Matcher& matcher); + private: LLScreenChannel* createChannel(LLChannelManager::Params& p); diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp index 30967677e8..9671c048ef 100644 --- a/indra/newview/llchiclet.cpp +++ b/indra/newview/llchiclet.cpp @@ -53,6 +53,7 @@ #include "llgroupmgr.h" #include "llnotificationmanager.h" #include "lltransientfloatermgr.h" +#include "llsyswellwindow.h" static LLDefaultChildRegistry::Register<LLChicletPanel> t1("chiclet_panel"); static LLDefaultChildRegistry::Register<LLIMWellChiclet> t2_0("chiclet_im_well"); @@ -233,6 +234,10 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p) connectCounterUpdatersToSignal("notify"); connectCounterUpdatersToSignal("groupnotify"); connectCounterUpdatersToSignal("offer"); + + // ensure that notification well window exists, to synchronously + // handle toast add/delete events. + LLNotificationWellWindow::getInstance(); } void LLNotificationChiclet::connectCounterUpdatersToSignal(const std::string& notification_type) diff --git a/indra/newview/llcolorswatch.cpp b/indra/newview/llcolorswatch.cpp index b2399d238b..dc6847f236 100644 --- a/indra/newview/llcolorswatch.cpp +++ b/indra/newview/llcolorswatch.cpp @@ -306,13 +306,16 @@ void LLColorSwatchCtrl::onColorChanged ( void* data, EColorPickOp pick_op ) } } -void LLColorSwatchCtrl::onFloaterClose() +// This is called when the main floatercustomize panel is closed. +// Since this class has pointers up to its parents, we need to cleanup +// this class first in order to avoid a crash. +void LLColorSwatchCtrl::onParentFloaterClosed() { LLFloaterColorPicker* pickerp = (LLFloaterColorPicker*)mPickerHandle.get(); - if (pickerp) { pickerp->setSwatch(NULL); + pickerp->closeFloater(); } mPickerHandle.markDead(); diff --git a/indra/newview/llcolorswatch.h b/indra/newview/llcolorswatch.h index 2f6aec85e8..4bb7d837cb 100644 --- a/indra/newview/llcolorswatch.h +++ b/indra/newview/llcolorswatch.h @@ -105,7 +105,7 @@ public: /*virtual*/ void setEnabled( BOOL enabled ); static void onColorChanged ( void* data, EColorPickOp pick_op = COLOR_CHANGE ); - void onFloaterClose(); + void onParentFloaterClosed(); protected: BOOL mValid; diff --git a/indra/newview/llcommanddispatcherlistener.cpp b/indra/newview/llcommanddispatcherlistener.cpp new file mode 100644 index 0000000000..00a20de30e --- /dev/null +++ b/indra/newview/llcommanddispatcherlistener.cpp @@ -0,0 +1,47 @@ +/** + * @file llcommanddispatcherlistener.cpp + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief Implementation for llcommanddispatcherlistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llcommanddispatcherlistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llcommandhandler.h" + +LLCommandDispatcherListener::LLCommandDispatcherListener(/* LLCommandDispatcher* instance */): + LLEventAPI("LLCommandDispatcher", "Access to LLCommandHandler commands") /* , + mDispatcher(instance) */ +{ + add("dispatch", + "Execute a command registered as an LLCommandHandler,\n" + "passing any required parameters:\n" + "[\"cmd\"] string command name\n" + "[\"params\"] array of parameters, as if from components of URL path\n" + "[\"query\"] map of parameters, as if from ?key1=val&key2=val\n" + "[\"trusted\"] boolean indicating trusted browser [default true]", + &LLCommandDispatcherListener::dispatch); +} + +void LLCommandDispatcherListener::dispatch(const LLSD& params) const +{ + // For most purposes, we expect callers to want to be trusted. + bool trusted_browser = true; + if (params.has("trusted")) + { + // But for testing, allow a caller to specify untrusted. + trusted_browser = params["trusted"].asBoolean(); + } + LLCommandDispatcher::dispatch(params["cmd"], params["params"], params["query"], NULL, + trusted_browser); +} diff --git a/indra/newview/llcommanddispatcherlistener.h b/indra/newview/llcommanddispatcherlistener.h new file mode 100644 index 0000000000..d0070ddd71 --- /dev/null +++ b/indra/newview/llcommanddispatcherlistener.h @@ -0,0 +1,30 @@ +/** + * @file llcommanddispatcherlistener.h + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief LLEventAPI for LLCommandDispatcher + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLCOMMANDDISPATCHERLISTENER_H) +#define LL_LLCOMMANDDISPATCHERLISTENER_H + +#include "lleventapi.h" +class LLCommandDispatcher; +class LLSD; + +class LLCommandDispatcherListener: public LLEventAPI +{ +public: + LLCommandDispatcherListener(/* LLCommandDispatcher* instance */); // all static members + +private: + void dispatch(const LLSD& params) const; + + //LLCommandDispatcher* mDispatcher; +}; + +#endif /* ! defined(LL_LLCOMMANDDISPATCHERLISTENER_H) */ diff --git a/indra/newview/llcommandhandler.cpp b/indra/newview/llcommandhandler.cpp index af6488388a..8c7e7bea83 100644 --- a/indra/newview/llcommandhandler.cpp +++ b/indra/newview/llcommandhandler.cpp @@ -34,12 +34,16 @@ #include "llviewerprecompiledheaders.h" #include "llcommandhandler.h" +#include "llnotificationsutil.h" +#include "llcommanddispatcherlistener.h" // system includes #include <boost/tokenizer.hpp> #define THROTTLE_PERIOD 15 // required secs between throttled commands +static LLCommandDispatcherListener sCommandDispatcherListener; + //--------------------------------------------------------------------------- // Underlying registry for command handlers, not directly accessible. //--------------------------------------------------------------------------- @@ -93,6 +97,8 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, LLMediaCtrl* web, bool trusted_browser) { + static bool slurl_blocked = false; + static bool slurl_throttled = false; static F64 last_throttle_time = 0.0; F64 cur_time = 0.0; std::map<std::string, LLCommandHandlerInfo>::iterator it = mMap.find(cmd); @@ -110,6 +116,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, // block request from external browser, but report as // "handled" because it was well formatted. LL_WARNS_ONCE("SLURL") << "Blocked SLURL command from untrusted browser" << LL_ENDL; + if (! slurl_blocked) + { + LLNotificationsUtil::add("BlockedSLURL"); + slurl_blocked = true; + } return true; case LLCommandHandler::UNTRUSTED_THROTTLE: @@ -119,6 +130,11 @@ bool LLCommandHandlerRegistry::dispatch(const std::string& cmd, // block request from external browser if it happened // within THROTTLE_PERIOD secs of the last command LL_WARNS_ONCE("SLURL") << "Throttled SLURL command from untrusted browser" << LL_ENDL; + if (! slurl_throttled) + { + LLNotificationsUtil::add("ThrottledSLURL"); + slurl_throttled = true; + } return true; } last_throttle_time = cur_time; diff --git a/indra/newview/lldelayedgestureerror.cpp b/indra/newview/lldelayedgestureerror.cpp index 411cb331a8..ead377deb0 100644 --- a/indra/newview/lldelayedgestureerror.cpp +++ b/indra/newview/lldelayedgestureerror.cpp @@ -36,7 +36,6 @@ #include <list> #include "llnotificationsutil.h" -#include "llnotify.h" #include "llcallbacklist.h" #include "llinventory.h" #include "llviewerinventory.h" diff --git a/indra/newview/lleventnotifier.cpp b/indra/newview/lleventnotifier.cpp index b64799bd86..edfb9dc864 100644 --- a/indra/newview/lleventnotifier.cpp +++ b/indra/newview/lleventnotifier.cpp @@ -37,7 +37,6 @@ #include "llnotificationsutil.h" #include "message.h" -#include "llnotify.h" #include "lleventinfo.h" #include "llfloaterreg.h" #include "llfloaterworldmap.h" diff --git a/indra/newview/llfirstuse.cpp b/indra/newview/llfirstuse.cpp index 0bcdad5da1..7fd0e070be 100644 --- a/indra/newview/llfirstuse.cpp +++ b/indra/newview/llfirstuse.cpp @@ -40,7 +40,6 @@ // viewer includes #include "llagent.h" // for gAgent.inPrelude() -#include "llnotify.h" #include "llviewercontrol.h" #include "llui.h" #include "llappviewer.h" diff --git a/indra/newview/llfloaterauction.cpp b/indra/newview/llfloaterauction.cpp index b63bcccf6b..c1a4a845e5 100644 --- a/indra/newview/llfloaterauction.cpp +++ b/indra/newview/llfloaterauction.cpp @@ -48,7 +48,6 @@ #include "llcombobox.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llsavedsettingsglue.h" #include "llviewertexturelist.h" #include "llviewerparcelmgr.h" diff --git a/indra/newview/llfloaterbuy.cpp b/indra/newview/llfloaterbuy.cpp index 16a5bb63e7..fba557c656 100644 --- a/indra/newview/llfloaterbuy.cpp +++ b/indra/newview/llfloaterbuy.cpp @@ -41,7 +41,6 @@ #include "llfloaterbuy.h" #include "llagent.h" // for agent id -#include "llalertdialog.h" #include "llinventorymodel.h" // for gInventory #include "llfloaterreg.h" #include "llfloaterinventory.h" // for get_item_icon diff --git a/indra/newview/llfloaterbuycontents.cpp b/indra/newview/llfloaterbuycontents.cpp index 39c7bc02af..0daef27af2 100644 --- a/indra/newview/llfloaterbuycontents.cpp +++ b/indra/newview/llfloaterbuycontents.cpp @@ -43,7 +43,6 @@ #include "llcachename.h" #include "llagent.h" // for agent id -#include "llalertdialog.h" #include "llcheckboxctrl.h" #include "llinventoryfunctions.h" #include "llinventorymodel.h" // for gInventory diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 3a8c3ab4d2..9b88923e7e 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -49,7 +49,6 @@ #include "lliconctrl.h" #include "lllineeditor.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llparcel.h" #include "llslurl.h" #include "llstatusbar.h" diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp index 56b56dc3d2..73b79d8e13 100644 --- a/indra/newview/llfloatercolorpicker.cpp +++ b/indra/newview/llfloatercolorpicker.cpp @@ -241,16 +241,6 @@ BOOL LLFloaterColorPicker::postBuild() return TRUE; } -/*virtual*/ -void LLFloaterColorPicker::onClose(bool app_settings) -{ - if (mSwatch) - { - mSwatch->onFloaterClose(); - } - stopUsingPipette(); -} - ////////////////////////////////////////////////////////////////////////////// // void LLFloaterColorPicker::initUI ( F32 rValIn, F32 gValIn, F32 bValIn ) diff --git a/indra/newview/llfloatercolorpicker.h b/indra/newview/llfloatercolorpicker.h index b381740acd..0bbbe2051c 100644 --- a/indra/newview/llfloatercolorpicker.h +++ b/indra/newview/llfloatercolorpicker.h @@ -56,7 +56,6 @@ class LLFloaterColorPicker // overrides virtual BOOL postBuild (); - virtual void onClose(bool app_settings); virtual void draw (); virtual BOOL handleMouseDown ( S32 x, S32 y, MASK mask ); virtual BOOL handleMouseUp ( S32 x, S32 y, MASK mask ); diff --git a/indra/newview/llfloaterfriends.cpp b/indra/newview/llfloaterfriends.cpp index 1482d3fe21..56291c57a6 100644 --- a/indra/newview/llfloaterfriends.cpp +++ b/indra/newview/llfloaterfriends.cpp @@ -50,7 +50,6 @@ #include "llinventorymodel.h" #include "llnamelistctrl.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llresmgr.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp index 04ba11530a..e1409b8ad5 100644 --- a/indra/newview/llfloatergodtools.cpp +++ b/indra/newview/llfloatergodtools.cpp @@ -45,7 +45,6 @@ #include "message.h" #include "llagent.h" -#include "llalertdialog.h" #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" @@ -69,7 +68,6 @@ #include "llviewerwindow.h" #include "llworld.h" #include "llfloateravatarpicker.h" -#include "llnotify.h" #include "llxfermanager.h" #include "llvlcomposition.h" #include "llsurface.h" diff --git a/indra/newview/llfloaterhud.cpp b/indra/newview/llfloaterhud.cpp index 14cff3bcc3..d2ee3e44c5 100644 --- a/indra/newview/llfloaterhud.cpp +++ b/indra/newview/llfloaterhud.cpp @@ -37,7 +37,6 @@ // Viewer libs #include "llviewercontrol.h" #include "llmediactrl.h" -#include "llalertdialog.h" // Linden libs #include "llnotificationsutil.h" diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index ed0f24d160..66bf5246b0 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -55,7 +55,6 @@ #include "llavataractions.h" #include "lllineeditor.h" #include "llnamelistctrl.h" -#include "llnotify.h" #include "llpanellandaudio.h" #include "llpanellandmedia.h" #include "llradiogroup.h" @@ -2300,7 +2299,7 @@ void LLPanelLandAccess::refresh() mListBanned->deleteAllItems(); LLParcel *parcel = mParcel->getParcel(); - + // Display options if (parcel) { @@ -2396,22 +2395,40 @@ void LLPanelLandAccess::refresh() mListBanned->addNameItem(entry.mID, ADD_SORTED, TRUE, suffix); } } + + LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion(); + if(region) + { + std::string region_access = "("; + region_access += region->getSimAccessString(); + region_access += ")"; + childSetLabelArg( "public_access", "[MATURITY]", region_access ); + } + else + { + childSetLabelArg( "public_access", "[MATURITY]", std::string() ); + } + if(parcel->getRegionDenyAnonymousOverride()) { childSetValue("limit_payment", TRUE); + childSetLabelArg( "limit_payment", "[ESTATE_PAYMENT_LIMIT]", getString("access_estate_defined") ); } else { childSetValue("limit_payment", (parcel->getParcelFlag(PF_DENY_ANONYMOUS))); + childSetLabelArg( "limit_payment", "[ESTATE_PAYMENT_LIMIT]", std::string() ); } if(parcel->getRegionDenyAgeUnverifiedOverride()) { childSetValue("limit_age_verified", TRUE); + childSetLabelArg( "limit_age_verified", "[ESTATE_AGE_LIMIT]", getString("access_estate_defined") ); } else { childSetValue("limit_age_verified", (parcel->getParcelFlag(PF_DENY_AGEUNVERIFIED))); + childSetLabelArg( "limit_age_verified", "[ESTATE_AGE_LIMIT]", std::string() ); } BOOL use_pass = parcel->getParcelFlag(PF_USE_PASS_LIST); diff --git a/indra/newview/llfloateropenobject.cpp b/indra/newview/llfloateropenobject.cpp index 56a86c2cb7..51c18196f2 100644 --- a/indra/newview/llfloateropenobject.cpp +++ b/indra/newview/llfloateropenobject.cpp @@ -44,7 +44,6 @@ #include "llnotificationsutil.h" #include "lltextbox.h" -#include "llalertdialog.h" #include "llinventorybridge.h" #include "llfloaterinventory.h" #include "llinventorymodel.h" diff --git a/indra/newview/llfloaterparcel.cpp b/indra/newview/llfloaterparcel.cpp index 88a39a495f..e2be784116 100644 --- a/indra/newview/llfloaterparcel.cpp +++ b/indra/newview/llfloaterparcel.cpp @@ -40,6 +40,7 @@ // viewer project includes #include "llcommandhandler.h" #include "llpanelplace.h" +#include "llsidetray.h" // linden library includes #include "lluuid.h" @@ -70,7 +71,10 @@ public: { if (parcel_id.notNull()) { - LLFloaterReg::showInstance("parcel_info", LLSD(parcel_id)); + LLSD key; + key["type"] = "remote_place"; + key["id"] = parcel_id; + LLSideTray::getInstance()->showPanel("panel_places", key); return true; } } diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 17bb8221ad..7edc27d4c3 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -32,7 +32,6 @@ */ #include "llviewerprecompiledheaders.h" -#include "llalertdialog.h" #include "llcheckboxctrl.h" #include "llfloaterperms.h" #include "llviewercontrol.h" diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 05a46ad894..2b1c0979b6 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -46,7 +46,6 @@ #include "message.h" #include "llagent.h" -#include "llalertdialog.h" #include "llappviewer.h" #include "llfloateravatarpicker.h" #include "llbutton.h" @@ -62,7 +61,6 @@ #include "llfloaterwindlight.h" #include "llinventorymodel.h" #include "lllineeditor.h" -#include "llalertdialog.h" #include "llnamelistctrl.h" #include "llnotifications.h" #include "llnotificationsutil.h" @@ -88,8 +86,6 @@ #include "lltrans.h" #include "llagentui.h" -#define ELAR_ENABLED 0 // Enable when server support is implemented - const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; @@ -1995,11 +1991,6 @@ void LLPanelEstateInfo::updateControls(LLViewerRegion* region) childSetEnabled("remove_banned_avatar_btn", god || owner || manager); childSetEnabled("message_estate_btn", god || owner || manager); childSetEnabled("kick_user_from_estate_btn", god || owner || manager); -#if ELAR_ENABLED - childSetEnabled("abuse_email_address", god || owner || manager); -#else - childSetEnabled("abuse_email_address", false); -#endif // estate managers can't add estate managers childSetEnabled("add_estate_manager_btn", god || owner); @@ -2065,8 +2056,6 @@ BOOL LLPanelEstateInfo::postBuild() initCtrl("limit_payment"); initCtrl("limit_age_verified"); initCtrl("voice_chat_check"); - getChild<LLUICtrl>("abuse_email_address")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAnything, this)); - getChild<LLLineEditor>("abuse_email_address")->setKeystrokeCallback(onChangeText, this); // set up the use global time checkbox getChild<LLUICtrl>("use_global_time_check")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeUseGlobalTime, this)); @@ -2276,8 +2265,6 @@ bool LLPanelEstateInfo::commitEstateInfoCaps() } body["sun_hour"] = sun_hour; - body["owner_abuse_email"] = childGetValue("abuse_email_address").asString(); - // we use a responder so that we can re-get the data after committing to the database LLHTTPClient::post(url, body, new LLEstateChangeInfoResponder(this)); return true; @@ -2436,16 +2423,6 @@ void LLPanelEstateInfo::setOwnerName(const std::string& name) childSetValue("estate_owner", LLSD(name)); } -const std::string LLPanelEstateInfo::getAbuseEmailAddress() const -{ - return childGetValue("abuse_email_address").asString(); -} - -void LLPanelEstateInfo::setAbuseEmailAddress(const std::string& address) -{ - childSetValue("abuse_email_address", LLSD(address)); -} - void LLPanelEstateInfo::setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban) @@ -2954,18 +2931,6 @@ bool LLDispatchEstateUpdateInfo::operator()( std::string estate_name = strings[0].c_str(); // preserve c_str() call! panel->setEstateName(estate_name); -#if ELAR_ENABLED - if (strings.size() > 9) - { - std::string abuse_email = strings[9].c_str(); // preserve c_str() call! - panel->setAbuseEmailAddress(abuse_email); - } - else -#endif - { - panel->setAbuseEmailAddress(panel->getString("email_unsupported")); - } - LLViewerRegion* regionp = gAgent.getRegion(); LLUUID owner_id(strings[1]); diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index a3b91223b7..704166d106 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -330,9 +330,6 @@ public: const std::string getOwnerName() const; void setOwnerName(const std::string& name); - const std::string getAbuseEmailAddress() const; - void setAbuseEmailAddress(const std::string& address); - // If visible from mainland, allowed agent and allowed groups // are ignored, so must disable UI. void setAccessAllowedEnabled(bool enable_agent, bool enable_group, bool enable_ban); diff --git a/indra/newview/llfloaterreporter.cpp b/indra/newview/llfloaterreporter.cpp index 408303a1e0..932e49c79b 100644 --- a/indra/newview/llfloaterreporter.cpp +++ b/indra/newview/llfloaterreporter.cpp @@ -95,7 +95,6 @@ const U32 INCLUDE_SCREENSHOT = 0x01 << 0; LLFloaterReporter::LLFloaterReporter(const LLSD& key) : LLFloater(key), mReportType(COMPLAINT_REPORT), - mEmailToEstateOwner(FALSE), mObjectID(), mScreenID(), mAbuserID(), @@ -117,18 +116,7 @@ void LLFloaterReporter::processRegionInfo(LLMessageSystem* msg) if ( LLFloaterReg::instanceVisible("reporter") ) { - LLFloaterReporter *f = LLFloaterReg::findTypedInstance<LLFloaterReporter>("reporter"); - BOOL email_to_estate_owner = ( region_flags & REGION_FLAGS_ABUSE_EMAIL_TO_ESTATE_OWNER ); - f->mEmailToEstateOwner = email_to_estate_owner; - - if ( email_to_estate_owner ) - { - LLNotificationsUtil::add("HelpReportAbuseEmailEO"); - } - else - { - LLNotificationsUtil::add("HelpReportAbuseEmailLL"); - } + LLNotificationsUtil::add("HelpReportAbuseEmailLL"); }; } // virtual @@ -218,17 +206,7 @@ LLFloaterReporter::~LLFloaterReporter() // virtual void LLFloaterReporter::draw() { - // this is set by a static callback sometime after the dialog is created. - // Only disable screenshot for abuse reports to estate owners - if ( mEmailToEstateOwner ) - { - childSetValue("screen_check", FALSE ); - childSetEnabled("screen_check", FALSE ); - } - else - { - childSetEnabled("screen_check", TRUE ); - } + childSetEnabled("screen_check", TRUE ); LLFloater::draw(); } @@ -637,11 +615,7 @@ LLSD LLFloaterReporter::gatherReport() LLUUID screenshot_id = LLUUID::null; if (childGetValue("screen_check")) { - - if ( mEmailToEstateOwner == FALSE ) - { - screenshot_id = childGetValue("screenshot"); - } + screenshot_id = childGetValue("screenshot"); }; LLSD report = LLSD::emptyMap(); diff --git a/indra/newview/llfloaterreporter.h b/indra/newview/llfloaterreporter.h index 917f513641..a3776f3d27 100644 --- a/indra/newview/llfloaterreporter.h +++ b/indra/newview/llfloaterreporter.h @@ -124,7 +124,6 @@ private: private: EReportType mReportType; - BOOL mEmailToEstateOwner; LLUUID mObjectID; LLUUID mScreenID; LLUUID mAbuserID; diff --git a/indra/newview/llfloatersearch.cpp b/indra/newview/llfloatersearch.cpp index 2c618263ec..c658963708 100644 --- a/indra/newview/llfloatersearch.cpp +++ b/indra/newview/llfloatersearch.cpp @@ -42,7 +42,8 @@ LLFloaterSearch::LLFloaterSearch(const LLSD& key) : LLFloater(key), LLViewerMediaObserver(), - mBrowser(NULL) + mBrowser(NULL), + mSearchGodLevel(0) { // declare a map that transforms a category name into // the URL suffix that is used to search that category @@ -86,12 +87,21 @@ void LLFloaterSearch::handleMediaEvent(LLPluginClassMedia *self, EMediaEvent eve case MEDIA_EVENT_NAVIGATE_COMPLETE: childSetText("status_text", getString("done_text")); break; - + default: break; } } +void LLFloaterSearch::godLevelChanged(U8 godlevel) +{ + // search results can change based upon god level - if the user + // changes god level, then give them a warning (we don't refresh + // the search as this might undo any page navigation or + // AJAX-driven changes since the last search). + childSetVisible("refresh_search", (godlevel != mSearchGodLevel)); +} + void LLFloaterSearch::search(const LLSD &key) { if (! mBrowser) @@ -99,6 +109,10 @@ void LLFloaterSearch::search(const LLSD &key) return; } + // reset the god level warning as we're sending the latest state + childHide("refresh_search"); + mSearchGodLevel = gAgent.getGodLevel(); + // get the URL for the search page std::string url = getString("search_url"); if (! LLStringUtil::endsWith(url, "/")) diff --git a/indra/newview/llfloatersearch.h b/indra/newview/llfloatersearch.h index 743107484f..ba817adf7f 100644 --- a/indra/newview/llfloatersearch.h +++ b/indra/newview/llfloatersearch.h @@ -66,14 +66,20 @@ public: /// "events", "groups", "wiki", "destinations", "classifieds" void search(const LLSD &key); + /// changing godmode can affect the search results that are + /// returned by the search website - use this method to tell the + /// search floater that the user has changed god level. + void godLevelChanged(U8 godlevel); + private: /*virtual*/ BOOL postBuild(); // inherited from LLViewerMediaObserver /*virtual*/ void handleMediaEvent(LLPluginClassMedia *self, EMediaEvent event); - + LLMediaCtrl *mBrowser; LLSD mCategoryPaths; + U8 mSearchGodLevel; }; #endif // LL_LLFLOATERSEARCH_H diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp index 49e8f9c956..e5260aa7b9 100644 --- a/indra/newview/llfloatersellland.cpp +++ b/indra/newview/llfloatersellland.cpp @@ -39,7 +39,6 @@ #include "lllineeditor.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llparcel.h" #include "llselectmgr.h" #include "lltexturectrl.h" diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 5bef306485..fe793fbcb8 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -40,6 +40,7 @@ #include "llinventoryfilter.h" #include "llpanel.h" #include "llviewercontrol.h" // gSavedSettings +#include "llviewerinventory.h" #include "llviewerwindow.h" // Argh, only for setCursor() // linden library includes @@ -603,6 +604,11 @@ const std::string& LLFolderViewItem::getSearchableLabel() const return mSearchableLabel; } +LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void) +{ + return gInventory.getItem(getListener()->getUUID()); +} + std::string LLFolderViewItem::getName( void ) const { if(mListener) diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h index 0ea031108b..43a5fd8de5 100644 --- a/indra/newview/llfolderviewitem.h +++ b/indra/newview/llfolderviewitem.h @@ -45,6 +45,7 @@ class LLFolderViewListenerFunctor; class LLInventoryFilter; class LLMenuGL; class LLUIImage; +class LLViewerInventoryItem; // These are grouping of inventory types. // Order matters when sorting system folders to the top. @@ -281,6 +282,9 @@ public: const LLFolderViewEventListener* getListener( void ) const { return mListener; } LLFolderViewEventListener* getListener( void ) { return mListener; } + + // Gets the inventory item if it exists (null otherwise) + LLViewerInventoryItem * getInventoryItem(void); // just rename the object. void rename(const std::string& new_name); diff --git a/indra/newview/llgesturemgr.cpp b/indra/newview/llgesturemgr.cpp index 4f487ddf04..df7aa9eabf 100644 --- a/indra/newview/llgesturemgr.cpp +++ b/indra/newview/llgesturemgr.cpp @@ -52,7 +52,6 @@ #include "llagent.h" #include "lldelayedgestureerror.h" #include "llinventorymodel.h" -#include "llnotify.h" #include "llviewermessage.h" #include "llvoavatarself.h" #include "llviewerstats.h" diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp index e6ded5f371..8b6762ce38 100644 --- a/indra/newview/llimpanel.cpp +++ b/indra/newview/llimpanel.cpp @@ -66,7 +66,6 @@ #include "llimview.h" // for LLIMModel to get other avatar id in chat #include "llkeyboard.h" #include "lllineeditor.h" -#include "llnotify.h" #include "llpanelimcontrolpanel.h" #include "llrecentpeople.h" #include "llresmgr.h" diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index fd1fb38914..fbed1494ff 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -72,7 +72,6 @@ #include "llviewerwindow.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llnearbychat.h" #include "llviewerregion.h" #include "llvoicechannel.h" @@ -167,7 +166,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mSessionInitialized(false), mCallBackEnabled(true), mTextIMPossible(true), - mOtherParticipantIsAvatar(true) + mOtherParticipantIsAvatar(true), + mStartCallOnInitialize(false) { if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { @@ -419,6 +419,12 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con { im_floater->sessionInitReplyReceived(new_session_id); } + + // auto-start the call on session initialization? + if (session->mStartCallOnInitialize) + { + gIMMgr->startCall(new_session_id); + } } //*TODO remove this "floater" stuff when Communicate Floater is gone @@ -1007,18 +1013,6 @@ bool LLIMModel::sendStartSession( return false; } -// static -void LLIMModel::sendSessionInitialized(const LLUUID &session_id) -{ - LLIMSession* session = getInstance()->findIMSession(session_id); - if (session) - { - LLSD arg; - arg["session_id"] = session_id; - getInstance()->mSessionInitializedSignal(arg); - } -} - // // Helper Functions // @@ -1484,26 +1478,34 @@ BOOL LLIncomingCallDialog::postBuild() { LLDockableFloater::postBuild(); + LLUUID session_id = mPayload["session_id"].asUUID(); LLSD caller_id = mPayload["caller_id"]; - EInstantMessage type = (EInstantMessage)mPayload["type"].asInteger(); - - std::string call_type = getString("VoiceInviteP2P"); std::string caller_name = mPayload["caller_name"].asString(); + + std::string call_type; + if (gAgent.isInGroup(session_id)) + { + LLStringUtil::format_map_t args; + LLGroupData data; + if (gAgent.getGroupData(session_id, data)) + { + args["[GROUP]"] = data.mName; + call_type = getString(mPayload["notify_box_type"], args); + } + } + else + { + call_type = getString(mPayload["notify_box_type"]); + } + if (caller_name == "anonymous") { caller_name = getString("anonymous"); } setTitle(caller_name + " " + call_type); - - // If it is not a P2P invite, then it's an AdHoc invite - if ( type != IM_SESSION_P2P_INVITE ) - { - 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 @@ -2012,6 +2014,15 @@ BOOL LLIMMgr::getIMReceived() const return mIMReceived; } +void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id) +{ + LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id); + if (session) + { + session->mStartCallOnInitialize = true; + } +} + LLUUID LLIMMgr::addP2PSession(const std::string& name, const LLUUID& other_participant_id, const std::string& voice_session_handle, diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 3fc1a00868..f26889ac91 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -104,6 +104,7 @@ public: bool mTextIMPossible; bool mOtherParticipantIsAvatar; + bool mStartCallOnInitialize; }; @@ -123,7 +124,6 @@ public: typedef boost::function<void(const LLSD&)> session_callback_t; session_signal_t mNewMsgSignal; session_signal_t mNoUnreadMsgsSignal; - session_signal_t mSessionInitializedSignal; /** * Find an IM Session corresponding to session_id @@ -138,7 +138,6 @@ public: boost::signals2::connection addNewMsgCallback( session_callback_t cb ) { return mNewMsgSignal.connect(cb); } boost::signals2::connection addNoUnreadMsgsCallback( session_callback_t cb ) { return mNoUnreadMsgsSignal.connect(cb); } - boost::signals2::connection addSessionInitializedCallback(session_callback_t cb ) { return mSessionInitializedSignal.connect(cb); } /** * Create new session object in a model @@ -213,7 +212,6 @@ public: static bool sendStartSession(const LLUUID& temp_session_id, const LLUUID& other_participant_id, const std::vector<LLUUID>& ids, EInstantMessage dialog); static void sendTypingState(LLUUID session_id, LLUUID other_participant_id, BOOL typing); - static void sendSessionInitialized(const LLUUID &session_id); static void sendMessage(const std::string& utf8_text, const LLUUID& im_session_id, const LLUUID& other_participant_id, EInstantMessage dialog); @@ -331,6 +329,9 @@ public: void notifyNewIM(); void clearNewIMNotification(); + // automatically start a call once the session has initialized + void autoStartCallOnStartup(const LLUUID& session_id); + // IM received that you haven't seen yet BOOL getIMReceived() const; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3746e9cfeb..52ebefabea 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3150,6 +3150,22 @@ void LLTextureBridge::openItem() } } +bool LLTextureBridge::canSaveTexture(void) +{ + const LLInventoryModel* model = getInventoryModel(); + if(!model) + { + return false; + } + + const LLViewerInventoryItem *item = model->getItem(mUUID); + if (item) + { + return item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); + } + return false; +} + void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { lldebugs << "LLTextureBridge::buildContextMenu()" << llendl; @@ -3174,6 +3190,10 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Texture Separator")); items.push_back(std::string("Save As")); + if (!canSaveTexture()) + { + disabled_items.push_back(std::string("Save As")); + } } hide_context_entries(menu, items, disabled_items); } diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 63be9dcdb8..5e4e89a71b 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -377,6 +377,7 @@ public: protected: LLTextureBridge(LLInventoryPanel* inventory, const LLUUID& uuid, LLInventoryType::EType type) : LLItemBridge(inventory, uuid), mInvType(type) {} + bool canSaveTexture(void); LLInventoryType::EType mInvType; }; diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 4cbf27b725..92b9dc427f 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -903,13 +903,10 @@ LLInventoryPanel* LLInventoryPanel::getActiveInventoryPanel(BOOL auto_open) if (!auto_open) return NULL; // D. Open the inventory side panel and use that. - LLSideTray *side_tray = LLSideTray::getInstance(); + LLSD key; LLSidepanelInventory *sidepanel_inventory = - dynamic_cast<LLSidepanelInventory *>(side_tray->getPanel("sidepanel_inventory")); - - // Use the inventory side panel only if it is already active. - // Activating it may unexpectedly switch off the currently active tab in some cases. - if (sidepanel_inventory && (LLPanel*)side_tray->getActiveTab() == (LLPanel*)sidepanel_inventory) + dynamic_cast<LLSidepanelInventory *>(LLSideTray::getInstance()->showPanel("sidepanel_inventory", key)); + if (sidepanel_inventory) { return sidepanel_inventory->getActivePanel(); } diff --git a/indra/newview/lllandmarklist.cpp b/indra/newview/lllandmarklist.cpp index d613cf6ba4..bd9d22c327 100644 --- a/indra/newview/lllandmarklist.cpp +++ b/indra/newview/lllandmarklist.cpp @@ -39,7 +39,6 @@ #include "llappviewer.h" #include "llagent.h" -#include "llnotify.h" #include "llvfile.h" #include "llviewerstats.h" diff --git a/indra/newview/llmenucommands.cpp b/indra/newview/llmenucommands.cpp index 28ddaa61c4..a2aef9ba63 100644 --- a/indra/newview/llmenucommands.cpp +++ b/indra/newview/llmenucommands.cpp @@ -49,7 +49,6 @@ #include "llfloaterchat.h" #include "llfloaterworldmap.h" #include "lllineeditor.h" -#include "llnotify.h" #include "llstatusbar.h" #include "llimview.h" #include "lltextbox.h" diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp index 70d92442ad..0dae667e7f 100644 --- a/indra/newview/llpanelclassified.cpp +++ b/indra/newview/llpanelclassified.cpp @@ -48,7 +48,6 @@ #include "message.h" #include "llagent.h" -#include "llalertdialog.h" #include "llavataractions.h" #include "llbutton.h" #include "llcheckboxctrl.h" diff --git a/indra/newview/llpanelgroup.cpp b/indra/newview/llpanelgroup.cpp index e0f159cfeb..fff2575893 100644 --- a/indra/newview/llpanelgroup.cpp +++ b/indra/newview/llpanelgroup.cpp @@ -551,21 +551,21 @@ bool LLPanelGroup::canClose() break; if(!need_save) return false; - // If no message was provided, give a generic one.
- if (mesg.empty())
- {
- mesg = mDefaultNeedsApplyMesg;
- }
- // Create a notify box, telling the user about the unapplied tab.
- LLSD args;
- args["NEEDS_APPLY_MESSAGE"] = mesg;
- args["WANT_APPLY_MESSAGE"] = mWantApplyMesg;
-
- LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2));
-
- mShowingNotifyDialog = true;
-
- return false;
+ // If no message was provided, give a generic one. + if (mesg.empty()) + { + mesg = mDefaultNeedsApplyMesg; + } + // Create a notify box, telling the user about the unapplied tab. + LLSD args; + args["NEEDS_APPLY_MESSAGE"] = mesg; + args["WANT_APPLY_MESSAGE"] = mWantApplyMesg; + + LLNotificationsUtil::add("SaveChanges", args, LLSD(), boost::bind(&LLPanelGroup::handleNotifyCallback,this, _1, _2)); + + mShowingNotifyDialog = true; + + return false; } bool LLPanelGroup::notifyChildren(const LLSD& info) @@ -576,32 +576,32 @@ bool LLPanelGroup::notifyChildren(const LLSD& info) if (str_action == "quit" ) { - canClose();
- return true;
+ canClose(); + return true; } if(str_action == "wait_quit") return mShowingNotifyDialog; } return false; } -bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- mShowingNotifyDialog = false;
- switch (option)
- {
- case 0: // "Apply Changes"
- apply();
- break;
- case 1: // "Ignore Changes"
- break;
- case 2: // "Cancel"
- default:
- // Do nothing. The user is canceling the action.
- // If we were quitting, we didn't really mean it.
- LLAppViewer::instance()->abortQuit();
- break;
- }
- return false;
-}
+bool LLPanelGroup::handleNotifyCallback(const LLSD& notification, const LLSD& response) +{ + S32 option = LLNotificationsUtil::getSelectedOption(notification, response); + mShowingNotifyDialog = false; + switch (option) + { + case 0: // "Apply Changes" + apply(); + break; + case 1: // "Ignore Changes" + break; + case 2: // "Cancel" + default: + // Do nothing. The user is canceling the action. + // If we were quitting, we didn't really mean it. + LLAppViewer::instance()->abortQuit(); + break; + } + return false; +} diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp index b6c58808ae..29b647415c 100644 --- a/indra/newview/llpanelgrouproles.cpp +++ b/indra/newview/llpanelgrouproles.cpp @@ -44,7 +44,6 @@ #include "llnamelistctrl.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llpanelgrouproles.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" diff --git a/indra/newview/llpanelimcontrolpanel.cpp b/indra/newview/llpanelimcontrolpanel.cpp index 8c19865550..4f76d32ad5 100644 --- a/indra/newview/llpanelimcontrolpanel.cpp +++ b/indra/newview/llpanelimcontrolpanel.cpp @@ -101,14 +101,6 @@ void LLPanelChatControlPanel::draw() && callback_enabled; childSetEnabled("call_btn", enable_connect); - // send a signal when the floater is fully initialized - // this lets LLAvatarActions::startAdhocCall() start the call - if (enable_connect && !mInitialized) - { - LLIMModel::sendSessionInitialized(mSessionId); - mInitialized = true; - } - LLPanel::draw(); } diff --git a/indra/newview/llpanelimcontrolpanel.h b/indra/newview/llpanelimcontrolpanel.h index 871779b273..711340efc7 100644 --- a/indra/newview/llpanelimcontrolpanel.h +++ b/indra/newview/llpanelimcontrolpanel.h @@ -45,8 +45,7 @@ class LLPanelChatControlPanel : public LLPanel { public: LLPanelChatControlPanel() : - mSessionId(LLUUID()), - mInitialized(false) {}; + mSessionId(LLUUID()) {}; ~LLPanelChatControlPanel(); virtual BOOL postBuild(); @@ -63,7 +62,6 @@ public: private: LLUUID mSessionId; - bool mInitialized; // connection to voice channel state change signal boost::signals2::connection mVoiceChannelStateChangeConnection; diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp index a729b8c06f..a9c604b72a 100644 --- a/indra/newview/llpanellogin.cpp +++ b/indra/newview/llpanellogin.cpp @@ -62,7 +62,6 @@ #include "llviewermenu.h" // for handle_preferences() #include "llviewernetwork.h" #include "llviewerwindow.h" // to link into child list -#include "llnotify.h" #include "llurlsimstring.h" #include "lluictrlfactory.h" #include "llhttpclient.h" @@ -73,6 +72,11 @@ #include "llfloatertos.h" #include "lltrans.h" #include "llglheaders.h" +#include "llpanelloginlistener.h" + +#if LL_WINDOWS +#pragma warning(disable: 4355) // 'this' used in initializer list +#endif // LL_WINDOWS #define USE_VIEWER_AUTH 0 @@ -166,7 +170,8 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect, mLogoImage(), mCallback(callback), mCallbackData(cb_data), - mHtmlAvailable( TRUE ) + mHtmlAvailable( TRUE ), + mListener(new LLPanelLoginListener(this)) { setFocusRoot(TRUE); @@ -452,7 +457,7 @@ BOOL LLPanelLogin::handleKeyHere(KEY key, MASK mask) if ( KEY_F1 == key ) { LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->getTopicFromFocus()); + vhelp->showTopic(vhelp->f1HelpTopic()); return TRUE; } @@ -972,7 +977,7 @@ void LLPanelLogin::onClickHelp(void*) if (sInstance) { LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - vhelp->showTopic(vhelp->getTopicFromFocus()); + vhelp->showTopic(vhelp->preLoginTopic()); } } diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h index e3d30d7d0c..97350ce5c7 100644 --- a/indra/newview/llpanellogin.h +++ b/indra/newview/llpanellogin.h @@ -36,10 +36,11 @@ #include "llpanel.h" #include "llpointer.h" // LLPointer<> #include "llmediactrl.h" // LLMediaCtrlObserver +#include <boost/scoped_ptr.hpp> class LLLineEditor; class LLUIImage; - +class LLPanelLoginListener; class LLPanelLogin: public LLPanel, @@ -90,6 +91,7 @@ public: /*virtual*/ void handleMediaEvent(LLPluginClassMedia* self, EMediaEvent event); private: + friend class LLPanelLoginListener; void reshapeBrowser(); static void onClickConnect(void*); static void onClickNewAccount(void*); @@ -103,6 +105,7 @@ private: private: LLPointer<LLUIImage> mLogoImage; + boost::scoped_ptr<LLPanelLoginListener> mListener; void (*mCallback)(S32 option, void *userdata); void* mCallbackData; diff --git a/indra/newview/llpanelloginlistener.cpp b/indra/newview/llpanelloginlistener.cpp new file mode 100644 index 0000000000..f7e59aaf54 --- /dev/null +++ b/indra/newview/llpanelloginlistener.cpp @@ -0,0 +1,34 @@ +/** + * @file llpanelloginlistener.cpp + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief Implementation for llpanelloginlistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llpanelloginlistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llpanellogin.h" + +LLPanelLoginListener::LLPanelLoginListener(LLPanelLogin* instance): + LLEventAPI("LLPanelLogin", "Access to LLPanelLogin methods"), + mPanel(instance) +{ + add("onClickConnect", + "Pretend user clicked the \"Log In\" button", + &LLPanelLoginListener::onClickConnect); +} + +void LLPanelLoginListener::onClickConnect(const LLSD&) const +{ + mPanel->onClickConnect(NULL); +} diff --git a/indra/newview/llpanelloginlistener.h b/indra/newview/llpanelloginlistener.h new file mode 100644 index 0000000000..0a56c75422 --- /dev/null +++ b/indra/newview/llpanelloginlistener.h @@ -0,0 +1,30 @@ +/** + * @file llpanelloginlistener.h + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief LLEventAPI for LLPanelLogin + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLPANELLOGINLISTENER_H) +#define LL_LLPANELLOGINLISTENER_H + +#include "lleventapi.h" +class LLPanelLogin; +class LLSD; + +class LLPanelLoginListener: public LLEventAPI +{ +public: + LLPanelLoginListener(LLPanelLogin* instance); + +private: + void onClickConnect(const LLSD&) const; + + LLPanelLogin* mPanel; +}; + +#endif /* ! defined(LL_LLPANELLOGINLISTENER_H) */ diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 21627e84ff..cef21e85d6 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -33,6 +33,7 @@ #include "llviewerprecompiledheaders.h" #include "llpanelmaininventory.h" +#include "llagent.h" #include "lldndbutton.h" #include "llfilepicker.h" #include "llfloaterinventory.h" @@ -863,7 +864,6 @@ void LLPanelMainInventory::initListCommandsHandlers() mEnableCallbackRegistrar.add("Inventory.GearDefault.Enable", boost::bind(&LLPanelMainInventory::isActionEnabled, this, _2)); mMenuGearDefault = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_gear_default.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); mMenuAdd = LLUICtrlFactory::getInstance()->createFromFile<LLMenuGL>("menu_inventory_add.xml", gMenuHolder, LLViewerMenuHolderGL::child_registry_t::instance()); - } void LLPanelMainInventory::updateListCommands() @@ -909,6 +909,22 @@ void LLPanelMainInventory::onClipboardAction(const LLSD& userdata) getActivePanel()->getRootFolder()->doToSelected(getActivePanel()->getModel(),command_name); } +void LLPanelMainInventory::saveTexture(const LLSD& userdata) +{ + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (!current_item) + { + return; + } + + const LLUUID& item_id = current_item->getListener()->getUUID(); + LLPreviewTexture* preview_texture = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item_id), TAKE_FOCUS_YES); + if (preview_texture) + { + preview_texture->openToSave(); + } +} + void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { if (!isActionEnabled(userdata)) @@ -953,18 +969,7 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } if (command_name == "save_texture") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (!current_item) - { - return; - } - - const LLUUID& item_id = current_item->getListener()->getUUID(); - LLPreviewTexture* preview_texture = LLFloaterReg::showTypedInstance<LLPreviewTexture>("preview_texture", LLSD(item_id), TAKE_FOCUS_YES); - if (preview_texture) - { - preview_texture->openToSave(); - } + saveTexture(userdata); } // This doesn't currently work, since the viewer can't change an assetID an item. if (command_name == "regenerate_link") @@ -1008,6 +1013,22 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) } } +bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata) +{ + LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); + if (current_item) + { + LLViewerInventoryItem *inv_item = current_item->getInventoryItem(); + if(inv_item) + { + bool can_save = inv_item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); + LLInventoryType::EType curr_type = current_item->getListener()->getInventoryType(); + return can_save && (curr_type == LLInventoryType::IT_TEXTURE || curr_type == LLInventoryType::IT_SNAPSHOT); + } + } + return false; +} + BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) { const std::string command_name = userdata.asString(); @@ -1035,12 +1056,7 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) } if (command_name == "save_texture") { - LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem(); - if (current_item) - { - return (current_item->getListener()->getInventoryType() == LLInventoryType::IT_TEXTURE); - } - return FALSE; + return isSaveTextureEnabled(userdata); } if (command_name == "find_original") { diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index ae78d3bec8..92443df369 100644 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -110,6 +110,8 @@ protected: void doCreate(const LLSD& userdata); void resetFilters(); void setSortBy(const LLSD& userdata); + void saveTexture(const LLSD& userdata); + bool isSaveTextureEnabled(const LLSD& userdata); private: LLFloaterInventoryFinder* getFinder(); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 9d38dab26e..43366ef814 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -157,7 +157,7 @@ LLInventoryItem* LLTaskInvFVBridge::findItem() const LLViewerObject* object = gObjectList.findObject(mPanel->getTaskUUID()); if(object) { - return (LLInventoryItem*)(object->getInventoryObject(mUUID)); + return dynamic_cast<LLInventoryItem*>(object->getInventoryObject(mUUID)); } return NULL; } @@ -712,6 +712,7 @@ public: virtual LLUIImagePtr getIcon() const; virtual const std::string& getDisplayName() const { return getName(); } virtual BOOL isItemRenameable() const; + // virtual BOOL isItemCopyable() const { return FALSE; } virtual BOOL renameItem(const std::string& new_name); virtual BOOL isItemRemovable(); virtual void buildContextMenu(LLMenuGL& menu, U32 flags); diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 4a554c1b2c..e21eb01da3 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -278,12 +278,20 @@ void LLPanelPlaces::onOpen(const LLSD& key) } else if (mPlaceInfoType == REMOTE_PLACE_INFO_TYPE) { - mPosGlobal = LLVector3d(key["x"].asReal(), - key["y"].asReal(), - key["z"].asReal()); + if (key.has("id")) + { + LLUUID parcel_id = key["id"].asUUID(); + mPlaceProfile->setParcelID(parcel_id); + } + else + { + mPosGlobal = LLVector3d(key["x"].asReal(), + key["y"].asReal(), + key["z"].asReal()); + mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); + } mPlaceProfile->setInfoType(LLPanelPlaceInfo::PLACE); - mPlaceProfile->displayParcelInfo(LLUUID(), mPosGlobal); } else if (mPlaceInfoType == TELEPORT_HISTORY_INFO_TYPE) { diff --git a/indra/newview/llparticipantlist.cpp b/indra/newview/llparticipantlist.cpp index 48a7a32a3b..b787699a66 100644 --- a/indra/newview/llparticipantlist.cpp +++ b/indra/newview/llparticipantlist.cpp @@ -47,6 +47,44 @@ #if LL_MSVC #pragma warning (disable : 4355) // 'this' used in initializer list: yes, intentionally #endif + +class ModerationResponder : public LLHTTPClient::Responder +{ +public: + ModerationResponder(const LLUUID& session_id) + { + mSessionID = session_id; + } + + virtual void error(U32 status, const std::string& reason) + { + llwarns << status << ": " << reason << llendl; + + if ( gIMMgr ) + { + //403 == you're not a mod + //should be disabled if you're not a moderator + if ( 403 == status ) + { + gIMMgr->showSessionEventError( + "mute", + "not_a_mod_error", + mSessionID); + } + else + { + gIMMgr->showSessionEventError( + "mute", + "generic_request_error", + mSessionID); + } + } + } + +private: + LLUUID mSessionID; +}; + LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* avatar_list, bool use_context_menu/* = true*/): mSpeakerMgr(data_source), mAvatarList(avatar_list), @@ -57,6 +95,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av mSpeakerRemoveListener = new SpeakerRemoveListener(*this); mSpeakerClearListener = new SpeakerClearListener(*this); mSpeakerModeratorListener = new SpeakerModeratorUpdateListener(*this); + mSpeakerMuteListener = new SpeakerMuteListener(*this); mSpeakerMgr->addListener(mSpeakerAddListener, "add"); mSpeakerMgr->addListener(mSpeakerRemoveListener, "remove"); @@ -87,6 +126,7 @@ LLParticipantList::LLParticipantList(LLSpeakerMgr* data_source, LLAvatarList* av for(LLSpeakerMgr::speaker_list_t::iterator it = speaker_list.begin(); it != speaker_list.end(); it++) { const LLPointer<LLSpeaker>& speakerp = *it; + addAvatarIDExceptAgent(group_members, speakerp->mID); if ( speakerp->mIsModerator ) { @@ -248,6 +288,24 @@ bool LLParticipantList::onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> e return true; } +bool LLParticipantList::onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + LLPointer<LLSpeaker> speakerp = (LLSpeaker*)event->getSource(); + if (speakerp.isNull()) return false; + + // update UI on confirmation of moderator mutes + if (event->getValue().asString() == "voice") + { + LLAvatarListItem* item = dynamic_cast<LLAvatarListItem*>(mAvatarList->getItemByValue(speakerp->mID)); + if (item) + { + LLOutputMonitorCtrl* indicator = item->getChild<LLOutputMonitorCtrl>("speaking_indicator"); + indicator->setIsMuted(speakerp->mModeratorMutedVoice); + } + } + return true; +} + void LLParticipantList::sort() { if ( !mAvatarList ) @@ -264,13 +322,21 @@ void LLParticipantList::sort() } } -// static void LLParticipantList::addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id) { - if (gAgent.getID() != avatar_id) - { - existing_list.push_back(avatar_id); - } + if (gAgent.getID() == avatar_id) return; + + existing_list.push_back(avatar_id); + adjustParticipant(avatar_id); +} + +void LLParticipantList::adjustParticipant(const LLUUID& speaker_id) +{ + LLPointer<LLSpeaker> speakerp = mSpeakerMgr->findSpeaker(speaker_id); + if (speakerp.isNull()) return; + + // add listener to process moderation changes + speakerp->addListener(mSpeakerMuteListener); } // @@ -315,6 +381,11 @@ bool LLParticipantList::SpeakerModeratorUpdateListener::handleEvent(LLPointer<LL return mParent.onModeratorUpdateEvent(event, userdata); } +bool LLParticipantList::SpeakerMuteListener::handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata) +{ + return mParent.onSpeakerMuteEvent(event, userdata); +} + LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() { // set up the callbacks for all of the avatar menu items @@ -330,8 +401,13 @@ LLContextMenu* LLParticipantList::LLParticipantListMenu::createMenu() enable_registrar.add("ParticipantList.CheckItem", boost::bind(&LLParticipantList::LLParticipantListMenu::checkContextMenuItem, this, _2)); // create the context menu from the XUI - return LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( + LLContextMenu* main_menu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>( "menu_participant_list.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance()); + + main_menu->setItemVisible("Moderator Options", isGroupModerator()); + main_menu->arrangeAndClear(); + + return main_menu; } void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const std::vector<LLUUID>& uuids, S32 x, S32 y) @@ -341,7 +417,7 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const if (uuids.size() == 0) return; const LLUUID speaker_id = mUUIDs.front(); - BOOL is_muted = LLMuteList::getInstance()->isMuted(speaker_id, LLMute::flagVoiceChat); + BOOL is_muted = isMuted(speaker_id); if (is_muted) { @@ -353,7 +429,6 @@ void LLParticipantList::LLParticipantListMenu::show(LLView* spawning_view, const LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteSelected", false); LLMenuGL::sMenuContainer->childSetVisible("ModerateVoiceUnMuteOthers", false); } - } void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& userdata) @@ -370,47 +445,10 @@ void LLParticipantList::LLParticipantListMenu::toggleAllowTextChat(const LLSD& u //current value represents ability to type, so invert data["params"]["mute_info"]["text"] = !mParent.mSpeakerMgr->findSpeaker(speaker_id)->mModeratorMutedText; - class MuteTextResponder : public LLHTTPClient::Responder - { - public: - MuteTextResponder(const LLUUID& session_id) - { - mSessionID = session_id; - } - - virtual void error(U32 status, const std::string& reason) - { - llwarns << status << ": " << reason << llendl; - - if ( gIMMgr ) - { - //403 == you're not a mod - //should be disabled if you're not a moderator - if ( 403 == status ) - { - gIMMgr->showSessionEventError( - "mute", - "not_a_moderator", - mSessionID); - } - else - { - gIMMgr->showSessionEventError( - "mute", - "generic", - mSessionID); - } - } - } - - private: - LLUUID mSessionID; - }; - LLHTTPClient::post( url, data, - new MuteTextResponder(mParent.mSpeakerMgr->getSessionID())); + new ModerationResponder(mParent.mSpeakerMgr->getSessionID())); } void LLParticipantList::LLParticipantListMenu::toggleMute(const LLSD& userdata, U32 flags) @@ -450,36 +488,87 @@ void LLParticipantList::LLParticipantListMenu::toggleMuteVoice(const LLSD& userd toggleMute(userdata, LLMute::flagVoiceChat); } +bool LLParticipantList::LLParticipantListMenu::isGroupModerator() +{ + // Agent is in Group Call + if(gAgent.isInGroup(mParent.mSpeakerMgr->getSessionID())) + { + // Agent is Moderator + return mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator; + } + return false; +} + +bool LLParticipantList::LLParticipantListMenu::isMuted(const LLUUID& avatar_id) +{ + LLPointer<LLSpeaker> selected_speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id); + if (!selected_speakerp) return true; + + return selected_speakerp->mStatus == LLSpeaker::STATUS_MUTED; +} + void LLParticipantList::LLParticipantListMenu::moderateVoice(const LLSD& userdata) { + if (!gAgent.getRegion()) return; + + bool moderate_selected = userdata.asString() == "selected"; + const LLUUID& selected_avatar_id = mUUIDs.front(); + bool is_muted = isMuted(selected_avatar_id); + if (moderate_selected) + { + moderateVoiceParticipant(selected_avatar_id, is_muted); + } + else + { + moderateVoiceOtherParticipants(selected_avatar_id, is_muted); + } } -void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLSD& userdata) + +void LLParticipantList::LLParticipantListMenu::moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute) +{ + if (gAgentID == avatar_id) return; // do not process myself + + LLPointer<LLSpeaker> speakerp = mParent.mSpeakerMgr->findSpeaker(avatar_id); + if (!speakerp) return; + + // *NOTE: mantipov: probably this condition will be incorrect when avatar will be blocked for + // text chat via moderation (LLSpeaker::mModeratorMutedText == TRUE) + bool is_in_voice = speakerp->mStatus <= LLSpeaker::STATUS_VOICE_ACTIVE || speakerp->mStatus == LLSpeaker::STATUS_MUTED; + + // do not send voice moderation changes for avatars not in voice channel + if (!is_in_voice) return; + + std::string url = gAgent.getRegion()->getCapability("ChatSessionRequest"); + LLSD data; + data["method"] = "mute update"; + data["session-id"] = mParent.mSpeakerMgr->getSessionID(); + data["params"] = LLSD::emptyMap(); + data["params"]["agent_id"] = avatar_id; + data["params"]["mute_info"] = LLSD::emptyMap(); + data["params"]["mute_info"]["voice"] = !unmute; + + LLHTTPClient::post( + url, + data, + new ModerationResponder(mParent.mSpeakerMgr->getSessionID())); +} + +void LLParticipantList::LLParticipantListMenu::moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute) { LLSpeakerMgr::speaker_list_t speakers; - mParent.mSpeakerMgr->getSpeakerList(&speakers, true); + mParent.mSpeakerMgr->getSpeakerList(&speakers, FALSE); - const LLUUID& excluded_avatar_id = mUUIDs.front(); - bool should_mute = userdata.asString() == "mute"; for (LLSpeakerMgr::speaker_list_t::iterator iter = speakers.begin(); iter != speakers.end(); ++iter) { LLSpeaker* speakerp = (*iter).get(); LLUUID speaker_id = speakerp->mID; - if (excluded_avatar_id == speaker_id) continue; - LLMute mute(speaker_id, speakerp->mDisplayName, speakerp->mType == LLSpeaker::SPEAKER_AGENT ? LLMute::AGENT : LLMute::OBJECT); + if (excluded_avatar_id == speaker_id) continue; - if (should_mute) - { - LLMuteList::getInstance()->add(mute, LLMute::flagVoiceChat); - } - else - { - LLMuteList::getInstance()->remove(mute, LLMute::flagVoiceChat); - } + moderateVoiceParticipant(speaker_id, unmute); } - } bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& userdata) @@ -492,8 +581,7 @@ bool LLParticipantList::LLParticipantListMenu::enableContextMenuItem(const LLSD& else if (item == "can_allow_text_chat" || "can_moderate_voice" == item) { - LLIMModel::LLIMSession* im_session = LLIMModel::getInstance()->findIMSession(mParent.mSpeakerMgr->getSessionID()); - return im_session->mType == IM_SESSION_GROUP_START && mParent.mSpeakerMgr->findSpeaker(gAgentID)->mIsModerator; + return isGroupModerator(); } return true; } @@ -516,3 +604,5 @@ bool LLParticipantList::LLParticipantListMenu::checkContextMenuItem(const LLSD& } return false; } + +//EOF diff --git a/indra/newview/llparticipantlist.h b/indra/newview/llparticipantlist.h index 83191a5b8d..9d7d3a0cbe 100644 --- a/indra/newview/llparticipantlist.h +++ b/indra/newview/llparticipantlist.h @@ -64,6 +64,7 @@ class LLParticipantList bool onRemoveItemEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); bool onClearListEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); bool onModeratorUpdateEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + bool onSpeakerMuteEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); /** * Sorts the Avatarlist by stored order @@ -109,6 +110,14 @@ class LLParticipantList /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); }; + class SpeakerMuteListener : public BaseSpeakerListner + { + public: + SpeakerMuteListener(LLParticipantList& parent) : BaseSpeakerListner(parent) {} + + /*virtual*/ bool handleEvent(LLPointer<LLOldEvents::LLEvent> event, const LLSD& userdata); + }; + /** * Menu used in the participant list. */ @@ -129,9 +138,55 @@ class LLParticipantList void toggleMuteText(const LLSD& userdata); void toggleMuteVoice(const LLSD& userdata); + /** + * Return true if Agent is group moderator(and moderator of group call). + */ + bool isGroupModerator(); + // Voice moderation support + /** + * Check whether specified by argument avatar is muted for group chat or not. + */ + bool isMuted(const LLUUID& avatar_id); + + /** + * Processes Voice moderation menu items. + * + * It calls either moderateVoiceParticipant() or moderateVoiceParticipant() depend on + * passed parameter. + * + * @param userdata can be "selected" or "others". + * + * @see moderateVoiceParticipant() + * @see moderateVoiceOtherParticipants() + */ void moderateVoice(const LLSD& userdata); - void moderateVoiceOtherParticipants(const LLSD& userdata); + + /** + * Mutes/Unmutes avatar for current group voice chat. + * + * It only marks avatar as muted for session and does not use local Agent's Block list. + * It does not mute Agent itself. + * + * @param[in] avatar_id UUID of avatar to be processed + * @param[in] unmute if true - specified avatar will be muted, otherwise - unmuted. + * + * @see moderateVoiceOtherParticipants() + */ + void moderateVoiceParticipant(const LLUUID& avatar_id, bool unmute); + + /** + * Mutes/Unmutes all avatars except specified for current group voice chat. + * + * It only marks avatars as muted for session and does not use local Agent's Block list. + * It based call moderateVoiceParticipant() for each avatar should be muted/unmuted. + * + * @param[in] excluded_avatar_id UUID of avatar NOT to be processed + * @param[in] unmute if true - avatars will be muted, otherwise - unmuted. + * + * @see moderateVoiceParticipant() + */ + void moderateVoiceOtherParticipants(const LLUUID& excluded_avatar_id, bool unmute); }; private: @@ -140,8 +195,18 @@ class LLParticipantList /** * Adds specified avatar ID to the existing list if it is not Agent's ID + * + * @param[in, out] existing_list - vector with avatars' UUIDs already in the list + * @param[in] avatar_id - Avatar UUID to be added into the list + */ + void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id); + + /** + * Adjusts passed participant to work properly. + * + * Adds SpeakerMuteListener to process moderation actions. */ - static void addAvatarIDExceptAgent(std::vector<LLUUID>& existing_list, const LLUUID& avatar_id); + void adjustParticipant(const LLUUID& speaker_id); LLSpeakerMgr* mSpeakerMgr; LLAvatarList* mAvatarList; @@ -153,6 +218,7 @@ class LLParticipantList LLPointer<SpeakerRemoveListener> mSpeakerRemoveListener; LLPointer<SpeakerClearListener> mSpeakerClearListener; LLPointer<SpeakerModeratorUpdateListener> mSpeakerModeratorListener; + LLPointer<SpeakerMuteListener> mSpeakerMuteListener; LLParticipantListMenu* mParticipantListMenu; diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp index 30cb21c83c..f1891aa421 100644 --- a/indra/newview/llpreviewgesture.cpp +++ b/indra/newview/llpreviewgesture.cpp @@ -59,7 +59,6 @@ #include "llinventorymodel.h" #include "llkeyboard.h" #include "lllineeditor.h" -#include "llnotify.h" #include "llradiogroup.h" #include "llscrolllistctrl.h" #include "llscrolllistitem.h" diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 5d675fcda6..95756ac5f3 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -44,7 +44,6 @@ #include "llinventorymodel.h" #include "lllineeditor.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llresmgr.h" #include "roles_constants.h" #include "llscrollbar.h" diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 8d80310769..646c9fb6a4 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -61,7 +61,6 @@ #include "llvfile.h" #include "llagent.h" -#include "llnotify.h" #include "llmenugl.h" #include "roles_constants.h" #include "llselectmgr.h" diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp index 698f6152b4..26694ac433 100644 --- a/indra/newview/llpreviewtexture.cpp +++ b/indra/newview/llpreviewtexture.cpp @@ -76,29 +76,12 @@ LLPreviewTexture::LLPreviewTexture(const LLSD& key) mAspectRatio(0.f), mPreviewToSave(FALSE) { - const LLInventoryItem *item = getItem(); + const LLViewerInventoryItem *item = static_cast<const LLViewerInventoryItem*>(getItem()); if(item) { mShowKeepDiscard = item->getPermissions().getCreator() != gAgent.getID(); mImageID = item->getAssetUUID(); - const LLPermissions& perm = item->getPermissions(); - U32 mask = PERM_NONE; - if(perm.getOwner() == gAgent.getID()) - { - mask = perm.getMaskBase(); - } - else if(gAgent.isInGroup(perm.getGroup())) - { - mask = perm.getMaskGroup(); - } - else - { - mask = perm.getMaskEveryone(); - } - if((mask & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) - { - mIsCopyable = TRUE; - } + mIsCopyable = item->checkPermissionsSet(PERM_ITEM_UNRESTRICTED); } else // not an item, assume it's an asset id { @@ -145,6 +128,9 @@ BOOL LLPreviewTexture::postBuild() childSetVisible("Discard", false); } + childSetAction("save_tex_btn", LLPreviewTexture::onSaveAsBtn, this); + childSetVisible("save_tex_btn", canSaveAs()); + if (!mCopyToInv) { const LLInventoryItem* item = getItem(); @@ -164,6 +150,13 @@ BOOL LLPreviewTexture::postBuild() return LLPreview::postBuild(); } +// static +void LLPreviewTexture::onSaveAsBtn(void* data) +{ + LLPreviewTexture* self = (LLPreviewTexture*)data; + self->saveAs(); +} + void LLPreviewTexture::draw() { if (mUpdateDimensions) @@ -576,6 +569,7 @@ void LLPreviewTexture::loadAsset() mImage->forceToSaveRawImage(0) ; mAssetStatus = PREVIEW_ASSET_LOADING; updateDimensions(); + childSetVisible("save_tex_btn", canSaveAs()); } LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus() diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h index 9b3c91d831..980aecee6d 100644 --- a/indra/newview/llpreviewtexture.h +++ b/indra/newview/llpreviewtexture.h @@ -58,7 +58,6 @@ public: virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE); virtual void onFocusReceived(); - static void saveToFile(void* userdata); static void onFileLoadedForSave( BOOL success, LLViewerFetchedTexture *src_vi, @@ -68,6 +67,8 @@ public: BOOL final, void* userdata ); void openToSave(); + + static void onSaveAsBtn(void* data); protected: void init(); /* virtual */ BOOL postBuild(); diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp index 790be83e74..79bae76e5f 100644 --- a/indra/newview/llscreenchannel.cpp +++ b/indra/newview/llscreenchannel.cpp @@ -813,8 +813,6 @@ void LLScreenChannel::updateShowToastsState() return; } - // *TODO: mantipov: what we have to do with derived classes: LLNotificationWellWindow & LLIMWelWindow? - // See EXT-3081 for details // for Message Well floater showed in a docked state - adjust channel's height if(dynamic_cast<LLSysWellWindow*>(floater) || dynamic_cast<LLIMFloater*>(floater)) { diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 4d6c19157a..44930f03c5 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5754,21 +5754,21 @@ void LLSelectMgr::redo() //----------------------------------------------------------------------------- BOOL LLSelectMgr::canDoDelete() const { - bool can_delete = false;
- // This function is "logically const" - it does not change state in
- // a way visible outside the selection manager.
- LLSelectMgr* self = const_cast<LLSelectMgr*>(this);
- LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject();
- // Note: Can only delete root objects (see getFirstDeleteableObject() for more info)
- if (obj!= NULL)
- {
- // all the faces needs to be selected
- if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES ))
- {
- can_delete = true;
- }
- }
-
+ bool can_delete = false; + // This function is "logically const" - it does not change state in + // a way visible outside the selection manager. + LLSelectMgr* self = const_cast<LLSelectMgr*>(this); + LLViewerObject* obj = self->mSelectedObjects->getFirstDeleteableObject(); + // Note: Can only delete root objects (see getFirstDeleteableObject() for more info) + if (obj!= NULL) + { + // all the faces needs to be selected + if(self->mSelectedObjects->contains(obj,SELECT_ALL_TES )) + { + can_delete = true; + } + } + return can_delete; } diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d8d1760c38..539673ab9e 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -121,7 +121,6 @@ #include "lllogininstance.h" // Host the login module. #include "llpanellogin.h" #include "llmutelist.h" -#include "llnotify.h" #include "llpanelavatar.h" #include "llavatarpropertiesprocessor.h" #include "llpanelevent.h" @@ -2695,12 +2694,15 @@ std::string LLStartUp::startupStateToString(EStartupState state) #define RTNENUM(E) case E: return #E switch(state){ RTNENUM( STATE_FIRST ); + RTNENUM( STATE_BROWSER_INIT ); RTNENUM( STATE_LOGIN_SHOW ); RTNENUM( STATE_LOGIN_WAIT ); RTNENUM( STATE_LOGIN_CLEANUP ); RTNENUM( STATE_LOGIN_AUTH_INIT ); RTNENUM( STATE_LOGIN_PROCESS_RESPONSE ); RTNENUM( STATE_WORLD_INIT ); + RTNENUM( STATE_MULTIMEDIA_INIT ); + RTNENUM( STATE_FONT_INIT ); RTNENUM( STATE_SEED_GRANTED_WAIT ); RTNENUM( STATE_SEED_CAP_GRANTED ); RTNENUM( STATE_WORLD_WAIT ); diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp index 4915720036..9e72464237 100644 --- a/indra/newview/llstatusbar.cpp +++ b/indra/newview/llstatusbar.cpp @@ -50,7 +50,6 @@ #include "llkeyboard.h" #include "lllineeditor.h" #include "llmenugl.h" -#include "llnotify.h" #include "llimview.h" #include "llsd.h" #include "lltextbox.h" diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index a4f5164a8d..c48301fa1e 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -30,10 +30,6 @@ * $/LicenseInfo$ */ -// *NOTE: this module is a copy-paste of llui/llalertdialog.h -// Can we re-implement this as a subclass of LLAlertDialog and -// avoid all this code duplication? It already caused EXT-2232. - #include "llviewerprecompiledheaders.h" // must be first include #include "linden_common.h" @@ -60,7 +56,7 @@ const F32 DEFAULT_BUTTON_DELAY = 0.5f; const S32 MSG_PAD = 8; /*static*/ LLControlGroup* LLToastAlertPanel::sSettings = NULL; -/*static*/ LLAlertURLLoader* LLToastAlertPanel::sURLLoader; +/*static*/ LLToastAlertPanel::URLLoader* LLToastAlertPanel::sURLLoader; //----------------------------------------------------------------------------- // Private methods diff --git a/indra/newview/lltoastalertpanel.h b/indra/newview/lltoastalertpanel.h index 38a635e8a4..875ab82c54 100644 --- a/indra/newview/lltoastalertpanel.h +++ b/indra/newview/lltoastalertpanel.h @@ -30,10 +30,6 @@ * $/LicenseInfo$ */ -// *NOTE: this module is a copy-paste of llui/llalertdialog.h -// Can we re-implement this as a subclass of LLAlertDialog and -// avoid all this code duplication? It already caused EXT-2232. - #ifndef LL_TOASTALERTPANEL_H #define LL_TOASTALERTPANEL_H @@ -41,11 +37,9 @@ #include "llfloater.h" #include "llui.h" #include "llnotificationptr.h" -#include "llalertdialog.h" class LLButton; class LLCheckBoxCtrl; -class LLAlertDialogTemplate; class LLLineEditor; /** @@ -62,7 +56,16 @@ class LLToastAlertPanel public: typedef bool (*display_callback_t)(S32 modal); - static void setURLLoader(LLAlertURLLoader* loader) + class URLLoader + { + public: + virtual void load(const std::string& url, bool force_open_externally = 0) = 0; + virtual ~URLLoader() + { + } + }; + + static void setURLLoader(URLLoader* loader) { sURLLoader = loader; } @@ -95,7 +98,7 @@ private: BOOL hasTitleBar() const; private: - static LLAlertURLLoader* sURLLoader; + static URLLoader* sURLLoader; static LLControlGroup* sSettings; struct ButtonData diff --git a/indra/newview/lltoastgroupnotifypanel.cpp b/indra/newview/lltoastgroupnotifypanel.cpp index eacc077a65..e49044cdca 100644 --- a/indra/newview/lltoastgroupnotifypanel.cpp +++ b/indra/newview/lltoastgroupnotifypanel.cpp @@ -40,7 +40,6 @@ #include "lliconctrl.h" #include "llinventoryfunctions.h" #include "llnotifications.h" -#include "llnotify.h" #include "llviewertexteditor.h" #include "lluiconstants.h" diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index 46618d4026..f8c82f8b22 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -47,11 +47,14 @@ #include "llurlsimstring.h" #include "llweb.h" #include "llworldmapmessage.h" +#include "llurldispatcherlistener.h" // library includes #include "llnotificationsutil.h" #include "llsd.h" +static LLURLDispatcherListener sURLDispatcherListener; + class LLURLDispatcherImpl { public: diff --git a/indra/newview/llurldispatcherlistener.cpp b/indra/newview/llurldispatcherlistener.cpp new file mode 100644 index 0000000000..fea6a769c5 --- /dev/null +++ b/indra/newview/llurldispatcherlistener.cpp @@ -0,0 +1,58 @@ +/** + * @file llurldispatcherlistener.cpp + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief Implementation for llurldispatcherlistener. + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +// Precompiled header +#include "llviewerprecompiledheaders.h" +// associated header +#include "llurldispatcherlistener.h" +// STL headers +// std headers +// external library headers +// other Linden headers +#include "llurldispatcher.h" + +LLURLDispatcherListener::LLURLDispatcherListener(/* LLURLDispatcher* instance */): + LLEventAPI("LLURLDispatcher", "Internal URL handling") /* , + mDispatcher(instance) */ +{ + add("dispatch", + "At startup time or on clicks in internal web browsers,\n" + "teleport, open map, or run requested command.\n" + "[\"url\"] string url to dispatch\n" + "[\"trusted\"] boolean indicating trusted browser [default true]", + &LLURLDispatcherListener::dispatch); + add("dispatchRightClick", "Dispatch [\"url\"] as if from a right-click on a hot link.", + &LLURLDispatcherListener::dispatchRightClick); + add("dispatchFromTextEditor", "Dispatch [\"url\"] as if from an edit field.", + &LLURLDispatcherListener::dispatchFromTextEditor); +} + +void LLURLDispatcherListener::dispatch(const LLSD& params) const +{ + // For most purposes, we expect callers to want to be trusted. + bool trusted_browser = true; + if (params.has("trusted")) + { + // But for testing, allow a caller to specify untrusted. + trusted_browser = params["trusted"].asBoolean(); + } + LLURLDispatcher::dispatch(params["url"], NULL, trusted_browser); +} + +void LLURLDispatcherListener::dispatchRightClick(const LLSD& params) const +{ + LLURLDispatcher::dispatchRightClick(params["url"]); +} + +void LLURLDispatcherListener::dispatchFromTextEditor(const LLSD& params) const +{ + LLURLDispatcher::dispatchFromTextEditor(params["url"]); +} diff --git a/indra/newview/llurldispatcherlistener.h b/indra/newview/llurldispatcherlistener.h new file mode 100644 index 0000000000..894afcbb51 --- /dev/null +++ b/indra/newview/llurldispatcherlistener.h @@ -0,0 +1,32 @@ +/** + * @file llurldispatcherlistener.h + * @author Nat Goodspeed + * @date 2009-12-10 + * @brief LLEventAPI for LLURLDispatcher + * + * $LicenseInfo:firstyear=2009&license=viewergpl$ + * Copyright (c) 2009, Linden Research, Inc. + * $/LicenseInfo$ + */ + +#if ! defined(LL_LLURLDISPATCHERLISTENER_H) +#define LL_LLURLDISPATCHERLISTENER_H + +#include "lleventapi.h" +class LLURLDispatcher; +class LLSD; + +class LLURLDispatcherListener: public LLEventAPI +{ +public: + LLURLDispatcherListener(/* LLURLDispatcher* instance */); // all static members + +private: + void dispatch(const LLSD& params) const; + void dispatchRightClick(const LLSD& params) const; + void dispatchFromTextEditor(const LLSD& params) const; + + //LLURLDispatcher* mDispatcher; +}; + +#endif /* ! defined(LL_LLURLDISPATCHERLISTENER_H) */ diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 6339d23fa7..91de7d9ba2 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -63,7 +63,6 @@ #include "llviewerjoystick.h" #include "llviewerparcelmgr.h" #include "llparcel.h" -#include "llnotify.h" #include "lloverlaybar.h" #include "llkeyboard.h" #include "llerrorcontrol.h" @@ -517,14 +516,12 @@ bool toggle_show_snapshot_button(const LLSD& newvalue) bool toggle_show_navigation_panel(const LLSD& newvalue) { LLRect floater_view_rect = gFloaterView->getRect(); - LLRect notify_view_rect = gNotifyBoxView->getRect(); LLNavigationBar* navbar = LLNavigationBar::getInstance(); //if newvalue contains 0 => navbar should turn invisible, so floater_view_rect should get higher, //and to do this pm=1, else if navbar becomes visible pm=-1 so floater_view_rect gets lower. int pm=newvalue.asBoolean()?-1:1; floater_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); - notify_view_rect.mTop += pm*(navbar->getDefNavBarHeight()-navbar->getDefFavBarHeight()); gFloaterView->setRect(floater_view_rect); floater_view_rect = gFloaterView->getRect(); navbar->showNavigationPanel(newvalue.asBoolean()); @@ -534,14 +531,12 @@ bool toggle_show_navigation_panel(const LLSD& newvalue) bool toggle_show_favorites_panel(const LLSD& newvalue) { LLRect floater_view_rect = gFloaterView->getRect(); - LLRect notify_view_rect = gNotifyBoxView->getRect(); LLNavigationBar* navbar = LLNavigationBar::getInstance(); //if newvalue contains 0 => favbar should turn invisible, so floater_view_rect should get higher, //and to do this pm=1, else if favbar becomes visible pm=-1 so floater_view_rect gets lower. int pm=newvalue.asBoolean()?-1:1; floater_view_rect.mTop += pm*navbar->getDefFavBarHeight(); - notify_view_rect.mTop += pm*navbar->getDefFavBarHeight(); gFloaterView->setRect(floater_view_rect); navbar->showFavoritesPanel(newvalue.asBoolean()); return true; diff --git a/indra/newview/llviewerhelp.cpp b/indra/newview/llviewerhelp.cpp index 297c0cc111..b8f91697e5 100644 --- a/indra/newview/llviewerhelp.cpp +++ b/indra/newview/llviewerhelp.cpp @@ -49,24 +49,38 @@ void LLViewerHelp::showTopic(const std::string &topic) { - showHelp(); - // allow overriding the help server with a local help file if( gSavedSettings.getBOOL("HelpUseLocal") ) { + showHelp(); LLFloaterHelpBrowser* helpbrowser = dynamic_cast<LLFloaterHelpBrowser*>(LLFloaterReg::getInstance("help_browser")); helpbrowser->navigateToLocalPage( "help-offline" , "index.html" ); return; } - // use a special login topic before the user logs in + // if the help topic is empty, use the default topic std::string help_topic = topic; - if (! LLLoginInstance::getInstance()->authSuccess()) + if (help_topic.empty()) { - help_topic = preLoginTopic(); + help_topic = defaultTopic(); + } + + // f1 help topic means: if user not logged in yet, show the + // pre-login topic, otherwise show help for the focused item + if (help_topic == f1HelpTopic()) + { + if (! LLLoginInstance::getInstance()->authSuccess()) + { + help_topic = preLoginTopic(); + } + else + { + help_topic = getTopicFromFocus(); + } } // work out the URL for this topic and display it + showHelp(); const LLOSInfo& osinfo = LLAppViewer::instance()->getOSInfo(); std::string helpURL = LLViewerHelpUtil::buildHelpURL( help_topic, gSavedSettings, osinfo ); setRawURL( helpURL ); @@ -84,6 +98,12 @@ std::string LLViewerHelp::preLoginTopic() return "pre_login_help"; } +std::string LLViewerHelp::f1HelpTopic() +{ + // *hack: to be done properly + return "f1_help"; +} + ////////////////////////////// // our own interfaces diff --git a/indra/newview/llviewerhelp.h b/indra/newview/llviewerhelp.h index dcb5ae32c9..07971a593e 100644 --- a/indra/newview/llviewerhelp.h +++ b/indra/newview/llviewerhelp.h @@ -51,14 +51,17 @@ class LLViewerHelp : public LLHelp, public LLSingleton<LLViewerHelp> /// display the specified help topic in the help viewer /*virtual*/ void showTopic(const std::string &topic); - /// return default (fallback) topic name suitable for showTopic() - /*virtual*/ std::string defaultTopic(); - // return topic derived from viewer UI focus, else default topic std::string getTopicFromFocus(); + /// return default (fallback) topic name suitable for showTopic() + /*virtual*/ std::string defaultTopic(); + // return topic to use before the user logs in - std::string preLoginTopic(); + /*virtual*/ std::string preLoginTopic(); + + // return topic to use for the top-level help, invoked by F1 + /*virtual*/ std::string f1HelpTopic(); private: static void showHelp(); // make sure help UI is visible & raised diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 9856cb2b7f..645a73c502 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -43,7 +43,6 @@ #include "llviewercontrol.h" #include "llconsole.h" #include "llinventorymodel.h" -#include "llnotify.h" #include "llgesturemgr.h" #include "llinventorybridge.h" @@ -1379,6 +1378,25 @@ LLViewerInventoryCategory *LLViewerInventoryItem::getLinkedCategory() const return NULL; } +bool LLViewerInventoryItem::checkPermissionsSet(PermissionMask mask) const +{ + const LLPermissions& perm = getPermissions(); + PermissionMask curr_mask = PERM_NONE; + if(perm.getOwner() == gAgent.getID()) + { + curr_mask = perm.getMaskBase(); + } + else if(gAgent.isInGroup(perm.getGroup())) + { + curr_mask = perm.getMaskGroup(); + } + else + { + curr_mask = perm.getMaskEveryone(); + } + return ((curr_mask & mask) == mask); +} + //---------- void LLViewerInventoryItem::onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 0156e7dab1..412a2c66e6 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -158,6 +158,9 @@ public: bool getIsBrokenLink() const; // true if the baseitem this points to doesn't exist in memory. LLViewerInventoryItem *getLinkedItem() const; LLViewerInventoryCategory *getLinkedCategory() const; + + // Checks the items permissions (for owner, group, or everyone) and returns true if all mask bits are set. + bool checkPermissionsSet(PermissionMask mask) const; // callback void onCallingCardNameLookup(const LLUUID& id, const std::string& first_name, const std::string& last_name); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 78322dda75..36d9e7935f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -59,6 +59,7 @@ #include "llfloaterland.h" #include "llfloaterpay.h" #include "llfloaterreporter.h" +#include "llfloatersearch.h" #include "llfloaterscriptdebug.h" #include "llfloatertools.h" #include "llfloaterworldmap.h" @@ -3408,6 +3409,13 @@ void set_god_level(U8 god_level) // changing god-level can affect which menus we see show_debug_menus(); + + // changing god-level can invalidate search results + LLFloaterSearch *search = dynamic_cast<LLFloaterSearch*>(LLFloaterReg::getInstance("search")); + if (search) + { + search->godLevelChanged(god_level); + } } #ifdef TOGGLE_HACKED_GODLIKE_VIEWER @@ -5567,17 +5575,8 @@ class LLShowHelp : public view_listener_t bool handleEvent(const LLSD& userdata) { std::string help_topic = userdata.asString(); - LLViewerHelp* vhelp = LLViewerHelp::getInstance(); - if (help_topic.empty()) - { - vhelp->showTopic(vhelp->getTopicFromFocus()); - } - else - { - vhelp->showTopic(help_topic); - } - + vhelp->showTopic(help_topic); return true; } }; diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 4b0dc8f668..a1c3806b27 100644 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -71,15 +71,6 @@ // system libraries #include <boost/tokenizer.hpp> -class LLFileEnableSaveAs : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - bool new_value = gFloaterView->getFrontmost() && gFloaterView->getFrontmost()->canSaveAs(); - return new_value; - } -}; - class LLFileEnableUpload : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -386,19 +377,6 @@ class LLFileCloseAllWindows : public view_listener_t } }; -class LLFileSaveTexture : public view_listener_t -{ - bool handleEvent(const LLSD& userdata) - { - LLFloater* top = gFloaterView->getFrontmost(); - if (top) - { - top->saveAs(); - } - return true; - } -}; - class LLFileTakeSnapshotToDisk : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -1050,10 +1028,10 @@ void init_menu_file() view_listener_t::addCommit(new LLFileCloseAllWindows(), "File.CloseAllWindows"); view_listener_t::addEnable(new LLFileEnableCloseWindow(), "File.EnableCloseWindow"); view_listener_t::addEnable(new LLFileEnableCloseAllWindows(), "File.EnableCloseAllWindows"); - view_listener_t::addCommit(new LLFileSaveTexture(), "File.SaveTexture"); view_listener_t::addCommit(new LLFileTakeSnapshotToDisk(), "File.TakeSnapshotToDisk"); view_listener_t::addCommit(new LLFileQuit(), "File.Quit"); view_listener_t::addEnable(new LLFileEnableUpload(), "File.EnableUpload"); - view_listener_t::addEnable(new LLFileEnableSaveAs(), "File.EnableSaveAs"); + + // "File.SaveTexture" moved to llpanelmaininventory so that it can be properly handled. } diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index bdc996c7d9..8fe18c56c9 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -59,7 +59,6 @@ #include "llnearbychat.h" #include "llnotifications.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llpanelgrouplandmoney.h" #include "llpanelplaces.h" #include "llrecentpeople.h" @@ -973,16 +972,8 @@ void inventory_offer_mute_callback(const LLUUID& blocked_id, const LLUUID& blocked_id; }; - using namespace LLNotificationsUI; - LLChannelManager* channel_manager = LLChannelManager::getInstance(); - LLScreenChannel - * screen_channel = - dynamic_cast<LLScreenChannel*> (channel_manager->findChannelByID( - LLUUID(gSavedSettings.getString("NotificationChannelUUID")))); - if (screen_channel != NULL) - { - screen_channel->killMatchedToasts(OfferMatcher(blocked_id)); - } + LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(blocked_id)); } LLOfferInfo::LLOfferInfo(const LLSD& sd) @@ -4847,24 +4838,25 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) LLMuteList::getInstance()->add(LLMute(item_id, notification["payload"]["object_name"].asString(), LLMute::OBJECT)); // purge the message queue of any previously queued requests from the same source. DEV-4879 - class OfferMatcher : public LLNotifyBoxView::Matcher + class OfferMatcher : public LLNotificationsUI::LLScreenChannel::Matcher { public: OfferMatcher(const LLUUID& to_block) : blocked_id(to_block) {} - BOOL matches(const LLNotificationPtr notification) const + bool matches(const LLNotificationPtr notification) const { if (notification->getName() == "ScriptQuestionCaution" || notification->getName() == "ScriptQuestion") { return (notification->getPayload()["item_id"].asUUID() == blocked_id); } - return FALSE; + return false; } private: const LLUUID& blocked_id; }; - // should do this via the channel - gNotifyBoxView->purgeMessagesMatching(OfferMatcher(item_id)); + + LLNotificationsUI::LLChannelManager::getInstance()->killToastsFromChannel(LLUUID( + gSavedSettings.getString("NotificationChannelUUID")), OfferMatcher(item_id)); } if (response["Details"]) diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 7a1abfd4e8..be68a2ef42 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -54,7 +54,6 @@ #include "llfloatergroups.h" #include "llfloatersellland.h" #include "llfloatertools.h" -#include "llnotify.h" #include "llparcelselection.h" #include "llresmgr.h" #include "llsdutil.h" diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index e0091145ce..300aea1620 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -51,7 +51,6 @@ #include "llmenugl.h" #include "llnotecard.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llpanelplaces.h" #include "llpreview.h" #include "llpreviewnotecard.h" diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 0d29efaedf..a5a40e9c2c 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -2879,7 +2879,8 @@ BOOL LLViewerMediaTexture::findFaces() } S32 face_id = -1 ; - while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1) + S32 num_faces = obj->mDrawable->getNumFaces() ; + while((face_id = obj->getFaceIndexWithMediaImpl(mMediaImplp, face_id)) > -1 && face_id < num_faces) { LLFace* facep = obj->mDrawable->getFace(face_id) ; if(facep) diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8529a93527..79c113f036 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -82,7 +82,6 @@ // newview includes #include "llagent.h" -#include "llalertdialog.h" #include "llbox.h" #include "llconsole.h" #include "llviewercontrol.h" @@ -129,7 +128,6 @@ #include "llmorphview.h" #include "llmoveview.h" #include "llnavigationbar.h" -#include "llnotify.h" #include "lloverlaybar.h" #include "llpreviewtexture.h" #include "llprogressview.h" @@ -1450,7 +1448,6 @@ void LLViewerWindow::initBase() gDebugView = getRootView()->getChild<LLDebugView>("DebugView"); gDebugView->init(); - gNotifyBoxView = getRootView()->getChild<LLNotifyBoxView>("notify_container"); gToolTipView = getRootView()->getChild<LLToolTipView>("tooltip view"); // Add the progress bar view (startup view), which overrides everything @@ -1628,8 +1625,6 @@ void LLViewerWindow::shutdownViews() gMorphView = NULL; gHUDView = NULL; - - gNotifyBoxView = NULL; } void LLViewerWindow::shutdownGL() @@ -1997,9 +1992,6 @@ void LLViewerWindow::draw() #if LL_DEBUG LLView::sIsDrawing = FALSE; #endif - - // UI post-draw Updates - gNotifyBoxView->updateNotifyBoxView(); } // Takes a single keydown event, usually when UI is visible @@ -2595,7 +2587,6 @@ void LLViewerWindow::updateUI() else if (dynamic_cast<LLUICtrl*>(viewp) && viewp != gMenuHolder && viewp != gFloaterView - && viewp != gNotifyBoxView && viewp != gConsole) { if (dynamic_cast<LLFloater*>(viewp)) diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 93b0ad4a5b..8828ebff6a 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -64,7 +64,6 @@ #include "llkeyframewalkmotion.h" #include "llmutelist.h" #include "llmoveview.h" -#include "llnotify.h" #include "llquantize.h" #include "llregionhandle.h" #include "llresmgr.h" diff --git a/indra/newview/llwaterparammanager.cpp b/indra/newview/llwaterparammanager.cpp index c8cc6a3d8e..697fefee3a 100644 --- a/indra/newview/llwaterparammanager.cpp +++ b/indra/newview/llwaterparammanager.cpp @@ -91,7 +91,7 @@ LLWaterParamManager::~LLWaterParamManager() void LLWaterParamManager::loadAllPresets(const std::string& file_name) { std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading Default water settings from " << path_name << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading Default water settings from " << path_name << LL_ENDL; bool found = true; while(found) @@ -117,7 +117,7 @@ void LLWaterParamManager::loadAllPresets(const std::string& file_name) // And repeat for user presets, note the user presets will modify any system presets already loaded std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading User water settings from " << path_name2 << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User water settings from " << path_name2 << LL_ENDL; found = true; while(found) @@ -152,7 +152,7 @@ void LLWaterParamManager::loadPreset(const std::string & name,bool propagate) escaped_filename += ".xml"; std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/water", escaped_filename)); - llinfos << "Loading water settings from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading water settings from " << pathName << LL_ENDL; llifstream presetsXML; presetsXML.open(pathName.c_str()); @@ -161,7 +161,7 @@ void LLWaterParamManager::loadPreset(const std::string & name,bool propagate) if(!presetsXML) { pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/water", escaped_filename); - llinfos << "Loading User water setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User water setting from " << pathName << LL_ENDL; presetsXML.clear(); presetsXML.open(pathName.c_str()); } diff --git a/indra/newview/llwearablelist.cpp b/indra/newview/llwearablelist.cpp index 31047413ef..bd7619f7e5 100644 --- a/indra/newview/llwearablelist.cpp +++ b/indra/newview/llwearablelist.cpp @@ -41,7 +41,6 @@ #include "llviewerinventory.h" #include "llviewerstats.h" #include "llnotificationsutil.h" -#include "llnotify.h" #include "llinventorymodel.h" #include "lltrans.h" diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp index 72431bd22f..c056c84e19 100644 --- a/indra/newview/llweb.cpp +++ b/indra/newview/llweb.cpp @@ -42,10 +42,9 @@ #include "llviewercontrol.h" #include "llfloatermediabrowser.h" #include "llfloaterreg.h" -#include "llalertdialog.h" #include "lltoastalertpanel.h" -class URLLoader : public LLAlertURLLoader +class URLLoader : public LLToastAlertPanel::URLLoader { virtual void load(const std::string& url , bool force_open_externally) { @@ -65,7 +64,6 @@ static URLLoader sAlertURLLoader; // static void LLWeb::initClass() { - LLAlertDialog::setURLLoader(&sAlertURLLoader); LLToastAlertPanel::setURLLoader(&sAlertURLLoader); } diff --git a/indra/newview/llwlparammanager.cpp b/indra/newview/llwlparammanager.cpp index c6fd35c142..c3a70705cf 100644 --- a/indra/newview/llwlparammanager.cpp +++ b/indra/newview/llwlparammanager.cpp @@ -109,7 +109,7 @@ LLWLParamManager::~LLWLParamManager() void LLWLParamManager::loadPresets(const std::string& file_name) { std::string path_name(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading Default WindLight settings from " << path_name << LL_ENDL; bool found = true; while(found) @@ -135,7 +135,7 @@ void LLWLParamManager::loadPresets(const std::string& file_name) // And repeat for user presets, note the user presets will modify any system presets already loaded std::string path_name2(gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", "")); - LL_INFOS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight settings from " << path_name2 << LL_ENDL; found = true; while(found) @@ -196,7 +196,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) escaped_filename += ".xml"; std::string pathName(gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "windlight/skies", escaped_filename)); - //llinfos << "Loading WindLight sky setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading WindLight sky setting from " << pathName << LL_ENDL; llifstream presetsXML; presetsXML.open(pathName.c_str()); @@ -205,7 +205,7 @@ void LLWLParamManager::loadPreset(const std::string & name,bool propagate) if(!presetsXML) { pathName=gDirUtilp->getExpandedFilename( LL_PATH_USER_SETTINGS , "windlight/skies", escaped_filename); - llinfos << "Loading User WindLight sky setting from " << pathName << llendl; + LL_DEBUGS2("AppInit", "Shaders") << "Loading User WindLight sky setting from " << pathName << LL_ENDL; presetsXML.clear(); presetsXML.open(pathName.c_str()); } diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index d1fd42bdd9..52fda97860 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1857,6 +1857,10 @@ Select the thumbnail to choose a different texture. top="0" help_topic="land_access_tab" name="land_access_panel"> + <panel.string + name="access_estate_defined"> + (Defined by the Estate) + </panel.string> <panel.string name="estate_override"> One or more of these options is set at the estate level @@ -1877,7 +1881,7 @@ Select the thumbnail to choose a different texture. <check_box follows="top|left" height="16" - label="Allow Public Access" + label="Allow Public Access [MATURITY]" layout="topleft" left_delta="0" name="public_access" @@ -1893,12 +1897,12 @@ Select the thumbnail to choose a different texture. name="Only Allow" top="49" width="278"> - Block Access By: + Restrict Access to Residents verified by: </text> <check_box follows="top|left" height="16" - label="Residents who have not given payment info to Linden Lab" + label="Payment Information on File [ESTATE_PAYMENT_LIMIT]" layout="topleft" left_delta="0" name="limit_payment" @@ -1908,7 +1912,7 @@ Select the thumbnail to choose a different texture. <check_box follows="top|left" height="16" - label="Residents who are not age verified adults" + label="Age Verification [ESTATE_AGE_LIMIT]" layout="topleft" left_delta="0" name="limit_age_verified" diff --git a/indra/newview/skins/default/xui/en/floater_buy_currency.xml b/indra/newview/skins/default/xui/en/floater_buy_currency.xml index 75711cdf89..26b003cafe 100644 --- a/indra/newview/skins/default/xui/en/floater_buy_currency.xml +++ b/indra/newview/skins/default/xui/en/floater_buy_currency.xml @@ -222,7 +222,7 @@ width="300" height="30" name="currency_links"> - [http://www.secondlife.com/ payment method] | [http://www.secondlife.com/ currency] | [http://www.secondlife.com exchange rate] + [http://www.secondlife.com/ payment method] | [http://www.secondlife.com/ currency] | [http://www.secondlife.com/my/account/exchange_rates.php exchange rate] </text> <text type="string" diff --git a/indra/newview/skins/default/xui/en/floater_incoming_call.xml b/indra/newview/skins/default/xui/en/floater_incoming_call.xml index acd59b6f09..81c54ae55e 100644 --- a/indra/newview/skins/default/xui/en/floater_incoming_call.xml +++ b/indra/newview/skins/default/xui/en/floater_incoming_call.xml @@ -26,6 +26,10 @@ name="VoiceInviteAdHoc"> has joined a Voice Chat call with a conference chat. </floater.string> + <floater.string + name="VoiceInviteGroup"> + has joined a Voice Chat call with the group [GROUP]. + </floater.string> <avatar_icon enabled="false" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/floater_preview_texture.xml b/indra/newview/skins/default/xui/en/floater_preview_texture.xml index 52a19ac6b3..602a18ea56 100644 --- a/indra/newview/skins/default/xui/en/floater_preview_texture.xml +++ b/indra/newview/skins/default/xui/en/floater_preview_texture.xml @@ -61,7 +61,16 @@ name="Discard" top_delta="0" width="100" /> - <text + <button + follows="left|bottom" + height="22" + label="Save As" + layout="topleft" + left_pad="5" + name="save_tex_btn" + top_delta="0" + width="100" /> + <text type="string" length="1" follows="left|bottom" diff --git a/indra/newview/skins/default/xui/en/floater_search.xml b/indra/newview/skins/default/xui/en/floater_search.xml index 82e4d87b28..e6bdcdf78e 100644 --- a/indra/newview/skins/default/xui/en/floater_search.xml +++ b/indra/newview/skins/default/xui/en/floater_search.xml @@ -55,8 +55,20 @@ layout="topleft" left_delta="0" name="status_text" - top_pad="5" + top_pad="7" width="150" /> + <text + visible="false" + follows="bottom|right" + height="16" + left_delta="0" + name="refresh_search" + left_pad="0" + right="-10" + halign="right" + width="450"> + Redo search to reflect current God level + </text> </layout_panel> </layout_stack> </floater> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 9b439c16e0..53be40d7fd 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -45,7 +45,8 @@ name="Second Life Help" shortcut="F1"> <menu_item_call.on_click - function="ShowHelp" /> + function="ShowHelp" + parameter="f1_help" /> </menu_item_call> <menu_item_separator /> <menu_item_call diff --git a/indra/newview/skins/default/xui/en/menu_participant_list.xml b/indra/newview/skins/default/xui/en/menu_participant_list.xml index 0422972cd4..adf4bd70e1 100644 --- a/indra/newview/skins/default/xui/en/menu_participant_list.xml +++ b/indra/newview/skins/default/xui/en/menu_participant_list.xml @@ -49,7 +49,7 @@ function="Avatar.Pay" /> </menu_item_call> <menu_item_check - label="Block/Unblock" + label="BlockVoice/Unblock" layout="topleft" name="Block/Unblock"> <menu_item_check.on_click @@ -64,7 +64,7 @@ <menu_item_separator layout="topleft" /> <menu_item_check - label="Mute Text" + label="Block Text" layout="topleft" name="MuteText"> <on_check @@ -76,6 +76,10 @@ function="ParticipantList.EnableItem" parameter="can_mute_text" /> </menu_item_check> + <context_menu + label="Moderator Options >" + layout="topleft" + name="Moderator Options" > <menu_item_check label="Allow text chat" layout="topleft" @@ -136,4 +140,5 @@ function="ParticipantList.EnableItem" parameter="can_moderate_voice" /> </menu_item_call> + </context_menu> </context_menu> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 861b0de2cf..0891afaf76 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1064,7 +1064,8 @@ name="Second Life Help" shortcut="F1"> <menu_item_call.on_click - function="ShowHelp" /> + function="ShowHelp" + parameter="f1_help" /> </menu_item_call> <menu_item_call label="Tutorial" @@ -1200,15 +1201,6 @@ function="ToggleControl" parameter="CompressSnapshotsToDisk" /> </menu_item_check> - <menu_item_call - label="Save Texture As" - layout="topleft" - name="Save Texture As"> - <menu_item_call.on_click - function="File.SaveTexture" /> - <menu_item_call.on_enable - function="File.EnableSaveAs" /> - </menu_item_call> <menu_item_separator layout="topleft" /> <menu diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 8c69699bb5..9cf9b9f586 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -3539,6 +3539,8 @@ Type a short announcement which will be sent to everyone in this region. type="alertmodal"> The maturity rating for this region has been updated. It may take some time for the change to be reflected on the map. + +To enter Adult regions, residents must be Account Verified, either by age-verification or payment-verification. </notification> <notification @@ -3799,21 +3801,6 @@ All reported abuses are investigated and resolved. You can view the resolution b <notification icon="alertmodal.tga" - name="HelpReportAbuseEmailEO" - type="alertmodal"> -IMPORTANT: This report will go to the owner of the region you are currently in and not to Linden Lab. - -As a service to residents and visitors, the owner of the region you are in has elected to receive and resolve all reports originating in this region. Linden Lab will not investigate reports you file from this location. - -The region owner will resolve reports based on the local rules of this region as outlined in the estate Covenant. -(View covenants by going to the World menu and selecting About Land.) - -The resolution of this report applies only to this Region. Residents' access to other areas of [SECOND_LIFE] will not be affected by the outcome of this report. Only Linden Lab can restrict access to the entirety of [SECOND_LIFE]. - <unique/> - </notification> - - <notification - icon="alertmodal.tga" name="HelpReportAbuseSelectCategory" type="alertmodal"> Please select a category for this abuse report. @@ -5750,6 +5737,23 @@ You just entered a region using a different server version, which may affect per The SLurl you clicked on is not supported. </notification> + <notification + icon="notifytip.tga" + name="BlockedSLURL" + priority="high" + type="notifytip"> +A SLurl was received from an untrusted browser and has been blocked for your security. + </notification> + + <notification + icon="notifytip.tga" + name="ThrottledSLURL" + priority="high" + type="notifytip"> +Multiple SLurls were received from an untrusted browser within a short period. +They will be blocked for a few seconds for your security. + </notification> + <notification name="IMToast" type="notifytoast"> [MESSAGE] <form name="form"> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 8aba8b9dd1..b5c6b637e5 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -92,11 +92,7 @@ name="(Japanese)" value="ja" /> - <combo_box.item - enabled="true" - label="Test Language" - name="TestLanguage" - value="test" /> + </combo_box> <text type="string" diff --git a/indra/newview/skins/default/xui/en/panel_region_estate.xml b/indra/newview/skins/default/xui/en/panel_region_estate.xml index e25ff0d548..f381c5c213 100644 --- a/indra/newview/skins/default/xui/en/panel_region_estate.xml +++ b/indra/newview/skins/default/xui/en/panel_region_estate.xml @@ -9,10 +9,6 @@ name="Estate" top="320" width="480"> - <panel.string - name="email_unsupported"> - Feature unsupported - </panel.string> <text type="string" length="1" @@ -81,7 +77,7 @@ regions in the estate. <view_border bevel_style="in" follows="top|left" - height="310" + height="270" layout="topleft" left_delta="-4" top_pad="5" @@ -141,12 +137,12 @@ regions in the estate. name="Only Allow" top="250" width="278"> - Restrict Access To: + Restrict Access to Accounts Verified by: </text> <check_box follows="top|left" height="16" - label="Residents with payment info on file" + label="Payment Information on File" layout="topleft" left_delta="0" name="limit_payment" @@ -156,7 +152,7 @@ regions in the estate. <check_box follows="top|left" height="16" - label="Age-verified adults" + label="Age Verification" layout="topleft" left_delta="0" name="limit_age_verified" @@ -179,26 +175,6 @@ regions in the estate. name="allow_direct_teleport" top_pad="4" width="80" /> - <text - type="string" - length="1" - follows="left|top" - height="20" - layout="topleft" - left="15" - name="abuse_email_text" - top_pad="10" - width="180"> - Abuse email address: - </text> - <line_editor - follows="top|left" - height="23" - layout="topleft" - left="15" - name="abuse_email_address" - top_pad="-5" - width="230" /> <button enabled="false" follows="left|top" diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index c3650c71c3..8ac4ca95b9 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2900,6 +2900,9 @@ If you continue to receive this message, contact the [SUPPORT_SITE]. <string name="message_session_event"> Unable to send your message to the chat session with [RECIPIENT]. </string> + <string name="mute"> + Error while moderating. + </string> <string name="removed_from_group"> You have been removed from the group. </string> |