Skip to content

Commit

Permalink
Fixed Present Full Screen minimize 20110203
Browse files Browse the repository at this point in the history
  • Loading branch information
realwatcm committed Feb 3, 2011
1 parent 2266671 commit 0a9bb99
Show file tree
Hide file tree
Showing 7 changed files with 194 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public class ChatMessageRecorder implements IChatRoomListener {
private String curFileName = "PublicChatMessageRecorded-" ;
private String curDir ;
private UserMessageRecorder objUser ;
private String dPath = "/tmp/" ;


String name = "CHATRECORDER";
Expand All @@ -78,18 +79,18 @@ public class ChatMessageRecorder implements IChatRoomListener {
; __date__ : PTS: Description
;
******************************************************************************/
public ChatMessageRecorder(ISharedObject so, String lDir) {
public ChatMessageRecorder(ISharedObject so, String dir) {
log.debug("ChatMessageRecorder Constructor...");
// check whether the input parameter is null or not
if ( (null == so) || (null == lDir) ){
if ( (null == so) || (null == dir) ){
log.debug("The SO parameter is null");
}


boolean success = false ;

this.so = so;
this.curDir = "/tmp/" + lDir ;
this.curDir = this.dPath + dir ;

success = (new File(curDir)).mkdir() ;

Expand Down Expand Up @@ -246,11 +247,7 @@ public void setRecordStatus(String userid, String username, boolean status){
log.debug("Null parameter");
return ;
}

log.debug("setRecordStatus Setting record {}",status);
log.debug("setRecordStatus Setting username {}",username);
log.debug("setRecordStatus Setting userid {}",userid);


if ( null != objUser ){
log.debug("Object Null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class PrivateChatMessageRecorder{
private String curDir ;
//private ArrayList<UserMessageRecorder> objUser = new ArrayList<UserMessageRecorder>() ;
private UserMessageRecorder objUser = new UserMessageRecorder() ;
private String dPath = "/tmp/" ;



Expand All @@ -72,7 +73,7 @@ public class PrivateChatMessageRecorder{
public PrivateChatMessageRecorder(String room) {
log.debug("PrivateChatMessageRecorder Constructor...");

this.curDir = "/tmp/" + room ;
this.curDir = this.dPath + room ;

}/** END FUNCTION 'PrivateChatMessageRecorder' **/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,6 @@
public function userJoined(user:User):void{
addParticipantToList(user.userid, user.name, user.role);
// realwat
var e:AddRecordUserEvent = new AddRecordUserEvent(AddRecordUserEvent.NEW_USER);
e.userid = user.userid ;
e.username = user.name ;
Expand All @@ -472,7 +471,6 @@
public function userLeft(user:User):void{
removeParticipantFromList(user.userid);
//realwat
var e:AddRecordUserEvent = new AddRecordUserEvent(AddRecordUserEvent.DEL_USER);
e.userid = user.userid;
globalDispatcher.dispatchEvent(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,6 @@ package org.bigbluebutton.modules.present.business {
},
// status - On error occurred
function(status:Object):void {
Alert.show('getUpdatePresenterViewDimension: fail');
LogUtil.error("Error occurred:");
for (var x:Object in status) {
LogUtil.error(x + " : " + status[x]);
Expand Down Expand Up @@ -789,7 +788,6 @@ package org.bigbluebutton.modules.present.business {
new Responder(
// On successful result
function(result:Object):void {
//Alert.show(String(isFullScreen));
sendFullScreenUpdateCommandCallback(isFullScreen);
},
// status - On error occurred
Expand Down Expand Up @@ -828,7 +826,6 @@ package org.bigbluebutton.modules.present.business {
new Responder(
// On successful result
function(result:Boolean):void {
//Alert.show(String(isFullScreen));
sendFullScreenUpdateCommandCallback(result);
},
// status - On error occurred
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,39 +136,6 @@
//the variable that hold the value for fixing the problem when enable the
// the presentation window full screen
private var isMinimized:Boolean = false;
private var tMinimize:Timer = null;
private var gCount:int = 0;
/*****************************************************************************
; setStatusToNormal
;----------------------------------------------------------------------------
; DESCRIPTION
; This routine is use to set the window status when the presenation window switch
; from minimize to full screen
;
; RETURNS
;
; INTERFACE NOTES
; INPUT
; t : TimerEvent
;
; IMPLEMENTATION
;
; HISTORY
; __date__ : PTS: Description
; 2011.01.27 Full screen Presentation
;
******************************************************************************/
private function setStatusToNormal(t:TimerEvent) : void {
if (2 == gCount){
tMinimize.stop();
gCount = 0;
tMinimize = null;
isMinimized = false;
}
gCount++;
}
/** END Function setStatusToNormal */
/*****************************************************************************
; maximizeHandler
Expand Down Expand Up @@ -197,8 +164,15 @@
// check the status when the window switch from minimize to normal.
if ( true == isMinimized && false == this.minimized ){
if(null == tMinimize){
tMinimize = new Timer(1000);
tMinimize.addEventListener(TimerEvent.TIMER, setStatusToNormal);
var tMinimize:Timer = new Timer(2000, 1);
tMinimize.addEventListener(TimerEvent.TIMER,
function(evt:TimerEvent):void{
isMinimized = false;
if(false == isPresenter){
dispatchEvent(new CenterSlideEvent(CenterSlideEvent.CENTER_SLIDE));
}
}
);
tMinimize.start();
}
return;
Expand Down Expand Up @@ -229,6 +203,7 @@
// set the viewer presentation window status
this.slideView.gIsViewerFullScreen = true;
dispatchEvent(new CenterSlideEvent(CenterSlideEvent.CENTER_SLIDE));
// share the view port the the viewer if is presenter.
if ( true == isPresenter ){
var event:PresenterViewEvent = new PresenterViewEvent(PresenterViewEvent.UPDATE_PRESENTER_VIEW_DIMENSION);
Expand All @@ -248,8 +223,14 @@
// _PTS_731_
ExternalInterface.call("showButton", false);
}
if ( true == slideView.gIsViewerFullScreen ){
// show view port when switch widnow form maximize
if ( false == isPresenter && true == this.slideView.gIsViewerFullScreen)
{
this.slideView.showViewPort();
}
if ( true == slideView.gIsViewerFullScreen){
this.slideView.gIsViewerFullScreen = false;
}
Expand All @@ -262,7 +243,6 @@
presentEvent.bottomRightY = this.height - CONTROL_BAR_HEIGHT - TOP_WINDOW_BORDER;
dispatchEvent(presentEvent);
}
if ( false == slideView.gIsPresenterFullScreen ) {
slideView.gIsFullScreen = false;
}
Expand Down Expand Up @@ -333,7 +313,9 @@
slideWidth = this.width - WIDTH_PADDING;
slideHeight = ((currentSlideHeight * slideWidth)/currentSlideWidth);
}
// check the presenter presentation window status
// set the viewer slide height to fit to the window when the presenter
// in full screen
if (true == slideView.gIsPresenterFullScreen){
slideHeight = this.height - CONTROL_BAR_HEIGHT - TOP_WINDOW_BORDER;
slideWidth = ((currentSlideWidth * slideHeight)/currentSlideHeight);
Expand Down Expand Up @@ -421,6 +403,13 @@
/** END Function : doSendPresenterDimension */
private function onKeyUp(event:KeyboardEvent):void{
// only presenter can presss key to change slide
if ( false == isPresenter )
{
return;
}
switch (event.keyCode) {
case Keyboard.LEFT:
case Keyboard.UP:
Expand Down Expand Up @@ -534,9 +523,10 @@
onResetZoom();
reinitWindowToDefaultSize();
//this.setFocus();
// dispatch event to display the presenter presentation view port in the viewer presentation window
dispatchEvent(new PresenterViewEvent(PresenterViewEvent.GET_PRESENTER_VIEW_DIMENSION));
// display the view port when the viewer login while the presenter in full screen.
dispatchEvent(new PresenterViewEvent(PresenterViewEvent.GET_PRESENTER_VIEW_DIMENSION));
}
private function displaySlideNavigationControls(show:Boolean):void {
Expand Down
Loading

0 comments on commit 0a9bb99

Please sign in to comment.