Beispiel #1
0
void LLPrefsChatImpl::apply()
{
	gSavedSettings.setS32("ChatFontSize", getChild<LLRadioGroup>("chat_font_size")->getSelectedIndex());
	gSavedSettings.setF32("ChatPersistTime", childGetValue("fade_chat_time").asReal());
	gSavedSettings.setS32("ConsoleMaxLines", childGetValue("max_chat_count"));

	gSavedSettings.setColor4("SystemChatColor", childGetValue("system"));
	gSavedSettings.setColor4("UserChatColor", childGetValue("user"));
	gSavedSettings.setColor4("AgentChatColor", childGetValue("agent"));
	gSavedSettings.setColor4("IMChatColor", childGetValue("im"));
	gSavedSettings.setColor4("ScriptErrorColor", childGetValue("script_error"));
	gSavedSettings.setColor4("ObjectChatColor", childGetValue("objects"));
	gSavedSettings.setColor4("llOwnerSayChatColor", childGetValue("owner"));
	gSavedSettings.setColor4("BackgroundChatColor", childGetValue("background"));

	gSavedSettings.setColor4("HTMLLinkColor", childGetValue("links"));
	LLTextEditor::setLinkColor(childGetValue("links"));

	gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check"));
	gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check"));
	gSavedSettings.setBOOL("ScriptErrorsAsChat", childGetValue("script_errors_as_chat"));
	gSavedSettings.setBOOL("UseChatBubbles", childGetValue("bubble_text_chat"));
	gSavedSettings.setBOOL("ChatFullWidth", childGetValue("chat_full_width_check"));
	gSavedSettings.setBOOL("CloseChatOnReturn", childGetValue("close_chat_on_return_check"));
	gSavedSettings.setBOOL("PlayTypingAnim", childGetValue("play_typing_animation"));

	gSavedSettings.setF32("ConsoleBackgroundOpacity", childGetValue("console_opacity").asReal());
	gSavedSettings.setF32("ChatBubbleOpacity", childGetValue("bubble_chat_opacity").asReal());

	gSavedSettings.setString("TranslateLanguage", childGetValue("translate_language_combobox"));
	gSavedSettings.setBOOL("TranslateChat", childGetValue("translate_chat"));

	refreshValues(); // member values become the official values and cancel becomes a no-op.
}
Beispiel #2
0
LLPrefsChatImpl::LLPrefsChatImpl()
	:	LLPanel(std::string("Chat Panel"))
{
	refreshValues(); // initialize member data from saved settings

	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_chat.xml");

	getChild<LLRadioGroup>("chat_font_size")->setSelectedIndex(gSavedSettings.getS32("ChatFontSize"));
	childSetValue("fade_chat_time", gSavedSettings.getF32("ChatPersistTime"));
	childSetValue("max_chat_count", gSavedSettings.getS32("ConsoleMaxLines"));

	getChild<LLColorSwatchCtrl>("system")->set(gSavedSettings.getColor4("SystemChatColor"));
	getChild<LLColorSwatchCtrl>("user")->set(gSavedSettings.getColor4("UserChatColor"));
	getChild<LLColorSwatchCtrl>("agent")->set(gSavedSettings.getColor4("AgentChatColor"));
	getChild<LLColorSwatchCtrl>("im")->set(gSavedSettings.getColor4("IMChatColor"));
	getChild<LLColorSwatchCtrl>("script_error")->set(gSavedSettings.getColor4("ScriptErrorColor"));
	getChild<LLColorSwatchCtrl>("objects")->set(gSavedSettings.getColor4("ObjectChatColor"));
	getChild<LLColorSwatchCtrl>("owner")->set(gSavedSettings.getColor4("llOwnerSayChatColor"));
	getChild<LLColorSwatchCtrl>("background")->set(gSavedSettings.getColor4("BackgroundChatColor"));
	getChild<LLColorSwatchCtrl>("links")->set(gSavedSettings.getColor4("HTMLLinkColor"));

	childSetValue("arrow_keys_move_avatar_check", gSavedSettings.getBOOL("ArrowKeysMoveAvatar"));
	childSetValue("show_timestamps_check", gSavedSettings.getBOOL("ChatShowTimestamps"));
	childSetValue("script_errors_as_chat", gSavedSettings.getBOOL("ScriptErrorsAsChat"));
 
	childSetValue("bubble_text_chat", gSavedSettings.getBOOL("UseChatBubbles"));
	childSetValue("chat_full_width_check", gSavedSettings.getBOOL("ChatFullWidth"));
	childSetValue("close_chat_on_return_check", gSavedSettings.getBOOL("CloseChatOnReturn"));
	childSetValue("play_typing_animation", gSavedSettings.getBOOL("PlayTypingAnim"));
	childSetValue("console_opacity", gSavedSettings.getF32("ConsoleBackgroundOpacity"));
	childSetValue("bubble_chat_opacity", gSavedSettings.getF32("ChatBubbleOpacity"));
	childSetValue("translate_language_combobox", 	gSavedSettings.getString("TranslateLanguage"));
	childSetValue("translate_chat", 	gSavedSettings.getBOOL("TranslateChat"));
}
// Update local copy so cancel has no effect
void LLPrefsAscentChat::apply()
{
    gSavedPerAccountSettings.setString("AscentInstantMessageResponse", childGetValue("im_response"));

    refreshValues();
    refresh();
}
Beispiel #4
0
LLPrefsAscentChat::LLPrefsAscentChat()
{
    LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_chat.xml");

    childSetCommitCallback("SpellBase", onSpellBaseComboBoxCommit, this);
    childSetAction("EmSpell_EditCustom", onSpellEditCustom, this);
    childSetAction("EmSpell_GetMore", onSpellGetMore, this);
    childSetAction("EmSpell_Add", onSpellAdd, this);
    childSetAction("EmSpell_Remove", onSpellRemove, this);

    childSetCommitCallback("time_format_combobox", onCommitTimeDate, this);
    childSetCommitCallback("date_format_combobox", onCommitTimeDate, this);

    childSetCommitCallback("AscentInstantMessageResponseAnyone", onCommitAutoResponse, this);
    childSetCommitCallback("AscentInstantMessageResponseFriends", onCommitAutoResponse, this);
    childSetCommitCallback("AscentInstantMessageResponseMuted", onCommitAutoResponse, this);
    childSetCommitCallback("AscentInstantMessageShowOnTyping", onCommitAutoResponse, this);
    childSetCommitCallback("AscentInstantMessageShowResponded", onCommitAutoResponse, this);
    childSetCommitCallback("AscentInstantMessageResponseRepeat", onCommitAutoResponse, this);
    childSetCommitCallback("AscentInstantMessageResponseItem", onCommitAutoResponse, this);

	if(sInst)delete sInst; sInst = this;
	LLView* target_view = getChild<LLView>("im_give_drop_target_rect");
	if (target_view)
	{
		const std::string drop="drop target";
		if (mObjectDropTarget)	delete mObjectDropTarget;
		mObjectDropTarget = new LLDropTarget(drop, target_view->getRect(), SinguIMResponseItemDrop);//, mAvatarID);
		addChild(mObjectDropTarget);
	}

	bool started = LLStartUp::getStartupState() == STATE_STARTED;
	if (started)
	{
		LLUUID itemid = (LLUUID)gSavedPerAccountSettings.getString("AscentInstantMessageResponseItemData");
		LLViewerInventoryItem* item = gInventory.getItem(itemid);

		if		(item)				childSetValue("im_give_disp_rect_txt","Currently set to: "+item->getName());
		else if (itemid.isNull())	childSetValue("im_give_disp_rect_txt","Currently not set");
		else 						childSetValue("im_give_disp_rect_txt","Currently set to an item not on this account");
	}
	else							childSetValue("im_give_disp_rect_txt","Not logged in");

    childSetCommitCallback("im_response", onCommitAutoResponse, this);

	childSetEnabled("reset_antispam", started);
	childSetCommitCallback("reset_antispam", onCommitResetAS, this);

    childSetCommitCallback("KeywordsOn", onCommitKeywords, this);
    childSetCommitCallback("KeywordsList", onCommitKeywords, this);
    childSetCommitCallback("KeywordsSound", onCommitKeywords, this);
    childSetCommitCallback("KeywordsInChat", onCommitKeywords, this);
    childSetCommitCallback("KeywordsInIM", onCommitKeywords, this);
    childSetCommitCallback("KeywordsChangeColor", onCommitKeywords, this);
    childSetCommitCallback("KeywordsColor", onCommitKeywords, this);
    childSetCommitCallback("KeywordsPlaySound", onCommitKeywords, this);

    refreshValues();
    refresh();
}
BOOL LLPanelAudioPrefs::postBuild()
{
	refreshValues(); // initialize member data from saved settings
	childSetLabelArg("currency_change_threshold", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());

	return TRUE;
}
BOOL LLPanelAudioPrefs::postBuild()
{
	refreshValues(); // initialize member data from saved settings
	childSetLabelArg("L$ Change Threshold", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
	childSetValue("mute_wind_check", !gSavedSettings.getBOOL("MuteWind"));

	return TRUE;
}
LLPrefsAscentChat::LLPrefsAscentChat()
{
    LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_chat.xml");

	getChild<LLUICtrl>("SpellBase")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellBaseComboBoxCommit, this, _2));
	getChild<LLUICtrl>("EmSpell_EditCustom")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellEditCustom, this));
	getChild<LLUICtrl>("EmSpell_GetMore")->setCommitCallback(boost::bind(&lggHunSpell_Wrapper::getMoreButton, glggHunSpell, this));
	getChild<LLUICtrl>("EmSpell_Add")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellAdd, this));
	getChild<LLUICtrl>("EmSpell_Remove")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onSpellRemove, this));

	getChild<LLUICtrl>("time_format_combobox")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitTimeDate, this, _1));
	getChild<LLUICtrl>("date_format_combobox")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitTimeDate, this, _1));

	bool started = (LLStartUp::getStartupState() == STATE_STARTED);
	if (!started) // Disable autoresponse when not logged in
	{
		LLView* autoresponse = getChildView("Autoresponse");
		autoresponse->setAllChildrenEnabled(false);
		autoresponse->setToolTip(LLTrans::getString("NotLoggedIn"));
	}

	// Saved per account settings aren't detected by control_name, therefore autoresponse controls get their values here and have them saved during apply.
	childSetValue("AscentInstantMessageResponseRepeat",  gSavedPerAccountSettings.getBOOL("AscentInstantMessageResponseRepeat"));
	childSetValue("AutoresponseAnyone",                  gSavedPerAccountSettings.getBOOL("AutoresponseAnyone"));
	childSetValue("AutoresponseAnyoneFriendsOnly",       gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneFriendsOnly"));
	childSetValue("AutoresponseAnyoneItem",              gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneItem"));
	childSetValue("AutoresponseAnyoneMessage",           gSavedPerAccountSettings.getString("AutoresponseAnyoneMessage"));
	childSetValue("AutoresponseAnyoneShow",              gSavedPerAccountSettings.getBOOL("AutoresponseAnyoneShow"));
	childSetValue("AutoresponseNonFriends",              gSavedPerAccountSettings.getBOOL("AutoresponseNonFriends"));
	childSetValue("AutoresponseNonFriendsItem",          gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsItem"));
	childSetValue("AutoresponseNonFriendsMessage",       gSavedPerAccountSettings.getString("AutoresponseNonFriendsMessage"));
	childSetValue("AutoresponseNonFriendsShow",          gSavedPerAccountSettings.getBOOL("AutoresponseNonFriendsShow"));
	childSetValue("AutoresponseMuted",                   gSavedPerAccountSettings.getBOOL("AutoresponseMuted"));
	childSetValue("AutoresponseMutedItem",               gSavedPerAccountSettings.getBOOL("AutoresponseMutedItem"));
	childSetValue("AutoresponseMutedMessage",            gSavedPerAccountSettings.getString("AutoresponseMutedMessage"));
	childSetValue("BusyModeResponse",                    gSavedPerAccountSettings.getString("BusyModeResponse"));
	childSetValue("BusyModeResponseItem",                gSavedPerAccountSettings.getBOOL("BusyModeResponseItem"));
	childSetValue("BusyModeResponseShow",                gSavedPerAccountSettings.getBOOL("BusyModeResponseShow"));

	childSetEnabled("reset_antispam", started);
	getChild<LLUICtrl>("reset_antispam")->setCommitCallback(boost::bind(NACLAntiSpamRegistry::purgeAllQueues));
	getChild<LLUICtrl>("enable_as")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitEnableAS, this, _2));
	getChild<LLUICtrl>("antispam_checkbox")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitDialogBlock, this, _1, _2));
	getChild<LLUICtrl>("Group Invites")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitDialogBlock, this, _1, _2));

	getChild<LLUICtrl>("KeywordsOn")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsList")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsSound")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsInChat")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsInIM")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsChangeColor")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsColor")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));
	getChild<LLUICtrl>("KeywordsPlaySound")->setCommitCallback(boost::bind(&LLPrefsAscentChat::onCommitKeywords, this, _1));

    refreshValues();
    refresh();
}
Beispiel #8
0
LLPrefsAscentSysImpl::LLPrefsAscentSysImpl()
 : LLPanel(std::string("Ascent"))
{
	LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");
	childSetCommitCallback("speed_rez_check", onCommitCheckBox, this);
	childSetCommitCallback("show_look_at_check", onCommitCheckBox, this);
	refreshValues();
	refresh();
}
// Update local copy so cancel has no effect
void LLPrefsAscentVan::apply()
{
    refreshValues();
    refresh();
	if (gAgentAvatarp) //check if we got inworld
	{
		gAgent.resetClientTag();
		gAgent.sendAgentSetAppearance();
	}
}
LLPrefsAscentVan::LLPrefsAscentVan()
{
    LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml");

	childSetVisible("announce_stream_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData());

	getChild<LLUICtrl>("tag_spoofing_combobox")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitClientTag, this, _1));

	getChild<LLUICtrl>("custom_tag_label_box")->setCommitCallback(boost::bind(&LLControlGroup::setString, boost::ref(gSavedSettings), "AscentCustomTagLabel", _2));

	getChild<LLUICtrl>("update_clientdefs")->setCommitCallback(boost::bind(LLPrefsAscentVan::onManualClientUpdate));

    refreshValues();
    refresh();
}
LLPrefsAscentSys::LLPrefsAscentSys()
{
    LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_system.xml");

    //General -----------------------------------------------------------------------------
	getChild<LLUICtrl>("show_look_at_check")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("power_user_check")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("power_user_confirm_check")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));

    //Command Line ------------------------------------------------------------------------
	commit_callback_t lineEditorControl(boost::bind(&LLControlGroup::setString, boost::ref(gSavedSettings), boost::bind(&LLUICtrl::getName, _1), _2));
	getChild<LLUICtrl>("AscentCmdLinePos")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineGround")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineHeight")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineTeleportHome")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineRezPlatform")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineCalc")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineClearChat")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineDrawDistance")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdTeleportToCam")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineKeyToName")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineOfferTp")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineMapTo")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AscentCmdLineTP2")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("SinguCmdLineAway")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("SinguCmdLineRegionSay")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AlchemyChatCommandResyncAnim")->setCommitCallback(lineEditorControl);
	getChild<LLUICtrl>("AlchemyChatCommandHoverHeight")->setCommitCallback(lineEditorControl);

	//Security ----------------------------------------------------------------------------
	getChild<LLUICtrl>("UISndRestart")->setCommitCallback(lineEditorControl);

	//Build -------------------------------------------------------------------------------
	getChild<LLUICtrl>("next_owner_copy")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("script_next_owner_copy")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("material")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitComboBox, this, _1, _2));
	getChild<LLUICtrl>("combobox shininess")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitComboBox, this, _1, _2));
	getChild<LLTextureCtrl>("texture control")->setDefaultImageAssetID(LLUUID(gSavedSettings.getString("EmeraldBuildPrefs_Texture")));
	getChild<LLUICtrl>("texture control")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitTexturePicker, this, _1));

	refreshValues();
    refresh();
}
LLPrefsAscentVan::LLPrefsAscentVan()
{
    LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml");

	childSetVisible("announce_stream_metadata", gAudiop && gAudiop->getStreamingAudioImpl() && gAudiop->getStreamingAudioImpl()->supportsMetaData());

	getChild<LLUICtrl>("tag_spoofing_combobox")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitClientTag, this, _1));

	getChild<LLUICtrl>("show_my_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("show_self_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("show_self_tag_color_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("customize_own_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("show_friend_tag_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));
	getChild<LLUICtrl>("use_status_check")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitCheckBox, this, _1, _2));

	getChild<LLUICtrl>("custom_tag_label_box")->setCommitCallback(boost::bind(&LLPrefsAscentVan::onCommitTextModified, this, _1, _2));

	getChild<LLUICtrl>("update_clientdefs")->setCommitCallback(boost::bind(LLPrefsAscentVan::onManualClientUpdate));

    refreshValues();
    refresh();
}
Beispiel #13
0
LLPrefsAscentVan::LLPrefsAscentVan()
{
    LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_ascent_vanity.xml");

    childSetCommitCallback("tag_spoofing_combobox", onCommitClientTag, this);

    childSetCommitCallback("show_my_tag_check", onCommitCheckBox, this);
    childSetCommitCallback("show_self_tag_check", onCommitCheckBox, this);
    childSetCommitCallback("show_self_tag_color_check", onCommitCheckBox, this);
    childSetCommitCallback("customize_own_tag_check", onCommitCheckBox, this);
    childSetCommitCallback("show_friend_tag_check", onCommitCheckBox, this);
    childSetCommitCallback("use_status_check", onCommitCheckBox, this);

    childSetCommitCallback("custom_tag_label_box", onCommitTextModified, this);

    childSetCommitCallback("X Modifier", onCommitUpdateAvatarOffsets);
    childSetCommitCallback("Y Modifier", onCommitUpdateAvatarOffsets);
    childSetCommitCallback("Z Modifier", onCommitUpdateAvatarOffsets);

    childSetAction("update_clientdefs", onManualClientUpdate, this);

    refreshValues();
    refresh();
}
void ConfigTaskWidget::onAutopilotConnect()
{
        enableControls(true);
        refreshValues();
}
void AMCurrentAmplifierCompositeView::refreshViewImplementation()
{
	refreshValues();
	refreshButtons();
}
Beispiel #16
0
void LLPrefsAscentSysImpl::apply()
{
	std::string short_date, long_date, short_time, long_time, timestamp;
	
	//General ------------------------------------------------------------------------------
	gSavedSettings.setBOOL("DoubleClickTeleport",		childGetValue("double_click_teleport_check"));
		gSavedSettings.setBOOL("OptionRotateCamAfterLocalTP",	childGetValue("center_after_teleport_check"));
		gSavedSettings.setBOOL("OptionOffsetTPByAgentHeight",	childGetValue("offset_teleport_check"));
	gSavedSettings.setBOOL("PreviewAnimInWorld",		childGetValue("preview_anim_in_world_check"));
	gSavedSettings.setBOOL("SaveScriptsAsMono",			childGetValue("save_scripts_as_mono_check"));
	gSavedSettings.setBOOL("AscentAlwaysRezInGroup",	childGetValue("always_rez_in_group_check"));
	//Disable Teleport Progress
	//Disable Logout progress
	//always show Build
	gSavedSettings.setBOOL("AscentFlyAlwaysEnabled",	childGetValue("always_fly_check"));
	//Disable camera minimum distance

	//Chat/IM ------------------------------------------------------------------------------
	//Use Vertical IMs
	//Script count
	//Missing the echo/log option.
	gSavedSettings.setBOOL("PlayTypingSound",			childGetValue("play_typing_sound_check"));
	gSavedSettings.setBOOL("AscentHideTypingNotification",	childGetValue("hide_typing_check"));
	gSavedSettings.setBOOL("AscentAllowMUpose",			childGetValue("allow_mu_pose_check"));
	gSavedSettings.setBOOL("AscentAutoCloseOOC",		childGetValue("close_ooc_check"));
	//gSavedSettings.setU32("LinksForChattingObjects",	childGetValue("objects_link").   );
	
	LLComboBox* combo = getChild<LLComboBox>("time_format_combobox");
	if (combo) {
		mTimeFormat = combo->getCurrentIndex();
	}

	combo = getChild<LLComboBox>("date_format_combobox");
	if (combo)
	{
		mDateFormat = combo->getCurrentIndex();
	}

	if (mTimeFormat == 0)
	{
		short_time = "%H:%M";
		long_time  = "%H:%M:%S";
		timestamp  = " %H:%M:%S";
	}
	else
	{
		short_time = "%I:%M %p";
		long_time  = "%I:%M:%S %p";
		timestamp  = " %I:%M %p";
	}

	if (mDateFormat == 0)
	{
		short_date = "%Y-%m-%d";
		long_date  = "%A %d %B %Y";
		timestamp  = "%a %d %b %Y" + timestamp;
	}
	else if (mDateFormat == 1)
	{
		short_date = "%d/%m/%Y";
		long_date  = "%A %d %B %Y";
		timestamp  = "%a %d %b %Y" + timestamp;
	}
	else
	{
		short_date = "%m/%d/%Y";
		long_date  = "%A, %B %d %Y";
		timestamp  = "%a %b %d %Y" + timestamp;
	}

	gSavedSettings.setString("ShortDateFormat",			short_date);
	gSavedSettings.setString("LongDateFormat",			long_date);
	gSavedSettings.setString("ShortTimeFormat",			short_time);
	gSavedSettings.setString("LongTimeFormat",			long_time);
	gSavedSettings.setString("TimestampFormat",			timestamp);

	gSavedSettings.setBOOL("SecondsInChatAndIMs",		childGetValue("seconds_in_chat_and_ims_check"));

	//Performance ----------------------------------------------------------------------------
	gSavedSettings.setBOOL("FetchInventoryOnLogin",		childGetValue("fetch_inventory_on_login_check"));
	gSavedSettings.setBOOL("WindEnabled",				childGetValue("enable_wind"));
	//Missing "Enabled Clouds"
	gSavedSettings.setBOOL("SpeedRez",					childGetValue("speed_rez_check"));
	gSavedSettings.setU32("SpeedRezInterval",			childGetValue("speed_rez_interval").asReal());
	
	//Commandline ----------------------------------------------------------------------------
	//Missing "Use Command Line"
	gSavedSettings.setString("AscentCmdLinePos",		childGetValue("AscentCmdLinePos"));
	gSavedSettings.setString("AscentCmdLineGround",		childGetValue("AscentCmdLineGround"));
	gSavedSettings.setString("AscentCmdLineHeight",		childGetValue("AscentCmdLineHeight"));
	gSavedSettings.setString("AscentCmdLineTeleportHome",	childGetValue("AscentCmdLineTeleportHome"));
	gSavedSettings.setString("AscentCmdLineRezPlatform",	childGetValue("AscentCmdLineRezPlatform"));
	//Platform Size
	gSavedSettings.setString("AscentCmdLineCalc",		childGetValue("AscentCmdLineCalc"));
	gSavedSettings.setString("AscentCmdLineClearChat",	childGetValue("AscentCmdLineClearChat"));
		//-------------------------------------------------------------------------------------
	gSavedSettings.setString("AscentCmdLineDrawDistance",	childGetValue("AscentCmdLineDrawDistance"));
	gSavedSettings.setString("AscentCmdTeleportToCam",		childGetValue("AscentCmdTeleportToCam"));
	gSavedSettings.setString("AscentCmdLineKeyToName",		childGetValue("AscentCmdLineKeyToName"));
	gSavedSettings.setString("AscentCmdLineOfferTp",		childGetValue("AscentCmdLineOfferTp"));
	gSavedSettings.setString("AscentCmdLineMapTo",			childGetValue("AscentCmdLineMapTo"));
	gSavedSettings.setBOOL("AscentMapToKeepPos",			childGetValue("AscentMapToKeepPos"));
	gSavedSettings.setString("AscentCmdLineTP2",			childGetValue("AscentCmdLineTP2"));
	

	//Privacy --------------------------------------------------------------------------------
	gSavedSettings.setBOOL("BroadcastViewerEffects",	childGetValue("broadcast_viewer_effects"));
	gSavedSettings.setBOOL("DisablePointAtAndBeam",		childGetValue("disable_point_at_and_beams_check"));
	gSavedSettings.setBOOL("PrivateLookAt",				childGetValue("private_look_at_check"));
	LLHUDEffectLookAt::sDebugLookAt						= childGetValue("show_look_at_check");
	gSavedSettings.setBOOL("RevokePermsOnStandUp",		childGetValue("revoke_perms_on_stand_up_check"));
	
	refreshValues();
}
// Update local copy so cancel has no effect
void LLPrefsAscentChat::apply()
{
    refreshValues();
    refresh();
}
// Update local copy so cancel has no effect
void LLPrefsAscentVan::apply()
{
    refreshValues();
    refresh();
}
ConfigInputWidget::ConfigInputWidget(QWidget *parent) : ConfigTaskWidget(parent)
{
    m_config = new Ui_InputWidget();
    m_config->setupUi(this);

    ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
    UAVObjectManager *objManager = pm->getObject<UAVObjectManager>();

	// First of all, put all the channel widgets into lists, so that we can
    // manipulate those:


	inMaxLabels << m_config->ch0Max
			<< m_config->ch1Max
			<< m_config->ch2Max
			<< m_config->ch3Max
			<< m_config->ch4Max
			<< m_config->ch5Max
			<< m_config->ch6Max
			<< m_config->ch7Max;

	inMinLabels << m_config->ch0Min
			<< m_config->ch1Min
			<< m_config->ch2Min
			<< m_config->ch3Min
			<< m_config->ch4Min
			<< m_config->ch5Min
			<< m_config->ch6Min
			<< m_config->ch7Min;

	inSliders << m_config->inSlider0
			  << m_config->inSlider1
			  << m_config->inSlider2
			  << m_config->inSlider3
			  << m_config->inSlider4
			  << m_config->inSlider5
			  << m_config->inSlider6
			  << m_config->inSlider7;

        inRevCheckboxes << m_config->ch0Rev
                        << m_config->ch1Rev
                        << m_config->ch2Rev
                        << m_config->ch3Rev
                        << m_config->ch4Rev
                        << m_config->ch5Rev
                        << m_config->ch6Rev
                        << m_config->ch7Rev;

        inChannelAssign << m_config->ch0Assign
                        << m_config->ch1Assign
                        << m_config->ch2Assign
                        << m_config->ch3Assign
                        << m_config->ch4Assign
                        << m_config->ch5Assign
                        << m_config->ch6Assign
                        << m_config->ch7Assign;

    // Now connect the widget to the ManualControlCommand / Channel UAVObject
    UAVDataObject* obj = dynamic_cast<UAVDataObject*>(objManager->getObject(QString("ManualControlCommand")));
    connect(obj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(updateChannels(UAVObject*)));

    // Register for ManualControlSettings changes:
    obj = dynamic_cast<UAVDataObject*>(objManager->getObject(QString("ManualControlSettings")));
    connect(obj,SIGNAL(objectUpdated(UAVObject*)),this,SLOT(refreshValues()));


    // Get the receiver types supported by OpenPilot and fill the corresponding
    // dropdown menu:
    obj = dynamic_cast<UAVDataObject*>(objManager->getObject(QString("ManualControlSettings")));
    UAVObjectField * field;
    // Fill in the dropdown menus for the channel RC Input assignement.
    QStringList channelsList;
        channelsList << "None";
    QList<UAVObjectField*> fieldList = obj->getFields();
    foreach (UAVObjectField* field, fieldList) {
        if (field->getUnits().contains("channel")) {
            channelsList.append(field->getName());
        }
    }

    m_config->ch0Assign->addItems(channelsList);
    m_config->ch1Assign->addItems(channelsList);
    m_config->ch2Assign->addItems(channelsList);
    m_config->ch3Assign->addItems(channelsList);
    m_config->ch4Assign->addItems(channelsList);
    m_config->ch5Assign->addItems(channelsList);
    m_config->ch6Assign->addItems(channelsList);
    m_config->ch7Assign->addItems(channelsList);

    // And the flight mode settings:
    field = obj->getField(QString("FlightModePosition"));
    m_config->fmsModePos1->addItems(field->getOptions());
    m_config->fmsModePos2->addItems(field->getOptions());
    m_config->fmsModePos3->addItems(field->getOptions());
    field = obj->getField(QString("Stabilization1Settings"));
    channelsList.clear();
    channelsList.append(field->getOptions());
    m_config->fmsSsPos1Roll->addItems(channelsList);
    m_config->fmsSsPos1Pitch->addItems(channelsList);
    m_config->fmsSsPos1Yaw->addItems(channelsList);
    m_config->fmsSsPos2Roll->addItems(channelsList);
    m_config->fmsSsPos2Pitch->addItems(channelsList);
    m_config->fmsSsPos2Yaw->addItems(channelsList);
    m_config->fmsSsPos3Roll->addItems(channelsList);
    m_config->fmsSsPos3Pitch->addItems(channelsList);
    m_config->fmsSsPos3Yaw->addItems(channelsList);

    // And the Armin configurations:
    field = obj->getField(QString("Arming"));
    m_config->armControl->clear();
    m_config->armControl->addItems(field->getOptions());


    connect(m_config->saveRCInputToSD, SIGNAL(clicked()), this, SLOT(saveRCInputObject()));
    connect(m_config->saveRCInputToRAM, SIGNAL(clicked()), this, SLOT(sendRCInputUpdate()));

    enableControls(false);
    refreshValues();
    connect(parent, SIGNAL(autopilotConnected()),this, SLOT(onAutopilotConnect()));
    connect(parent, SIGNAL(autopilotDisconnected()), this, SLOT(onAutopilotDisconnect()));

    connect(m_config->ch0Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->ch1Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->ch2Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->ch3Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->ch4Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->ch5Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->ch6Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->ch7Rev, SIGNAL(toggled(bool)), this, SLOT(reverseCheckboxClicked(bool)));
    connect(m_config->doRCInputCalibration,SIGNAL(stateChanged(int)),this,SLOT(updateTips(int)));
    firstUpdate = true;

    // Connect the help button
    connect(m_config->inputHelp, SIGNAL(clicked()), this, SLOT(openHelp()));
    updateTips(Qt::Unchecked);

}
void LLPanelAudioPrefs::apply()
{
	refreshValues();

	gSavedSettings.setBOOL("MuteWind", !(BOOL)(childGetValue("mute_wind_check").asBoolean()));
}
void LLPrefsAscentSysImpl::apply()
{
	std::string short_date, long_date, short_time, long_time, timestamp;
	
	//General ------------------------------------------------------------------------------
	gSavedSettings.setBOOL("DoubleClickTeleport",		childGetValue("double_click_teleport_check"));
		gSavedSettings.setBOOL("OptionRotateCamAfterLocalTP",	childGetValue("center_after_teleport_check"));
		gSavedSettings.setBOOL("OptionOffsetTPByAgentHeight",	childGetValue("offset_teleport_check"));
	gSavedSettings.setBOOL("PreviewAnimInWorld",		childGetValue("preview_anim_in_world_check"));
	gSavedSettings.setBOOL("SaveScriptsAsMono",			childGetValue("save_scripts_as_mono_check"));
	gSavedSettings.setBOOL("AscentAlwaysRezInGroup",	childGetValue("always_rez_in_group_check"));
	//Disable Teleport Progress
	//Disable Logout progress
	//always show Build
	gSavedSettings.setBOOL("AscentFlyAlwaysEnabled",	childGetValue("always_fly_check"));
	//Disable camera minimum distance
	gSavedSettings.setBOOL("AscentPowerfulWizard",		(childGetValue("power_user_check") && childGetValue("power_user_confirm_check")));
	if (gSavedSettings.getBOOL("AscentPowerfulWizard") && !mPowerUser)
	{
		LLVector3d lpos_global = gAgent.getPositionGlobal();
		gAudiop->triggerSound(LLUUID("58a38e89-44c6-c52b-deb8-9f1ddc527319"), gAgent.getID(), 1.0f, LLAudioEngine::AUDIO_TYPE_UI, lpos_global);
		LLChat chat;
		chat.mSourceType = CHAT_SOURCE_SYSTEM;
		chat.mText = llformat("You are bestowed with powers beyond mortal comprehension.\nUse your newfound abilities wisely.\nUnlocked:\n- Animation Priority up to 7 - Meant for animations that should override anything and everything at all times. DO NOT USE THIS FOR GENERAL ANIMATIONS.\n- Right click > Destroy objects - Permanently deletes an object immediately, when you don't feel like waiting for the server to respond.\n- Right Click > Explode objects - Turns and object physical, temporary, and delinks it.");
		LLFloaterChat::addChat(chat);
	}
		//
	//Chat/IM ------------------------------------------------------------------------------
	//Use Vertical IMs
	//Script count
	//Missing the echo/log option.
	gSavedSettings.setBOOL("PlayTypingSound",			childGetValue("play_typing_sound_check"));
	gSavedSettings.setBOOL("AscentHideTypingNotification",	childGetValue("hide_typing_check"));
	gSavedSettings.setBOOL("AscentInstantMessageAnnounceIncoming",	childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean());
	gSavedSettings.setBOOL("AscentAllowMUpose",			childGetValue("allow_mu_pose_check").asBoolean());
	gSavedSettings.setBOOL("AscentAutoCloseOOC",		childGetValue("close_ooc_check").asBoolean());
	//gSavedSettings.setU32("LinksForChattingObjects",	childGetValue("objects_link").   );
	
	LLComboBox* combo = getChild<LLComboBox>("time_format_combobox");
	if (combo) {
		mTimeFormat = combo->getCurrentIndex();
	}

	combo = getChild<LLComboBox>("date_format_combobox");
	if (combo)
	{
		mDateFormat = combo->getCurrentIndex();
	}

	if (mTimeFormat == 0)
	{
		short_time = "%H:%M";
		long_time  = "%H:%M:%S";
		timestamp  = " %H:%M:%S";
	}
	else
	{
		short_time = "%I:%M %p";
		long_time  = "%I:%M:%S %p";
		timestamp  = " %I:%M %p";
	}

	if (mDateFormat == 0)
	{
		short_date = "%Y-%m-%d";
		long_date  = "%A %d %B %Y";
		timestamp  = "%a %d %b %Y" + timestamp;
	}
	else if (mDateFormat == 1)
	{
		short_date = "%d/%m/%Y";
		long_date  = "%A %d %B %Y";
		timestamp  = "%a %d %b %Y" + timestamp;
	}
	else
	{
		short_date = "%m/%d/%Y";
		long_date  = "%A, %B %d %Y";
		timestamp  = "%a %b %d %Y" + timestamp;
	}

	gSavedSettings.setString("ShortDateFormat",			short_date);
	gSavedSettings.setString("LongDateFormat",			long_date);
	gSavedSettings.setString("ShortTimeFormat",			short_time);
	gSavedSettings.setString("LongTimeFormat",			long_time);
	gSavedSettings.setString("TimestampFormat",			timestamp);
	gSavedSettings.setBOOL("SecondsInChatAndIMs",		childGetValue("seconds_in_chat_and_ims_check").asBoolean());


	gSavedPerAccountSettings.setString("AscentInstantMessageResponse",			childGetValue("im_response").asString());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted",		childGetValue("AscentInstantMessageResponseMuted").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseFriends",		childGetValue("AscentInstantMessageResponseFriends").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseMuted",		childGetValue("AscentInstantMessageResponseMuted").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseAnyone",		childGetValue("AscentInstantMessageResponseAnyone").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowResponded",		childGetValue("AscentInstantMessageShowResponded").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageShowOnTyping",		childGetValue("AscentInstantMessageShowOnTyping").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseRepeat",		childGetValue("AscentInstantMessageResponseRepeat").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageResponseItem",		childGetValue("AscentInstantMessageResponseItem").asBoolean());
	gSavedPerAccountSettings.setBOOL("AscentInstantMessageAnnounceIncoming",	childGetValue("AscentInstantMessageAnnounceIncoming").asBoolean());

	//Performance ----------------------------------------------------------------------------
	gSavedSettings.setBOOL("FetchInventoryOnLogin",		childGetValue("fetch_inventory_on_login_check"));
	gSavedSettings.setBOOL("WindEnabled",				childGetValue("enable_wind"));
	gSavedSettings.setBOOL("CloudsEnabled",				childGetValue("enable_clouds"));
	gSavedSettings.setBOOL("SkyUseClassicClouds",		childGetValue("enable_classic_clouds"));
	gSavedSettings.setBOOL("SpeedRez",					childGetValue("speed_rez_check"));
	gSavedSettings.setU32("SpeedRezInterval",			childGetValue("speed_rez_interval").asReal());
	
	//Commandline ----------------------------------------------------------------------------
	//Missing "Use Command Line"
	gSavedSettings.setString("AscentCmdLinePos",		childGetValue("AscentCmdLinePos"));
	gSavedSettings.setString("AscentCmdLineGround",		childGetValue("AscentCmdLineGround"));
	gSavedSettings.setString("AscentCmdLineHeight",		childGetValue("AscentCmdLineHeight"));
	gSavedSettings.setString("AscentCmdLineTeleportHome",	childGetValue("AscentCmdLineTeleportHome"));
	gSavedSettings.setString("AscentCmdLineRezPlatform",	childGetValue("AscentCmdLineRezPlatform"));
	//Platform Size
	gSavedSettings.setString("AscentCmdLineCalc",		childGetValue("AscentCmdLineCalc"));
	gSavedSettings.setString("AscentCmdLineClearChat",	childGetValue("AscentCmdLineClearChat"));
		//-------------------------------------------------------------------------------------
	gSavedSettings.setString("AscentCmdLineDrawDistance",	childGetValue("AscentCmdLineDrawDistance"));
	gSavedSettings.setString("AscentCmdTeleportToCam",		childGetValue("AscentCmdTeleportToCam"));
	gSavedSettings.setString("AscentCmdLineKeyToName",		childGetValue("AscentCmdLineKeyToName"));
	gSavedSettings.setString("AscentCmdLineOfferTp",		childGetValue("AscentCmdLineOfferTp"));
	gSavedSettings.setString("AscentCmdLineMapTo",			childGetValue("AscentCmdLineMapTo"));
	gSavedSettings.setBOOL("AscentMapToKeepPos",			childGetValue("AscentMapToKeepPos"));
	gSavedSettings.setString("AscentCmdLineTP2",			childGetValue("AscentCmdLineTP2"));
	

	//Privacy --------------------------------------------------------------------------------
	gSavedSettings.setBOOL("BroadcastViewerEffects",	childGetValue("broadcast_viewer_effects"));
	gSavedSettings.setBOOL("DisablePointAtAndBeam",		childGetValue("disable_point_at_and_beams_check"));
	gSavedSettings.setBOOL("PrivateLookAt",				childGetValue("private_look_at_check"));
	LLHUDEffectLookAt::sDebugLookAt						= childGetValue("show_look_at_check");
	gSavedSettings.setBOOL("RevokePermsOnStandUp",		childGetValue("revoke_perms_on_stand_up_check"));
	gSavedSettings.setBOOL("DisableClickSit",			childGetValue("disable_click_sit_check"));
	
	refreshValues();
	refresh();
}
BOOL LLPanelAudioPrefs::postBuild()
{
	refreshValues(); // initialize member data from saved settings
	return TRUE;
}