From 8cc774c58fa4c9d6f0973c4ec2fbf7df63405d22 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 27 Jun 2008 10:13:39 +0000 Subject: [PATCH] Fixes for 2.0. --- Cydia.mm | 40 +++++++++++++++++++++++++++++----------- makefile | 6 ++++-- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/Cydia.mm b/Cydia.mm index a773da84..22b64e58 100644 --- a/Cydia.mm +++ b/Cydia.mm @@ -4240,7 +4240,9 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$"); if (show) [animator performSelector:@selector(startAnimation:) withObject:animation afterDelay:delay]; +#ifndef __OBJC2__ [delegate_ showKeyboard:show]; +#endif } - (void) textFieldDidBecomeFirstResponder:(UITextField *)field { @@ -4310,12 +4312,22 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$"); [table_ setShouldHideHeaderInShortLists:NO]; [transition_ transition:0 toView:table_]; - CGRect cnfrect = {{1, 38}, {17, 18}}; + CGRect cnfrect = {{ +#ifdef __OBJC2__ + 6 + +#endif + 1, 38}, {17, 18}}; CGRect area; - area.origin.x = cnfrect.size.width + 15; + area.origin.x = cnfrect.origin.x + cnfrect.size.width + 14; area.origin.y = 30; - area.size.width = [self bounds].size.width - area.origin.x - 18; + + area.size.width = +#ifdef __OBJC2__ + 8 + +#endif + [self bounds].size.width - area.origin.x - 18; + area.size.height = [UISearchField defaultHeight]; field_ = [[UISearchField alloc] initWithFrame:area]; @@ -4325,9 +4337,14 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$"); CFRelease(font); [field_ setPlaceholder:@"Package Names & Descriptions"]; - [field_ setPaddingTop:5]; [field_ setDelegate:self]; +#ifdef __OBJC2__ + [field_ setPaddingTop:3]; +#else + [field_ setPaddingTop:5]; +#endif + #ifndef __OBJC2__ UITextTraits *traits = [field_ textTraits]; [traits setEditingDelegate:self]; @@ -4336,7 +4353,9 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$"); [traits setAutoCorrectionType:1]; #endif - accessory_ = [[UIView alloc] initWithFrame:CGRectMake(0, 6, 6 + cnfrect.size.width + 6 + area.size.width + 6, area.size.height + 30)]; + CGRect accrect = {{0, 6}, {6 + cnfrect.size.width + 6 + area.size.width + 6, area.size.height + 30}}; + + accessory_ = [[UIView alloc] initWithFrame:accrect]; [accessory_ addSubview:field_]; UIPushButton *configure = [[[UIPushButton alloc] initWithFrame:cnfrect] autorelease]; @@ -4454,11 +4473,7 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$"); [navbar_ setBarStyle:1]; CGRect ovrrect = [navbar_ bounds]; - ovrrect.size.height = ([UINavigationBar defaultSizeWithPrompt].height - [UINavigationBar defaultSize].height) -#ifdef __OBJC2__ - - 4 -#endif - ; + ovrrect.size.height = ([UINavigationBar defaultSizeWithPrompt].height - [UINavigationBar defaultSize].height); overlay_ = [[UIView alloc] initWithFrame:ovrrect]; @@ -4474,10 +4489,13 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$"); [indicator_ setStyle:style]; [overlay_ addSubview:indicator_]; - CGSize prmsize = {200, indsize.width}; + CGSize prmsize = {200, indsize.width + 4}; CGRect prmrect = {{ indoffset * 2 + indsize.width, +#ifdef __OBJC2__ + -1 + +#endif (ovrrect.size.height - prmsize.height) / 2 }, prmsize}; diff --git a/makefile b/makefile index 3491be4b..ee8fa99f 100644 --- a/makefile +++ b/makefile @@ -20,6 +20,8 @@ exec: exec.mm makefile Cydia: Cydia.mm ../uicaboodle.m/*.mm *.h makefile $(target)g++ -I../uicaboodle.m -fobjc-call-cxx-cdtors -g0 -O2 -Wall -Werror -o $@ $(filter %.mm,$^) -framework UIKit -framework IOKit -framework CoreFoundation -framework Foundation -framework CoreGraphics -framework GraphicsServices $(frameworks) -lobjc -lapt-pkg -lpcre -fobjc-exceptions -I/apl/i20 -F"$${PKG_ROOT}"/System/Library/PrivateFrameworks - #CODESIGN_ALLOCATE=$$(which "$(target)codesign_allocate") /apl/tel/util/ldid -S Cydia -.PHONY: all clean +sign: Cydia + CODESIGN_ALLOCATE=$$(which "$(target)codesign_allocate") /apl/tel/util/ldid -S Cydia + +.PHONY: all clean sign -- 2.45.2