- apply config values to layout when it has been loaded

This commit is contained in:
Richard Alam 2011-10-04 23:36:22 -04:00
parent bfa964c821
commit b58908aafc
2 changed files with 12 additions and 15 deletions

View File

@ -37,8 +37,6 @@
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.core.BBB;
import org.bigbluebutton.core.EventBroadcaster;
import org.bigbluebutton.core.managers.ConfigManager2;
import org.bigbluebutton.main.events.BBBEvent;
import org.bigbluebutton.main.views.MainApplicationShell;
import org.bigbluebutton.util.i18n.ResourceUtil;
@ -201,17 +199,7 @@
return "true";
}
private var configMgr:ConfigManager2 = BBB.initConfigManager();
private function init():void {
EventBroadcaster.getInstance().addEventListener("configLoadedEvent", configLoadedEventHandler);
configMgr.loadConfig();
}
private function configLoadedEventHandler(e:Event):void {
LogUtil.debug("***** Config Loaded ****");
mainShell.initOptions();
}
]]>
</mx:Script>

View File

@ -58,7 +58,8 @@
import mx.core.FlexGlobals;
import mx.events.CloseEvent;
import mx.managers.PopUpManager;
import org.bigbluebutton.core.EventBroadcaster;
import org.bigbluebutton.core.managers.ConfigManager2;
import org.bigbluebutton.common.IBbbModuleWindow;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
@ -99,6 +100,7 @@
[Bindable] private var fullscreen_icon:Class = images.full_screen;
[Bindable] private var logs_icon:Class = images.table;
[Bindable] private var reset_layout_icon:Class = images.layout;
private var configMgr:ConfigManager2 = BBB.initConfigManager();
public function get mode():String {
return _mode;
@ -107,7 +109,7 @@
[Bindable]
private var layoutOptions:LayoutOptions = new LayoutOptions();
public function initOptions():void {
private function initOptions():void {
layoutOptions.showLogButton = BBB.initConfigManager().config.layout.showDebugWindow;
layoutOptions.showResetLayout = BBB.initConfigManager().config.layout.showResetLayout;
layoutOptions.showVideoLayout = BBB.initConfigManager().config.layout.showVideoLayout;
@ -118,6 +120,13 @@
protected function initializeShell():void {
globalDispatcher = new Dispatcher();
EventBroadcaster.getInstance().addEventListener("configLoadedEvent", configLoadedEventHandler);
configMgr.loadConfig();
}
private function configLoadedEventHandler(e:Event):void {
LogUtil.debug("***** Config Loaded ****");
initOptions();
}
protected function initFullScreen():void {