]> git.saurik.com Git - cydia.git/commitdiff
Fixed viewport and user agent.
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 13 Aug 2009 09:55:12 +0000 (09:55 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:13:58 +0000 (07:13 +0000)
Cydia.mm
UICaboodle/BrowserView.mm
control

index 239c58499ae32d0e2bf68ae2c5b485a44487f945..f00d4d71a6b3014e48e5a01e7cc6e6aaee3c8529 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -3810,17 +3810,18 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
         WebView *webview([webview_ webView]);
 
         Package *package([[Database sharedInstance] packageWithName:@"cydia"]);
+
         NSString *application = package == nil ? @"Cydia" : [NSString
             stringWithFormat:@"Cydia/%@",
             [package installed]
         ];
 
-        if (Product_ != nil)
-            application = [NSString stringWithFormat:@"%@ Version/%@", application, Product_];
-        if (Build_ != nil)
-            application = [NSString stringWithFormat:@"%@ Mobile/%@", application, Build_];
         if (Safari_ != nil)
-            application = [NSString stringWithFormat:@"%@ Safari/%@", application, Safari_];
+            application = [NSString stringWithFormat:@"Safari/%@ %@", application, Safari_];
+        if (Build_ != nil)
+            application = [NSString stringWithFormat:@"Mobile/%@ %@", application, Build_];
+        if (Product_ != nil)
+            application = [NSString stringWithFormat:@"Version/%@ %@", application, Product_];
 
         [webview setApplicationNameForUserAgent:application];
     } return self;
index 30d837185151d9f657d70cfb98841728d1232cf6..5f984d1faebb6e59c98065372befb449d111f3a8 100644 (file)
@@ -1171,7 +1171,7 @@ UIActionSheet *mailAlertSheet = [[UIActionSheet alloc] initWithTitle:UCLocalize(
 }
 
 - (void) setViewportWidth:(float)width {
-    width_ = width ? width != 0 : [[self class] defaultWidth];
+    width_ = width != 0 ? width : [[self class] defaultWidth];
     [webview_ setViewportSize:CGSizeMake(width_, UIWebViewGrowsAndShrinksToFitHeight) forDocumentTypes:0x10];
 }
 
diff --git a/control b/control
index 0d4ffcd122861671e1458881536533c2e1be164e..67163fbe5da5e58e623e6d220b71d2ee283ee261 100644 (file)
--- a/control
+++ b/control
@@ -3,7 +3,7 @@ Priority: required
 Section: Packaging
 Maintainer: Jay Freeman (saurik) <saurik@saurik.com>
 Architecture: iphoneos-arm
-Version: 1.0.2987-1
+Version: 1.0.2988-1
 Replaces: com.sosiphone.addcydia
 Depends: apr-lib, apt7-lib, apt7-key, darwintools, pcre, shell-cmds, system-cmds
 Pre-Depends: dpkg (>= 1.14.25-8)