<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -187,9 +187,7 @@
 
 
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-  return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
-//	return (interfaceOrientation == UIInterfaceOrientationPortrait);
-//	return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
+  return [LatestChattyAppDelegate shouldAllowRotationTo:interfaceOrientation];
 }
 
 //- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation {</diff>
      <filename>Classes/ChattyViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -67,7 +67,7 @@
 }
 
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-	return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+	return [LatestChattyAppDelegate shouldAllowRotationTo:interfaceOrientation];
 }
 
 </diff>
      <filename>Classes/ComposeViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -41,7 +41,7 @@
 
 
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-  return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+  return [LatestChattyAppDelegate shouldAllowRotationTo:interfaceOrientation];
 }
 
 </diff>
      <filename>Classes/DetailViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -51,8 +51,7 @@
 
 
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-	// Return YES for supported orientations
-	return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+	return [LatestChattyAppDelegate shouldAllowRotationTo:interfaceOrientation];
 }
 
 </diff>
      <filename>Classes/ExternalWebViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@
 
 + (void)showErrorAlertNamed:(NSString *)name;
 + (NSString *)urlEscape:(NSString *)string;
++ (BOOL)shouldAllowRotationTo:(UIInterfaceOrientation)orientation;
 
 @property (nonatomic, retain) UIWindow *window;
 @property (nonatomic, retain) UINavigationController *navigationController;</diff>
      <filename>Classes/LatestChattyAppDelegate.h</filename>
    </modified>
    <modified>
      <diff>@@ -136,5 +136,15 @@
                       kCFStringEncodingUTF8);
 }
 
++ (BOOL)shouldAllowRotationTo:(UIInterfaceOrientation)orientation {
+  BOOL allowLandscape = [[NSUserDefaults standardUserDefaults] boolForKey:@&quot;rotation_allow_landscape&quot;];
+  
+  if (orientation == UIInterfaceOrientationPortraitUpsideDown)  return NO;
+  if (orientation == UIInterfaceOrientationPortrait) return YES;
+  if (allowLandscape) return YES;
+  
+  return NO;
+}
+
 
 @end</diff>
      <filename>Classes/LatestChattyAppDelegate.m</filename>
    </modified>
    <modified>
      <diff>@@ -136,8 +136,7 @@
 
 
 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
-	// Return YES for supported orientations
-	return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
+	return [LatestChattyAppDelegate shouldAllowRotationTo:interfaceOrientation];
 }
 
 </diff>
      <filename>Classes/NewsAdditions/RootViewController.m</filename>
    </modified>
    <modified>
      <diff>@@ -134,6 +134,22 @@
 		&lt;/dict&gt;
 		&lt;dict&gt;
 			&lt;key&gt;Title&lt;/key&gt;
+			&lt;string&gt;Allow Rotation&lt;/string&gt;
+			&lt;key&gt;Type&lt;/key&gt;
+			&lt;string&gt;PSGroupSpecifier&lt;/string&gt;
+		&lt;/dict&gt;
+		&lt;dict&gt;
+			&lt;key&gt;Type&lt;/key&gt;
+			&lt;string&gt;PSToggleSwitchSpecifier&lt;/string&gt;
+			&lt;key&gt;Title&lt;/key&gt;
+			&lt;string&gt;Landscape&lt;/string&gt;
+			&lt;key&gt;Key&lt;/key&gt;
+			&lt;string&gt;rotation_allow_landscape&lt;/string&gt;
+			&lt;key&gt;DefaultValue&lt;/key&gt;
+			&lt;true/&gt;
+		&lt;/dict&gt;
+		&lt;dict&gt;
+			&lt;key&gt;Title&lt;/key&gt;
 			&lt;string&gt;Server&lt;/string&gt;
 			&lt;key&gt;Type&lt;/key&gt;
 			&lt;string&gt;PSGroupSpecifier&lt;/string&gt;</diff>
      <filename>Settings.bundle/Root.plist</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ae8ec673b43f2d56d74d331e1e3534f896c52641</id>
    </parent>
  </parents>
  <author>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </author>
  <url>http://github.com/Squeegy/latest-chatty/commit/5709b7a781a69369ee8cadf4403a525058268771</url>
  <id>5709b7a781a69369ee8cadf4403a525058268771</id>
  <committed-date>2009-01-16T13:46:54-08:00</committed-date>
  <authored-date>2009-01-16T13:46:54-08:00</authored-date>
  <message>Added ability to turn of landscape autorotation.</message>
  <tree>cbfa0dc46c9ba210a9377b5c79f7d78a44e2496b</tree>
  <committer>
    <name>Alex Wayne</name>
    <email>alex@beautifulpixel.com</email>
  </committer>
</commit>
