From 359f15190797617bd6329555b5387563d26dbaae Mon Sep 17 00:00:00 2001
From: Christophe Geuzaine <cgeuzaine@ulg.ac.be>
Date: Mon, 2 Jun 2014 19:56:49 +0000
Subject: [PATCH] pp

---
 contrib/mobile/iOS/Onelab/Parameter.h         | 29 +++++++++----------
 contrib/mobile/iOS/Onelab/Parameter.mm        | 17 +++++------
 .../iOS/Onelab/ParametersViewController.mm    |  4 ++-
 3 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/contrib/mobile/iOS/Onelab/Parameter.h b/contrib/mobile/iOS/Onelab/Parameter.h
index f613486eb9..6fd94dfd34 100644
--- a/contrib/mobile/iOS/Onelab/Parameter.h
+++ b/contrib/mobile/iOS/Onelab/Parameter.h
@@ -5,9 +5,9 @@
 
 @interface Parameter : NSObject
 {
-    @protected
-    NSString *name;
-    UILabel *label;
+@protected
+  NSString *name;
+  UILabel *label;
 }
 -(id)init;
 -(void)setFrame:(CGRect)frame;
@@ -21,18 +21,17 @@
 
 @interface ParameterStringList : Parameter <UIActionSheetDelegate>
 {
-    @protected
-    UIButton *button;
+@protected
+  UIButton *button;
 }
 -(id)initWithString:(onelab::string)string;
 -(UIPickerView *)getUIView;
 @end
 
-
 @interface ParameterNumberList : Parameter <UIActionSheetDelegate>
 {
-    @protected
-	UIButton *button;
+@protected
+  UIButton *button;
 }
 -(id)initWithNumber:(onelab::number)number;
 -(UITextField *)getUIView;
@@ -40,8 +39,8 @@
 
 @interface ParameterNumberCheckbox : Parameter
 {
-    @protected
-    UISwitch *checkbox;
+@protected
+  UISwitch *checkbox;
 }
 -(id)initWithNumber:(onelab::number)number;
 -(UISwitch *)getCheckbox;
@@ -49,8 +48,8 @@
 
 @interface ParameterNumberStepper : Parameter
 {
-	@protected
-	UIStepper *stepper;
+@protected
+  UIStepper *stepper;
 }
 -(id)initWithNumber:(onelab::number)number;
 -(UIStepper *)getStepper;
@@ -58,8 +57,8 @@
 
 @interface ParameterNumberRange : Parameter
 {
-    @protected
-    UISlider *slider;
+@protected
+  UISlider *slider;
 }
 -(id)initWithNumber:(onelab::number)number;
 -(UISlider *)getSlider;
@@ -68,7 +67,7 @@
 @interface ParameterNumberTextbox : Parameter <UITextFieldDelegate>
 {
 @protected
-    UITextField *textbox;
+  UITextField *textbox;
 }
 -(id)initWithNumber:(onelab::number)number;
 -(UITextField *)getTextbox;
diff --git a/contrib/mobile/iOS/Onelab/Parameter.mm b/contrib/mobile/iOS/Onelab/Parameter.mm
index a5a6d52ce6..bea64cce0f 100644
--- a/contrib/mobile/iOS/Onelab/Parameter.mm
+++ b/contrib/mobile/iOS/Onelab/Parameter.mm
@@ -48,15 +48,14 @@
 -(id) initWithString:(onelab::string)string
 {
   self = [super init];
-  if(self)
-    {
-      label.alpha = (string.getReadOnly())? 0.439216f : 1.0f;
-      [label setText:[NSString stringWithCString:string.getShortName().c_str() encoding:[NSString defaultCStringEncoding]]];
-      name = [NSString stringWithCString:string.getName().c_str() encoding:[NSString defaultCStringEncoding]];
-      button = [UIButton buttonWithType:UIButtonTypeSystem];
-      [button addTarget:self action:@selector(selectValue) forControlEvents:UIControlEventTouchDown];
-      [button setTitle:[NSString stringWithFormat:@"%s", string.getValue().c_str()] forState:UIControlStateNormal];
-    }
+  if(self){
+    label.alpha = (string.getReadOnly())? 0.439216f : 1.0f;
+    [label setText:[NSString stringWithCString:string.getShortName().c_str() encoding:[NSString defaultCStringEncoding]]];
+    name = [NSString stringWithCString:string.getName().c_str() encoding:[NSString defaultCStringEncoding]];
+    button = [UIButton buttonWithType:UIButtonTypeSystem];
+    [button addTarget:self action:@selector(selectValue) forControlEvents:UIControlEventTouchDown];
+    [button setTitle:[NSString stringWithFormat:@"%s", string.getValue().c_str()] forState:UIControlStateNormal];
+  }
   return self;
 }
 -(void)selectValue
diff --git a/contrib/mobile/iOS/Onelab/ParametersViewController.mm b/contrib/mobile/iOS/Onelab/ParametersViewController.mm
index f5da0e03d9..7b2c702a7f 100644
--- a/contrib/mobile/iOS/Onelab/ParametersViewController.mm
+++ b/contrib/mobile/iOS/Onelab/ParametersViewController.mm
@@ -194,7 +194,9 @@
       onelab::server::instance()->get(number,[[p getName] UTF8String]);
       std::vector<onelab::string> string;
       onelab::server::instance()->get(string,[[p getName] UTF8String]);
-      if((number.size() < 1 && string.size() < 1) || (number.size() > 0 && !number[0].getVisible()) || (string.size() > 0 && !string[0].getVisible())){
+      if((number.size() < 1 && string.size() < 1) ||
+         (number.size() > 0 && !number[0].getVisible()) ||
+         (string.size() > 0 && !string[0].getVisible())){
         [section removeObjectAtIndex:iparameter];
         [self removeParemeterNumberAtIndex:[NSIndexPath indexPathForRow:iparameter inSection:iSection]];
       }
-- 
GitLab