diff options
author | Loren Shih <seraph@lindenlab.com> | 2011-02-04 11:23:56 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2011-02-04 11:23:56 -0500 |
commit | 3f77074f27ed96ee817e00d026145942da9a1ecb (patch) | |
tree | 3a3d95d21ae523d3d07fefe0cb52382a9a990881 /indra | |
parent | aa9d9901e843135632b67af6b5641ab019a84d09 (diff) | |
parent | e82fb8c7b90c0f5038c38a1aaf4882718433bfd6 (diff) |
Automated merge up from viewer-development into mesh-development
Diffstat (limited to 'indra')
14 files changed, 83 insertions, 74 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 952643326a..92d6d9a486 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1545,6 +1545,7 @@ LLPanelPreference::LLPanelPreference() : LLPanel() { mCommitCallbackRegistrar.add("Pref.setControlFalse", boost::bind(&LLPanelPreference::setControlFalse,this, _2)); + mCommitCallbackRegistrar.add("Pref.updateMediaAutoPlayCheckbox", boost::bind(&LLPanelPreference::updateMediaAutoPlayCheckbox, this, _1)); } //virtual @@ -1706,6 +1707,21 @@ void LLPanelPreference::setControlFalse(const LLSD& user_data) control->set(LLSD(FALSE)); } +void LLPanelPreference::updateMediaAutoPlayCheckbox(LLUICtrl* ctrl) +{ + std::string name = ctrl->getName(); + + // Disable "Allow Media to auto play" only when both + // "Streaming Music" and "Media" are unchecked. STORM-513. + if ((name == "enable_music") || (name == "enable_media")) + { + bool music_enabled = getChild<LLCheckBoxCtrl>("enable_music")->get(); + bool media_enabled = getChild<LLCheckBoxCtrl>("enable_media")->get(); + + getChild<LLCheckBoxCtrl>("media_auto_play_btn")->setEnabled(music_enabled || media_enabled); + } +} + static LLRegisterPanelClassWrapper<LLPanelPreferenceGraphics> t_pref_graph("panel_preference_graphics"); BOOL LLPanelPreferenceGraphics::postBuild() diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 784033ae95..46014804ec 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -189,6 +189,10 @@ public: void setControlFalse(const LLSD& user_data); virtual void setHardwareDefaults(){}; + // Disables "Allow Media to auto play" check box only when both + // "Streaming Music" and "Media" are unchecked. Otherwise enables it. + void updateMediaAutoPlayCheckbox(LLUICtrl* ctrl); + // This function squirrels away the current values of the controls so that // cancel() can restore them. virtual void saveSettings(); diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index c50afb0e9d..21b1cc77ad 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3246,7 +3246,10 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, } else if(LLToolDragAndDrop::SOURCE_NOTECARD == source) { - accept = TRUE; + // Don't allow placing an original item from a notecard to Current Outfit or an outfit folder + // because they must contain only links to wearable items. + accept = !(move_is_into_current_outfit || move_is_into_outfit); + if(drop) { copy_inventory_from_notecard(LLToolDragAndDrop::getInstance()->getObjectID(), diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a3aa3dbdff..d85ddcaa60 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -118,18 +118,6 @@ LLPanelMainInventory::LLPanelMainInventory() mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars)); - // Controls - // *TODO: Just use persistant settings for each of these - U32 sort_order = gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER); - BOOL sort_by_name = ! ( sort_order & LLInventoryFilter::SO_DATE ); - BOOL sort_folders_by_name = ( sort_order & LLInventoryFilter::SO_FOLDERS_BY_NAME ); - BOOL sort_system_folders_to_top = ( sort_order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP ); - - gSavedSettings.declareBOOL("Inventory.SortByName", sort_by_name, "Declared in code", FALSE); - gSavedSettings.declareBOOL("Inventory.SortByDate", !sort_by_name, "Declared in code", FALSE); - gSavedSettings.declareBOOL("Inventory.FoldersAlwaysByName", sort_folders_by_name, "Declared in code", FALSE); - gSavedSettings.declareBOOL("Inventory.SystemFoldersToTop", sort_system_folders_to_top, "Declared in code", FALSE); - mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); } @@ -325,67 +313,41 @@ void LLPanelMainInventory::resetFilters() void LLPanelMainInventory::setSortBy(const LLSD& userdata) { - std::string sort_field = userdata.asString(); - if (sort_field == "name") + U32 sort_order_mask = getActivePanel()->getSortOrder(); + std::string sort_type = userdata.asString(); + if (sort_type == "name") { - U32 order = getActivePanel()->getSortOrder(); - order &= ~LLInventoryFilter::SO_DATE; - - getActivePanel()->setSortOrder( order ); - - gSavedSettings.setU32("InventorySortOrder", order); - - gSavedSettings.setBOOL("Inventory.SortByName", TRUE ); - gSavedSettings.setBOOL("Inventory.SortByDate", FALSE ); + sort_order_mask &= ~LLInventoryFilter::SO_DATE; } - else if (sort_field == "date") + else if (sort_type == "date") { - U32 order = getActivePanel()->getSortOrder(); - order |= LLInventoryFilter::SO_DATE; - - getActivePanel()->setSortOrder( order ); - - gSavedSettings.setU32("InventorySortOrder", order); - - gSavedSettings.setBOOL("Inventory.SortByName", FALSE ); - gSavedSettings.setBOOL("Inventory.SortByDate", TRUE ); + sort_order_mask |= LLInventoryFilter::SO_DATE; } - else if (sort_field == "foldersalwaysbyname") + else if (sort_type == "foldersalwaysbyname") { - U32 order = getActivePanel()->getSortOrder(); - if ( order & LLInventoryFilter::SO_FOLDERS_BY_NAME ) + if ( sort_order_mask & LLInventoryFilter::SO_FOLDERS_BY_NAME ) { - order &= ~LLInventoryFilter::SO_FOLDERS_BY_NAME; - - gSavedSettings.setBOOL("Inventory.FoldersAlwaysByName", FALSE ); + sort_order_mask &= ~LLInventoryFilter::SO_FOLDERS_BY_NAME; } else { - order |= LLInventoryFilter::SO_FOLDERS_BY_NAME; - - gSavedSettings.setBOOL("Inventory.FoldersAlwaysByName", TRUE ); + sort_order_mask |= LLInventoryFilter::SO_FOLDERS_BY_NAME; } - getActivePanel()->setSortOrder( order ); } - else if (sort_field == "systemfolderstotop") + else if (sort_type == "systemfolderstotop") { - U32 order = getActivePanel()->getSortOrder(); - if ( order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP ) + if ( sort_order_mask & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP ) { - order &= ~LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; - - gSavedSettings.setBOOL("Inventory.SystemFoldersToTop", FALSE ); + sort_order_mask &= ~LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; } else { - order |= LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; - - gSavedSettings.setBOOL("Inventory.SystemFoldersToTop", TRUE ); + sort_order_mask |= LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; } - getActivePanel()->setSortOrder( order ); - - gSavedSettings.setU32("InventorySortOrder", order); } + + getActivePanel()->setSortOrder(sort_order_mask); + gSavedSettings.setU32("InventorySortOrder", sort_order_mask); } // static @@ -1022,6 +984,11 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) const LLSD arg = "date"; setSortBy(arg); } + if (command_name == "sort_folders_by_name") + { + const LLSD arg = "foldersalwaysbyname"; + setSortBy(arg); + } if (command_name == "sort_system_folders_to_top") { const LLSD arg = "systemfolderstotop"; @@ -1202,24 +1169,26 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata) { + U32 sort_order_mask = getActivePanel()->getSortOrder(); const std::string command_name = userdata.asString(); - if (command_name == "sort_by_name") { - U32 order = getActivePanel()->getSortOrder(); - return ~order & LLInventoryFilter::SO_DATE; + return ~sort_order_mask & LLInventoryFilter::SO_DATE; } if (command_name == "sort_by_recent") { - U32 order = getActivePanel()->getSortOrder(); - return order & LLInventoryFilter::SO_DATE; + return sort_order_mask & LLInventoryFilter::SO_DATE; + } + + if (command_name == "sort_folders_by_name") + { + return sort_order_mask & LLInventoryFilter::SO_FOLDERS_BY_NAME; } if (command_name == "sort_system_folders_to_top") { - U32 order = getActivePanel()->getSortOrder(); - return order & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; + return sort_order_mask & LLInventoryFilter::SO_SYSTEM_FOLDERS_TO_TOP; } return FALSE; diff --git a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml index 75600a93f6..5810cc21e7 100644 --- a/indra/newview/skins/default/xui/da/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/da/panel_preferences_sound.xml @@ -9,7 +9,7 @@ <slider label="Omgivelser" name="Wind Volume"/> <slider label="Lyd effekter" name="SFX Volume"/> <slider label="Musik" name="Music Volume"/> - <check_box label="Aktiveret" name="music_enabled"/> + <check_box label="Aktiveret" name="enable_music"/> <slider label="Media" name="Media Volume"/> <check_box label="Aktiveret" name="enable_media"/> <slider label="Stemme chat" name="Voice Volume"/> diff --git a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml index 26674ea594..0f029d8664 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_sound.xml @@ -9,7 +9,7 @@ <slider label="Umgebung" name="Wind Volume"/> <slider label="Soundeffekte" name="SFX Volume"/> <slider label="Musik wird gestreamt" name="Music Volume"/> - <check_box label="Aktiviert" name="music_enabled"/> + <check_box label="Aktiviert" name="enable_music"/> <slider label="Medien" name="Media Volume"/> <check_box label="Aktiviert" name="enable_media"/> <slider label="Voice-Chat" name="Voice Volume"/> diff --git a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml index 7fa4cd840a..d2519a5aa4 100644 --- a/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml +++ b/indra/newview/skins/default/xui/en/menu_inventory_gear_default.xml @@ -39,6 +39,17 @@ parameter="sort_by_recent" /> </menu_item_check> <menu_item_check + label="Sort Folders Always by Name" + layout="topleft" + name="sort_folders_by_name"> + <on_click + function="Inventory.GearDefault.Custom.Action" + parameter="sort_folders_by_name" /> + <on_check + function="Inventory.GearDefault.Check" + parameter="sort_folders_by_name" /> + </menu_item_check> + <menu_item_check label="Sort System Folders to Top" layout="topleft" name="sort_system_folders_to_top"> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml index f0ce8b849a..26af8dc29d 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml @@ -198,9 +198,12 @@ label="Enabled" layout="topleft" left_pad="5" - name="music_enabled" + name="enable_music" top_delta="2" - width="350"/> + width="350"> + <check_box.commit_callback + function="Pref.updateMediaAutoPlayCheckbox"/> + </check_box> <slider control_name="AudioLevelMedia" disabled_control="MuteAudio" @@ -245,7 +248,10 @@ top_delta="2" left_pad="5" name="enable_media" - width="110"/> + width="110"> + <check_box.commit_callback + function="Pref.updateMediaAutoPlayCheckbox"/> + </check_box> <slider control_name="AudioLevelVoice" disabled_control="MuteAudio" diff --git a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml index 7989100c09..6c4ab0f14f 100644 --- a/indra/newview/skins/default/xui/es/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/es/panel_preferences_sound.xml @@ -9,7 +9,7 @@ <slider label="Ambiental" name="Wind Volume"/> <slider label="Efectos de sonido" name="SFX Volume"/> <slider label="Música en streaming" name="Music Volume"/> - <check_box label="Activada" name="music_enabled"/> + <check_box label="Activada" name="enable_music"/> <slider label="Multimedia" name="Media Volume"/> <check_box label="Activada" name="enable_media"/> <slider label="Chat de voz" name="Voice Volume"/> diff --git a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml index 44c866a30f..48630918d7 100644 --- a/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/fr/panel_preferences_sound.xml @@ -9,7 +9,7 @@ <slider label="Ambiant" name="Wind Volume"/> <slider label="Effets sonores" name="SFX Volume"/> <slider label="Flux musical" name="Music Volume"/> - <check_box label="Activé" name="music_enabled"/> + <check_box label="Activé" name="enable_music"/> <slider label="Média" name="Media Volume"/> <check_box label="Activé" name="enable_media"/> <slider label="Chat vocal" name="Voice Volume"/> diff --git a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml index 2ddb226020..6e70a314c5 100644 --- a/indra/newview/skins/default/xui/it/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/it/panel_preferences_sound.xml @@ -6,7 +6,7 @@ <slider label="Ambiente" name="Wind Volume"/> <slider label="Effetti sonori" name="SFX Volume"/> <slider label="Musica in streaming" name="Music Volume"/> - <check_box label="Abilitato" name="music_enabled"/> + <check_box label="Abilitato" name="enable_music"/> <slider label="Multimediale" name="Media Volume"/> <check_box label="Abilitato" name="enable_media"/> <slider label="Chat vocale" name="Voice Volume"/> diff --git a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml index 4f29ae7b44..9fbbd46220 100644 --- a/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/ja/panel_preferences_sound.xml @@ -6,7 +6,7 @@ <slider label="風" name="Wind Volume"/> <slider label="効果音" name="SFX Volume"/> <slider label="ストリーミング音楽" name="Music Volume"/> - <check_box label="有効" name="music_enabled"/> + <check_box label="有効" name="enable_music"/> <slider label="メディア" name="Media Volume"/> <check_box label="有効" name="enable_media"/> <slider label="ボイスチャット" name="Voice Volume"/> diff --git a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml index c708cc0b99..ac93949a1b 100644 --- a/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/pl/panel_preferences_sound.xml @@ -9,7 +9,7 @@ <slider label="Otoczenie" name="Wind Volume"/> <slider label="Efekty dźwiękowe" name="SFX Volume"/> <slider label="Muzyka strumieniowa" name="Music Volume"/> - <check_box label="Odtwarzaj media audio" name="music_enabled"/> + <check_box label="Odtwarzaj media audio" name="enable_music"/> <slider label="Media" name="Media Volume"/> <check_box label="Odtwarzaj media" name="enable_media"/> <slider label="Komunikacja głosowa" name="Voice Volume"/> diff --git a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml index 60f51c33e5..3846bfb377 100644 --- a/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml +++ b/indra/newview/skins/default/xui/pt/panel_preferences_sound.xml @@ -9,7 +9,7 @@ <slider label="Ambiente" name="Wind Volume"/> <slider label="Efeitos sonoros" name="SFX Volume"/> <slider label="Streaming de música" name="Music Volume"/> - <check_box label="Ativado" name="music_enabled"/> + <check_box label="Ativado" name="enable_music"/> <slider label="Mídia" name="Media Volume"/> <check_box label="Ativado" name="enable_media"/> <slider label="Bate-papo de voz" name="Voice Volume"/> |