Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #47 from blackberry-webworks/next-direction-portrait
Browse files Browse the repository at this point in the history
Pull Req: Replace DIRECTION_PORTRAIT to DIRECTION_NORTH
  • Loading branch information
dmateescu committed Feb 9, 2012
2 parents e491ea1 + 894ee8d commit 93368b7
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions framework/src/blackberry/web/widget/Widget.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ public Widget( WidgetConfig wConfig, String locationURI ) {
initialize();
_locationURI = locationURI;

// Set our orientation
WidgetConfigImpl configImpl = (WidgetConfigImpl) _wConfig;
if (configImpl.isOrientationDefined()) {
int direction;
if (configImpl.getOrientation() == 0) {
direction = net.rim.device.api.system.Display.DIRECTION_PORTRAIT;
} else {
direction = net.rim.device.api.system.Display.DIRECTION_LANDSCAPE;
}
net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections(direction);
}
// Set our orientation
WidgetConfigImpl configImpl = (WidgetConfigImpl) _wConfig;
if( configImpl.isOrientationDefined() ) {
int direction;
if( configImpl.getOrientation() == 0 ) {
direction = net.rim.device.api.system.Display.DIRECTION_NORTH;
} else {
direction = net.rim.device.api.system.Display.DIRECTION_LANDSCAPE;
}
net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections( direction );
}

// Create PageManager
PageManager pageManager = new PageManager( this, (WidgetConfigImpl) _wConfig );

Expand Down Expand Up @@ -143,9 +143,9 @@ public static void main( String[] args ) {
waitForStartupComplete();
}
Widget widget = makeWidget( args, wConfig );

widget.enterEventDispatcher();

MemoryMaid mm = MemoryMaid.getInstance();
if( mm != null ) {
mm.stop();
Expand Down

0 comments on commit 93368b7

Please sign in to comment.