rhodes 3.3.3.beta.3 → 3.3.3.beta.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Manifest.txt +16 -1
- data/Rakefile +77 -28
- data/doc/build.txt +5 -3
- data/doc/configuration.txt +13 -0
- data/doc/device-caps.txt +46 -27
- data/doc/rhom.txt +2 -2
- data/doc/test-log-debug.txt +6 -0
- data/doc/ui.txt +13 -0
- data/lib/build/jake.rb +11 -11
- data/lib/extensions/crypt/crypt/cbc.rb +5 -2
- data/lib/extensions/nfc/ext/nfc/platform/android/src/com/rhomobile/nfc/Nfc.java +14 -4
- data/lib/framework/rho/render.rb +17 -4
- data/lib/framework/rho/rho.rb +1 -1
- data/lib/framework/rho/rhocontroller.rb +11 -1
- data/lib/framework/rhomotoapi.rb +110 -0
- data/platform/android/Rhodes/jni/Android.mk +2 -5
- data/platform/android/Rhodes/jni/include/rhodes/JNIRhodes.h +1 -0
- data/platform/android/Rhodes/jni/include/rhodes/fileapi.h +38 -0
- data/platform/android/Rhodes/jni/src/callbacks.cpp +7 -26
- data/platform/android/Rhodes/jni/src/extmanager.cpp +4 -1
- data/platform/android/Rhodes/jni/src/fileapi.cpp +38 -14
- data/platform/android/Rhodes/jni/src/mapview.cpp +1 -2
- data/platform/android/Rhodes/jni/src/rhodesapp.cpp +10 -0
- data/platform/android/Rhodes/jni/src/rhodessystem.cpp +1 -1
- data/platform/android/Rhodes/jni/src/signature.cpp +1 -4
- data/platform/android/Rhodes/rhobundle.xml +1 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivity.java +11 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesActivityListener.java +4 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesApplication.java +26 -6
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/RhodesService.java +3 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/AbstractRhoExtension.java +70 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtData.java +3 -1
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtManager.java +21 -7
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/IRhoExtension.java +19 -10
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtDataImpl.java +8 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManager.java +18 -0
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerImpl.java +168 -31
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/file/RhoFileApi.java +46 -9
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/mainview/SimpleMainView.java +3 -2
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/Signature.java +27 -53
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/signature/SignatureView.java +27 -3
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/util/Utils.java +13 -14
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/webview/RhoWebViewClient.java +12 -5
- data/platform/android/build/RhodesSRC_build.files +2 -1
- data/platform/android/build/android.rake +48 -17
- data/platform/bb/RubyVM/src/com/xruby/runtime/lang/RubyAPI.java +1 -1
- data/platform/bb/rhodes/src/rhomobile/RhodesApplication.java +24 -3
- data/platform/iphone/Classes/AppManager/AppManager.m +1 -1
- data/platform/iphone/Classes/Camera/PickImageDelegate.m +27 -2
- data/platform/iphone/Classes/DateTimePickerDelegate.h +2 -0
- data/platform/iphone/Classes/DateTimePickerDelegate.m +85 -9
- data/platform/iphone/Classes/DateTimePickerViewController.h +21 -0
- data/platform/iphone/Classes/DateTimePickerViewController.m +75 -0
- data/platform/iphone/Classes/GeoLocation/LocationController.h +6 -2
- data/platform/iphone/Classes/GeoLocation/LocationController.m +54 -14
- data/platform/iphone/Classes/RhoMainView.h +2 -0
- data/platform/iphone/Classes/Rhodes.m +11 -5
- data/platform/iphone/Classes/Signature/SignatureDelegate.m +13 -12
- data/platform/iphone/Classes/Signature/SignatureViewController.m +2 -1
- data/platform/iphone/Classes/SimpleMainView.m +3 -0
- data/platform/iphone/Classes/SplitView/SplittedMainView.m +3 -0
- data/platform/iphone/Classes/TabbedMainView.m +30 -11
- data/platform/iphone/rbuild/iphone.rake +7 -1
- data/platform/iphone/rhorunner.xcodeproj/project.pbxproj +6 -0
- data/platform/shared/RhoConnectClient/RhoConnectClient.cpp +1 -1
- data/platform/shared/common/BundleManager.cpp +42 -2
- data/platform/shared/common/ExtManager.h +7 -0
- data/platform/shared/common/RhoFile.cpp +170 -2
- data/platform/shared/common/RhoFile.h +4 -0
- data/platform/shared/common/RhodesApp.cpp +30 -0
- data/platform/shared/common/RhodesApp.h +1 -0
- data/platform/shared/common/map/OSMMapEngine.cpp +11 -3
- data/platform/shared/common/map/OSMMapEngine.h +3 -0
- data/platform/shared/logging/RhoLogConf.cpp +8 -9
- data/platform/shared/logging/RhoLogConf.h +5 -7
- data/platform/shared/logging/RhoLogSink.cpp +3 -3
- data/platform/shared/logging/RhoLogSink.h +1 -1
- data/platform/shared/net/HttpServer.cpp +17 -9
- data/platform/shared/qt/rhodes/main.cpp +1 -1
- data/platform/shared/ruby/ext/rho/rhoruby.c +4 -0
- data/platform/shared/ruby/ext/webview/webview.i +9 -4
- data/platform/shared/ruby/ext/webview/webview_wrap.c +2 -2
- data/platform/shared/test/Tests.cpp +2 -2
- data/platform/wm/build/build_inf.js +75 -47
- data/platform/wm/build/wm.rake +50 -53
- data/platform/wm/rhodes/Rhodes.cpp +40 -97
- data/platform/wm/rhodes/rho/common/ExtManager.cpp +23 -1
- data/platform/wm/rhodes/rho/rubyext/WebView.cpp +9 -0
- data/platform/wm/tools/detool/detool.cpp +103 -52
- data/platform/wp7/RhoRubyExtGen/RhoDateTimePicker.cs +60 -0
- data/platform/wp7/RhoRubyExtGen/RhoRubyExtGen.csproj +1 -0
- data/platform/wp7/RhoRubyExtGen/RhoWebView.cs +4 -4
- data/platform/wp7/RhoRubyLib/Initializers.Generated.cs +15 -1
- data/platform/wp7/RhoRubyLib/RhoRubyLib.csproj +12 -2
- data/platform/wp7/RhoRubyLib/WP_PlatformAdaptationLayer.cs +2 -0
- data/platform/wp7/RhoRubyLib/common/RhoFile.cs +3 -3
- data/platform/wp7/RhoRubyLib/common/RhoFilePath.cs +2 -2
- data/platform/wp7/RhoRubyLib/common/RhodesApp.cs +39 -24
- data/platform/wp7/RhoRubyLib/json/RJSONTokener.cs +8 -1
- data/platform/wp7/RhoRubyLib/logging/RhoLogServerSink.cs +3 -3
- data/platform/wp7/RhoRubyLib/logging/RhoLogger.cs +1 -1
- data/platform/wp7/RhoRubyLib/net/HttpServer.cs +22 -15
- data/platform/wp7/RhoRubyLib/net/NetRequest.cs +1 -1
- data/platform/wp7/RhoRubyLib/rubyext/RhoDateTimePicker.cs +237 -0
- data/platform/wp7/RhoRubyLib/rubyext/RhoWebView.cs +5 -5
- data/platform/wp7/RhoRubyLib/views/RhoDateTimeDlg.xaml +37 -0
- data/platform/wp7/RhoRubyLib/views/RhoDateTimeDlg.xaml.cs +59 -0
- data/platform/wp7/RhoRubyLib/views/RhoView.xaml.cs +34 -41
- data/platform/wp7/rhodes/App.xaml.cs +1 -0
- data/platform/wp7/rhodes/Properties/WMAppManifest.xml +18 -18
- data/platform/wp7/rhodes/Rhodes.csproj +5 -1
- data/platform/wp7/rhodes/Toolkit.Content/ApplicationBar.Cancel.png +0 -0
- data/platform/wp7/rhodes/Toolkit.Content/ApplicationBar.Check.png +0 -0
- data/rakefile.rb +77 -28
- data/res/build-tools/Microsoft.Phone.Controls.Toolkit.dll +0 -0
- data/res/build-tools/YUICompressorLicense.txt +54 -0
- data/res/build-tools/detool.exe +0 -0
- data/res/build-tools/yuicompressor-2.4.7.jar +0 -0
- data/res/generators/templates/application/app/layout.erb +1 -0
- data/res/generators/templates/application/public/js/jquery-wp7-patch.js +8 -2
- data/res/generators/templates/application/public/js/syncengine.js +147 -0
- data/spec/phone_spec/app/Data/septest.json +1 -1
- data/spec/phone_spec/app/spec/asynchttp_spec.rb +11 -10
- data/spec/phone_spec/app/spec/blobsync_spec.rb +9 -34
- data/spec/phone_spec/app/spec/date_spec.rb +6 -6
- data/spec/phone_spec/app/spec/rho_spec.rb +1 -6
- data/spec/phone_spec/app/spec/rhofile_spec.rb +13 -7
- data/spec/phone_spec/app/spec/rhom_object_spec.rb +4 -3
- data/spec/phone_spec/app/spec/syncengine_spec.rb +12 -14
- data/spec/phone_spec/app/spec_runner.rb +9 -10
- data/version +1 -1
- metadata +20 -5
- data/platform/android/Rhodes/src/com/rhomobile/rhodes/extmanager/RhoExtManagerSingleton.java +0 -15
@@ -212,7 +212,7 @@ public class RubyAPI {
|
|
212
212
|
className = ((RubyClass)receiver).getName() + "::";
|
213
213
|
else
|
214
214
|
{
|
215
|
-
if ( receiver.getRubyClass() != null )
|
215
|
+
if ( receiver != null && receiver.getRubyClass() != null )
|
216
216
|
className = receiver.getRubyClass().getName() + ".";
|
217
217
|
}
|
218
218
|
|
@@ -99,6 +99,7 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
99
99
|
public static final String LABEL_CLOSE = "Close";
|
100
100
|
public static final String LABEL_EXIT = "Exit";
|
101
101
|
public static final String LABEL_NONE = "none";
|
102
|
+
public static final String LABEL_COPYPASTE = "copy_paste";
|
102
103
|
|
103
104
|
private static final RhoLogger LOG = RhoLogger.RHO_STRIP_LOG ? new RhoEmptyLogger() :
|
104
105
|
new RhoLogger("RhodesApplication");
|
@@ -507,7 +508,9 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
507
508
|
if ( ClientRegister.getInstance() != null )
|
508
509
|
ClientRegister.getInstance().Destroy();
|
509
510
|
|
510
|
-
|
511
|
+
if (!m_bInDeactivate)
|
512
|
+
RhoRuby.rho_ruby_deactivateApp();
|
513
|
+
|
511
514
|
RhoRuby.rho_ruby_uiDestroyed();
|
512
515
|
|
513
516
|
GeoLocation.stop();
|
@@ -565,6 +568,7 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
565
568
|
private static boolean m_bRubyInit = false;
|
566
569
|
public void activate()
|
567
570
|
{
|
571
|
+
m_bInDeactivate = false;
|
568
572
|
if (!m_bActivate)
|
569
573
|
rhodes_activate();
|
570
574
|
else
|
@@ -670,9 +674,11 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
670
674
|
}
|
671
675
|
}
|
672
676
|
|
677
|
+
boolean m_bInDeactivate = false;
|
673
678
|
public void deactivate() {
|
674
679
|
LOG.TRACE("Rhodes deactivate ***--------------------------***");
|
675
680
|
|
681
|
+
m_bInDeactivate = true;
|
676
682
|
RhoRuby.rho_ruby_deactivateApp();
|
677
683
|
|
678
684
|
// SyncEngine.stop(null);
|
@@ -839,7 +845,8 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
839
845
|
}
|
840
846
|
|
841
847
|
private Vector menuItems = new Vector();
|
842
|
-
|
848
|
+
private boolean m_bMenuCopyPaste = false;
|
849
|
+
|
843
850
|
private MenuItem homeItem = new MenuItem("", 200000, 10) {
|
844
851
|
public void run() {
|
845
852
|
navigateHome();
|
@@ -895,8 +902,11 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
895
902
|
super.makeMenu(menu, instance);
|
896
903
|
return;
|
897
904
|
}
|
905
|
+
//return;
|
906
|
+
|
907
|
+
if (!m_bMenuCopyPaste)
|
908
|
+
menu.deleteAll();
|
898
909
|
|
899
|
-
menu.deleteAll();
|
900
910
|
// Don't draw menu if menuItems is null
|
901
911
|
if (menuItems == null)
|
902
912
|
return;
|
@@ -955,6 +965,8 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
955
965
|
setDefaultItemToMenuItems(label, closeItem);
|
956
966
|
} else if (label.equalsIgnoreCase(RhodesApplication.LABEL_NONE)) {
|
957
967
|
menuItems = null;
|
968
|
+
} else if (value.equalsIgnoreCase(RhodesApplication.LABEL_COPYPASTE)) {
|
969
|
+
m_bMenuCopyPaste = true;
|
958
970
|
} else {
|
959
971
|
MenuItem itemToAdd = new MenuItem(label, 200000, 10)
|
960
972
|
{
|
@@ -1029,6 +1041,7 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
1029
1041
|
|
1030
1042
|
public void setMenuItems(Vector menuItems) {
|
1031
1043
|
this.menuItems = menuItems;
|
1044
|
+
m_bMenuCopyPaste = false;
|
1032
1045
|
}
|
1033
1046
|
|
1034
1047
|
public MenuItem getSavedGetLinkItem() {
|
@@ -1371,6 +1384,14 @@ final public class RhodesApplication extends RhodesApplicationPlatform implement
|
|
1371
1384
|
_mainScreen.close();
|
1372
1385
|
}
|
1373
1386
|
});
|
1387
|
+
|
1388
|
+
this.invokeLater(new Runnable() {
|
1389
|
+
public void run()
|
1390
|
+
{
|
1391
|
+
System.exit(1);
|
1392
|
+
}
|
1393
|
+
});
|
1394
|
+
|
1374
1395
|
}
|
1375
1396
|
|
1376
1397
|
boolean m_bDisableInput = false;
|
@@ -406,7 +406,7 @@ BOOL isPathIsSymLink(NSFileManager *fileManager, NSString* path) {
|
|
406
406
|
#endif
|
407
407
|
}
|
408
408
|
|
409
|
-
rho_logconf_Init_with_separate_user_path(rho_native_rhopath(), "", rho_native_rhouserpath());
|
409
|
+
rho_logconf_Init_with_separate_user_path(rho_native_rhopath(), rho_native_rhopath(), "", rho_native_rhouserpath());
|
410
410
|
rho_rhodesapp_create_with_separate_user_path(rho_native_rhopath(), rho_native_rhouserpath());
|
411
411
|
RAWLOG_INFO("Rhodes started");
|
412
412
|
}
|
@@ -485,10 +485,11 @@ VALUE get_camera_info(const char* camera_type) {
|
|
485
485
|
}
|
486
486
|
}
|
487
487
|
|
488
|
-
if ([platform
|
488
|
+
if ([platform hasPrefix:@"iPad1"]) {
|
489
489
|
// iPad
|
490
490
|
}
|
491
|
-
|
491
|
+
else
|
492
|
+
if ([platform hasPrefix:@"iPad2"]) {
|
492
493
|
// iPad 2
|
493
494
|
if (!isFront) {
|
494
495
|
w = 960;
|
@@ -498,6 +499,30 @@ VALUE get_camera_info(const char* camera_type) {
|
|
498
499
|
w = 640;
|
499
500
|
h = 480;
|
500
501
|
}
|
502
|
+
}
|
503
|
+
else
|
504
|
+
if ([platform hasPrefix:@"iPad3"]) {
|
505
|
+
// iPad 3
|
506
|
+
if (!isFront) {
|
507
|
+
w = 2592;
|
508
|
+
h = 1936;
|
509
|
+
}
|
510
|
+
else {
|
511
|
+
w = 640;
|
512
|
+
h = 480;
|
513
|
+
}
|
514
|
+
}
|
515
|
+
else
|
516
|
+
if ([platform hasPrefix:@"iPad"]) {
|
517
|
+
// iPad 3/4 ?
|
518
|
+
if (!isFront) {
|
519
|
+
w = 2592;
|
520
|
+
h = 1936;
|
521
|
+
}
|
522
|
+
else {
|
523
|
+
w = 640;
|
524
|
+
h = 480;
|
525
|
+
}
|
501
526
|
}
|
502
527
|
|
503
528
|
if ((w <= 0) || (h <= 0)) {
|
@@ -28,6 +28,7 @@
|
|
28
28
|
#import <Foundation/Foundation.h>
|
29
29
|
#import "RhoDelegate.h"
|
30
30
|
#import "DateTime.h"
|
31
|
+
#import "DateTimePickerViewController.h"
|
31
32
|
|
32
33
|
@interface DateTimePickerDelegate : RhoDelegate <UIPickerViewDelegate>
|
33
34
|
{
|
@@ -37,6 +38,7 @@
|
|
37
38
|
UIToolbar *toolbar;
|
38
39
|
UILabel *barLabel;
|
39
40
|
DateTime *dateTime;
|
41
|
+
DateTimePickerViewController* dt_controller;
|
40
42
|
}
|
41
43
|
|
42
44
|
@property (nonatomic, retain) DateTime *dateTime;
|
@@ -27,6 +27,8 @@
|
|
27
27
|
#import "DateTimePickerDelegate.h"
|
28
28
|
#import "common/RhodesApp.h"
|
29
29
|
#import "ruby/ext/rho/rhoruby.h"
|
30
|
+
#import "DateTimePickerViewController.h"
|
31
|
+
#import "Rhodes.h"
|
30
32
|
|
31
33
|
|
32
34
|
static NSString* ourChangeValueCallback = nil;
|
@@ -166,6 +168,20 @@ static NSString* ourChangeValueCallback = nil;
|
|
166
168
|
// Add toolbar to view
|
167
169
|
[self createPickerBar:pickerFrame];
|
168
170
|
|
171
|
+
|
172
|
+
//pickerFrame.origin.y = self.toolbar.frame.size.height;
|
173
|
+
|
174
|
+
CGRect totalrect = CGRectMake( parentFrame.origin.x,
|
175
|
+
parentFrame.origin.y + parentFrame.size.height - pickerSize.height - self.toolbar.frame.size.height,
|
176
|
+
pickerSize.width,
|
177
|
+
pickerSize.height + self.toolbar.frame.size.height);
|
178
|
+
|
179
|
+
|
180
|
+
[self.pickerView setFrame:pickerFrame];
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
/*
|
169
185
|
// Add picker to view
|
170
186
|
[parentView addSubview:self.pickerView];
|
171
187
|
|
@@ -181,22 +197,62 @@ static NSString* ourChangeValueCallback = nil;
|
|
181
197
|
self.pickerView.frame = pickerFrame;
|
182
198
|
|
183
199
|
[UIView commitAnimations];
|
200
|
+
*/
|
201
|
+
|
202
|
+
//parentFrame.origin.y += totalrect.size.height;
|
203
|
+
|
204
|
+
dt_controller = [[DateTimePickerViewController alloc] initWithRect:parentFrame];
|
205
|
+
|
206
|
+
[dt_controller makeTransparencyBackground];
|
207
|
+
|
208
|
+
[dt_controller.view addSubview:self.toolbar];
|
209
|
+
[dt_controller.view addSubview:self.barLabel];
|
210
|
+
[dt_controller.view addSubview:self.pickerView];
|
211
|
+
|
212
|
+
self.pickerView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
|
213
|
+
self.barLabel.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
|
214
|
+
self.toolbar.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth;
|
215
|
+
|
216
|
+
//[[[[Rhodes sharedInstance] mainView] getMainViewController] presentViewController:ctrl animated:YES completion:nil];
|
217
|
+
//[ctrl release];
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
[parentView addSubview:dt_controller.view];
|
222
|
+
|
223
|
+
CGRect startFrame = parentFrame;
|
224
|
+
startFrame.origin.y = parentFrame.origin.y + parentFrame.size.height - totalrect.size.height;
|
225
|
+
dt_controller.view.frame = startFrame;
|
226
|
+
|
227
|
+
[UIView beginAnimations:nil context:NULL];
|
228
|
+
[UIView setAnimationDuration:0.3];
|
229
|
+
|
230
|
+
[UIView setAnimationDelegate:self];
|
231
|
+
[UIView setAnimationDidStopSelector:@selector(slideUpDidStop)];
|
232
|
+
|
233
|
+
dt_controller.view.frame = parentFrame;
|
234
|
+
|
235
|
+
[UIView commitAnimations];
|
236
|
+
|
237
|
+
|
184
238
|
}
|
185
239
|
}
|
186
240
|
|
187
241
|
- (void)slideUpDidStop
|
188
242
|
{
|
189
243
|
// the date picker has finished sliding upwards, so add toolbar
|
190
|
-
[self.parentView addSubview:self.toolbar];
|
191
|
-
[self.parentView addSubview:self.barLabel];
|
244
|
+
//[self.parentView addSubview:self.toolbar];
|
245
|
+
//[self.parentView addSubview:self.barLabel];
|
246
|
+
[dt_controller makeGrayBacground];
|
192
247
|
[self.pickerView addTarget:self action:@selector(onChangeValue:) forControlEvents:UIControlEventValueChanged];
|
193
248
|
}
|
194
249
|
|
195
250
|
- (void)slideDownDidStop
|
196
251
|
{
|
197
252
|
// the date picker has finished sliding downwards, so remove it
|
198
|
-
[
|
199
|
-
[
|
253
|
+
[dt_controller.view removeFromSuperview];
|
254
|
+
[dt_controller release];
|
255
|
+
[self.pickerView release];
|
200
256
|
self.pickerView = nil;
|
201
257
|
[self.barLabel release];
|
202
258
|
self.barLabel = nil;
|
@@ -207,9 +263,11 @@ static NSString* ourChangeValueCallback = nil;
|
|
207
263
|
- (void)animateDown
|
208
264
|
{
|
209
265
|
CGRect parentFrame = parentView.frame;
|
210
|
-
CGRect endFrame =
|
211
|
-
endFrame.origin.y
|
266
|
+
CGRect endFrame = dt_controller.view.frame;
|
267
|
+
endFrame.origin.y += self.pickerView.frame.size.height + self.toolbar.frame.size.height;
|
212
268
|
// start the slide down animation
|
269
|
+
[dt_controller makeTransparencyBackground];
|
270
|
+
|
213
271
|
[UIView beginAnimations:nil context:NULL];
|
214
272
|
[UIView setAnimationDuration:0.3];
|
215
273
|
|
@@ -218,10 +276,10 @@ static NSString* ourChangeValueCallback = nil;
|
|
218
276
|
[UIView setAnimationDidStopSelector:@selector(slideDownDidStop)];
|
219
277
|
|
220
278
|
// Remove toolbar immediately
|
221
|
-
[self.barLabel removeFromSuperview];
|
222
|
-
[self.toolbar removeFromSuperview];
|
279
|
+
//[self.barLabel removeFromSuperview];
|
280
|
+
//[self.toolbar removeFromSuperview];
|
223
281
|
|
224
|
-
|
282
|
+
dt_controller.view.frame = endFrame;
|
225
283
|
[UIView commitAnimations];
|
226
284
|
}
|
227
285
|
|
@@ -235,6 +293,15 @@ static NSString* ourChangeValueCallback = nil;
|
|
235
293
|
[postUrl cStringUsingEncoding:[NSString defaultCStringEncoding]],
|
236
294
|
0, [self.dateTime.data cStringUsingEncoding:[NSString defaultCStringEncoding]], 1 );
|
237
295
|
[self animateDown];
|
296
|
+
/*
|
297
|
+
[[[[Rhodes sharedInstance] mainView] getMainViewController] dismissViewControllerAnimated:YES completion:nil];
|
298
|
+
[self.pickerView release];
|
299
|
+
self.pickerView = nil;
|
300
|
+
[self.barLabel release];
|
301
|
+
self.barLabel = nil;
|
302
|
+
[self.toolbar release];
|
303
|
+
self.toolbar = nil;
|
304
|
+
*/
|
238
305
|
}
|
239
306
|
|
240
307
|
- (IBAction)dateAction:(id)sender
|
@@ -252,6 +319,15 @@ static NSString* ourChangeValueCallback = nil;
|
|
252
319
|
ldate, [self.dateTime.data cStringUsingEncoding:[NSString defaultCStringEncoding]], 0 );
|
253
320
|
|
254
321
|
[self animateDown];
|
322
|
+
/*
|
323
|
+
[[[[Rhodes sharedInstance] mainView] getMainViewController] dismissViewControllerAnimated:YES completion:nil];
|
324
|
+
[self.pickerView release];
|
325
|
+
self.pickerView = nil;
|
326
|
+
[self.barLabel release];
|
327
|
+
self.barLabel = nil;
|
328
|
+
[self.toolbar release];
|
329
|
+
self.toolbar = nil;
|
330
|
+
*/
|
255
331
|
}
|
256
332
|
|
257
333
|
+(void)setChangeValueCallback:(NSString*)callback {
|
@@ -0,0 +1,21 @@
|
|
1
|
+
//
|
2
|
+
// DateTimePickerViewController.h
|
3
|
+
// rhorunner
|
4
|
+
//
|
5
|
+
// Created by Dmitry Soldatenkov on 02.03.12.
|
6
|
+
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import <UIKit/UIKit.h>
|
10
|
+
#import "RhoViewController.h"
|
11
|
+
|
12
|
+
@interface DateTimePickerViewController : RhoViewController {
|
13
|
+
CGRect myrect;
|
14
|
+
}
|
15
|
+
|
16
|
+
- (id)initWithRect:(CGRect)rect;
|
17
|
+
|
18
|
+
-(void)makeTransparencyBackground;
|
19
|
+
-(void)makeGrayBacground;
|
20
|
+
|
21
|
+
@end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
//
|
2
|
+
// DateTimePickerViewController.m
|
3
|
+
// rhorunner
|
4
|
+
//
|
5
|
+
// Created by Dmitry Soldatenkov on 02.03.12.
|
6
|
+
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
|
7
|
+
//
|
8
|
+
|
9
|
+
#import "DateTimePickerViewController.h"
|
10
|
+
|
11
|
+
@interface DateTimePickerViewController ()
|
12
|
+
|
13
|
+
@end
|
14
|
+
|
15
|
+
@implementation DateTimePickerViewController
|
16
|
+
|
17
|
+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
|
18
|
+
{
|
19
|
+
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
|
20
|
+
if (self) {
|
21
|
+
// Custom initialization
|
22
|
+
}
|
23
|
+
return self;
|
24
|
+
}
|
25
|
+
|
26
|
+
- (id)initWithRect:(CGRect)rect
|
27
|
+
{
|
28
|
+
self = [super initWithNibName:nil bundle:nil];
|
29
|
+
if (self) {
|
30
|
+
// Custom initialization
|
31
|
+
myrect = rect;
|
32
|
+
}
|
33
|
+
return self;
|
34
|
+
}
|
35
|
+
|
36
|
+
|
37
|
+
- (void)loadView
|
38
|
+
{
|
39
|
+
// If you create your views manually, you MUST override this method and use it to create your views.
|
40
|
+
// If you use Interface Builder to create your views, then you must NOT override this method.
|
41
|
+
UIView* v = [[UIView alloc] initWithFrame:myrect];
|
42
|
+
v.autoresizesSubviews = YES;
|
43
|
+
v.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
|
44
|
+
v.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0];
|
45
|
+
v.opaque = NO;
|
46
|
+
self.view = v;
|
47
|
+
}
|
48
|
+
|
49
|
+
-(void)makeTransparencyBackground
|
50
|
+
{
|
51
|
+
self.view.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0];
|
52
|
+
[self.view setNeedsDisplay];
|
53
|
+
}
|
54
|
+
|
55
|
+
-(void)makeGrayBacground
|
56
|
+
{
|
57
|
+
self.view.backgroundColor = [UIColor colorWithWhite:0.5 alpha:0.4];
|
58
|
+
[self.view setNeedsDisplay];
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
- (void)viewDidLoad
|
63
|
+
{
|
64
|
+
[super viewDidLoad];
|
65
|
+
// Do any additional setup after loading the view, typically from a nib.
|
66
|
+
}
|
67
|
+
|
68
|
+
- (void)viewDidUnload
|
69
|
+
{
|
70
|
+
[super viewDidUnload];
|
71
|
+
// Release any retained subviews of the main view.
|
72
|
+
}
|
73
|
+
|
74
|
+
|
75
|
+
@end
|
@@ -29,20 +29,24 @@
|
|
29
29
|
@interface LocationController : NSObject<CLLocationManagerDelegate> {
|
30
30
|
CLLocationManager* _locationManager;
|
31
31
|
CFRunLoopTimerRef _timer;
|
32
|
+
|
33
|
+
bool isErrorState;
|
32
34
|
|
33
35
|
@public
|
34
36
|
double _dLatitude, _dLongitude, _dAccuracy;
|
35
37
|
bool _bKnownPosition;
|
36
38
|
|
37
|
-
SEL onUpdateLocation;
|
39
|
+
//SEL onUpdateLocation;
|
38
40
|
}
|
39
41
|
|
40
42
|
@property (nonatomic, retain) CLLocationManager *_locationManager;
|
41
43
|
@property (assign) SEL onUpdateLocation;
|
42
44
|
|
43
|
-
- (void) initLocationManager;
|
45
|
+
- (void) initLocationManager:(NSObject*)param;
|
44
46
|
- (void) stop;
|
45
47
|
|
48
|
+
- (void)doUpdateLocation;
|
49
|
+
|
46
50
|
- (double) getLatitude;
|
47
51
|
- (double) getLongitude;
|
48
52
|
- (double) getAccuracy;
|