Merge lp:~aaronbrethorst-deactivatedaccount/ubuntuone-ios-client/settings-redesign into lp:ubuntuone-ios-client
- settings-redesign
- Merge into trunk
Proposed by
Aaron Brethorst
Status: | Merged |
---|---|
Approved by: | Zachery Bir |
Approved revision: | 31 |
Merged at revision: | 31 |
Proposed branch: | lp:~aaronbrethorst-deactivatedaccount/ubuntuone-ios-client/settings-redesign |
Merge into: | lp:ubuntuone-ios-client |
Diff against target: |
4025 lines (+207/-3380) 25 files modified
iPhoneApp/Info.plist (+3/-1) iPhoneApp/UI/include/AccountView.h (+10/-14) iPhoneApp/UI/include/CleanUpView.h (+0/-94) iPhoneApp/UI/include/ContactsSettingsView.h (+0/-76) iPhoneApp/UI/include/LogLevelView.h (+0/-55) iPhoneApp/UI/include/LogSettingsView.h (+0/-60) iPhoneApp/UI/include/LogView.h (+0/-52) iPhoneApp/UI/include/LoginManager.h (+0/-54) iPhoneApp/UI/include/MainSingleView.h (+1/-1) iPhoneApp/UI/include/RecoverSyncMethodsView.h (+0/-51) iPhoneApp/UI/include/RecoverView.h (+0/-79) iPhoneApp/UI/include/SettingsSingleView.h (+0/-74) iPhoneApp/UI/src/AccountView.mm (+182/-146) iPhoneApp/UI/src/CleanUpView.mm (+0/-340) iPhoneApp/UI/src/ContactsSettingsView.mm (+0/-388) iPhoneApp/UI/src/LogLevelView.mm (+0/-231) iPhoneApp/UI/src/LogSettingsView.mm (+0/-357) iPhoneApp/UI/src/LogView.mm (+0/-120) iPhoneApp/UI/src/LoginManager.mm (+0/-59) iPhoneApp/UI/src/MainSingleView.mm (+9/-26) iPhoneApp/UI/src/RecoverSyncMethodsView.mm (+0/-65) iPhoneApp/UI/src/RecoverView.mm (+0/-339) iPhoneApp/UI/src/SettingsSingleView.mm (+0/-640) iPhoneApp/UI/src/UIController.mm (+0/-2) iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj (+2/-56) |
To merge this branch: | bzr merge lp:~aaronbrethorst-deactivatedaccount/ubuntuone-ios-client/settings-redesign |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Zachery Bir (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
Overhaul the settings experience. Make it far simpler than it was before, and remove several classes that we no longer need as a result.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'iPhoneApp/Default.png' |
2 | Binary files iPhoneApp/Default.png 2010-07-23 17:27:52 +0000 and iPhoneApp/Default.png 2010-08-20 00:36:44 +0000 differ |
3 | === modified file 'iPhoneApp/Default@2x.png' |
4 | Binary files iPhoneApp/Default@2x.png 2010-07-23 17:27:52 +0000 and iPhoneApp/Default@2x.png 2010-08-20 00:36:44 +0000 differ |
5 | === modified file 'iPhoneApp/Info.plist' |
6 | --- iPhoneApp/Info.plist 2010-07-23 17:27:52 +0000 |
7 | +++ iPhoneApp/Info.plist 2010-08-20 00:36:44 +0000 |
8 | @@ -18,7 +18,7 @@ |
9 | <string>Icon@2x.png</string> |
10 | </array> |
11 | <key>CFBundleIdentifier</key> |
12 | - <string>com.structlab.one.iphoneplugin</string> |
13 | + <string>com.ubuntu.one.iphoneplugin</string> |
14 | <key>CFBundleInfoDictionaryVersion</key> |
15 | <string>6.0</string> |
16 | <key>CFBundleName</key> |
17 | @@ -42,5 +42,7 @@ |
18 | </array> |
19 | </dict> |
20 | </array> |
21 | + <key>UIStatusBarStyle</key> |
22 | + <string>UIStatusBarStyleOpaqueBlack</string> |
23 | </dict> |
24 | </plist> |
25 | |
26 | === modified file 'iPhoneApp/UI/include/AccountView.h' |
27 | --- iPhoneApp/UI/include/AccountView.h 2010-08-04 19:38:11 +0000 |
28 | +++ iPhoneApp/UI/include/AccountView.h 2010-08-20 00:36:44 +0000 |
29 | @@ -47,13 +47,8 @@ |
30 | UITableViewCell* usernameParameter; |
31 | UITableViewCell* passwordParameter; |
32 | |
33 | - //AB 21 July 2010 - Add a 'Retrieve Creds Section' |
34 | UITableViewCell* credentialsButton; |
35 | - // |
36 | - |
37 | - UIActivityIndicatorView* activityIndicator; |
38 | - |
39 | - UIFont* small_font; |
40 | + UITableViewCell* aboutButton; |
41 | |
42 | bool showerror; |
43 | |
44 | @@ -61,16 +56,17 @@ |
45 | NSString* username; |
46 | NSString* password; |
47 | |
48 | - UIColor* funBlue; |
49 | - UIAlertView *animationAlert; |
50 | NSString* credentials; |
51 | + |
52 | + //Contact Sync |
53 | + NSString* syncValue; |
54 | + |
55 | + BOOL presentedModally; |
56 | } |
57 | -- (BOOL) isPortal; |
58 | +@property(nonatomic,assign) BOOL presentedModally; |
59 | +@property(nonatomic,retain) NSString *credentials; |
60 | +@property(nonatomic,retain) NSString *syncValue; |
61 | - (void) reload; |
62 | -- (void) startWaitingAnimation:(NSNotification *) aNotification ; |
63 | -- (void) stopWaitingAnimation:(NSNotification *) aNotification ; |
64 | -- (void) setCredentials:(NSString*)value; |
65 | -//AB 21 July 2010 - Add a 'Retrieve Creds Section' |
66 | - (void)loadCredentials; |
67 | -//- (void)alertView: (UIAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex; |
68 | +- (IBAction)close:(id)sender; |
69 | @end |
70 | |
71 | === removed file 'iPhoneApp/UI/include/CleanUpView.h' |
72 | --- iPhoneApp/UI/include/CleanUpView.h 2010-07-22 20:21:36 +0000 |
73 | +++ iPhoneApp/UI/include/CleanUpView.h 1970-01-01 00:00:00 +0000 |
74 | @@ -1,94 +0,0 @@ |
75 | -/* |
76 | - * Funambol is a mobile platform developed by Funambol, Inc. |
77 | - * Copyright (C) 2008 Funambol, Inc. |
78 | - * |
79 | - * This program is free software; you can redistribute it and/or modify it under |
80 | - * the terms of the GNU Affero General Public License version 3 as published by |
81 | - * the Free Software Foundation with the addition of the following permission |
82 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
83 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
84 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
85 | - * |
86 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
87 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
88 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
89 | - * details. |
90 | - * |
91 | - * You should have received a copy of the GNU Affero General Public License |
92 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
93 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
94 | - * MA 02110-1301 USA. |
95 | - * |
96 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
97 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
98 | - * |
99 | - * The interactive user interfaces in modified source and object code versions |
100 | - * of this program must display Appropriate Legal Notices, as required under |
101 | - * Section 5 of the GNU Affero General Public License version 3. |
102 | - * |
103 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
104 | - * version 3, these Appropriate Legal Notices must retain the display of the |
105 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
106 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
107 | - * the words "Powered by Funambol". |
108 | - */ |
109 | - |
110 | -#import <UIKit/UIKit.h> |
111 | - |
112 | - |
113 | -#import "common.h" |
114 | -#import "base/Log.h" |
115 | - |
116 | - |
117 | -@interface CleanUpView : UIViewController <UITableViewDelegate, UITableViewDataSource, UIAlertViewDelegate, UIActionSheetDelegate> { |
118 | - |
119 | - UITableView* cleanupTable; |
120 | - |
121 | - UIBarButtonItem * cleanupButton; |
122 | - |
123 | - UITableViewCell * descriptionCell; |
124 | - UITableViewCell * contactSyncCell; |
125 | - UISwitch* contactSync; |
126 | - |
127 | - UITableViewCell * calendarSyncCell; |
128 | - UISwitch* calendarSync; |
129 | - |
130 | - UITableViewCell * noteSyncCell; |
131 | - UISwitch* noteSync; |
132 | - |
133 | - NSMutableArray *menuList; |
134 | - |
135 | - UIFont* small_font; |
136 | - |
137 | - |
138 | - NSString* direction; |
139 | - |
140 | - UIAlertView* alert; |
141 | - |
142 | - int contactLastSync; |
143 | - |
144 | - bool clickedCleanup; |
145 | - bool firstmsgCleanup; |
146 | - bool notsyncedCleanup; |
147 | - bool contactFlag; |
148 | - bool calendarFlag; |
149 | - bool noteFlag; |
150 | - |
151 | - int heightRow; |
152 | -} |
153 | - |
154 | -- (id) init; |
155 | -- (void) dealloc; |
156 | -- (void) loadView; |
157 | -- (void) reload; |
158 | - |
159 | -- (void) contactSyncAction: (id)sender; |
160 | -- (void) cleanupAction: (id)sender; |
161 | - |
162 | -- (void) viewWillAppear:(BOOL)animated; |
163 | - |
164 | -- (bool) didClickCleanup; |
165 | -- (bool) getContactFlag; |
166 | -- (bool) getCalendarFlag; |
167 | -- (bool) getNoteFlag; |
168 | -@end |
169 | |
170 | === removed file 'iPhoneApp/UI/include/ContactsSettingsView.h' |
171 | --- iPhoneApp/UI/include/ContactsSettingsView.h 2010-07-22 20:21:36 +0000 |
172 | +++ iPhoneApp/UI/include/ContactsSettingsView.h 1970-01-01 00:00:00 +0000 |
173 | @@ -1,76 +0,0 @@ |
174 | -/* |
175 | - * Funambol is a mobile platform developed by Funambol, Inc. |
176 | - * Copyright (C) 2008 Funambol, Inc. |
177 | - * |
178 | - * This program is free software; you can redistribute it and/or modify it under |
179 | - * the terms of the GNU Affero General Public License version 3 as published by |
180 | - * the Free Software Foundation with the addition of the following permission |
181 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
182 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
183 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
184 | - * |
185 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
186 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
187 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
188 | - * details. |
189 | - * |
190 | - * You should have received a copy of the GNU Affero General Public License |
191 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
192 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
193 | - * MA 02110-1301 USA. |
194 | - * |
195 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
196 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
197 | - * |
198 | - * The interactive user interfaces in modified source and object code versions |
199 | - * of this program must display Appropriate Legal Notices, as required under |
200 | - * Section 5 of the GNU Affero General Public License version 3. |
201 | - * |
202 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
203 | - * version 3, these Appropriate Legal Notices must retain the display of the |
204 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
205 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
206 | - * the words "Powered by Funambol". |
207 | - */ |
208 | - |
209 | -#import <UIKit/UIKit.h> |
210 | - |
211 | - |
212 | -#import "common.h" |
213 | -#import "base/Log.h" |
214 | - |
215 | - |
216 | -@interface ContactsSettingsView : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
217 | - |
218 | - UITableView* contactsTable; |
219 | - |
220 | - UITableViewCell* contactSyncCell; |
221 | - UITableViewCell* syncWayCell; |
222 | - UITableViewCell* remoteURICell; |
223 | - UITableViewCell* pathCell; |
224 | - |
225 | - UILabel* syncWayLabel; |
226 | - |
227 | - NSString* syncValue; |
228 | - NSString* remoteURIValue; |
229 | - |
230 | - UISwitch* contactSync; |
231 | - UITextField* remoteURI; |
232 | - UISlider* path; |
233 | - NSMutableArray *menuList; |
234 | - |
235 | - UIFont* small_font; |
236 | - |
237 | - UITableViewCell * companyDirectoryCell; |
238 | - UISwitch * companyDirectory; |
239 | - |
240 | - UIColor* funBlue; |
241 | - |
242 | -} |
243 | -- (id)init; |
244 | -- (void)dealloc; |
245 | -- (void) reload; |
246 | -- (void) pathAction: (id)sender; |
247 | -- (void) remoteURIAction: (id)sender; |
248 | -- (void) contactSyncAction: (id)sender; |
249 | -@end |
250 | |
251 | === removed file 'iPhoneApp/UI/include/LogLevelView.h' |
252 | --- iPhoneApp/UI/include/LogLevelView.h 2010-07-22 20:21:36 +0000 |
253 | +++ iPhoneApp/UI/include/LogLevelView.h 1970-01-01 00:00:00 +0000 |
254 | @@ -1,55 +0,0 @@ |
255 | -/* |
256 | - * Funambol is a mobile platform developed by Funambol, Inc. |
257 | - * Copyright (C) 2008 Funambol, Inc. |
258 | - * |
259 | - * This program is free software; you can redistribute it and/or modify it under |
260 | - * the terms of the GNU Affero General Public License version 3 as published by |
261 | - * the Free Software Foundation with the addition of the following permission |
262 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
263 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
264 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
265 | - * |
266 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
267 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
268 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
269 | - * details. |
270 | - * |
271 | - * You should have received a copy of the GNU Affero General Public License |
272 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
273 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
274 | - * MA 02110-1301 USA. |
275 | - * |
276 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
277 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
278 | - * |
279 | - * The interactive user interfaces in modified source and object code versions |
280 | - * of this program must display Appropriate Legal Notices, as required under |
281 | - * Section 5 of the GNU Affero General Public License version 3. |
282 | - * |
283 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
284 | - * version 3, these Appropriate Legal Notices must retain the display of the |
285 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
286 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
287 | - * the words "Powered by Funambol". |
288 | - */ |
289 | - |
290 | -#import <UIKit/UIKit.h> |
291 | - |
292 | -#import "common.h" |
293 | -#import "base/Log.h" |
294 | - |
295 | -@interface LogLevelView : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
296 | - |
297 | - UITableView* logTable; |
298 | - |
299 | - UITableViewCell* infoCell; |
300 | - UITableViewCell* debugCell; |
301 | - UITableViewCell* errorCell; |
302 | -} |
303 | -- (id)init; |
304 | -- (void)reload; |
305 | -- (void) dealloc; |
306 | -- (void)infoAction:(id)sender; |
307 | -- (void)errorAction:(id)sender; |
308 | -- (void)debugAction:(id)sender; |
309 | -@end |
310 | \ No newline at end of file |
311 | |
312 | === removed file 'iPhoneApp/UI/include/LogSettingsView.h' |
313 | --- iPhoneApp/UI/include/LogSettingsView.h 2010-07-22 20:21:36 +0000 |
314 | +++ iPhoneApp/UI/include/LogSettingsView.h 1970-01-01 00:00:00 +0000 |
315 | @@ -1,60 +0,0 @@ |
316 | -/* |
317 | - * Funambol is a mobile platform developed by Funambol, Inc. |
318 | - * Copyright (C) 2008 Funambol, Inc. |
319 | - * |
320 | - * This program is free software; you can redistribute it and/or modify it under |
321 | - * the terms of the GNU Affero General Public License version 3 as published by |
322 | - * the Free Software Foundation with the addition of the following permission |
323 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
324 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
325 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
326 | - * |
327 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
328 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
329 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
330 | - * details. |
331 | - * |
332 | - * You should have received a copy of the GNU Affero General Public License |
333 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
334 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
335 | - * MA 02110-1301 USA. |
336 | - * |
337 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
338 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
339 | - * |
340 | - * The interactive user interfaces in modified source and object code versions |
341 | - * of this program must display Appropriate Legal Notices, as required under |
342 | - * Section 5 of the GNU Affero General Public License version 3. |
343 | - * |
344 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
345 | - * version 3, these Appropriate Legal Notices must retain the display of the |
346 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
347 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
348 | - * the words "Powered by Funambol". |
349 | - */ |
350 | - |
351 | -#import <UIKit/UIKit.h> |
352 | - |
353 | -#import "common.h" |
354 | -#import "base/Log.h" |
355 | - |
356 | -@interface LogSettingsView : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
357 | - |
358 | - UITableView* logTable; |
359 | - |
360 | - UITableViewCell* logLevelCell; |
361 | - UITableViewCell* viewLogCell; |
362 | - UITableViewCell* sendLogCell; |
363 | - |
364 | - UILabel* logLevelLabel; |
365 | - |
366 | - NSMutableArray *menuList; |
367 | - UIColor* funBlue; |
368 | - UIFont* small_font; |
369 | - |
370 | -} |
371 | -- (id)init; |
372 | -- (void)reload; |
373 | -- (void) dealloc; |
374 | -- (void)sendLogAction:(id)sender; |
375 | -@end |
376 | |
377 | === removed file 'iPhoneApp/UI/include/LogView.h' |
378 | --- iPhoneApp/UI/include/LogView.h 2010-07-22 20:21:36 +0000 |
379 | +++ iPhoneApp/UI/include/LogView.h 1970-01-01 00:00:00 +0000 |
380 | @@ -1,52 +0,0 @@ |
381 | -/* |
382 | - * Funambol is a mobile platform developed by Funambol, Inc. |
383 | - * Copyright (C) 2008 Funambol, Inc. |
384 | - * |
385 | - * This program is free software; you can redistribute it and/or modify it under |
386 | - * the terms of the GNU Affero General Public License version 3 as published by |
387 | - * the Free Software Foundation with the addition of the following permission |
388 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
389 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
390 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
391 | - * |
392 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
393 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
394 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
395 | - * details. |
396 | - * |
397 | - * You should have received a copy of the GNU Affero General Public License |
398 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
399 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
400 | - * MA 02110-1301 USA. |
401 | - * |
402 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
403 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
404 | - * |
405 | - * The interactive user interfaces in modified source and object code versions |
406 | - * of this program must display Appropriate Legal Notices, as required under |
407 | - * Section 5 of the GNU Affero General Public License version 3. |
408 | - * |
409 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
410 | - * version 3, these Appropriate Legal Notices must retain the display of the |
411 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
412 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
413 | - * the words "Powered by Funambol". |
414 | - */ |
415 | - |
416 | -#import <UIKit/UIKit.h> |
417 | - |
418 | -#import "common.h" |
419 | -#import "base/Log.h" |
420 | - |
421 | -@interface LogView : UIViewController { |
422 | - UITextView* logTextView; |
423 | - UIFont* small_font; |
424 | - |
425 | - |
426 | -} |
427 | -- (id)init; |
428 | -- (void)reload; |
429 | -- (void) dealloc; |
430 | -- (void)viewWillAppear:(BOOL)animated; |
431 | - |
432 | -@end |
433 | |
434 | === removed file 'iPhoneApp/UI/include/LoginManager.h' |
435 | --- iPhoneApp/UI/include/LoginManager.h 2010-07-22 20:21:36 +0000 |
436 | +++ iPhoneApp/UI/include/LoginManager.h 1970-01-01 00:00:00 +0000 |
437 | @@ -1,54 +0,0 @@ |
438 | -/* |
439 | - * Funambol is a mobile platform developed by Funambol, Inc. |
440 | - * Copyright (C) 2010 Funambol, Inc. |
441 | - * |
442 | - * This program is free software; you can redistribute it and/or modify it under |
443 | - * the terms of the GNU Affero General Public License version 3 as published by |
444 | - * the Free Software Foundation with the addition of the following permission |
445 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
446 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
447 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
448 | - * |
449 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
450 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
451 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
452 | - * details. |
453 | - * |
454 | - * You should have received a copy of the GNU Affero General Public License |
455 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
456 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
457 | - * MA 02110-1301 USA. |
458 | - * |
459 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
460 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
461 | - * |
462 | - * The interactive user interfaces in modified source and object code versions |
463 | - * of this program must display Appropriate Legal Notices, as required under |
464 | - * Section 5 of the GNU Affero General Public License version 3. |
465 | - * |
466 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
467 | - * version 3, these Appropriate Legal Notices must retain the display of the |
468 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
469 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
470 | - * the words "Powered by Funambol". |
471 | - */ |
472 | - |
473 | -#import "FunambolAPI.h" |
474 | -#import "base/util/StringBuffer.h" |
475 | - |
476 | -#define LOGIN_START_NOTIFICATION "LoginStartNotification" |
477 | -#define LOGIN_END_NOTIFICATION "LoginEndNotification" |
478 | - |
479 | -#define LOGIN_STATUS_NOTIFICATION_CODE "LoginStatusCode" |
480 | - |
481 | - |
482 | -@interface LoginManager : NSObject { |
483 | - NSString* credentials; |
484 | -} |
485 | - |
486 | -- (id) init; |
487 | -- (void) dealloc; |
488 | -- (BOOL) login; |
489 | -- (void) setCredentials:(NSString*) value; |
490 | - |
491 | -@end |
492 | |
493 | === modified file 'iPhoneApp/UI/include/MainSingleView.h' |
494 | --- iPhoneApp/UI/include/MainSingleView.h 2010-08-12 01:15:02 +0000 |
495 | +++ iPhoneApp/UI/include/MainSingleView.h 2010-08-20 00:36:44 +0000 |
496 | @@ -54,7 +54,7 @@ |
497 | UIButton* stopButton; |
498 | UIButton* infoButton; |
499 | UITextView* textView; |
500 | -// UILabel* allText; |
501 | + |
502 | UIButton *allText; |
503 | UILabel* synchronizeText; |
504 | UILabel* syncCancelText; |
505 | |
506 | === removed file 'iPhoneApp/UI/include/RecoverSyncMethodsView.h' |
507 | --- iPhoneApp/UI/include/RecoverSyncMethodsView.h 2010-07-22 20:21:36 +0000 |
508 | +++ iPhoneApp/UI/include/RecoverSyncMethodsView.h 1970-01-01 00:00:00 +0000 |
509 | @@ -1,51 +0,0 @@ |
510 | -/* |
511 | - * Funambol is a mobile platform developed by Funambol, Inc. |
512 | - * Copyright (C) 2008 Funambol, Inc. |
513 | - * |
514 | - * This program is free software; you can redistribute it and/or modify it under |
515 | - * the terms of the GNU Affero General Public License version 3 as published by |
516 | - * the Free Software Foundation with the addition of the following permission |
517 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
518 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
519 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
520 | - * |
521 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
522 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
523 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
524 | - * details. |
525 | - * |
526 | - * You should have received a copy of the GNU Affero General Public License |
527 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
528 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
529 | - * MA 02110-1301 USA. |
530 | - * |
531 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
532 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
533 | - * |
534 | - * The interactive user interfaces in modified source and object code versions |
535 | - * of this program must display Appropriate Legal Notices, as required under |
536 | - * Section 5 of the GNU Affero General Public License version 3. |
537 | - * |
538 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
539 | - * version 3, these Appropriate Legal Notices must retain the display of the |
540 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
541 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
542 | - * the words "Powered by Funambol". |
543 | - */ |
544 | - |
545 | -#import <UIKit/UIKit.h> |
546 | - |
547 | -#import "SyncMethodsView.h" |
548 | - |
549 | - |
550 | -@interface RecoverSyncMethodsView : SyncMethodsView { |
551 | - |
552 | -} |
553 | - |
554 | -- (id)init; |
555 | -- (id)initWithModes:(NSArray*)syncModes; |
556 | - |
557 | -- (void)recoverFromServerAction:(id)sender; |
558 | -- (void)recoverFromClientAction:(id)sender; |
559 | - |
560 | -@end |
561 | |
562 | === removed file 'iPhoneApp/UI/include/RecoverView.h' |
563 | --- iPhoneApp/UI/include/RecoverView.h 2010-07-22 20:21:36 +0000 |
564 | +++ iPhoneApp/UI/include/RecoverView.h 1970-01-01 00:00:00 +0000 |
565 | @@ -1,79 +0,0 @@ |
566 | -/* |
567 | - * Funambol is a mobile platform developed by Funambol, Inc. |
568 | - * Copyright (C) 2008 Funambol, Inc. |
569 | - * |
570 | - * This program is free software; you can redistribute it and/or modify it under |
571 | - * the terms of the GNU Affero General Public License version 3 as published by |
572 | - * the Free Software Foundation with the addition of the following permission |
573 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
574 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
575 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
576 | - * |
577 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
578 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
579 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
580 | - * details. |
581 | - * |
582 | - * You should have received a copy of the GNU Affero General Public License |
583 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
584 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
585 | - * MA 02110-1301 USA. |
586 | - * |
587 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
588 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
589 | - * |
590 | - * The interactive user interfaces in modified source and object code versions |
591 | - * of this program must display Appropriate Legal Notices, as required under |
592 | - * Section 5 of the GNU Affero General Public License version 3. |
593 | - * |
594 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
595 | - * version 3, these Appropriate Legal Notices must retain the display of the |
596 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
597 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
598 | - * the words "Powered by Funambol". |
599 | - */ |
600 | - |
601 | -#import <UIKit/UIKit.h> |
602 | - |
603 | - |
604 | -#import "common.h" |
605 | -#import "base/Log.h" |
606 | - |
607 | - |
608 | -@interface RecoverView : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
609 | - |
610 | - UITableView* recoverTable; |
611 | - |
612 | - UIBarButtonItem * recoverButton; |
613 | - |
614 | - UITableViewCell * descriptionCell; |
615 | - UITableViewCell* directionCell; |
616 | - UITableViewCell * contactSyncCell; |
617 | - UISwitch* contactSync; |
618 | - |
619 | - NSMutableArray *menuList; |
620 | - |
621 | - UIFont* small_font; |
622 | - |
623 | - |
624 | - NSString* direction; |
625 | - |
626 | - bool clickedRecover; |
627 | -} |
628 | - |
629 | -- (id) init; |
630 | -- (void) dealloc; |
631 | -- (void) loadView; |
632 | -- (void) reload; |
633 | - |
634 | -- (void) contactSyncAction: (id)sender; |
635 | -- (void) recoverAction: (id)sender; |
636 | - |
637 | -- (void) viewWillAppear:(BOOL)animated; |
638 | - |
639 | -- (void) setRecoverDirection: (NSString*)direction; |
640 | -- (NSString*) getRecoverDirection; |
641 | - |
642 | -- (void) setDirectionText; |
643 | -- (bool) didClickRecover; |
644 | -@end |
645 | |
646 | === removed file 'iPhoneApp/UI/include/SettingsSingleView.h' |
647 | --- iPhoneApp/UI/include/SettingsSingleView.h 2010-08-12 01:15:02 +0000 |
648 | +++ iPhoneApp/UI/include/SettingsSingleView.h 1970-01-01 00:00:00 +0000 |
649 | @@ -1,74 +0,0 @@ |
650 | -/* |
651 | - * Funambol is a mobile platform developed by Funambol, Inc. |
652 | - * Copyright (C) 2008 Funambol, Inc. |
653 | - * |
654 | - * This program is free software; you can redistribute it and/or modify it under |
655 | - * the terms of the GNU Affero General Public License version 3 as published by |
656 | - * the Free Software Foundation with the addition of the following permission |
657 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
658 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
659 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
660 | - * |
661 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
662 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
663 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
664 | - * details. |
665 | - * |
666 | - * You should have received a copy of the GNU Affero General Public License |
667 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
668 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
669 | - * MA 02110-1301 USA. |
670 | - * |
671 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
672 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
673 | - * |
674 | - * The interactive user interfaces in modified source and object code versions |
675 | - * of this program must display Appropriate Legal Notices, as required under |
676 | - * Section 5 of the GNU Affero General Public License version 3. |
677 | - * |
678 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
679 | - * version 3, these Appropriate Legal Notices must retain the display of the |
680 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
681 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
682 | - * the words "Powered by Funambol". |
683 | - */ |
684 | - |
685 | -#import <UIKit/UIKit.h> |
686 | - |
687 | -#import "common.h" |
688 | -#import "base/Log.h" |
689 | - |
690 | -@interface SettingsSingleView : UIViewController <UITableViewDelegate, UITableViewDataSource> { |
691 | - |
692 | - NSMutableArray* menuList; |
693 | - |
694 | - UITableView* settingsTable; |
695 | - |
696 | - UITableViewCell* accountCell; |
697 | - UITableViewCell* contactsCell; |
698 | - |
699 | - UITableViewCell* logCell; |
700 | - UITableViewCell* aboutCell; |
701 | - UITableViewCell* recoverCell; |
702 | - UITableViewCell* cleanupCell; |
703 | - |
704 | - UILabel* usernameLabel; |
705 | - UILabel* contactsLabel; |
706 | - UIFont* small_font; |
707 | - UIColor* funBlue; |
708 | - |
709 | - NSIndexPath * lastSelection; |
710 | -} |
711 | -- (id)init; |
712 | -- (void)dealloc; |
713 | -- (void) viewDidAppear:(BOOL)animated; |
714 | -- (void) reload; |
715 | -- (void) addComponents; |
716 | -- (void) addAccountTable; |
717 | -- (void) addSourcesTable; |
718 | -- (void) addLogTable; |
719 | -- (void) addAboutTable; |
720 | -- (void) addRecoverTable; |
721 | -- (void) addCleanupTable; |
722 | -- (IBAction)done:(id)sender; |
723 | -@end |
724 | |
725 | === modified file 'iPhoneApp/UI/src/AccountView.mm' |
726 | --- iPhoneApp/UI/src/AccountView.mm 2010-08-12 01:15:02 +0000 |
727 | +++ iPhoneApp/UI/src/AccountView.mm 2010-08-20 00:36:44 +0000 |
728 | @@ -40,31 +40,32 @@ |
729 | #import "FunambolAPI.h" |
730 | #import "base/util/StringBuffer.h" |
731 | #import "customs.h" |
732 | -#import "LoginManager.h" |
733 | +#import "FastSyncMethodsView.h" |
734 | +#import "AboutView.h" |
735 | |
736 | -@interface AccountView () |
737 | +@interface AccountView (Private) |
738 | - (UITextField*)buildTextFieldWithFrame:(CGRect)aFrame text:(NSString*)text keyboardType:(UIKeyboardType)keyboardType returnKeyType:(UIReturnKeyType)returnKeyType; |
739 | +- (NSString*)friendlySyncValue; |
740 | +- (void)updateSyncValue; |
741 | @end |
742 | |
743 | - |
744 | @implementation AccountView |
745 | |
746 | +@synthesize credentials, syncValue, presentedModally; |
747 | + |
748 | - (id)init { |
749 | if (self = [super initWithStyle:UITableViewStyleGrouped]) |
750 | { |
751 | - // this title will appear in the navigation bar |
752 | - self.title = NSLocalizedString(@"Account",@"Account"); |
753 | - funBlue = [[UIColor alloc] initWithRed:FUNBLUE_RGB_RED green:FUNBLUE_RGB_GREEN blue:FUNBLUE_RGB_BLUE alpha:1.0]; |
754 | + self.title = NSLocalizedString(@"Settings",@"Settings"); |
755 | + |
756 | showerror = true; |
757 | + |
758 | + self.presentedModally = NO; |
759 | } |
760 | |
761 | return self; |
762 | } |
763 | |
764 | -- (BOOL) isPortal{ |
765 | - return FALSE; |
766 | -} |
767 | - |
768 | - (void) noCredsAlert: (NSString*) text{ |
769 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Alert", @"Alert") message:text |
770 | delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"OK") otherButtonTitles: nil]; |
771 | @@ -72,47 +73,6 @@ |
772 | [alert release]; |
773 | } |
774 | |
775 | -- (void) startWaitingAnimation:(NSNotification *) aNotification { |
776 | - [usernameValue setEnabled:NO]; |
777 | - [passwordValue setEnabled:NO]; |
778 | - usernameValue.textColor = [UIColor grayColor]; |
779 | - passwordValue.textColor = [UIColor grayColor]; |
780 | - animationAlert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Alert", @"Alert") message: NSLocalizedString(@"WaitingAnimation", @"WaitingAnimation") |
781 | - delegate:self cancelButtonTitle:nil otherButtonTitles: nil]; |
782 | - |
783 | - activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; |
784 | - activityIndicator.center = CGPointMake(145, 100); |
785 | - [animationAlert addSubview:activityIndicator]; |
786 | - //[self.view addSubview:activityIndicator]; |
787 | - [activityIndicator startAnimating]; |
788 | - [animationAlert show]; |
789 | -} |
790 | - |
791 | --(void) stopWaitingAnimation:(NSNotification *) aNotification { |
792 | - [activityIndicator stopAnimating]; |
793 | - [animationAlert dismissWithClickedButtonIndex:0 animated:YES]; |
794 | - [animationAlert release]; |
795 | - [usernameValue setEnabled:YES]; |
796 | - [passwordValue setEnabled:YES]; |
797 | - usernameValue.textColor = funBlue; |
798 | - passwordValue.textColor = funBlue; |
799 | - |
800 | - NSNumber* notificationType = [[aNotification userInfo] objectForKey:@LOGIN_STATUS_NOTIFICATION_CODE]; |
801 | - int notification_type = [notificationType intValue]; |
802 | - |
803 | - if (notification_type != 0){ |
804 | - UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Alert", @"Alert") message: NSLocalizedString(@"WaitingAnimationError", @"WaitingAnimationError") |
805 | - delegate:self cancelButtonTitle:nil otherButtonTitles: nil]; |
806 | - [alert show]; |
807 | - [alert release]; |
808 | - } else { |
809 | - [activityIndicator removeFromSuperview]; |
810 | - [[self navigationController] popViewControllerAnimated:YES]; |
811 | - } |
812 | - |
813 | -} |
814 | - |
815 | -//AB 21 July 2010 - Add a 'Retrieve Creds Section' |
816 | - (void)loadCredentials |
817 | { |
818 | if (credentials) |
819 | @@ -137,42 +97,11 @@ |
820 | [value retain]; |
821 | [credentials release]; |
822 | credentials = value; |
823 | - |
824 | -#if 0 //AB 21 July 2010 - Add a 'Retrieve Creds Section' |
825 | - [self startWaitingAnimation:nil]; |
826 | - credentials = value; |
827 | - |
828 | - LoginManager* loginmanager = [[LoginManager alloc]init]; |
829 | - [loginmanager setCredentials:value]; |
830 | - [loginmanager login]; |
831 | -#endif |
832 | -} |
833 | - |
834 | -- (UITextField*)buildTextFieldWithFrame:(CGRect)aFrame text:(NSString*)text keyboardType:(UIKeyboardType)keyboardType returnKeyType:(UIReturnKeyType)returnKeyType |
835 | -{ |
836 | - UITextField *field = [[UITextField alloc] initWithFrame:aFrame]; |
837 | - field.borderStyle = UITextBorderStyleNone; |
838 | - field.font = small_font; |
839 | - field.exclusiveTouch = YES; |
840 | - field.autocorrectionType = UITextAutocorrectionTypeNo; |
841 | - field.text = text; |
842 | - field.keyboardType = keyboardType; |
843 | - field.returnKeyType = returnKeyType; |
844 | - field.clearButtonMode = UITextFieldViewModeNever; |
845 | - field.autocapitalizationType = UITextAutocapitalizationTypeNone; |
846 | - field.textColor = funBlue; |
847 | - field.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; |
848 | - field.delegate = self; |
849 | - |
850 | - return field; |
851 | -} |
852 | - |
853 | +} |
854 | |
855 | - (void) viewDidLoad{ |
856 | [super viewDidLoad]; |
857 | |
858 | - small_font = [UIFont systemFontOfSize:15]; |
859 | - |
860 | [[FunambolAPI getInstance] loadSyncConfig:&URL username:&username password:&password]; |
861 | |
862 | //smart dimension of the labels |
863 | @@ -211,21 +140,17 @@ |
864 | passwordValue.secureTextEntry = YES; |
865 | [passwordParameter addSubview:passwordValue]; |
866 | |
867 | - //AB 21 July 2010 - Add a 'Retrieve Creds Section' |
868 | credentialsButton = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"CredentialsButton"]; |
869 | credentialsButton.textLabel.text = NSLocalizedString(@"Retrieve My Credentials...",@"Credentials button in AccountView.mm"); |
870 | credentialsButton.textLabel.textAlignment = UITextAlignmentCenter; |
871 | |
872 | [self loadCredentials]; |
873 | - // |
874 | + |
875 | + aboutButton = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"AboutButton"]; |
876 | + aboutButton.textLabel.text = NSLocalizedString(@"About Ubuntu One",@"About button in AccountView.mm"); |
877 | + aboutButton.textLabel.textAlignment = UITextAlignmentCenter; |
878 | |
879 | [self.tableView reloadData]; |
880 | - |
881 | - [[NSNotificationCenter defaultCenter] addObserver:self |
882 | - selector:@selector(stopWaitingAnimation:) |
883 | - name:@LOGIN_END_NOTIFICATION |
884 | - object:nil]; |
885 | - |
886 | } |
887 | |
888 | - (void) viewDidAppear:(BOOL) animated{ |
889 | @@ -246,6 +171,22 @@ |
890 | } |
891 | } |
892 | |
893 | +- (void)viewWillAppear:(BOOL)animated |
894 | +{ |
895 | + [super viewWillAppear:animated]; |
896 | + |
897 | + if (self.presentedModally) { |
898 | + self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Close",@"") style:UIBarButtonItemStyleDone target:self action:@selector(close:)] autorelease]; |
899 | + } |
900 | + |
901 | + [self updateSyncValue]; |
902 | + [self.tableView reloadData]; |
903 | +} |
904 | + |
905 | +- (IBAction)close:(id)sender |
906 | +{ |
907 | + [self dismissModalViewControllerAnimated:YES]; |
908 | +} |
909 | |
910 | - (void) viewWillDisappear:(BOOL) animated{ |
911 | showerror = true; |
912 | @@ -258,71 +199,112 @@ |
913 | |
914 | } |
915 | |
916 | -- (UITableViewCell *)tableView:(UITableView *)accountTable cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
917 | - if ([self isPortal]){ |
918 | - switch (indexPath.row) { |
919 | - case 0: |
920 | - return usernameParameter; |
921 | - case 1: |
922 | - return passwordParameter; |
923 | - default: |
924 | - break; |
925 | - } |
926 | - }else{ |
927 | - if (0 == indexPath.section) { |
928 | - switch (indexPath.row) { |
929 | - case 0: |
930 | - return usernameParameter; |
931 | - case 1: |
932 | - return passwordParameter; |
933 | - default: |
934 | - break; |
935 | - } |
936 | - }else if (1 == indexPath.section){ |
937 | +- (UITableViewCell *)tableView:(UITableView *)accountTable cellForRowAtIndexPath:(NSIndexPath *)indexPath |
938 | +{ |
939 | + switch (indexPath.section) |
940 | + { |
941 | + case 0: //Username and Password |
942 | + { |
943 | + if (0 == indexPath.row) |
944 | + { |
945 | + return usernameParameter; |
946 | + } |
947 | + else if (1 == indexPath.row) |
948 | + { |
949 | + return passwordParameter; |
950 | + } |
951 | + break; |
952 | + } |
953 | + case 1: //Retrieve Credentials |
954 | + { |
955 | return credentialsButton; |
956 | } |
957 | - |
958 | - } |
959 | - return nil; |
960 | + case 2: //Sync Direction |
961 | + { |
962 | + static NSString* identifier = @"SyncWayIdentifier"; |
963 | + |
964 | + UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:identifier]; |
965 | + |
966 | + if (nil == cell) |
967 | + { |
968 | + cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier] autorelease]; |
969 | + cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; |
970 | + } |
971 | + |
972 | + cell.textLabel.text = NSLocalizedString(@"Sync Direction",@"Sync Direction"); |
973 | + cell.detailTextLabel.text = [self friendlySyncValue]; |
974 | + |
975 | + return cell; |
976 | + |
977 | + break; |
978 | + } |
979 | + case 3: //About |
980 | + { |
981 | + return aboutButton; |
982 | + } |
983 | + default: |
984 | + { |
985 | + return nil; |
986 | + break; |
987 | + } |
988 | + } |
989 | } |
990 | |
991 | - (NSInteger)tableView:(UITableView *)accountTable numberOfRowsInSection:(NSInteger)section { |
992 | - if([self isPortal]){ |
993 | - return 2; |
994 | - }else{ |
995 | - if (0 == section){ |
996 | - return 2; |
997 | - }else{ |
998 | - return 1; |
999 | - } |
1000 | - } |
1001 | + if (0 == section){ |
1002 | + return 2; |
1003 | + }else { |
1004 | + return 1; |
1005 | + } |
1006 | } |
1007 | |
1008 | - (CGFloat)tableView:(UITableView *)accountTable heightForRowAtIndexPath:(NSIndexPath *)indexPath |
1009 | { |
1010 | - switch (indexPath.section) { |
1011 | - |
1012 | - default: |
1013 | - return 45; |
1014 | - break; |
1015 | - } |
1016 | -} |
1017 | - |
1018 | -- (NSInteger)numberOfSectionsInTableView:(UITableView *)accountTable { |
1019 | -#if 0 //AB 21 July 2010 - Add a 'Retrieve Creds Section' |
1020 | - return 1; |
1021 | -#endif |
1022 | - return 2; |
1023 | -} |
1024 | - |
1025 | -//AB 21 July 2010 - Add a 'Retrieve Creds Section' |
1026 | + return 45; |
1027 | +} |
1028 | + |
1029 | +- (NSInteger)numberOfSectionsInTableView:(UITableView *)accountTable |
1030 | +{ |
1031 | + return 4; |
1032 | +} |
1033 | + |
1034 | +- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section |
1035 | +{ |
1036 | + switch (section) |
1037 | + { |
1038 | + case 0: |
1039 | + { |
1040 | + return NSLocalizedString(@"Credentials",@""); |
1041 | + break; |
1042 | + } |
1043 | + case 2: |
1044 | + { |
1045 | + return NSLocalizedString(@"Sync Settings",@""); |
1046 | + break; |
1047 | + } |
1048 | + default: |
1049 | + { |
1050 | + return nil; |
1051 | + break; |
1052 | + } |
1053 | + } |
1054 | +} |
1055 | + |
1056 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath |
1057 | { |
1058 | - if (1 == indexPath.section && 0 == indexPath.row) |
1059 | + if (1 == indexPath.section) |
1060 | { |
1061 | NSURL *credentialsURL = [NSURL URLWithString:@"https://one.ubuntu.com/phones/creds/ios"]; |
1062 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; |
1063 | [[UIApplication sharedApplication] openURL:credentialsURL]; |
1064 | + } else if (2 == indexPath.section) { |
1065 | + FastSyncMethodsView* syncMethodsViewController = [[[FastSyncMethodsView alloc] init] autorelease]; |
1066 | + [syncMethodsViewController setSyncSourceName:@"addressbook"]; |
1067 | + [syncMethodsViewController setSyncMode:self.syncValue]; |
1068 | + [[self navigationController] pushViewController:syncMethodsViewController animated:YES]; |
1069 | + } else if (3 == indexPath.section) { |
1070 | + AboutView *about = [[[AboutView alloc] init] autorelease]; |
1071 | + [self.navigationController pushViewController:about animated:YES]; |
1072 | } |
1073 | } |
1074 | |
1075 | @@ -353,17 +335,71 @@ |
1076 | [usernameParameter release]; |
1077 | [passwordParameter release]; |
1078 | |
1079 | - [small_font release]; |
1080 | - |
1081 | [URL release]; |
1082 | |
1083 | + self.credentials = NULL; |
1084 | + |
1085 | + self.syncValue = NULL; |
1086 | + |
1087 | + [credentialsButton release]; |
1088 | + [aboutButton release]; |
1089 | |
1090 | - [funBlue release]; |
1091 | [username release]; |
1092 | [password release]; |
1093 | [super dealloc]; |
1094 | } |
1095 | |
1096 | - |
1097 | - |
1098 | @end |
1099 | + |
1100 | +@implementation AccountView (Private) |
1101 | + |
1102 | +- (UITextField*)buildTextFieldWithFrame:(CGRect)aFrame text:(NSString*)text keyboardType:(UIKeyboardType)keyboardType returnKeyType:(UIReturnKeyType)returnKeyType |
1103 | +{ |
1104 | + UITextField *field = [[UITextField alloc] initWithFrame:aFrame]; |
1105 | + field.borderStyle = UITextBorderStyleNone; |
1106 | + field.font = [UIFont systemFontOfSize:15]; |
1107 | + field.exclusiveTouch = YES; |
1108 | + field.autocorrectionType = UITextAutocorrectionTypeNo; |
1109 | + field.text = text; |
1110 | + field.keyboardType = keyboardType; |
1111 | + field.returnKeyType = returnKeyType; |
1112 | + field.clearButtonMode = UITextFieldViewModeNever; |
1113 | + field.autocapitalizationType = UITextAutocapitalizationTypeNone; |
1114 | + field.textColor = [UIColor colorWithRed:FUNBLUE_RGB_RED green:FUNBLUE_RGB_GREEN blue:FUNBLUE_RGB_BLUE alpha:1.0]; |
1115 | + field.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; |
1116 | + field.delegate = self; |
1117 | + |
1118 | + return field; |
1119 | +} |
1120 | + |
1121 | +- (NSString*)friendlySyncValue |
1122 | +{ |
1123 | + if ([syncValue isEqual:@"two-way"]) |
1124 | + { |
1125 | + return NSLocalizedString(@"Two Way",@"Two Way"); |
1126 | + } |
1127 | + else if ([syncValue isEqual:@"one-way-from-client"]) |
1128 | + { |
1129 | + return NSLocalizedString(@"From Client",@"From Client"); |
1130 | + } |
1131 | + else if ([syncValue isEqual:@"one-way-from-server"]) |
1132 | + { |
1133 | + return NSLocalizedString(@"From Server",@"From Server"); |
1134 | + } |
1135 | + else if ([syncValue isEqual:@"none"]) |
1136 | + { |
1137 | + return NSLocalizedString(@"Disabled",@"Disabled"); |
1138 | + } |
1139 | + else |
1140 | + { |
1141 | + return @"Unknown"; |
1142 | + } |
1143 | +} |
1144 | + |
1145 | +- (void)updateSyncValue |
1146 | +{ |
1147 | + NSString *sync = [[FunambolAPI getInstance] getSync:@"addressbook"]; |
1148 | + self.syncValue = sync; |
1149 | + [sync release]; |
1150 | +} |
1151 | +@end |
1152 | \ No newline at end of file |
1153 | |
1154 | === removed file 'iPhoneApp/UI/src/CleanUpView.mm' |
1155 | --- iPhoneApp/UI/src/CleanUpView.mm 2010-07-22 20:21:36 +0000 |
1156 | +++ iPhoneApp/UI/src/CleanUpView.mm 1970-01-01 00:00:00 +0000 |
1157 | @@ -1,340 +0,0 @@ |
1158 | -/* |
1159 | - * Funambol is a mobile platform developed by Funambol, Inc. |
1160 | - * Copyright (C) 2008 Funambol, Inc. |
1161 | - * |
1162 | - * This program is free software; you can redistribute it and/or modify it under |
1163 | - * the terms of the GNU Affero General Public License version 3 as published by |
1164 | - * the Free Software Foundation with the addition of the following permission |
1165 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
1166 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
1167 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
1168 | - * |
1169 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
1170 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
1171 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
1172 | - * details. |
1173 | - * |
1174 | - * You should have received a copy of the GNU Affero General Public License |
1175 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
1176 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
1177 | - * MA 02110-1301 USA. |
1178 | - * |
1179 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
1180 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
1181 | - * |
1182 | - * The interactive user interfaces in modified source and object code versions |
1183 | - * of this program must display Appropriate Legal Notices, as required under |
1184 | - * Section 5 of the GNU Affero General Public License version 3. |
1185 | - * |
1186 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
1187 | - * version 3, these Appropriate Legal Notices must retain the display of the |
1188 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
1189 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
1190 | - * the words "Powered by Funambol". |
1191 | - */ |
1192 | - |
1193 | - |
1194 | -#import "CleanUpView.h" |
1195 | - |
1196 | -#import "spds/constants.h" |
1197 | -#import "customs.h" |
1198 | -#import "FunambolAPI.h" |
1199 | - |
1200 | - |
1201 | -@implementation CleanUpView |
1202 | - |
1203 | -- (id) init { |
1204 | - self = [super init]; |
1205 | - if (self) |
1206 | - { |
1207 | - // this title will appear in the navigation bar |
1208 | - self.title = NSLocalizedString(@"Clean Up",@"Clean Up"); |
1209 | - } |
1210 | - return self; |
1211 | -} |
1212 | - |
1213 | -- (void) dealloc { |
1214 | - // TODO: destruct |
1215 | - |
1216 | - [super dealloc]; |
1217 | -} |
1218 | - |
1219 | -- (void) loadView{ |
1220 | - |
1221 | - UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
1222 | - self.view = contentView; |
1223 | - [contentView release]; |
1224 | - |
1225 | - self.view.autoresizesSubviews = YES; |
1226 | - |
1227 | - small_font = [UIFont systemFontOfSize:15]; |
1228 | - |
1229 | - |
1230 | - cleanupTable = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; |
1231 | - cleanupTable.delegate = self; |
1232 | - cleanupTable.dataSource = self; |
1233 | - //cleanupTable.rowHeight = 80; |
1234 | - [cleanupTable setAutoresizesSubviews:YES]; |
1235 | - [cleanupTable setAutoresizingMask:UIViewAutoresizingFlexibleHeight + UIViewAutoresizingFlexibleBottomMargin]; |
1236 | - |
1237 | - [self.view addSubview:cleanupTable]; |
1238 | - |
1239 | - contactSyncCell = [[UITableViewCell alloc]init]; |
1240 | - calendarSyncCell = [[UITableViewCell alloc]init]; |
1241 | - noteSyncCell = [[UITableViewCell alloc]init]; |
1242 | - |
1243 | - |
1244 | - descriptionCell = [[UITableViewCell alloc] init]; |
1245 | - descriptionCell.selectionStyle = UITableViewCellSelectionStyleNone; |
1246 | - NSString* descriptionLabel = NSLocalizedString(@"Clean up Text", @"Clean up Text"); |
1247 | - |
1248 | - |
1249 | - int val = [descriptionLabel length]; |
1250 | - val = (val / 20 ) * 15; |
1251 | - if ( val < 50 ) { |
1252 | - val = 50; |
1253 | - } |
1254 | - heightRow = val + 20; |
1255 | - |
1256 | - |
1257 | - |
1258 | - UITextView * description= [[UITextView alloc] initWithFrame: CGRectMake(20, 10, descriptionCell.contentView.bounds.size.width-40, val)]; |
1259 | - description.text = descriptionLabel; |
1260 | - |
1261 | - |
1262 | - [description setEditable:NO]; |
1263 | - [description setFont:small_font]; |
1264 | - [description setScrollEnabled:NO]; |
1265 | - [description setAutoresizesSubviews:YES]; |
1266 | - |
1267 | - [descriptionCell addSubview:description]; |
1268 | - |
1269 | - |
1270 | - contactSyncCell.textLabel.text = NSLocalizedString(@"Contacts", @"Contacts..."); |
1271 | - calendarSyncCell.textLabel.text = NSLocalizedString(@"Calendar", @"Calendar..."); |
1272 | - noteSyncCell.textLabel.text = NSLocalizedString(@"Notes", @"Notes..."); |
1273 | - |
1274 | - contactSync = [[UISwitch alloc] initWithFrame:CGRectMake(200.0, 10.0, 60.0, 30)]; |
1275 | - [contactSync addTarget:self action:@selector(contactSyncAction:) forControlEvents:UIControlEventValueChanged]; |
1276 | - [contactSync setOn:NO animated:NO]; |
1277 | - |
1278 | - calendarSync = [[UISwitch alloc] initWithFrame:CGRectMake(200.0, 10.0, 60.0, 30)]; |
1279 | - [calendarSync addTarget:self action:@selector(calendarSyncAction:) forControlEvents:UIControlEventValueChanged]; |
1280 | - [calendarSync setOn:NO animated:NO]; |
1281 | - |
1282 | - noteSync = [[UISwitch alloc] initWithFrame:CGRectMake(200.0, 10.0, 60.0, 30)]; |
1283 | - [noteSync addTarget:self action:@selector(noteSyncAction:) forControlEvents:UIControlEventValueChanged]; |
1284 | - [noteSync setOn:NO animated:NO]; |
1285 | - |
1286 | - [contactSyncCell addSubview:contactSync]; |
1287 | - [calendarSyncCell addSubview:calendarSync]; |
1288 | - [noteSyncCell addSubview:noteSync]; |
1289 | - cleanupButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Yes",@"Yes...") |
1290 | - style:UIBarButtonItemStylePlain |
1291 | - target:self |
1292 | - action:@selector(cleanupAction:)]; |
1293 | - |
1294 | - |
1295 | - self.navigationItem.rightBarButtonItem = cleanupButton; |
1296 | - [cleanupButton setEnabled:YES]; |
1297 | - |
1298 | - |
1299 | - |
1300 | - [cleanupTable reloadData]; |
1301 | -} |
1302 | - |
1303 | -- (void) reload |
1304 | -{ |
1305 | -} |
1306 | - |
1307 | -- (void) viewDidAppear:(BOOL)animated{ |
1308 | - [self contactSyncAction:nil]; |
1309 | -} |
1310 | - |
1311 | - |
1312 | - |
1313 | -- (void) contactSyncAction: (id)sender |
1314 | -{ |
1315 | - if ([contactSync isOn]) |
1316 | - { |
1317 | - contactFlag = true; |
1318 | - } |
1319 | - else |
1320 | - { |
1321 | - contactFlag = false; |
1322 | - } |
1323 | -} |
1324 | - |
1325 | -- (void) calendarSyncAction: (id)sender |
1326 | -{ |
1327 | - if ([calendarSync isOn]) |
1328 | - { |
1329 | - calendarFlag = true; |
1330 | - } |
1331 | - else |
1332 | - { |
1333 | - calendarFlag = false; |
1334 | - } |
1335 | -} |
1336 | - |
1337 | -- (void) noteSyncAction: (id)sender |
1338 | -{ |
1339 | - if ([noteSync isOn]) |
1340 | - { |
1341 | - noteFlag = true; |
1342 | - } |
1343 | - else |
1344 | - { |
1345 | - noteFlag = false; |
1346 | - } |
1347 | -} |
1348 | - |
1349 | -- (void) cleanupAction: (id)sender |
1350 | -{ |
1351 | - |
1352 | - |
1353 | - bool contactNotSynced = false; |
1354 | - |
1355 | - int sourcesnotsynced = 0; |
1356 | - |
1357 | - if(([[FunambolAPI getInstance]getSyncSourceLastSyncDate:@"addressbook"] == 0) && |
1358 | - !([[[FunambolAPI getInstance]getSync:@"addressbook"]isEqualToString:@"none"])){ |
1359 | - contactNotSynced = true; |
1360 | - sourcesnotsynced++; |
1361 | - } |
1362 | - |
1363 | - if(sourcesnotsynced > 0){ |
1364 | - alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Alert", @"Alert") |
1365 | - message:NSLocalizedString(@"Want to cleanup notsynced sources",@"Want to cleanup notsynced sources") |
1366 | - delegate:self |
1367 | - cancelButtonTitle:NSLocalizedString(@"OK",@"OK") |
1368 | - otherButtonTitles:NSLocalizedString(@"Cancel",@"Cancel"), nil]; |
1369 | - [alert show]; |
1370 | - [alert release]; |
1371 | - |
1372 | - }else{ |
1373 | - clickedCleanup = true; |
1374 | - [[self navigationController] popViewControllerAnimated:YES]; |
1375 | - } |
1376 | - |
1377 | -} |
1378 | - |
1379 | -- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex |
1380 | -{ |
1381 | - // the user clicked one of the OK/Cancel buttons |
1382 | - if (buttonIndex == 0){//OK |
1383 | - clickedCleanup = true; |
1384 | - [[self navigationController] popViewControllerAnimated:YES]; |
1385 | - }else{//Cancel |
1386 | - clickedCleanup = false; |
1387 | - [[self navigationController] popViewControllerAnimated:YES]; |
1388 | - } |
1389 | -} |
1390 | - |
1391 | - |
1392 | -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath |
1393 | -{ |
1394 | - switch (indexPath.section) { |
1395 | - case 0: |
1396 | - return heightRow; |
1397 | - default: |
1398 | - return 40; |
1399 | - break; |
1400 | - } |
1401 | - cleanupTable.rowHeight; |
1402 | -} |
1403 | - |
1404 | -- (UITableViewCell *)tableView:(UITableView *)contactsTable cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
1405 | - |
1406 | - switch (indexPath.section) { |
1407 | - case 0: |
1408 | - switch (indexPath.row) { |
1409 | - case 0: |
1410 | - return descriptionCell; |
1411 | - default: |
1412 | - break; |
1413 | - } |
1414 | - break; |
1415 | - case 1: |
1416 | - switch (indexPath.row) { |
1417 | - case 0: |
1418 | - return contactSyncCell; |
1419 | - case 1: |
1420 | - return calendarSyncCell; |
1421 | - case 2: |
1422 | - return noteSyncCell; |
1423 | - default: |
1424 | - break; |
1425 | - } |
1426 | - break; |
1427 | - default: |
1428 | - |
1429 | - break; |
1430 | - } |
1431 | - |
1432 | - return nil; |
1433 | -} |
1434 | - |
1435 | -- (void)tableView:(UITableView *)contactsTable didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
1436 | - switch (indexPath.section) { |
1437 | - case 0: |
1438 | - // Cannot select description |
1439 | - [cleanupTable deselectRowAtIndexPath:indexPath animated:YES]; |
1440 | - return; |
1441 | - break; |
1442 | - //case 1: |
1443 | - // break; |
1444 | - default: |
1445 | - break; |
1446 | - } |
1447 | - |
1448 | -} |
1449 | - |
1450 | -- (NSInteger)tableView:(UITableView *)contactsTable numberOfRowsInSection:(NSInteger)section { |
1451 | - switch (section) { |
1452 | - case 0: |
1453 | - return 1; |
1454 | - case 1: |
1455 | - return 3; |
1456 | - default: |
1457 | - break; |
1458 | - } |
1459 | - return 0;//should never happen |
1460 | -} |
1461 | - |
1462 | - |
1463 | - |
1464 | -- (void)viewWillAppear:(BOOL)animated |
1465 | -{ |
1466 | - clickedCleanup = false; |
1467 | - |
1468 | - // this UIViewController is about to re-appear, make sure we remove the current selection in our table view |
1469 | - NSIndexPath *indexPath = [cleanupTable indexPathForSelectedRow]; |
1470 | - if(!indexPath) |
1471 | - return; |
1472 | - |
1473 | - [cleanupTable deselectRowAtIndexPath:indexPath animated:NO]; |
1474 | - |
1475 | -} |
1476 | - |
1477 | - |
1478 | - |
1479 | -- (NSInteger)numberOfSectionsInTableView:(UITableView *)contactsTable { |
1480 | - return 1; |
1481 | -} |
1482 | - |
1483 | -- (bool) didClickCleanup |
1484 | -{ |
1485 | - return clickedCleanup; |
1486 | -} |
1487 | - |
1488 | -- (bool) getContactFlag{ |
1489 | - return contactFlag; |
1490 | -} |
1491 | -- (bool) getCalendarFlag{ |
1492 | - return calendarFlag; |
1493 | -} |
1494 | -- (bool) getNoteFlag{ |
1495 | - return noteFlag; |
1496 | -} |
1497 | -@end |
1498 | |
1499 | === removed file 'iPhoneApp/UI/src/ContactsSettingsView.mm' |
1500 | --- iPhoneApp/UI/src/ContactsSettingsView.mm 2010-07-22 20:21:36 +0000 |
1501 | +++ iPhoneApp/UI/src/ContactsSettingsView.mm 1970-01-01 00:00:00 +0000 |
1502 | @@ -1,388 +0,0 @@ |
1503 | -/* |
1504 | - * Funambol is a mobile platform developed by Funambol, Inc. |
1505 | - * Copyright (C) 2008 Funambol, Inc. |
1506 | - * |
1507 | - * This program is free software; you can redistribute it and/or modify it under |
1508 | - * the terms of the GNU Affero General Public License version 3 as published by |
1509 | - * the Free Software Foundation with the addition of the following permission |
1510 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
1511 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
1512 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
1513 | - * |
1514 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
1515 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
1516 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
1517 | - * details. |
1518 | - * |
1519 | - * You should have received a copy of the GNU Affero General Public License |
1520 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
1521 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
1522 | - * MA 02110-1301 USA. |
1523 | - * |
1524 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
1525 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
1526 | - * |
1527 | - * The interactive user interfaces in modified source and object code versions |
1528 | - * of this program must display Appropriate Legal Notices, as required under |
1529 | - * Section 5 of the GNU Affero General Public License version 3. |
1530 | - * |
1531 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
1532 | - * version 3, these Appropriate Legal Notices must retain the display of the |
1533 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
1534 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
1535 | - * the words "Powered by Funambol". |
1536 | - */ |
1537 | - |
1538 | - |
1539 | -#import <UIKit/UIKit.h> |
1540 | -#import "ContactsSettingsView.h" |
1541 | -#import "UIController.h" |
1542 | -#import "FunambolAPI.h" |
1543 | -#import "FastSyncMethodsView.h" |
1544 | - |
1545 | -#import "customs.h" |
1546 | - |
1547 | - |
1548 | -@implementation ContactsSettingsView |
1549 | - |
1550 | -- (BOOL) isPathEnabled{ |
1551 | - return false; |
1552 | -} |
1553 | - |
1554 | -- (id) init { |
1555 | - self = [super init]; |
1556 | - if (self) |
1557 | - { |
1558 | - // this title will appear in the navigation bar |
1559 | - self.title = NSLocalizedString(@"Contacts",@"Contacts"); |
1560 | - menuList = [[NSMutableArray alloc] init]; |
1561 | - } |
1562 | - funBlue = [[UIColor alloc] initWithRed:FUNBLUE_RGB_RED green:FUNBLUE_RGB_GREEN blue:FUNBLUE_RGB_BLUE alpha:1.0]; |
1563 | - return self; |
1564 | -} |
1565 | - |
1566 | -- (void) loadView{ |
1567 | - |
1568 | - UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
1569 | - self.view = contentView; |
1570 | - [contentView release]; |
1571 | - |
1572 | - FastSyncMethodsView* syncmethodsview = [[FastSyncMethodsView alloc] init]; |
1573 | - NSString * mode = [[FunambolAPI getInstance] getSync:@"addressbook"]; |
1574 | - [syncmethodsview setSyncSourceName:@"addressbook"]; |
1575 | - [syncmethodsview setSyncMode:mode]; |
1576 | - |
1577 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
1578 | - NSLocalizedString(@"Sync Methods", @""), @"title", |
1579 | - syncmethodsview, @"viewController", |
1580 | - nil]]; |
1581 | - [syncmethodsview release]; |
1582 | - |
1583 | - self.view.autoresizesSubviews = YES; |
1584 | - |
1585 | - small_font = [UIFont systemFontOfSize:15]; |
1586 | - |
1587 | - syncValue = [[FunambolAPI getInstance] getSync:@"addressbook"]; |
1588 | - remoteURIValue = [[FunambolAPI getInstance] getURI:@"addressbook"]; |
1589 | - |
1590 | - contactsTable = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; |
1591 | - contactsTable.delegate = self; |
1592 | - contactsTable.dataSource = self; |
1593 | - contactsTable.rowHeight = 40; |
1594 | - [contactsTable reloadData]; |
1595 | - |
1596 | - [self.view addSubview:contactsTable]; |
1597 | - |
1598 | - contactSyncCell = [[UITableViewCell alloc]init]; |
1599 | - syncWayCell = [[UITableViewCell alloc]init]; |
1600 | - pathCell = [[UITableViewCell alloc]init]; |
1601 | - remoteURICell = [[UITableViewCell alloc]init]; |
1602 | - |
1603 | - path = [[UISwitch alloc] initWithFrame:CGRectMake(200.0, 10.0, 60.0, 30)]; |
1604 | - [path addTarget:self action:@selector(pathAction:) forControlEvents:UIControlEventValueChanged]; |
1605 | - |
1606 | - pathCell.textLabel.text = NSLocalizedString(@"Sync", @"Sync"); |
1607 | - [pathCell addSubview:path]; |
1608 | - |
1609 | - contactSync = [[UISwitch alloc] initWithFrame:CGRectMake(200.0, 10.0, 60.0, 30)]; |
1610 | - [contactSync addTarget:self action:@selector(contactSyncAction:) forControlEvents:UIControlEventValueChanged]; |
1611 | - if([mode isEqualToString:@"none"]){ |
1612 | - [contactSync setOn:NO animated:NO]; |
1613 | - }else{ |
1614 | - [contactSync setOn:YES animated:NO]; |
1615 | - } |
1616 | - |
1617 | - contactSyncCell.textLabel.text = NSLocalizedString(@"Sync", @"Sync"); |
1618 | - [contactSyncCell addSubview:contactSync]; |
1619 | - |
1620 | - [syncWayCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
1621 | - syncWayCell.textLabel.text = NSLocalizedString(@"Sync Direction",@"Sync Direction"); |
1622 | - syncWayLabel = [[UILabel alloc] initWithFrame:CGRectMake(140.0, 7.0, 140.0, 25.0)]; |
1623 | - if([syncValue isEqualToString:@"two-way"]){ |
1624 | - [syncWayLabel setText:NSLocalizedString(@"Two Way",@"Two Way")]; |
1625 | - }else if([syncValue isEqualToString:@"one-way-from-client"]){ |
1626 | - [syncWayLabel setText:NSLocalizedString(@"From Client",@"From Client")]; |
1627 | - }else if([syncValue isEqualToString:@"one-way-from-server"]){ |
1628 | - [syncWayLabel setText:NSLocalizedString(@"From Server",@"From Server")]; |
1629 | - }else if([syncValue isEqualToString:@"none"]){ |
1630 | - [syncWayLabel setText:NSLocalizedString(@"Disabled",@"Disabled")]; |
1631 | - } |
1632 | - [syncWayLabel setTextColor:funBlue]; |
1633 | - [syncWayLabel setFont:small_font]; |
1634 | - [syncWayLabel setTextAlignment:UITextAlignmentRight]; |
1635 | - |
1636 | - [syncWayCell addSubview:syncWayLabel]; |
1637 | - |
1638 | - |
1639 | - remoteURI = [[UITextField alloc] initWithFrame:CGRectMake(140.0,11.0, 160.0, 25.0)]; |
1640 | - remoteURI.borderStyle = UITextBorderStyleNone; |
1641 | - remoteURI.textColor = funBlue; |
1642 | - remoteURI.font = small_font; |
1643 | - [remoteURI setTextAlignment:UITextAlignmentRight]; |
1644 | - remoteURI.autocorrectionType = UITextAutocorrectionTypeNo; |
1645 | - remoteURI.text = remoteURIValue; |
1646 | - remoteURI.backgroundColor = [UIColor whiteColor]; |
1647 | - remoteURI.keyboardType = UIKeyboardTypeDefault; |
1648 | - remoteURI.returnKeyType = UIReturnKeyDone; |
1649 | - remoteURI.clearButtonMode = UITextFieldViewModeNever; |
1650 | - [remoteURI addTarget:self action:@selector(remoteURIAction:) forControlEvents:UIControlEventAllEditingEvents]; |
1651 | - remoteURICell.textLabel.text = NSLocalizedString(@"Remote URI", @"Remote URI"); |
1652 | - [remoteURICell setSelectionStyle:UITableViewCellSelectionStyleNone]; |
1653 | - [remoteURICell addSubview:remoteURI]; |
1654 | - |
1655 | - |
1656 | - companyDirectory = [[UISwitch alloc] initWithFrame:CGRectMake(200.0, 10.0, 60.0, 30)]; |
1657 | - [companyDirectory addTarget:self action:@selector(companyDirectoryAction:) forControlEvents:UIControlEventValueChanged]; |
1658 | - [companyDirectory setOn:( |
1659 | - ([remoteURI.text length] >= [@"-shared" length]) |
1660 | - && |
1661 | - ([ |
1662 | - [remoteURI.text substringFromIndex: |
1663 | - ([remoteURI.text length] - ([@"-shared" length]))] |
1664 | - compare:@"-shared"] |
1665 | - == 0) |
1666 | - ) |
1667 | - animated:NO]; |
1668 | - |
1669 | - companyDirectoryCell = [[UITableViewCell alloc]init]; |
1670 | - companyDirectoryCell.textLabel.text = NSLocalizedString(@"Company Directory", @"Company Directory"); |
1671 | - [companyDirectoryCell addSubview:companyDirectory]; |
1672 | - if (CUSTOM_CONTACTS_COMPANY_DIRECTORY) { // BEGIN CUSTOM |
1673 | - remoteURI.enabled = false; |
1674 | - remoteURI.textColor = [UIColor grayColor]; |
1675 | - } // END CUSTOM |
1676 | - [mode release]; |
1677 | -} |
1678 | - |
1679 | - |
1680 | - |
1681 | -//TABLE VIEW |
1682 | - |
1683 | -- (UITableViewCell *)tableView:(UITableView *)contactsTable cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
1684 | - switch (indexPath.section) { |
1685 | - case 0: |
1686 | - switch (indexPath.row) { |
1687 | - case 0: |
1688 | - return syncWayCell; |
1689 | - default: |
1690 | - break; |
1691 | - } |
1692 | - break; |
1693 | - case 1: |
1694 | - { |
1695 | - if ([self isPathEnabled]){ |
1696 | - switch (indexPath.row) { |
1697 | - case 0: |
1698 | - return pathCell; |
1699 | - case 1: |
1700 | - return remoteURICell; |
1701 | - default: |
1702 | - break; |
1703 | - } |
1704 | - }else{ |
1705 | - switch (indexPath.row) { |
1706 | - case 0: |
1707 | - return remoteURICell; |
1708 | - default: |
1709 | - break; |
1710 | - } |
1711 | - } |
1712 | - |
1713 | - // This will always be last, so we dont need more switches |
1714 | - if (CUSTOM_CONTACTS_COMPANY_DIRECTORY) { // BEGIN CUSTOM |
1715 | - return companyDirectoryCell; |
1716 | - } // END CUSTOM |
1717 | - } |
1718 | - break; |
1719 | - default: |
1720 | - break; |
1721 | - } |
1722 | - return nil; |
1723 | -} |
1724 | - |
1725 | -- (void)tableView:(UITableView *)contactsTable didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
1726 | - UIViewController *targetViewController; |
1727 | - NSString * mode; |
1728 | - switch (indexPath.section) { |
1729 | - case 0: |
1730 | - switch (indexPath.row) { |
1731 | - case 0: |
1732 | - targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
1733 | - mode = [[FunambolAPI getInstance] getSync:@"addressbook"]; |
1734 | - [((SyncMethodsView*)targetViewController) setSyncMode:mode]; |
1735 | - [mode release]; |
1736 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
1737 | - break; |
1738 | - default: |
1739 | - break; |
1740 | - } |
1741 | - break; |
1742 | - default: |
1743 | - break; |
1744 | - } |
1745 | - |
1746 | -} |
1747 | - |
1748 | -- (NSInteger)tableView:(UITableView *)contactsTable numberOfRowsInSection:(NSInteger)section { |
1749 | - |
1750 | - switch (section) { |
1751 | - case 0: |
1752 | - return 1; |
1753 | - case 1: |
1754 | - { |
1755 | - int size = 1; |
1756 | - if (CUSTOM_CONTACTS_COMPANY_DIRECTORY) { // BEGIN CUSTOM |
1757 | - size++; |
1758 | - } // END CUSTOM |
1759 | - if ([self isPathEnabled]) { |
1760 | - size++; |
1761 | - } |
1762 | - return size; |
1763 | - } |
1764 | - break; |
1765 | - default: |
1766 | - break; |
1767 | - } |
1768 | - return 0;//should never happen |
1769 | -} |
1770 | - |
1771 | - |
1772 | - |
1773 | -- (NSInteger)numberOfSectionsInTableView:(UITableView *)contactsTable { |
1774 | - return 2; |
1775 | -} |
1776 | - |
1777 | -- (void) pathAction: (id)sender{ |
1778 | - |
1779 | -} |
1780 | - |
1781 | -- (void) remoteURIAction: (id)sender{ |
1782 | - |
1783 | - [[FunambolAPI getInstance] setURI:remoteURI.text syncsourcename:@"addressbook"]; |
1784 | - |
1785 | -} |
1786 | - |
1787 | -- (void) contactSyncAction: (id)sender{ |
1788 | - if([contactSync isOn]){ |
1789 | - [[FunambolAPI getInstance]setSync:@"two-way" source: @"addressbook"]; |
1790 | - syncWayCell.textLabel.textColor = [UIColor blackColor]; |
1791 | - |
1792 | - [syncWayLabel setText:NSLocalizedString(@"Two Way", @"Two Way")]; |
1793 | - }else { |
1794 | - [[FunambolAPI getInstance]setSync:@"none" source: @"addressbook"]; |
1795 | - syncWayCell.textLabel.textColor = [UIColor grayColor]; |
1796 | - [syncWayLabel setText:NSLocalizedString(@"Disabled", @"Disabled")]; |
1797 | - } |
1798 | - |
1799 | - |
1800 | -} |
1801 | - |
1802 | -- (void) companyDirectoryAction: (id)sender { |
1803 | - if ([companyDirectory isOn]) |
1804 | - { |
1805 | - if ([remoteURI.text length] < [@"-shared" length] || |
1806 | - [ |
1807 | - [remoteURI.text substringFromIndex: |
1808 | - ([remoteURI.text length] - ([@"-shared" length]))] |
1809 | - compare:@"-shared"] |
1810 | - != 0) |
1811 | - { |
1812 | - remoteURI.text = [NSString stringWithFormat:@"%@%@", remoteURI.text, @"-shared"]; |
1813 | - } |
1814 | - } |
1815 | - else |
1816 | - { |
1817 | - if ([remoteURI.text length] > [@"-shared" length] && |
1818 | - [[remoteURI.text substringFromIndex:([remoteURI.text length] - ([@"-shared" length]))] compare:@"-shared"] == 0) |
1819 | - { |
1820 | - remoteURI.text = [remoteURI.text substringToIndex:([remoteURI.text length] - ([@"-shared" length]))]; |
1821 | - } |
1822 | - } |
1823 | - |
1824 | - [[FunambolAPI getInstance] setURI:remoteURI.text syncsourcename:@"addressbook"]; |
1825 | - |
1826 | -} |
1827 | - |
1828 | -- (void)viewDidAppear:(BOOL)animated{ |
1829 | - NSString * mode = [[FunambolAPI getInstance] getSync:@"addressbook"]; |
1830 | - if([mode isEqualToString:@"none"]){ |
1831 | - [contactSync setOn:NO animated:YES]; |
1832 | - syncWayCell.textLabel.textColor = [UIColor grayColor]; |
1833 | - }else{ |
1834 | - [contactSync setOn:YES animated:YES]; |
1835 | - syncWayCell.textLabel.textColor = [UIColor blackColor]; |
1836 | - } |
1837 | - |
1838 | - if([mode isEqualToString:@"two-way"]){ |
1839 | - [syncWayLabel setText:NSLocalizedString(@"Two Way",@"Two Way")]; |
1840 | - }else if([mode isEqualToString:@"one-way-from-client"]){ |
1841 | - [syncWayLabel setText:NSLocalizedString(@"From Client",@"From Client")]; |
1842 | - }else if([mode isEqualToString:@"one-way-from-server"]){ |
1843 | - [syncWayLabel setText:NSLocalizedString(@"From Server",@"From Server")]; |
1844 | - }else if([mode isEqualToString:@"none"]){ |
1845 | - [syncWayLabel setText:NSLocalizedString(@"Disabled",@"Disabled")]; |
1846 | - } |
1847 | - [mode release]; |
1848 | - |
1849 | - |
1850 | -} |
1851 | - |
1852 | -- (void)viewWillAppear:(BOOL)animated |
1853 | -{ |
1854 | - // this UIViewController is about to re-appear, make sure we remove the current selection in our table view |
1855 | - NSIndexPath *indexPath = [contactsTable indexPathForSelectedRow]; |
1856 | - [contactsTable deselectRowAtIndexPath:indexPath animated:NO]; |
1857 | -} |
1858 | - |
1859 | -- (void) dealloc { |
1860 | - [contactsTable release]; |
1861 | - |
1862 | - [contactSyncCell release]; |
1863 | - [syncWayCell release]; |
1864 | - [remoteURICell release]; |
1865 | - [pathCell release]; |
1866 | - |
1867 | - [syncValue release]; |
1868 | - [remoteURIValue release]; |
1869 | - |
1870 | - [contactSync release]; |
1871 | - [remoteURI release]; |
1872 | - [path release]; |
1873 | - [menuList release]; |
1874 | - |
1875 | - [small_font release]; |
1876 | - |
1877 | - [funBlue release]; |
1878 | - [syncWayLabel release]; |
1879 | - |
1880 | - [companyDirectory release]; |
1881 | - [companyDirectoryCell release]; |
1882 | - |
1883 | - |
1884 | - [super dealloc]; |
1885 | -} |
1886 | - |
1887 | -- (void) reload { |
1888 | - |
1889 | -} |
1890 | -@end |
1891 | |
1892 | === removed file 'iPhoneApp/UI/src/LogLevelView.mm' |
1893 | --- iPhoneApp/UI/src/LogLevelView.mm 2010-07-22 20:21:36 +0000 |
1894 | +++ iPhoneApp/UI/src/LogLevelView.mm 1970-01-01 00:00:00 +0000 |
1895 | @@ -1,231 +0,0 @@ |
1896 | -/* |
1897 | - * Funambol is a mobile platform developed by Funambol, Inc. |
1898 | - * Copyright (C) 2008 Funambol, Inc. |
1899 | - * |
1900 | - * This program is free software; you can redistribute it and/or modify it under |
1901 | - * the terms of the GNU Affero General Public License version 3 as published by |
1902 | - * the Free Software Foundation with the addition of the following permission |
1903 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
1904 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
1905 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
1906 | - * |
1907 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
1908 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
1909 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
1910 | - * details. |
1911 | - * |
1912 | - * You should have received a copy of the GNU Affero General Public License |
1913 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
1914 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
1915 | - * MA 02110-1301 USA. |
1916 | - * |
1917 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
1918 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
1919 | - * |
1920 | - * The interactive user interfaces in modified source and object code versions |
1921 | - * of this program must display Appropriate Legal Notices, as required under |
1922 | - * Section 5 of the GNU Affero General Public License version 3. |
1923 | - * |
1924 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
1925 | - * version 3, these Appropriate Legal Notices must retain the display of the |
1926 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
1927 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
1928 | - * the words "Powered by Funambol". |
1929 | - */ |
1930 | - |
1931 | - |
1932 | -#import <UIKit/UIKit.h> |
1933 | - |
1934 | - |
1935 | -#import "common.h" |
1936 | -#import "LogLevelView.h" |
1937 | -#import "base/Log.h" |
1938 | -#import "UIController.h" |
1939 | -#import "FunambolAPI.h" |
1940 | - |
1941 | -@implementation LogLevelView |
1942 | - |
1943 | -- (id)init { |
1944 | - self = [super init]; |
1945 | - if (self) |
1946 | - { |
1947 | - // this title will appear in the navigation bar |
1948 | - self.title = NSLocalizedString(@"LogLevel",@"LogLevel") ; |
1949 | - } |
1950 | - return self; |
1951 | -} |
1952 | - |
1953 | -- (void) loadView{ |
1954 | - UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
1955 | - self.view = contentView; |
1956 | - |
1957 | - errorCell = [[UITableViewCell alloc]init]; |
1958 | - errorCell.textLabel.text = NSLocalizedString(@"Error",@"Error") ; |
1959 | - infoCell = [[UITableViewCell alloc]init]; |
1960 | - infoCell.textLabel.text = NSLocalizedString(@"Info",@"Info"); |
1961 | - debugCell = [[UITableViewCell alloc]init]; |
1962 | - debugCell.textLabel.text = NSLocalizedString(@"Debug",@"Debug"); |
1963 | - int loglevelValue = [[FunambolAPI getInstance] getLogLevel]; |
1964 | - |
1965 | - switch (loglevelValue) { |
1966 | - case 0: |
1967 | - [errorCell setAccessoryType:UITableViewCellAccessoryCheckmark]; |
1968 | - [infoCell setAccessoryType:UITableViewCellAccessoryNone]; |
1969 | - [debugCell setAccessoryType:UITableViewCellAccessoryNone]; |
1970 | - break; |
1971 | - case 1: |
1972 | - [infoCell setAccessoryType:UITableViewCellAccessoryCheckmark]; |
1973 | - [errorCell setAccessoryType:UITableViewCellAccessoryNone]; |
1974 | - [debugCell setAccessoryType:UITableViewCellAccessoryNone]; |
1975 | - break; |
1976 | - case 2: |
1977 | - [debugCell setAccessoryType:UITableViewCellAccessoryCheckmark]; |
1978 | - [infoCell setAccessoryType:UITableViewCellAccessoryNone]; |
1979 | - [errorCell setAccessoryType:UITableViewCellAccessoryNone]; |
1980 | - break; |
1981 | - default: |
1982 | - break; |
1983 | - } |
1984 | - |
1985 | - |
1986 | - logTable = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; |
1987 | - logTable.delegate = self; |
1988 | - logTable.dataSource = self; |
1989 | - logTable.rowHeight = 40; |
1990 | - [logTable reloadData]; |
1991 | - |
1992 | - [self.view addSubview:logTable]; |
1993 | - |
1994 | -} |
1995 | - |
1996 | -//TABLE VIEW |
1997 | - |
1998 | -- (void)viewWillAppear:(BOOL)animated |
1999 | -{ |
2000 | - // this UIViewController is about to re-appear, make sure we remove the current selection in our table view |
2001 | - NSIndexPath *tableSelection = [logTable indexPathForSelectedRow]; |
2002 | - [logTable deselectRowAtIndexPath:tableSelection animated:NO]; |
2003 | -} |
2004 | - |
2005 | -- (void)tableView:(UITableView *)settingsTable didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
2006 | - switch (indexPath.row) { |
2007 | - case 0: |
2008 | - [self errorAction:nil]; |
2009 | - break; |
2010 | - case 1: |
2011 | - [self infoAction:nil]; |
2012 | - break; |
2013 | - case 2: |
2014 | - [self debugAction:nil]; |
2015 | - break; |
2016 | - default: |
2017 | - break; |
2018 | - } |
2019 | -} |
2020 | -/* |
2021 | -- (UITableViewCellAccessoryType)tableView:(UITableView *)logTable accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath |
2022 | -{ |
2023 | - int loglevelValue = [[FunambolAPI getInstance] getLogLevel]; |
2024 | - switch (indexPath.row) { |
2025 | - case 0: |
2026 | - if (loglevelValue == 0 ){ |
2027 | - return UITableViewCellAccessoryCheckmark; |
2028 | - }else{ |
2029 | - return UITableViewCellAccessoryNone; |
2030 | - } |
2031 | - case 1: |
2032 | - if (loglevelValue == 1 ){ |
2033 | - return UITableViewCellAccessoryCheckmark; |
2034 | - }else{ |
2035 | - return UITableViewCellAccessoryNone; |
2036 | - } |
2037 | - case 2: |
2038 | - if (loglevelValue == 2 ){ |
2039 | - return UITableViewCellAccessoryCheckmark; |
2040 | - }else{ |
2041 | - return UITableViewCellAccessoryNone; |
2042 | - } |
2043 | - |
2044 | - default: |
2045 | - break; |
2046 | - } |
2047 | - return UITableViewCellAccessoryNone; |
2048 | -}*/ |
2049 | - |
2050 | -- (UITableViewCell *)tableView:(UITableView *)logTable cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
2051 | - |
2052 | - switch (indexPath.section) { |
2053 | - //account table section |
2054 | - case 0: |
2055 | - switch (indexPath.row) { |
2056 | - case 0: |
2057 | - return errorCell; |
2058 | - case 1: |
2059 | - return infoCell; |
2060 | - case 2: |
2061 | - return debugCell; |
2062 | - default: |
2063 | - break; |
2064 | - } |
2065 | - default: |
2066 | - break; |
2067 | - } |
2068 | - return nil; |
2069 | -} |
2070 | - |
2071 | -- (NSInteger)tableView:(UITableView *)logTable numberOfRowsInSection:(NSInteger)section { |
2072 | - |
2073 | - return 3; |
2074 | -} |
2075 | - |
2076 | - |
2077 | - |
2078 | -- (NSInteger)numberOfSectionsInTableView:(UITableView *)logTable { |
2079 | - return 1; |
2080 | -} |
2081 | - |
2082 | -- (void)reload { |
2083 | - [self init]; |
2084 | -} |
2085 | - |
2086 | -- (void)backAction:(id)sender |
2087 | -{ |
2088 | -} |
2089 | - |
2090 | - |
2091 | -- (void)errorAction:(id)sender |
2092 | -{ |
2093 | - [errorCell setAccessoryType:UITableViewCellAccessoryCheckmark]; |
2094 | - [infoCell setAccessoryType:UITableViewCellAccessoryNone]; |
2095 | - [debugCell setAccessoryType:UITableViewCellAccessoryNone]; |
2096 | - [[FunambolAPI getInstance] setLogLevel:0]; |
2097 | - |
2098 | -} |
2099 | - |
2100 | -- (void)infoAction:(id)sender |
2101 | -{ |
2102 | - |
2103 | - [errorCell setAccessoryType:UITableViewCellAccessoryNone]; |
2104 | - [infoCell setAccessoryType:UITableViewCellAccessoryCheckmark]; |
2105 | - [debugCell setAccessoryType:UITableViewCellAccessoryNone]; |
2106 | - [[FunambolAPI getInstance] setLogLevel:1]; |
2107 | -} |
2108 | - |
2109 | -- (void)debugAction:(id)sender |
2110 | -{ |
2111 | - |
2112 | - [errorCell setAccessoryType:UITableViewCellAccessoryNone]; |
2113 | - [infoCell setAccessoryType:UITableViewCellAccessoryNone]; |
2114 | - [debugCell setAccessoryType:UITableViewCellAccessoryCheckmark]; |
2115 | - [[FunambolAPI getInstance] setLogLevel:2]; |
2116 | -} |
2117 | - |
2118 | -- (void) dealloc{ |
2119 | - [logTable release]; |
2120 | - |
2121 | - [infoCell release]; |
2122 | - [debugCell release]; |
2123 | - [errorCell release]; |
2124 | - [super dealloc]; |
2125 | -} |
2126 | -@end |
2127 | |
2128 | === removed file 'iPhoneApp/UI/src/LogSettingsView.mm' |
2129 | --- iPhoneApp/UI/src/LogSettingsView.mm 2010-07-22 20:21:36 +0000 |
2130 | +++ iPhoneApp/UI/src/LogSettingsView.mm 1970-01-01 00:00:00 +0000 |
2131 | @@ -1,357 +0,0 @@ |
2132 | -/* |
2133 | - * Funambol is a mobile platform developed by Funambol, Inc. |
2134 | - * Copyright (C) 2008 Funambol, Inc. |
2135 | - * |
2136 | - * This program is free software; you can redistribute it and/or modify it under |
2137 | - * the terms of the GNU Affero General Public License version 3 as published by |
2138 | - * the Free Software Foundation with the addition of the following permission |
2139 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
2140 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
2141 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
2142 | - * |
2143 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
2144 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
2145 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
2146 | - * details. |
2147 | - * |
2148 | - * You should have received a copy of the GNU Affero General Public License |
2149 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
2150 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
2151 | - * MA 02110-1301 USA. |
2152 | - * |
2153 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
2154 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
2155 | - * |
2156 | - * The interactive user interfaces in modified source and object code versions |
2157 | - * of this program must display Appropriate Legal Notices, as required under |
2158 | - * Section 5 of the GNU Affero General Public License version 3. |
2159 | - * |
2160 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
2161 | - * version 3, these Appropriate Legal Notices must retain the display of the |
2162 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
2163 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
2164 | - * the words "Powered by Funambol". |
2165 | - */ |
2166 | - |
2167 | - |
2168 | -#import <UIKit/UIKit.h> |
2169 | - |
2170 | - |
2171 | -#import "common.h" |
2172 | -#import "LogSettingsView.h" |
2173 | -#import "base/Log.h" |
2174 | -#import "UIController.h" |
2175 | -#import "LogLevelView.h" |
2176 | -#import "LogView.h" |
2177 | -#import "customs.h" |
2178 | -#import "base/util/StringBuffer.h" |
2179 | -#import "stringUtils.h" |
2180 | -#import "FunambolAPI.h" |
2181 | - |
2182 | - |
2183 | - |
2184 | -@implementation LogSettingsView |
2185 | - |
2186 | -- (BOOL) isSendLogEnabled{ |
2187 | - return (CUSTOM_SEND_LOG != 0); |
2188 | -} |
2189 | - |
2190 | -- (id)init { self = [super init]; |
2191 | - if (self) |
2192 | - { |
2193 | - // this title will appear in the navigation bar |
2194 | - self.title = NSLocalizedString(@"Log",@"Log"); |
2195 | - |
2196 | - menuList = [[NSMutableArray alloc] init]; |
2197 | - } |
2198 | - funBlue = [[UIColor alloc] initWithRed:FUNBLUE_RGB_RED green:FUNBLUE_RGB_GREEN blue:FUNBLUE_RGB_BLUE alpha:1.0]; |
2199 | - return self; |
2200 | -} |
2201 | - |
2202 | -- (void) loadView{ |
2203 | - UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
2204 | - self.view = contentView; |
2205 | - [contentView release]; |
2206 | - small_font = [UIFont systemFontOfSize:15]; |
2207 | - logLevelLabel = [[UILabel alloc] initWithFrame:CGRectMake(140.0, 7.0, 140.0, 25.0)]; |
2208 | - |
2209 | - int loglevelValue = [[FunambolAPI getInstance] getLogLevel]; |
2210 | - if (loglevelValue == 0 ){ |
2211 | - [logLevelLabel setText:NSLocalizedString(@"Error",@"Error")]; |
2212 | - }else if (loglevelValue == 1 ){ |
2213 | - [logLevelLabel setText:NSLocalizedString(@"Info",@"Info")]; |
2214 | - }else if (loglevelValue == 2 ){ |
2215 | - [logLevelLabel setText:NSLocalizedString(@"Debug",@"Debug")]; |
2216 | - } |
2217 | - |
2218 | - [logLevelLabel setTextColor:funBlue]; |
2219 | - [logLevelLabel setFont:small_font]; |
2220 | - [logLevelLabel setTextAlignment:UITextAlignmentRight]; |
2221 | - |
2222 | - self.view.autoresizesSubviews = YES; |
2223 | - |
2224 | - LogLevelView* loglevelview = [[LogLevelView alloc] init]; |
2225 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
2226 | - NSLocalizedString(@"Account", @""), @"title", |
2227 | - loglevelview, @"viewController", |
2228 | - nil]]; |
2229 | - [loglevelview release]; |
2230 | - |
2231 | - LogView* logview = [[LogView alloc] init]; |
2232 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
2233 | - NSLocalizedString(@"Account", @""), @"title", |
2234 | - logview, @"viewController", |
2235 | - nil]]; |
2236 | - [logview release]; |
2237 | - |
2238 | - |
2239 | - logTable = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; |
2240 | - logTable.delegate = self; |
2241 | - logTable.dataSource = self; |
2242 | - logTable.rowHeight = 40; |
2243 | - [logTable reloadData]; |
2244 | - |
2245 | - |
2246 | - viewLogCell = [[UITableViewCell alloc]init]; |
2247 | - viewLogCell.textLabel.text = NSLocalizedString(@"View Log",@"ViewLog"); |
2248 | - [viewLogCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
2249 | - |
2250 | - sendLogCell = [[UITableViewCell alloc]init]; |
2251 | - sendLogCell.textLabel.text = NSLocalizedString(@"Send Log",@"Send Log"); |
2252 | - [sendLogCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
2253 | - |
2254 | - logLevelCell = [[UITableViewCell alloc]init]; |
2255 | - logLevelCell.textLabel.text = NSLocalizedString(@"LogLevel",@"Log Level"); |
2256 | - [logLevelCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
2257 | - [logLevelCell addSubview:logLevelLabel]; |
2258 | - |
2259 | - [self.view addSubview:logTable]; |
2260 | - |
2261 | -} |
2262 | - |
2263 | -//TABLE VIEW |
2264 | - |
2265 | -- (UITableViewCell *)tableView:(UITableView *)logTable cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
2266 | - |
2267 | - if([self isSendLogEnabled]){ |
2268 | - switch (indexPath.section) { |
2269 | - //account table section |
2270 | - case 0: |
2271 | - switch (indexPath.row) { |
2272 | - case 0: |
2273 | - return logLevelCell; |
2274 | - default: |
2275 | - break; |
2276 | - } |
2277 | - break; |
2278 | - //sources table section |
2279 | - case 1: |
2280 | - switch (indexPath.row) { |
2281 | - case 0: |
2282 | - return viewLogCell; |
2283 | - case 1: |
2284 | - return sendLogCell; |
2285 | - default: |
2286 | - break; |
2287 | - } |
2288 | - default: |
2289 | - break; |
2290 | - } |
2291 | - }else{ |
2292 | - switch (indexPath.section) { |
2293 | - //account table section |
2294 | - case 0: |
2295 | - switch (indexPath.row) { |
2296 | - case 0: |
2297 | - return logLevelCell; |
2298 | - default: |
2299 | - break; |
2300 | - } |
2301 | - break; |
2302 | - //sources table section |
2303 | - case 1: |
2304 | - switch (indexPath.row) { |
2305 | - case 0: |
2306 | - return viewLogCell; |
2307 | - default: |
2308 | - break; |
2309 | - } |
2310 | - default: |
2311 | - break; |
2312 | - } |
2313 | - } |
2314 | - return nil; |
2315 | -} |
2316 | - |
2317 | -- (void)viewWillAppear:(BOOL)animated |
2318 | -{ |
2319 | - // this UIViewController is about to re-appear, make sure we remove the current selection in our table view |
2320 | - NSIndexPath *tableSelection = [logTable indexPathForSelectedRow]; |
2321 | - [logTable deselectRowAtIndexPath:tableSelection animated:NO]; |
2322 | -} |
2323 | - |
2324 | -- (void)tableView:(UITableView *)logTable didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
2325 | - UIViewController *targetViewController; |
2326 | - if([self isSendLogEnabled]){ |
2327 | - switch (indexPath.section) { |
2328 | - case 0: |
2329 | - switch (indexPath.row) { |
2330 | - case 0: |
2331 | - targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
2332 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
2333 | - break; |
2334 | - default: |
2335 | - break; |
2336 | - } |
2337 | - break; |
2338 | - case 1: |
2339 | - switch (indexPath.row) { |
2340 | - case 0: |
2341 | - targetViewController = [[menuList objectAtIndex: 1] objectForKey:@"viewController"]; |
2342 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
2343 | - break; |
2344 | - case 1: |
2345 | - [self sendLogAction:self]; |
2346 | - break; |
2347 | - default: |
2348 | - break; |
2349 | - } |
2350 | - break; |
2351 | - default: |
2352 | - break; |
2353 | - } |
2354 | - }else{ |
2355 | - switch (indexPath.section) { |
2356 | - case 0: |
2357 | - switch (indexPath.row) { |
2358 | - case 0: |
2359 | - targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
2360 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
2361 | - break; |
2362 | - default: |
2363 | - break; |
2364 | - } |
2365 | - break; |
2366 | - case 1: |
2367 | - switch (indexPath.row) { |
2368 | - case 0: |
2369 | - targetViewController = [[menuList objectAtIndex: 1] objectForKey:@"viewController"]; |
2370 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
2371 | - break; |
2372 | - default: |
2373 | - break; |
2374 | - } |
2375 | - break; |
2376 | - default: |
2377 | - break; |
2378 | - } |
2379 | - } |
2380 | -} |
2381 | -- (NSInteger)tableView:(UITableView *)logTable numberOfRowsInSection:(NSInteger)section { |
2382 | - if([self isSendLogEnabled]){ |
2383 | - switch (section) { |
2384 | - case 0: |
2385 | - return 1; |
2386 | - case 1: |
2387 | - return 2; |
2388 | - default: |
2389 | - break; |
2390 | - } |
2391 | - }else{ |
2392 | - switch (section) { |
2393 | - case 0: |
2394 | - return 1; |
2395 | - case 1: |
2396 | - return 1; |
2397 | - default: |
2398 | - break; |
2399 | - } |
2400 | - } |
2401 | - return 0;//should never happen |
2402 | -} |
2403 | - |
2404 | - |
2405 | - |
2406 | -- (NSInteger)numberOfSectionsInTableView:(UITableView *)logTable { |
2407 | - return 2; |
2408 | -} |
2409 | - |
2410 | -- (void)reload { |
2411 | -} |
2412 | - |
2413 | -- (void) dealloc{ |
2414 | - [logTable release]; |
2415 | - |
2416 | - [logLevelCell release]; |
2417 | - [viewLogCell release]; |
2418 | - [sendLogCell release]; |
2419 | - |
2420 | - [small_font release]; |
2421 | - [logLevelLabel release]; |
2422 | - [funBlue release]; |
2423 | - |
2424 | - [menuList release]; |
2425 | - [super dealloc]; |
2426 | - |
2427 | -} |
2428 | - |
2429 | -- (void)sendLogAction:(id)sender { |
2430 | - NSString *documentsDirectory = getiphoneHomeDir(); |
2431 | - |
2432 | - NSString *s = [NSString stringWithFormat:@"%@/synclog.txt",documentsDirectory]; |
2433 | - |
2434 | - NSFileHandle *logFile = [NSFileHandle fileHandleForReadingAtPath:s]; |
2435 | - NSString *logString; |
2436 | - |
2437 | - if (logFile != nil) { |
2438 | - NSData *logData = [logFile readDataToEndOfFile]; |
2439 | - [logFile closeFile]; |
2440 | - logString = [[NSString alloc] initWithData:logData encoding:1]; |
2441 | - Funambol::StringBuffer logs([logString UTF8String]); |
2442 | - [logString release]; |
2443 | - logs.replaceAll("<", "<",0); |
2444 | - logs.replaceAll(">", ">",0); |
2445 | - logString = [[NSString alloc] initWithCString:logs.c_str()]; |
2446 | - } else { |
2447 | - logString = @"Cannot open log"; |
2448 | - } |
2449 | - |
2450 | - NSString * to = NSLocalizedString(@"Send To", @"Send To"); |
2451 | - NSString * subj = NSLocalizedString(@"Sending Logs", @"Sending Logs"); |
2452 | - |
2453 | - CFStringRef cto = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (const CFStringRef)to, CFSTR(""), CFSTR(""), kCFStringEncodingUTF8); |
2454 | - CFStringRef csubj = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (const CFStringRef)subj, CFSTR(""), CFSTR(""), kCFStringEncodingUTF8); |
2455 | - CFStringRef cbody = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (const CFStringRef)logString, CFSTR(""), CFSTR(""), kCFStringEncodingUTF8); |
2456 | - |
2457 | - NSString * url = [NSString stringWithFormat:@"mailto:%@?subject=%@&body=%@", (NSString*)cto, (NSString*)csubj, (NSString*)cbody]; |
2458 | - NSURL * URL = [NSURL URLWithString:url]; |
2459 | - |
2460 | - [logString release]; |
2461 | - |
2462 | - CFRelease(cto); |
2463 | - CFRelease(csubj); |
2464 | - CFRelease(cbody); |
2465 | - |
2466 | - if (URL) |
2467 | - { |
2468 | - [[UIApplication sharedApplication] openURL:URL]; |
2469 | - } |
2470 | - else |
2471 | - { |
2472 | - [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Alert", @"Alert") message:NSLocalizedString(@"Cannot Send Logs", @"Cannot Send Logs") |
2473 | - delegate:self cancelButtonTitle:NSLocalizedString(@"OK", @"OK") otherButtonTitles: nil]; |
2474 | - } |
2475 | -} |
2476 | - |
2477 | --(void)viewDidAppear:(BOOL)animated{ |
2478 | - int loglevelValue = [[FunambolAPI getInstance] getLogLevel]; |
2479 | - if (loglevelValue == 0 ){ |
2480 | - [logLevelLabel setText:NSLocalizedString(@"Error",@"Error")]; |
2481 | - }else if (loglevelValue == 1 ){ |
2482 | - [logLevelLabel setText:NSLocalizedString(@"Info",@"Info")]; |
2483 | - }else if (loglevelValue == 2 ){ |
2484 | - [logLevelLabel setText:NSLocalizedString(@"Debug",@"Debug")]; |
2485 | - } |
2486 | -} |
2487 | - |
2488 | -@end |
2489 | |
2490 | === removed file 'iPhoneApp/UI/src/LogView.mm' |
2491 | --- iPhoneApp/UI/src/LogView.mm 2010-07-22 20:21:36 +0000 |
2492 | +++ iPhoneApp/UI/src/LogView.mm 1970-01-01 00:00:00 +0000 |
2493 | @@ -1,120 +0,0 @@ |
2494 | -/* |
2495 | - * Funambol is a mobile platform developed by Funambol, Inc. |
2496 | - * Copyright (C) 2008 Funambol, Inc. |
2497 | - * |
2498 | - * This program is free software; you can redistribute it and/or modify it under |
2499 | - * the terms of the GNU Affero General Public License version 3 as published by |
2500 | - * the Free Software Foundation with the addition of the following permission |
2501 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
2502 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
2503 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
2504 | - * |
2505 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
2506 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
2507 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
2508 | - * details. |
2509 | - * |
2510 | - * You should have received a copy of the GNU Affero General Public License |
2511 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
2512 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
2513 | - * MA 02110-1301 USA. |
2514 | - * |
2515 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
2516 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
2517 | - * |
2518 | - * The interactive user interfaces in modified source and object code versions |
2519 | - * of this program must display Appropriate Legal Notices, as required under |
2520 | - * Section 5 of the GNU Affero General Public License version 3. |
2521 | - * |
2522 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
2523 | - * version 3, these Appropriate Legal Notices must retain the display of the |
2524 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
2525 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
2526 | - * the words "Powered by Funambol". |
2527 | - */ |
2528 | - |
2529 | - |
2530 | -#import <UIKit/UIKit.h> |
2531 | - |
2532 | -#import "common.h" |
2533 | -#import "LogView.h" |
2534 | -#import "base/Log.h" |
2535 | -#import "UIController.h" |
2536 | -#import "stringUtils.h" |
2537 | - |
2538 | -@implementation LogView |
2539 | - |
2540 | -- (id)init { |
2541 | - |
2542 | - self = [super init]; |
2543 | - if (self) |
2544 | - { |
2545 | - // this title will appear in the navigation bar |
2546 | - self.title = NSLocalizedString(@"View Log",@"View Log"); |
2547 | - |
2548 | - } |
2549 | - return self; |
2550 | -} |
2551 | - |
2552 | -- (void) loadView{ |
2553 | - UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
2554 | - self.view = contentView; |
2555 | - small_font = [UIFont systemFontOfSize:10]; |
2556 | - |
2557 | - logTextView = [UITextView alloc]; |
2558 | - [logTextView initWithFrame: self.view.bounds]; |
2559 | - |
2560 | - [self reload]; |
2561 | - |
2562 | - [logTextView setEditable:NO]; |
2563 | - [logTextView setFont:small_font]; |
2564 | - [self.view addSubview:logTextView]; |
2565 | -} |
2566 | - |
2567 | -- (void)viewWillAppear:(BOOL)animated |
2568 | -{ |
2569 | - NSString *documentsDirectory = getiphoneHomeDir(); |
2570 | - |
2571 | - NSString *s = [NSString stringWithFormat:@"%@/synclog.txt",documentsDirectory]; |
2572 | - |
2573 | - NSFileHandle *logFile = [NSFileHandle fileHandleForReadingAtPath:s]; |
2574 | - NSString *logString; |
2575 | - |
2576 | - if (logFile != nil) { |
2577 | - NSData *logData = [logFile readDataToEndOfFile]; |
2578 | - [logFile closeFile]; |
2579 | - logString = [[NSString alloc] initWithData:logData encoding:1]; |
2580 | - } else { |
2581 | - logString = @"Cannot open log"; |
2582 | - } |
2583 | - |
2584 | - [logTextView setText:logString]; |
2585 | -} |
2586 | - |
2587 | -- (void)reload { |
2588 | - |
2589 | - NSString *documentsDirectory = getiphoneHomeDir(); |
2590 | - |
2591 | - NSString *s = [NSString stringWithFormat:@"%@/synclog.txt",documentsDirectory]; |
2592 | - |
2593 | - NSFileHandle *logFile = [NSFileHandle fileHandleForReadingAtPath:s]; |
2594 | - NSString *logString; |
2595 | - |
2596 | - if (logFile != nil) { |
2597 | - NSData *logData = [logFile readDataToEndOfFile]; |
2598 | - [logFile closeFile]; |
2599 | - logString = [[NSString alloc] initWithData:logData encoding:1]; |
2600 | - } else { |
2601 | - logString = @"Cannot open log"; |
2602 | - } |
2603 | - |
2604 | - [logTextView setText:logString]; |
2605 | -} |
2606 | - |
2607 | --(void) dealloc{ |
2608 | - [logTextView release]; |
2609 | - [small_font release]; |
2610 | - [super dealloc]; |
2611 | -} |
2612 | - |
2613 | -@end |
2614 | |
2615 | === removed file 'iPhoneApp/UI/src/LoginManager.mm' |
2616 | --- iPhoneApp/UI/src/LoginManager.mm 2010-07-22 20:21:36 +0000 |
2617 | +++ iPhoneApp/UI/src/LoginManager.mm 1970-01-01 00:00:00 +0000 |
2618 | @@ -1,59 +0,0 @@ |
2619 | -/* |
2620 | - * Funambol is a mobile platform developed by Funambol, Inc. |
2621 | - * Copyright (C) 2010 Funambol, Inc. |
2622 | - * |
2623 | - * This program is free software; you can redistribute it and/or modify it under |
2624 | - * the terms of the GNU Affero General Public License version 3 as published by |
2625 | - * the Free Software Foundation with the addition of the following permission |
2626 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
2627 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
2628 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
2629 | - * |
2630 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
2631 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
2632 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
2633 | - * details. |
2634 | - * |
2635 | - * You should have received a copy of the GNU Affero General Public License |
2636 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
2637 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
2638 | - * MA 02110-1301 USA. |
2639 | - * |
2640 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
2641 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
2642 | - * |
2643 | - * The interactive user interfaces in modified source and object code versions |
2644 | - * of this program must display Appropriate Legal Notices, as required under |
2645 | - * Section 5 of the GNU Affero General Public License version 3. |
2646 | - * |
2647 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
2648 | - * version 3, these Appropriate Legal Notices must retain the display of the |
2649 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
2650 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
2651 | - * the words "Powered by Funambol". |
2652 | - */ |
2653 | - |
2654 | -#import "LoginManager.h" |
2655 | - |
2656 | -@implementation LoginManager |
2657 | - |
2658 | -- (id) init |
2659 | -{ |
2660 | - return [super init]; |
2661 | -} |
2662 | - |
2663 | -- (BOOL) login |
2664 | -{ |
2665 | - return YES; |
2666 | -} |
2667 | - |
2668 | -- (void)dealloc |
2669 | -{ |
2670 | - [super dealloc]; |
2671 | -} |
2672 | - |
2673 | -- (void) setCredentials:(NSString*) value{ |
2674 | - credentials = value; |
2675 | -} |
2676 | - |
2677 | -@end |
2678 | |
2679 | === modified file 'iPhoneApp/UI/src/MainSingleView.mm' |
2680 | --- iPhoneApp/UI/src/MainSingleView.mm 2010-08-16 07:13:14 +0000 |
2681 | +++ iPhoneApp/UI/src/MainSingleView.mm 2010-08-20 00:36:44 +0000 |
2682 | @@ -38,7 +38,6 @@ |
2683 | #import "common.h" |
2684 | #import "MainSingleView.h" |
2685 | #import "AccountView.h" |
2686 | -#import "SettingsSingleView.h" |
2687 | #import "base/Log.h" |
2688 | #import "UIController.h" |
2689 | #import "FunambolAPI.h" |
2690 | @@ -54,47 +53,31 @@ |
2691 | @implementation MainSingleView |
2692 | |
2693 | - (id)init { |
2694 | - |
2695 | - syncContactText = nil; |
2696 | - self = [super init]; |
2697 | - if (self) |
2698 | - { |
2699 | - // this title will appear in the navigation bar |
2700 | + if (self = [super init]) { |
2701 | self.title = NSLocalizedString(@"AppName",@"Funambol"); |
2702 | - menuList = [[NSMutableArray alloc] init]; |
2703 | + syncContactText = nil; |
2704 | } |
2705 | return self; |
2706 | } |
2707 | |
2708 | -- (void) didReceiveMemoryWarning{ |
2709 | +- (void)didReceiveMemoryWarning { |
2710 | |
2711 | [super didReceiveMemoryWarning]; |
2712 | - LOG.error("Memory Warning!!!"); |
2713 | - //exit(-2);//TODO remove! |
2714 | - |
2715 | + LOG.error("Memory Warning!!!"); |
2716 | } |
2717 | |
2718 | - (void) loadView{ |
2719 | UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
2720 | self.view = contentView; |
2721 | [contentView release]; |
2722 | - |
2723 | - SettingsSingleView* settingsview = [[SettingsSingleView alloc]init]; |
2724 | - [menuList addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys: |
2725 | - NSLocalizedString(@"Settings", @""), @"title", |
2726 | - settingsview, @"viewController", |
2727 | - nil]]; |
2728 | - [settingsview release]; |
2729 | - |
2730 | - |
2731 | + |
2732 | if (credentials) { |
2733 | AccountView* accountview = [[AccountView alloc]init]; |
2734 | [accountview setCredentials:credentials]; |
2735 | [[self navigationController] pushViewController:accountview animated:NO]; |
2736 | } else { |
2737 | if ([self checkConfigCredentials] == YES) { |
2738 | - AccountView* accountview = [[AccountView alloc]init]; |
2739 | - //[accountview setCredentials:nil]; |
2740 | + AccountView* accountview = [[AccountView alloc] init]; |
2741 | [[self navigationController] pushViewController:accountview animated:NO]; |
2742 | } |
2743 | } |
2744 | @@ -287,9 +270,9 @@ |
2745 | |
2746 | - (void)settingsAction:(id)sender |
2747 | { |
2748 | - UIViewController *targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
2749 | - |
2750 | - UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:targetViewController] autorelease]; |
2751 | + AccountView *settings = [[[AccountView alloc] init] autorelease]; |
2752 | + settings.presentedModally = YES; |
2753 | + UINavigationController *nav = [[[UINavigationController alloc] initWithRootViewController:settings] autorelease]; |
2754 | nav.navigationBar.barStyle = UIBarStyleBlackOpaque; |
2755 | nav.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; |
2756 | [self presentModalViewController:nav animated:YES]; |
2757 | |
2758 | === removed file 'iPhoneApp/UI/src/RecoverSyncMethodsView.mm' |
2759 | --- iPhoneApp/UI/src/RecoverSyncMethodsView.mm 2010-07-22 20:21:36 +0000 |
2760 | +++ iPhoneApp/UI/src/RecoverSyncMethodsView.mm 1970-01-01 00:00:00 +0000 |
2761 | @@ -1,65 +0,0 @@ |
2762 | -/* |
2763 | - * Funambol is a mobile platform developed by Funambol, Inc. |
2764 | - * Copyright (C) 2008 Funambol, Inc. |
2765 | - * |
2766 | - * This program is free software; you can redistribute it and/or modify it under |
2767 | - * the terms of the GNU Affero General Public License version 3 as published by |
2768 | - * the Free Software Foundation with the addition of the following permission |
2769 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
2770 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
2771 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
2772 | - * |
2773 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
2774 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
2775 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
2776 | - * details. |
2777 | - * |
2778 | - * You should have received a copy of the GNU Affero General Public License |
2779 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
2780 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
2781 | - * MA 02110-1301 USA. |
2782 | - * |
2783 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
2784 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
2785 | - * |
2786 | - * The interactive user interfaces in modified source and object code versions |
2787 | - * of this program must display Appropriate Legal Notices, as required under |
2788 | - * Section 5 of the GNU Affero General Public License version 3. |
2789 | - * |
2790 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
2791 | - * version 3, these Appropriate Legal Notices must retain the display of the |
2792 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
2793 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
2794 | - * the words "Powered by Funambol". |
2795 | - */ |
2796 | - |
2797 | -#import "RecoverSyncMethodsView.h" |
2798 | - |
2799 | -#import "FunambolAPI.h" |
2800 | - |
2801 | -@implementation RecoverSyncMethodsView |
2802 | - |
2803 | -- (id)init |
2804 | -{ |
2805 | - NSMutableArray * defaultModes = [[NSMutableArray alloc] init]; |
2806 | - [defaultModes addObject:@"recover-from-server"]; |
2807 | - [defaultModes addObject:@"recover-from-client"]; |
2808 | - self = [super initWithModes: defaultModes]; |
2809 | - return self; |
2810 | -} |
2811 | - |
2812 | -- (id)initWithModes:(NSArray*)syncModes { |
2813 | - self = [super initWithModes:syncModes]; |
2814 | - return self; |
2815 | -} |
2816 | - |
2817 | -- (void)recoverFromServerAction:(id)sender |
2818 | -{ |
2819 | - [[FunambolAPI getInstance] setRecoverMode:@"recover-from-server"]; |
2820 | -} |
2821 | - |
2822 | -- (void)recoverFromClientAction:(id)sender |
2823 | -{ |
2824 | - [[FunambolAPI getInstance] setRecoverMode:@"recover-from-client"]; |
2825 | -} |
2826 | -@end |
2827 | |
2828 | === removed file 'iPhoneApp/UI/src/RecoverView.mm' |
2829 | --- iPhoneApp/UI/src/RecoverView.mm 2010-07-22 20:21:36 +0000 |
2830 | +++ iPhoneApp/UI/src/RecoverView.mm 1970-01-01 00:00:00 +0000 |
2831 | @@ -1,339 +0,0 @@ |
2832 | -/* |
2833 | - * Funambol is a mobile platform developed by Funambol, Inc. |
2834 | - * Copyright (C) 2008 Funambol, Inc. |
2835 | - * |
2836 | - * This program is free software; you can redistribute it and/or modify it under |
2837 | - * the terms of the GNU Affero General Public License version 3 as published by |
2838 | - * the Free Software Foundation with the addition of the following permission |
2839 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
2840 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
2841 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
2842 | - * |
2843 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
2844 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
2845 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
2846 | - * details. |
2847 | - * |
2848 | - * You should have received a copy of the GNU Affero General Public License |
2849 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
2850 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
2851 | - * MA 02110-1301 USA. |
2852 | - * |
2853 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
2854 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
2855 | - * |
2856 | - * The interactive user interfaces in modified source and object code versions |
2857 | - * of this program must display Appropriate Legal Notices, as required under |
2858 | - * Section 5 of the GNU Affero General Public License version 3. |
2859 | - * |
2860 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
2861 | - * version 3, these Appropriate Legal Notices must retain the display of the |
2862 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
2863 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
2864 | - * the words "Powered by Funambol". |
2865 | - */ |
2866 | - |
2867 | - |
2868 | -#import "RecoverView.h" |
2869 | - |
2870 | -#import "RecoverSyncMethodsView.h" |
2871 | - |
2872 | -#import "CoreGraphics/CoreGraphics.h" |
2873 | - |
2874 | -#import "spds/constants.h" |
2875 | - |
2876 | - |
2877 | -@implementation RecoverView |
2878 | - |
2879 | -- (id) init { |
2880 | - self = [super init]; |
2881 | - if (self) |
2882 | - { |
2883 | - // this title will appear in the navigation bar |
2884 | - self.title = NSLocalizedString(@"Recover",@"Recover"); |
2885 | - menuList = [[NSMutableArray alloc] init]; |
2886 | - |
2887 | - [self setRecoverDirection:@"recover-from-server"]; |
2888 | - } |
2889 | - return self; |
2890 | -} |
2891 | - |
2892 | -- (void) dealloc { |
2893 | - // TODO: destruct |
2894 | - |
2895 | - [super dealloc]; |
2896 | -} |
2897 | - |
2898 | -- (void) loadView{ |
2899 | - |
2900 | - UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
2901 | - self.view = contentView; |
2902 | - [contentView release]; |
2903 | - |
2904 | - self.view.autoresizesSubviews = YES; |
2905 | - |
2906 | - small_font = [UIFont systemFontOfSize:15]; |
2907 | - |
2908 | - |
2909 | - SyncMethodsView* syncmethodsview = [[RecoverSyncMethodsView alloc] init]; |
2910 | - [syncmethodsview setSyncMode:@"recover-from-server"]; |
2911 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
2912 | - NSLocalizedString(@"Sync Methods", @""), @"title", |
2913 | - syncmethodsview, @"viewController", |
2914 | - nil]]; |
2915 | - [syncmethodsview release]; |
2916 | - |
2917 | - recoverTable = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; |
2918 | - recoverTable.delegate = self; |
2919 | - recoverTable.dataSource = self; |
2920 | - //recoverTable.rowHeight = 40; |
2921 | - [recoverTable setAutoresizesSubviews:YES]; |
2922 | - [recoverTable setAutoresizingMask:UIViewAutoresizingFlexibleHeight + UIViewAutoresizingFlexibleBottomMargin]; |
2923 | - |
2924 | - [self.view addSubview:recoverTable]; |
2925 | - |
2926 | - directionCell = [[UITableViewCell alloc]init]; |
2927 | - contactSyncCell = [[UITableViewCell alloc]init]; |
2928 | - |
2929 | - |
2930 | - descriptionCell = [[UITableViewCell alloc] init]; |
2931 | - descriptionCell.selectionStyle = UITableViewCellSelectionStyleNone; |
2932 | - |
2933 | - UITextView * description= [[UITextView alloc] initWithFrame: CGRectMake(20, 10, descriptionCell.contentView.bounds.size.width-40, 100)]; |
2934 | - description.text = NSLocalizedString(@"Recover Directions", @"Recover data..."); |
2935 | - [description setEditable:NO]; |
2936 | - [description setFont:small_font]; |
2937 | - [description setScrollEnabled:NO]; |
2938 | - [description setAutoresizesSubviews:YES]; |
2939 | - |
2940 | - [descriptionCell addSubview:description]; |
2941 | - |
2942 | - |
2943 | - [directionCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
2944 | - [self setDirectionText]; |
2945 | - |
2946 | - contactSyncCell.textLabel.text = NSLocalizedString(@"Contacts", @"Contacts..."); |
2947 | - |
2948 | - contactSync = [[UISwitch alloc] initWithFrame:CGRectMake(200.0, 10.0, 60.0, 30)]; |
2949 | - [contactSync addTarget:self action:@selector(contactSyncAction:) forControlEvents:UIControlEventValueChanged]; |
2950 | - [contactSync setOn:YES animated:NO]; |
2951 | - |
2952 | - [contactSyncCell addSubview:contactSync]; |
2953 | - |
2954 | - |
2955 | - recoverButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Begin",@"Begin...") |
2956 | - style:UIBarButtonItemStylePlain |
2957 | - target:self |
2958 | - action:@selector(recoverAction:)]; |
2959 | - |
2960 | - self.navigationItem.rightBarButtonItem = recoverButton; |
2961 | - [recoverButton setEnabled:YES]; |
2962 | - |
2963 | - |
2964 | - |
2965 | - [recoverTable reloadData]; |
2966 | -} |
2967 | - |
2968 | -- (void) reload |
2969 | -{ |
2970 | -} |
2971 | - |
2972 | -- (void) viewDidAppear:(BOOL)animated{ |
2973 | - [self contactSyncAction:nil]; |
2974 | -} |
2975 | - |
2976 | -- (void) contactSyncAction: (id)sender |
2977 | -{ |
2978 | - if ([contactSync isOn]) |
2979 | - { |
2980 | - [recoverButton setEnabled:YES]; |
2981 | - } |
2982 | - else |
2983 | - { |
2984 | - [recoverButton setEnabled:NO]; |
2985 | - } |
2986 | -} |
2987 | - |
2988 | -- (void) recoverAction: (id)sender |
2989 | -{ |
2990 | - if ([contactSync isOn]) |
2991 | - { |
2992 | - clickedRecover = true; |
2993 | - |
2994 | - [[self navigationController] popViewControllerAnimated:YES]; |
2995 | - } |
2996 | - else |
2997 | - { |
2998 | - clickedRecover = false; |
2999 | - } |
3000 | -} |
3001 | - |
3002 | -- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath |
3003 | -{ |
3004 | - switch (indexPath.section) { |
3005 | - case 0: |
3006 | - return 110; |
3007 | - default: |
3008 | - return 40; |
3009 | - break; |
3010 | - } |
3011 | - recoverTable.rowHeight; |
3012 | -} |
3013 | - |
3014 | -- (UITableViewCell *)tableView:(UITableView *)contactsTable cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
3015 | - |
3016 | - switch (indexPath.section) { |
3017 | - case 0: |
3018 | - switch (indexPath.row) { |
3019 | - case 0: |
3020 | - return descriptionCell; |
3021 | - default: |
3022 | - break; |
3023 | - } |
3024 | - break; |
3025 | - case 1: |
3026 | - switch (indexPath.row) { |
3027 | - case 0: |
3028 | - return directionCell; |
3029 | - default: |
3030 | - break; |
3031 | - } |
3032 | - break; |
3033 | - case 2: |
3034 | - switch (indexPath.row) { |
3035 | - case 0: |
3036 | - return contactSyncCell; |
3037 | - default: |
3038 | - break; |
3039 | - } |
3040 | - break; |
3041 | - default: |
3042 | - |
3043 | - break; |
3044 | - } |
3045 | - |
3046 | - return nil; |
3047 | -} |
3048 | - |
3049 | -- (void)tableView:(UITableView *)contactsTable didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
3050 | - UIViewController *targetViewController; |
3051 | - switch (indexPath.section) { |
3052 | - case 0: |
3053 | - // Cannot select description |
3054 | - [recoverTable deselectRowAtIndexPath:indexPath animated:YES]; |
3055 | - return; |
3056 | - break; |
3057 | - case 1: |
3058 | - switch (indexPath.row) { |
3059 | - case 0: |
3060 | - targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
3061 | - [((SyncMethodsView*)targetViewController) setSyncMode:direction]; |
3062 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3063 | - |
3064 | - break; |
3065 | - default: |
3066 | - break; |
3067 | - } |
3068 | - break; |
3069 | - default: |
3070 | - break; |
3071 | - } |
3072 | - |
3073 | -} |
3074 | - |
3075 | -- (NSInteger)tableView:(UITableView *)contactsTable numberOfRowsInSection:(NSInteger)section { |
3076 | - switch (section) { |
3077 | - case 0: |
3078 | - return 1; |
3079 | - case 1: |
3080 | - return 1; |
3081 | - case 2: |
3082 | - // Number of categories |
3083 | - return 1; |
3084 | - default: |
3085 | - break; |
3086 | - } |
3087 | - return 0;//should never happen |
3088 | -} |
3089 | - |
3090 | - |
3091 | - |
3092 | -- (void)viewWillAppear:(BOOL)animated |
3093 | -{ |
3094 | - clickedRecover = false; |
3095 | - |
3096 | - // this UIViewController is about to re-appear, make sure we remove the current selection in our table view |
3097 | - NSIndexPath *indexPath = [recoverTable indexPathForSelectedRow]; |
3098 | - if(!indexPath) |
3099 | - return; |
3100 | - |
3101 | - UIViewController *targetViewController; |
3102 | - NSString* mode; |
3103 | - switch (indexPath.section) { |
3104 | - case 1: |
3105 | - switch (indexPath.row) { |
3106 | - case 0: |
3107 | - targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
3108 | - mode = [((SyncMethodsView*)targetViewController) getSyncMode]; |
3109 | - [self setRecoverDirection:mode]; |
3110 | - [mode release]; |
3111 | - break; |
3112 | - default: |
3113 | - break; |
3114 | - } |
3115 | - break; |
3116 | - default: |
3117 | - break; |
3118 | - } |
3119 | - [recoverTable deselectRowAtIndexPath:indexPath animated:NO]; |
3120 | - |
3121 | - [self setDirectionText]; |
3122 | -} |
3123 | - |
3124 | - |
3125 | - |
3126 | -- (NSInteger)numberOfSectionsInTableView:(UITableView *)contactsTable { |
3127 | - return 3; |
3128 | -} |
3129 | - |
3130 | - |
3131 | -- (void) setDirectionText |
3132 | -{ |
3133 | - if ([direction isEqualToString:@"recover-from-server"]) |
3134 | - { |
3135 | - directionCell.textLabel.text = [NSString stringWithFormat:@"%@ - %@", NSLocalizedString(@"Direction",@"Direction..."), @"From Server"]; |
3136 | - } |
3137 | - else |
3138 | - { |
3139 | - directionCell.textLabel.text = [NSString stringWithFormat:@"%@ - %@", NSLocalizedString(@"Direction",@"Direction..."), @"To Server"]; |
3140 | - } |
3141 | -} |
3142 | - |
3143 | - |
3144 | -- (void) setRecoverDirection: (NSString*)dir |
3145 | -{ |
3146 | - if (dir == direction) |
3147 | - { |
3148 | - return; |
3149 | - } |
3150 | - |
3151 | - if (direction) |
3152 | - { |
3153 | - [direction release]; |
3154 | - } |
3155 | - |
3156 | - direction = [dir copy]; |
3157 | -} |
3158 | - |
3159 | -- (NSString*) getRecoverDirection |
3160 | -{ |
3161 | - if (!direction) |
3162 | - return nil; |
3163 | - return [direction copy]; |
3164 | -} |
3165 | - |
3166 | -- (bool) didClickRecover |
3167 | -{ |
3168 | - return clickedRecover; |
3169 | -} |
3170 | -@end |
3171 | |
3172 | === removed file 'iPhoneApp/UI/src/SettingsSingleView.mm' |
3173 | --- iPhoneApp/UI/src/SettingsSingleView.mm 2010-08-12 01:15:02 +0000 |
3174 | +++ iPhoneApp/UI/src/SettingsSingleView.mm 1970-01-01 00:00:00 +0000 |
3175 | @@ -1,640 +0,0 @@ |
3176 | -/* |
3177 | - * Funambol is a mobile platform developed by Funambol, Inc. |
3178 | - * Copyright (C) 2008 Funambol, Inc. |
3179 | - * |
3180 | - * This program is free software; you can redistribute it and/or modify it under |
3181 | - * the terms of the GNU Affero General Public License version 3 as published by |
3182 | - * the Free Software Foundation with the addition of the following permission |
3183 | - * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED |
3184 | - * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE |
3185 | - * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
3186 | - * |
3187 | - * This program is distributed in the hope that it will be useful, but WITHOUT |
3188 | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
3189 | - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
3190 | - * details. |
3191 | - * |
3192 | - * You should have received a copy of the GNU Affero General Public License |
3193 | - * along with this program; if not, see http://www.gnu.org/licenses or write to |
3194 | - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
3195 | - * MA 02110-1301 USA. |
3196 | - * |
3197 | - * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite |
3198 | - * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. |
3199 | - * |
3200 | - * The interactive user interfaces in modified source and object code versions |
3201 | - * of this program must display Appropriate Legal Notices, as required under |
3202 | - * Section 5 of the GNU Affero General Public License version 3. |
3203 | - * |
3204 | - * In accordance with Section 7(b) of the GNU Affero General Public License |
3205 | - * version 3, these Appropriate Legal Notices must retain the display of the |
3206 | - * "Powered by Funambol" logo. If the display of the logo is not reasonably |
3207 | - * feasible for technical reasons, the Appropriate Legal Notices must display |
3208 | - * the words "Powered by Funambol". |
3209 | - */ |
3210 | - |
3211 | - |
3212 | -#import <UIKit/UIKit.h> |
3213 | - |
3214 | -#import "common.h" |
3215 | -#import "SettingsSingleView.h" |
3216 | -#import "base/Log.h" |
3217 | -#import "AccountView.h" |
3218 | -#import "ContactsSettingsView.h" |
3219 | -#import "LogSettingsView.h" |
3220 | -#import "AboutView.h" |
3221 | -#import "FunambolAPI.h" |
3222 | - |
3223 | -#import "RecoverView.h" |
3224 | -#import "CleanUpView.h" |
3225 | -// TODO : REMOVE THIS HACK WHEN CLEANUP PAGE IS IMPLEMENTED IS WORKING |
3226 | -//#define CleanupView RecoverView |
3227 | -//#define didClickCleanup didClickRecover |
3228 | - |
3229 | -#import "FunambolAPI.h" |
3230 | - |
3231 | -#import "UIController.h" |
3232 | - |
3233 | -#import "customs.h" |
3234 | - |
3235 | -//static NSString *kCellIdentifier = @"MyIdentifier"; |
3236 | - |
3237 | -@implementation SettingsSingleView |
3238 | - |
3239 | -- (id)init { |
3240 | - |
3241 | - self = [super init]; |
3242 | - if (self) |
3243 | - { |
3244 | - // this title will appear in the navigation bar |
3245 | - self.title = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"]; |
3246 | - |
3247 | - menuList = [[NSMutableArray alloc] init]; |
3248 | - } |
3249 | - funBlue = [[UIColor alloc] initWithRed:FUNBLUE_RGB_RED green:FUNBLUE_RGB_GREEN blue:FUNBLUE_RGB_BLUE alpha:1.0]; |
3250 | - return self; |
3251 | -} |
3252 | - |
3253 | -- (void) loadView{ |
3254 | - UIView *contentView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]]; |
3255 | - self.view = contentView; |
3256 | - [contentView release]; |
3257 | - |
3258 | - self.view.autoresizesSubviews = YES; |
3259 | - [self setTitle:NSLocalizedString(@"Settings",@"Settings")]; |
3260 | - small_font = [UIFont systemFontOfSize:15]; |
3261 | - |
3262 | - usernameLabel = [[UILabel alloc] initWithFrame:CGRectMake(140.0, 7.0, 140.0, 25.0)]; |
3263 | - [usernameLabel setFont:small_font]; |
3264 | - [usernameLabel setTextAlignment:UITextAlignmentRight]; |
3265 | - [usernameLabel setTextColor:funBlue]; |
3266 | - |
3267 | - |
3268 | - contactsLabel = [[UILabel alloc] initWithFrame:CGRectMake(140.0, 7.0, 140.0, 25.0)]; |
3269 | - [contactsLabel setFont:small_font]; |
3270 | - [contactsLabel setTextAlignment:UITextAlignmentRight]; |
3271 | - [contactsLabel setTextColor:funBlue]; |
3272 | - |
3273 | - [self addComponents]; |
3274 | - |
3275 | -} |
3276 | - |
3277 | -- (IBAction)done:(id)sender |
3278 | -{ |
3279 | - [self dismissModalViewControllerAnimated:YES]; |
3280 | -} |
3281 | - |
3282 | -- (void)viewWillAppear:(BOOL)animated |
3283 | -{ |
3284 | - // this UIViewController is about to re-appear, make sure we remove the current selection in our table view |
3285 | - lastSelection = [settingsTable indexPathForSelectedRow]; |
3286 | - [settingsTable deselectRowAtIndexPath:lastSelection animated:NO]; |
3287 | - |
3288 | - self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Done",@"") style:UIBarButtonItemStyleDone target:self action:@selector(done:)] autorelease]; |
3289 | -} |
3290 | - |
3291 | -- (void) viewDidAppear:(BOOL)animated{ |
3292 | - NSString* URL; |
3293 | - NSString* username; |
3294 | - NSString* password; |
3295 | - |
3296 | - [[FunambolAPI getInstance] loadSyncConfig:&URL username:&username password:&password]; |
3297 | - |
3298 | - if([username isEqualToString:@""] || [password isEqualToString:@""]){ |
3299 | - UIViewController *targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
3300 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3301 | - } |
3302 | - |
3303 | - StringBuffer urlstring([URL UTF8String]); |
3304 | - if((urlstring.find(" ") != StringBuffer::npos)|| |
3305 | - (urlstring.find("<") != StringBuffer::npos)|| |
3306 | - (urlstring.find(">") != StringBuffer::npos)){ |
3307 | - UIViewController *targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
3308 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3309 | - } |
3310 | - |
3311 | - [usernameLabel setText:username]; |
3312 | - |
3313 | - [URL release]; |
3314 | - [username release]; |
3315 | - [password release]; |
3316 | - |
3317 | - NSString* contactsync = [[FunambolAPI getInstance] getSync:@"addressbook"]; |
3318 | - |
3319 | - if([contactsync isEqualToString:@"none"]){ |
3320 | - [contactsLabel setText:NSLocalizedString(@"Disabled",@"Disabled")]; |
3321 | - }else{ |
3322 | - [contactsLabel setText:NSLocalizedString(@"Enabled",@"Enabled")]; |
3323 | - } |
3324 | - |
3325 | - [contactsync release]; |
3326 | - |
3327 | - // this UIViewController is about to re-appear, make sure we remove the current selection in our table view |
3328 | - NSIndexPath *indexPath = lastSelection; |
3329 | - |
3330 | - if(!indexPath) |
3331 | - return; |
3332 | - |
3333 | - switch (indexPath.section) { |
3334 | - case 2: |
3335 | - if (!CUSTOM_LOG_SEPARATE_GROUP && CUSTOM_CLEANUP || CUSTOM_RECOVER) |
3336 | - { |
3337 | - switch (indexPath.row) { |
3338 | - case 1: |
3339 | - if (CUSTOM_CLEANUP) { |
3340 | - // Go back and init cleanup |
3341 | - UIViewController *targetViewController = [[menuList objectAtIndex: 3] objectForKey:@"viewController"]; |
3342 | - if ([((CleanUpView*)targetViewController) didClickCleanup]) |
3343 | - { |
3344 | - [[UIController getInstance] cleanupContacts]; |
3345 | - [[self navigationController] popViewControllerAnimated:YES]; |
3346 | - } |
3347 | - } else if (CUSTOM_RECOVER) { |
3348 | - UIViewController *targetViewController = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3349 | - if ([((RecoverView*)targetViewController) didClickRecover]) |
3350 | - { |
3351 | - // Go back and init recover |
3352 | - [[UIController getInstance] recoverContacts]; |
3353 | - [[self navigationController] popViewControllerAnimated:YES]; |
3354 | - } |
3355 | - } |
3356 | - break; |
3357 | - case 2: |
3358 | - if (CUSTOM_RECOVER) |
3359 | - { |
3360 | - UIViewController *targetViewController = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3361 | - if ([((RecoverView*)targetViewController) didClickRecover]) |
3362 | - { |
3363 | - // Go back and init recover |
3364 | - [[UIController getInstance] recoverContacts]; |
3365 | - [[self navigationController] popViewControllerAnimated:YES]; |
3366 | - } |
3367 | - } |
3368 | - break; |
3369 | - default: |
3370 | - break; |
3371 | - } |
3372 | - } |
3373 | - |
3374 | - break; |
3375 | - case 3: |
3376 | - if(CUSTOM_LOG_SEPARATE_GROUP && CUSTOM_CLEANUP || CUSTOM_RECOVER) |
3377 | - { |
3378 | - switch (indexPath.row) { |
3379 | - case 0: |
3380 | - if (CUSTOM_CLEANUP) { |
3381 | - // Go back and init cleanup |
3382 | - UIViewController *targetViewController = [[menuList objectAtIndex: 3] objectForKey:@"viewController"]; |
3383 | - if ([((CleanUpView*)targetViewController) didClickCleanup]) |
3384 | - { |
3385 | - [[UIController getInstance] cleanupContacts]; |
3386 | - [[self navigationController] popViewControllerAnimated:YES]; |
3387 | - } |
3388 | - } else if (CUSTOM_RECOVER) { |
3389 | - UIViewController *targetViewController = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3390 | - if ([((RecoverView*)targetViewController) didClickRecover]) |
3391 | - { |
3392 | - // Go back and init recover |
3393 | - [[UIController getInstance] recoverContacts]; |
3394 | - [[self navigationController] popViewControllerAnimated:YES]; |
3395 | - } |
3396 | - } |
3397 | - break; |
3398 | - case 1: |
3399 | - if (CUSTOM_RECOVER) |
3400 | - { |
3401 | - UIViewController *targetViewController = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3402 | - if ([((RecoverView*)targetViewController) didClickRecover]) |
3403 | - { |
3404 | - // Go back and init recover |
3405 | - [[UIController getInstance] recoverContacts]; |
3406 | - [[self navigationController] popViewControllerAnimated:YES]; |
3407 | - } |
3408 | - } |
3409 | - break; |
3410 | - default: |
3411 | - break; |
3412 | - } |
3413 | - } |
3414 | - break; |
3415 | - default: |
3416 | - break; |
3417 | - } |
3418 | - |
3419 | - [settingsTable deselectRowAtIndexPath:indexPath animated:NO]; |
3420 | -} |
3421 | - |
3422 | -/* |
3423 | - * 0 account |
3424 | - * 1 Contact |
3425 | - * 2 log |
3426 | - * 3 cleanup |
3427 | - * 4 recover |
3428 | - * 5 about |
3429 | - */ |
3430 | - |
3431 | -- (void) addComponents{ |
3432 | - |
3433 | - //menulist index 0 |
3434 | - AccountView* accountview = [[AccountView alloc] init]; |
3435 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
3436 | - NSLocalizedString(@"Account", @""), @"title", |
3437 | - accountview, @"viewController", |
3438 | - nil]]; |
3439 | - [accountview release]; |
3440 | - |
3441 | - //menulist index 1 |
3442 | - ContactsSettingsView* contactview = [[ContactsSettingsView alloc] init]; |
3443 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
3444 | - NSLocalizedString(@"Contact Settings", @""), @"title", |
3445 | - contactview, @"viewController", |
3446 | - nil]]; |
3447 | - [contactview release]; |
3448 | - |
3449 | - LogSettingsView* logsettingsview = [[LogSettingsView alloc] init]; |
3450 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
3451 | - NSLocalizedString(@"Log Settings", @""), @"title", |
3452 | - logsettingsview, @"viewController", |
3453 | - nil]]; |
3454 | - [logsettingsview release]; |
3455 | - |
3456 | - //menulist index 2 |
3457 | - CleanUpView * cleanupView = [[CleanUpView alloc] init]; |
3458 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
3459 | - NSLocalizedString(@"Cleanup", @""), @"title", |
3460 | - cleanupView, @"viewController", |
3461 | - nil]]; |
3462 | - [cleanupView release]; |
3463 | - RecoverView * recoverView = [[RecoverView alloc] init]; |
3464 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
3465 | - NSLocalizedString(@"Recover", @""), @"title", |
3466 | - recoverView, @"viewController", |
3467 | - nil]]; |
3468 | - [recoverView release]; |
3469 | - |
3470 | - |
3471 | - AboutView* aboutview = [[AboutView alloc] init]; |
3472 | - [menuList addObject:[NSDictionary dictionaryWithObjectsAndKeys: |
3473 | - NSLocalizedString(@"Account", @""), @"title", |
3474 | - aboutview, @"viewController", |
3475 | - nil]]; |
3476 | - [aboutview release]; |
3477 | - |
3478 | - settingsTable = [[UITableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; |
3479 | - settingsTable.delegate = self; |
3480 | - settingsTable.dataSource = self; |
3481 | - settingsTable.rowHeight = 40; |
3482 | - [settingsTable reloadData]; |
3483 | - //Main Navigation Bar! |
3484 | - |
3485 | - //usernameLabel = [[UILabel alloc] initWithFrame:CGRectMake(140.0, 7.0, 140.0, 25.0)]; |
3486 | - |
3487 | - |
3488 | - |
3489 | - [self addAccountTable]; |
3490 | - |
3491 | - [self addSourcesTable]; |
3492 | - |
3493 | - [self addLogTable]; |
3494 | - |
3495 | - [self addAboutTable]; |
3496 | - |
3497 | - [self addCleanupTable]; |
3498 | - |
3499 | - [self addRecoverTable]; |
3500 | - |
3501 | - [self.view addSubview:settingsTable]; |
3502 | - |
3503 | - |
3504 | -} |
3505 | - |
3506 | -- (void) addAccountTable{ |
3507 | - accountCell = [[UITableViewCell alloc]init]; |
3508 | - accountCell.textLabel.text = NSLocalizedString(@"Account",@"Account"); |
3509 | - accountCell.imageView.image = [UIImage imageNamed: @"worksettings.png"]; |
3510 | - accountCell.textLabel.textAlignment = UITextAlignmentLeft; |
3511 | - [accountCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
3512 | - [accountCell addSubview:usernameLabel]; |
3513 | -} |
3514 | - |
3515 | -- (void) addSourcesTable{ |
3516 | - |
3517 | - contactsCell = [[UITableViewCell alloc]init]; |
3518 | - contactsCell.textLabel.text = NSLocalizedString(@"Contacts",@"Contacts"); |
3519 | - contactsCell.imageView.image = [UIImage imageNamed: @"icon_contacts_small.png"]; |
3520 | - contactsCell.textLabel.textAlignment = UITextAlignmentLeft; |
3521 | - [contactsCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
3522 | - //[contactsCell addSubview:contactsLabel]; |
3523 | -} |
3524 | - |
3525 | -- (void) addLogTable{ |
3526 | - |
3527 | - logCell = [[UITableViewCell alloc]init]; |
3528 | - logCell.textLabel.text = NSLocalizedString(@"Log",@"Log"); |
3529 | - logCell.imageView.image = [UIImage imageNamed: @"icon_log_small.png"]; |
3530 | - [logCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
3531 | -} |
3532 | - |
3533 | -- (void) addAboutTable{ |
3534 | - |
3535 | - aboutCell = [[UITableViewCell alloc]init]; |
3536 | - aboutCell.textLabel.text = [NSLocalizedString(@"AboutC",@"About ") stringByAppendingString:NSLocalizedString(@"AppName",@"Funambol")]; |
3537 | - aboutCell.imageView.image = [UIImage imageNamed: @"icon_logo_small.png"]; |
3538 | - [aboutCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
3539 | -} |
3540 | - |
3541 | -- (void) addCleanupTable{ |
3542 | - |
3543 | - cleanupCell = [[UITableViewCell alloc]init]; |
3544 | - cleanupCell.textLabel.text = NSLocalizedString(@"Cleanup",@"Cleanup"); |
3545 | - cleanupCell.imageView.image = [UIImage imageNamed: @"icon_cleanup_small.png"]; |
3546 | - [cleanupCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
3547 | -} |
3548 | - |
3549 | -- (void) addRecoverTable{ |
3550 | - |
3551 | - recoverCell = [[UITableViewCell alloc]init]; |
3552 | - recoverCell.textLabel.text = NSLocalizedString(@"Recover",@"Recover"); |
3553 | - recoverCell.imageView.image = [UIImage imageNamed: @"icon_recover_small.png"]; |
3554 | - [recoverCell setAccessoryType:UITableViewCellAccessoryDisclosureIndicator]; |
3555 | -} |
3556 | - |
3557 | -- (void) reload { |
3558 | -} |
3559 | - |
3560 | -- (UITableViewCell *)tableView:(UITableView *)settingsTable cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
3561 | - switch (indexPath.section) { |
3562 | - //account table section |
3563 | - case 0: |
3564 | - switch (indexPath.row) { |
3565 | - case 0: |
3566 | - return accountCell; |
3567 | - default: |
3568 | - break; |
3569 | - } |
3570 | - break; |
3571 | - //sources table section |
3572 | - case 1: |
3573 | - switch (indexPath.row) { |
3574 | - case 0: |
3575 | - return contactsCell; |
3576 | - default: |
3577 | - break; |
3578 | - } |
3579 | - // cleanup/recover |
3580 | - case 2: |
3581 | - switch (indexPath.row) { |
3582 | - case 0: |
3583 | - return logCell; |
3584 | - case 1: |
3585 | - if (CUSTOM_CLEANUP){ |
3586 | - return cleanupCell; |
3587 | - } else if (CUSTOM_RECOVER){ |
3588 | - return recoverCell; |
3589 | - } |
3590 | - case 2: |
3591 | - return recoverCell; |
3592 | - default: |
3593 | - break; |
3594 | - } |
3595 | - |
3596 | - // about table section |
3597 | - case 3: |
3598 | - switch (indexPath.row) { |
3599 | - case 0: |
3600 | - if(CUSTOM_LOG_SEPARATE_GROUP){ |
3601 | - if (CUSTOM_CLEANUP) |
3602 | - return cleanupCell; |
3603 | - else if (CUSTOM_RECOVER) |
3604 | - return recoverCell; |
3605 | - }else{ |
3606 | - return aboutCell; |
3607 | - } |
3608 | - case 1: |
3609 | - return recoverCell; |
3610 | - default: |
3611 | - break; |
3612 | - } |
3613 | - case 4: |
3614 | - switch (indexPath.row) { |
3615 | - case 0: |
3616 | - return aboutCell; |
3617 | - default: |
3618 | - break; |
3619 | - } |
3620 | - |
3621 | - default: |
3622 | - |
3623 | - break; |
3624 | - } |
3625 | - return nil; |
3626 | -} |
3627 | - |
3628 | -- (NSInteger)tableView:(UITableView *)settingsTable numberOfRowsInSection:(NSInteger)section { |
3629 | - |
3630 | - switch (section) { |
3631 | - case 0: |
3632 | - return 1; |
3633 | - case 1: |
3634 | - return 1; |
3635 | - case 2: |
3636 | - if(CUSTOM_LOG_SEPARATE_GROUP){ |
3637 | - return 1; |
3638 | - }else{ |
3639 | - switch ((CUSTOM_CLEANUP?1:0)*1 + (CUSTOM_RECOVER?1:0)*2) |
3640 | - { |
3641 | - case 0: // Neither clean nor recover - it will be Log |
3642 | - return 1; |
3643 | - case 1: |
3644 | - return 2; |
3645 | - case 2: |
3646 | - return 2; |
3647 | - case 3: |
3648 | - return 3; |
3649 | - default: |
3650 | - break; |
3651 | - } |
3652 | - } |
3653 | - case 3: |
3654 | - if(CUSTOM_LOG_SEPARATE_GROUP){ |
3655 | - switch ((CUSTOM_CLEANUP?1:0)*1 + (CUSTOM_RECOVER?1:0)*2) |
3656 | - { |
3657 | - case 0: // Neither clean nor recover - it will be Log |
3658 | - return 1; |
3659 | - case 1: |
3660 | - return 1; |
3661 | - case 2: |
3662 | - return 1; |
3663 | - case 3: |
3664 | - return 2; |
3665 | - default: |
3666 | - break; |
3667 | - } |
3668 | - }else{ |
3669 | - return 1; |
3670 | - } |
3671 | - case 4: |
3672 | - return 1; |
3673 | - default: |
3674 | - break; |
3675 | - } |
3676 | - return 0; |
3677 | -} |
3678 | - |
3679 | -- (NSInteger)numberOfSectionsInTableView:(UITableView *)settingsTable { |
3680 | - if (CUSTOM_LOG_SEPARATE_GROUP){ |
3681 | - return 5; |
3682 | - }else{ |
3683 | - return 4; |
3684 | - } |
3685 | - return 4; |
3686 | -} |
3687 | - |
3688 | - |
3689 | -/* |
3690 | - * 0 account |
3691 | - * 1 Contact |
3692 | - * 2 log |
3693 | - * 3 cleanup |
3694 | - * 4 recover |
3695 | - * 5 about |
3696 | - */ |
3697 | - |
3698 | -- (void)tableView:(UITableView *)settingsTable didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ |
3699 | - UIViewController *targetViewController; |
3700 | - UIViewController *targetViewController3; |
3701 | - switch (indexPath.section){ |
3702 | - case 0://account |
3703 | - switch (indexPath.row) { |
3704 | - case 0: |
3705 | - targetViewController = [[menuList objectAtIndex: 0] objectForKey:@"viewController"]; |
3706 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3707 | - break; |
3708 | - default: |
3709 | - break; |
3710 | - } |
3711 | - break; |
3712 | - case 1://contact |
3713 | - switch (indexPath.row) { |
3714 | - case 0: |
3715 | - targetViewController = [[menuList objectAtIndex: 1] objectForKey:@"viewController"]; |
3716 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3717 | - break; |
3718 | - default: |
3719 | - break; |
3720 | - } |
3721 | - break; |
3722 | - case 2://log cleanup recover |
3723 | - switch (indexPath.row) { |
3724 | - case 0: |
3725 | - targetViewController = [[menuList objectAtIndex: 2] objectForKey:@"viewController"]; |
3726 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3727 | - break; |
3728 | - case 1: |
3729 | - if(CUSTOM_CLEANUP){ |
3730 | - UIViewController *targetViewController2 = [[menuList objectAtIndex: 3] objectForKey:@"viewController"]; |
3731 | - [[self navigationController] pushViewController:targetViewController2 animated:YES]; |
3732 | - }else if (CUSTOM_RECOVER){ |
3733 | - UIViewController *targetViewController3 = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3734 | - [[self navigationController] pushViewController:targetViewController3 animated:YES]; |
3735 | - } |
3736 | - break; |
3737 | - case 2: |
3738 | - targetViewController3 = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3739 | - [[self navigationController] pushViewController:targetViewController3 animated:YES]; |
3740 | - break; |
3741 | - default: |
3742 | - break; |
3743 | - } |
3744 | - break; |
3745 | - case 3:// about |
3746 | - if(CUSTOM_LOG_SEPARATE_GROUP){ |
3747 | - switch (indexPath.row) { |
3748 | - case 0: |
3749 | - if(CUSTOM_CLEANUP){ |
3750 | - UIViewController *targetViewController2 = [[menuList objectAtIndex: 3] objectForKey:@"viewController"]; |
3751 | - [[self navigationController] pushViewController:targetViewController2 animated:YES]; |
3752 | - }else if (CUSTOM_RECOVER){ |
3753 | - UIViewController *targetViewController3 = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3754 | - [[self navigationController] pushViewController:targetViewController3 animated:YES]; |
3755 | - } |
3756 | - break; |
3757 | - case 1: |
3758 | - targetViewController3 = [[menuList objectAtIndex: 4] objectForKey:@"viewController"]; |
3759 | - [[self navigationController] pushViewController:targetViewController3 animated:YES]; |
3760 | - break; |
3761 | - default: |
3762 | - break; |
3763 | - } |
3764 | - }else{ |
3765 | - switch (indexPath.row) { |
3766 | - case 0: |
3767 | - targetViewController = [[menuList objectAtIndex: 5] objectForKey:@"viewController"]; |
3768 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3769 | - break; |
3770 | - |
3771 | - default: |
3772 | - break; |
3773 | - } |
3774 | - } |
3775 | - break; |
3776 | - case 4: |
3777 | - switch (indexPath.row) { |
3778 | - case 0: |
3779 | - targetViewController = [[menuList objectAtIndex: 5] objectForKey:@"viewController"]; |
3780 | - [[self navigationController] pushViewController:targetViewController animated:YES]; |
3781 | - break; |
3782 | - |
3783 | - default: |
3784 | - break; |
3785 | - } |
3786 | - default: |
3787 | - break; |
3788 | - |
3789 | - } |
3790 | -} |
3791 | - |
3792 | - |
3793 | -- (void)dealloc { |
3794 | - [menuList release]; |
3795 | - |
3796 | - [settingsTable release]; |
3797 | - |
3798 | - [accountCell release]; |
3799 | - [logCell release]; |
3800 | - [aboutCell release]; |
3801 | - |
3802 | - [recoverCell release]; |
3803 | - [cleanupCell release]; |
3804 | - |
3805 | - [contactsLabel release]; |
3806 | - [usernameLabel release]; |
3807 | - [funBlue release]; |
3808 | - [small_font release]; |
3809 | - |
3810 | - [super dealloc]; |
3811 | -} |
3812 | - |
3813 | - |
3814 | - |
3815 | -@end |
3816 | |
3817 | === modified file 'iPhoneApp/UI/src/UIController.mm' |
3818 | --- iPhoneApp/UI/src/UIController.mm 2010-07-22 20:21:36 +0000 |
3819 | +++ iPhoneApp/UI/src/UIController.mm 2010-08-20 00:36:44 +0000 |
3820 | @@ -39,9 +39,7 @@ |
3821 | #import "FunambolAPI.h" |
3822 | |
3823 | #import "MainSingleView.h" |
3824 | -#import "SettingsSingleView.h" |
3825 | |
3826 | -#import "LogView.h" |
3827 | #import "base/Log.h" |
3828 | #import "customs.h" |
3829 | |
3830 | |
3831 | === modified file 'iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj' |
3832 | --- iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj 2010-08-12 01:15:02 +0000 |
3833 | +++ iPhoneApp/funambolAppStore.xcodeproj/project.pbxproj 2010-08-20 00:36:44 +0000 |
3834 | @@ -7,7 +7,6 @@ |
3835 | objects = { |
3836 | |
3837 | /* Begin PBXBuildFile section */ |
3838 | - 1054008311AA748E0074E5A9 /* LoginManager.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1054008211AA748E0074E5A9 /* LoginManager.mm */; }; |
3839 | 7C7647BC0DB361F500786883 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C7647BB0DB361F500786883 /* main.mm */; }; |
3840 | 7C849D210DB6371B00AE7A7D /* iPhoneDefaultConfigFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C849D200DB6371B00AE7A7D /* iPhoneDefaultConfigFactory.cpp */; }; |
3841 | 7C9F57A50DAF5C47007E0091 /* DataConverter.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F579E0DAF5C47007E0091 /* DataConverter.mm */; }; |
3842 | @@ -20,7 +19,6 @@ |
3843 | 7C9F58020DAF5C50007E0091 /* icon_logo_small.png in Resources */ = {isa = PBXBuildFile; fileRef = 7C9F57C10DAF5C50007E0091 /* icon_logo_small.png */; }; |
3844 | 7C9F58120DAF5C50007E0091 /* worksettings.png in Resources */ = {isa = PBXBuildFile; fileRef = 7C9F57D10DAF5C50007E0091 /* worksettings.png */; }; |
3845 | 7C9F58160DAF5C50007E0091 /* AccountView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F57E40DAF5C50007E0091 /* AccountView.mm */; }; |
3846 | - 7C9F58180DAF5C50007E0091 /* LogView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F57E60DAF5C50007E0091 /* LogView.mm */; }; |
3847 | 7C9F581B0DAF5C50007E0091 /* UIController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F57E90DAF5C50007E0091 /* UIController.mm */; }; |
3848 | 7C9F59500DAF67B9007E0091 /* stringUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F594F0DAF67B9007E0091 /* stringUtils.cpp */; }; |
3849 | 7C9F59620DAF683B007E0091 /* AddressBookSyncSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7C9F59610DAF683B007E0091 /* AddressBookSyncSource.cpp */; }; |
3850 | @@ -68,17 +66,12 @@ |
3851 | AB33AAA10E5AE0460098F0A2 /* icon_sync_154x154_frame15.png in Resources */ = {isa = PBXBuildFile; fileRef = AB33AA910E5AE0460098F0A2 /* icon_sync_154x154_frame15.png */; }; |
3852 | AB3785BA0E5AF345003E51F8 /* dist.plist in Resources */ = {isa = PBXBuildFile; fileRef = AB3785B90E5AF345003E51F8 /* dist.plist */; }; |
3853 | AB3E86550E08090F00581A6C /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AB3E86540E08090F00581A6C /* SystemConfiguration.framework */; }; |
3854 | - AB69923B0E275770000BE6D9 /* SettingsSingleView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB69923A0E275770000BE6D9 /* SettingsSingleView.mm */; }; |
3855 | - AB7207470DBDF01400AE2222 /* LogLevelView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB7207460DBDF01400AE2222 /* LogLevelView.mm */; }; |
3856 | - AB76D12F0DF434CB00C1F7D3 /* CleanUpView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB76D12E0DF434CB00C1F7D3 /* CleanUpView.mm */; }; |
3857 | AB7C7D050DEC07A100F46ECA /* logoImage.png in Resources */ = {isa = PBXBuildFile; fileRef = AB7C7D040DEC07A100F46ECA /* logoImage.png */; }; |
3858 | AB8B508B0DE4384F005B47E4 /* apple-touch-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = AB8B508A0DE4384F005B47E4 /* apple-touch-icon.png */; }; |
3859 | - AB926A750DBCD04E008E5FC6 /* LogSettingsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB926A740DBCD04E008E5FC6 /* LogSettingsView.mm */; }; |
3860 | AB926BE60DBCF087008E5FC6 /* AboutView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AB926BE50DBCF087008E5FC6 /* AboutView.mm */; }; |
3861 | ABAEC2FC11DB5AD100A9D30F /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABAEC2FB11DB5AD100A9D30F /* CFNetwork.framework */; }; |
3862 | ABB027A30DF807D600CC4ECD /* icon_cleanup_small.png in Resources */ = {isa = PBXBuildFile; fileRef = ABB027A20DF807D600CC4ECD /* icon_cleanup_small.png */; }; |
3863 | ABB2C3300DC78162001F56C2 /* SyncMethodsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABB2C32F0DC78162001F56C2 /* SyncMethodsView.mm */; }; |
3864 | - ABBCD6A10DBF89AA00A4C160 /* ContactsSettingsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABBCD6A00DBF89AA00A4C160 /* ContactsSettingsView.mm */; }; |
3865 | ABBF2921104BCE15004A9F09 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = ABBF291D104BCE15004A9F09 /* Localizable.strings */; }; |
3866 | ABC5F1430E249E9100119787 /* MainSingleView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABC5F1420E249E9100119787 /* MainSingleView.mm */; }; |
3867 | ABC5F1D20E24AFF400119787 /* button_default.png in Resources */ = {isa = PBXBuildFile; fileRef = ABC5F1CF0E24AFF400119787 /* button_default.png */; }; |
3868 | @@ -92,8 +85,6 @@ |
3869 | ABDC41DD0DDC9D2700F552B6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ABDC41DC0DDC9D2700F552B6 /* UIKit.framework */; }; |
3870 | ABDE70600DB8D4D800C98302 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = ABDE705F0DB8D4D700C98302 /* libsqlite3.dylib */; }; |
3871 | ABF33CDC11E75F670053481B /* libfunambol.a in Frameworks */ = {isa = PBXBuildFile; fileRef = ABF33CDB11E75F670053481B /* libfunambol.a */; }; |
3872 | - ABF87D880DEE91EC00E433ED /* RecoverView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABF87D870DEE91EC00E433ED /* RecoverView.mm */; }; |
3873 | - ABF87D940DEE924900E433ED /* RecoverSyncMethodsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABF87D930DEE924900E433ED /* RecoverSyncMethodsView.mm */; }; |
3874 | ABF87D980DEE926E00E433ED /* FastSyncMethodsView.mm in Sources */ = {isa = PBXBuildFile; fileRef = ABF87D970DEE926E00E433ED /* FastSyncMethodsView.mm */; }; |
3875 | /* End PBXBuildFile section */ |
3876 | |
3877 | @@ -136,8 +127,6 @@ |
3878 | /* End PBXContainerItemProxy section */ |
3879 | |
3880 | /* Begin PBXFileReference section */ |
3881 | - 1054008211AA748E0074E5A9 /* LoginManager.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LoginManager.mm; sourceTree = "<group>"; }; |
3882 | - 1054008611AA74970074E5A9 /* LoginManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginManager.h; sourceTree = "<group>"; }; |
3883 | 1D6058910D05DD3D006BFB54 /* Funambol.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Funambol.app; sourceTree = BUILT_PRODUCTS_DIR; }; |
3884 | 7C7647BA0DB361EE00786883 /* main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = main.h; sourceTree = "<group>"; }; |
3885 | 7C7647BB0DB361F500786883 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = "<group>"; }; |
3886 | @@ -157,10 +146,8 @@ |
3887 | 7C9F57D10DAF5C50007E0091 /* worksettings.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = worksettings.png; sourceTree = "<group>"; }; |
3888 | 7C9F57D30DAF5C50007E0091 /* AccountView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccountView.h; sourceTree = "<group>"; }; |
3889 | 7C9F57D40DAF5C50007E0091 /* common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = common.h; sourceTree = "<group>"; }; |
3890 | - 7C9F57D60DAF5C50007E0091 /* LogView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogView.h; sourceTree = "<group>"; }; |
3891 | 7C9F57D90DAF5C50007E0091 /* UIController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UIController.h; sourceTree = "<group>"; }; |
3892 | 7C9F57E40DAF5C50007E0091 /* AccountView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccountView.mm; sourceTree = "<group>"; }; |
3893 | - 7C9F57E60DAF5C50007E0091 /* LogView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LogView.mm; sourceTree = "<group>"; }; |
3894 | 7C9F57E90DAF5C50007E0091 /* UIController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = UIController.mm; sourceTree = "<group>"; }; |
3895 | 7C9F58F70DAF653D007E0091 /* funambol_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = funambol_Prefix.pch; sourceTree = "<group>"; }; |
3896 | 7C9F594F0DAF67B9007E0091 /* stringUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stringUtils.cpp; sourceTree = "<group>"; }; |
3897 | @@ -215,16 +202,8 @@ |
3898 | AB33AA910E5AE0460098F0A2 /* icon_sync_154x154_frame15.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_sync_154x154_frame15.png; sourceTree = "<group>"; }; |
3899 | AB3785B90E5AF345003E51F8 /* dist.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = dist.plist; sourceTree = "<group>"; }; |
3900 | AB3E86540E08090F00581A6C /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; |
3901 | - AB6992370E27574D000BE6D9 /* SettingsSingleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SettingsSingleView.h; sourceTree = "<group>"; }; |
3902 | - AB69923A0E275770000BE6D9 /* SettingsSingleView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SettingsSingleView.mm; sourceTree = "<group>"; }; |
3903 | - AB7207450DBDF00900AE2222 /* LogLevelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogLevelView.h; sourceTree = "<group>"; }; |
3904 | - AB7207460DBDF01400AE2222 /* LogLevelView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LogLevelView.mm; sourceTree = "<group>"; }; |
3905 | - AB76D12C0DF4344F00C1F7D3 /* CleanUpView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CleanUpView.h; sourceTree = "<group>"; }; |
3906 | - AB76D12E0DF434CB00C1F7D3 /* CleanUpView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CleanUpView.mm; sourceTree = "<group>"; }; |
3907 | AB7C7D040DEC07A100F46ECA /* logoImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logoImage.png; sourceTree = "<group>"; }; |
3908 | AB8B508A0DE4384F005B47E4 /* apple-touch-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "apple-touch-icon.png"; sourceTree = "<group>"; }; |
3909 | - AB926A740DBCD04E008E5FC6 /* LogSettingsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LogSettingsView.mm; sourceTree = "<group>"; }; |
3910 | - AB926A760DBCD056008E5FC6 /* LogSettingsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LogSettingsView.h; sourceTree = "<group>"; }; |
3911 | AB926BE40DBCF07B008E5FC6 /* AboutView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AboutView.h; sourceTree = "<group>"; }; |
3912 | AB926BE50DBCF087008E5FC6 /* AboutView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AboutView.mm; sourceTree = "<group>"; }; |
3913 | AB96C9360E94BF5C00527267 /* MacMappingStoreBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MacMappingStoreBuilder.h; sourceTree = "<group>"; }; |
3914 | @@ -233,8 +212,6 @@ |
3915 | ABB027A20DF807D600CC4ECD /* icon_cleanup_small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_cleanup_small.png; sourceTree = "<group>"; }; |
3916 | ABB2C32F0DC78162001F56C2 /* SyncMethodsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SyncMethodsView.mm; sourceTree = "<group>"; }; |
3917 | ABB2C3310DC7816C001F56C2 /* SyncMethodsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SyncMethodsView.h; sourceTree = "<group>"; }; |
3918 | - ABBCD69E0DBF88D500A4C160 /* ContactsSettingsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContactsSettingsView.h; sourceTree = "<group>"; }; |
3919 | - ABBCD6A00DBF89AA00A4C160 /* ContactsSettingsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ContactsSettingsView.mm; sourceTree = "<group>"; }; |
3920 | ABBF291E104BCE15004A9F09 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; }; |
3921 | ABC5F1410E249E8500119787 /* MainSingleView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainSingleView.h; sourceTree = "<group>"; }; |
3922 | ABC5F1420E249E9100119787 /* MainSingleView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MainSingleView.mm; sourceTree = "<group>"; }; |
3923 | @@ -251,11 +228,7 @@ |
3924 | ABDD7E3E0E2F404F000D79C0 /* DataConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataConverter.h; sourceTree = "<group>"; }; |
3925 | ABDE705F0DB8D4D700C98302 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; |
3926 | ABF33CDB11E75F670053481B /* libfunambol.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libfunambol.a; path = "../funambol-sdk/build/mac/build/iPhone-Release-iphoneos/libfunambol.a"; sourceTree = SOURCE_ROOT; }; |
3927 | - ABF87D860DEE91E300E433ED /* RecoverView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecoverView.h; sourceTree = "<group>"; }; |
3928 | - ABF87D870DEE91EC00E433ED /* RecoverView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RecoverView.mm; sourceTree = "<group>"; }; |
3929 | ABF87D8A0DEE921A00E433ED /* customs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = customs.h; sourceTree = "<group>"; }; |
3930 | - ABF87D930DEE924900E433ED /* RecoverSyncMethodsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RecoverSyncMethodsView.mm; sourceTree = "<group>"; }; |
3931 | - ABF87D950DEE925700E433ED /* RecoverSyncMethodsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RecoverSyncMethodsView.h; sourceTree = "<group>"; }; |
3932 | ABF87D970DEE926E00E433ED /* FastSyncMethodsView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FastSyncMethodsView.mm; sourceTree = "<group>"; }; |
3933 | ABF87D990DEE927600E433ED /* FastSyncMethodsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastSyncMethodsView.h; sourceTree = "<group>"; }; |
3934 | /* End PBXFileReference section */ |
3935 | @@ -459,23 +432,14 @@ |
3936 | 7C9F57D20DAF5C50007E0091 /* include */ = { |
3937 | isa = PBXGroup; |
3938 | children = ( |
3939 | - 1054008611AA74970074E5A9 /* LoginManager.h */, |
3940 | - AB6992370E27574D000BE6D9 /* SettingsSingleView.h */, |
3941 | ABC5F1410E249E8500119787 /* MainSingleView.h */, |
3942 | - AB76D12C0DF4344F00C1F7D3 /* CleanUpView.h */, |
3943 | ABF87D990DEE927600E433ED /* FastSyncMethodsView.h */, |
3944 | - ABF87D950DEE925700E433ED /* RecoverSyncMethodsView.h */, |
3945 | ABF87D8A0DEE921A00E433ED /* customs.h */, |
3946 | - ABF87D860DEE91E300E433ED /* RecoverView.h */, |
3947 | ABB2C3310DC7816C001F56C2 /* SyncMethodsView.h */, |
3948 | - ABBCD69E0DBF88D500A4C160 /* ContactsSettingsView.h */, |
3949 | - AB7207450DBDF00900AE2222 /* LogLevelView.h */, |
3950 | AB926BE40DBCF07B008E5FC6 /* AboutView.h */, |
3951 | - AB926A760DBCD056008E5FC6 /* LogSettingsView.h */, |
3952 | 7C7647BA0DB361EE00786883 /* main.h */, |
3953 | 7C9F57D30DAF5C50007E0091 /* AccountView.h */, |
3954 | 7C9F57D40DAF5C50007E0091 /* common.h */, |
3955 | - 7C9F57D60DAF5C50007E0091 /* LogView.h */, |
3956 | 7C9F57D90DAF5C50007E0091 /* UIController.h */, |
3957 | ); |
3958 | path = include; |
3959 | @@ -484,21 +448,12 @@ |
3960 | 7C9F57E30DAF5C50007E0091 /* src */ = { |
3961 | isa = PBXGroup; |
3962 | children = ( |
3963 | - 1054008211AA748E0074E5A9 /* LoginManager.mm */, |
3964 | - AB69923A0E275770000BE6D9 /* SettingsSingleView.mm */, |
3965 | ABC5F1420E249E9100119787 /* MainSingleView.mm */, |
3966 | - AB76D12E0DF434CB00C1F7D3 /* CleanUpView.mm */, |
3967 | ABF87D970DEE926E00E433ED /* FastSyncMethodsView.mm */, |
3968 | - ABF87D930DEE924900E433ED /* RecoverSyncMethodsView.mm */, |
3969 | - ABF87D870DEE91EC00E433ED /* RecoverView.mm */, |
3970 | ABB2C32F0DC78162001F56C2 /* SyncMethodsView.mm */, |
3971 | - ABBCD6A00DBF89AA00A4C160 /* ContactsSettingsView.mm */, |
3972 | - AB7207460DBDF01400AE2222 /* LogLevelView.mm */, |
3973 | AB926BE50DBCF087008E5FC6 /* AboutView.mm */, |
3974 | - AB926A740DBCD04E008E5FC6 /* LogSettingsView.mm */, |
3975 | 7C7647BB0DB361F500786883 /* main.mm */, |
3976 | 7C9F57E40DAF5C50007E0091 /* AccountView.mm */, |
3977 | - 7C9F57E60DAF5C50007E0091 /* LogView.mm */, |
3978 | 7C9F57E90DAF5C50007E0091 /* UIController.mm */, |
3979 | ); |
3980 | path = src; |
3981 | @@ -721,26 +676,17 @@ |
3982 | 7C9F57A70DAF5C47007E0091 /* PersonDataConverter.mm in Sources */, |
3983 | 7C9F57A80DAF5C47007E0091 /* TimestampDB.cpp in Sources */, |
3984 | 7C9F58160DAF5C50007E0091 /* AccountView.mm in Sources */, |
3985 | - 7C9F58180DAF5C50007E0091 /* LogView.mm in Sources */, |
3986 | 7C9F581B0DAF5C50007E0091 /* UIController.mm in Sources */, |
3987 | 7C9F59500DAF67B9007E0091 /* stringUtils.cpp in Sources */, |
3988 | 7C9F59620DAF683B007E0091 /* AddressBookSyncSource.cpp in Sources */, |
3989 | 7C7647BC0DB361F500786883 /* main.mm in Sources */, |
3990 | 7C849D210DB6371B00AE7A7D /* iPhoneDefaultConfigFactory.cpp in Sources */, |
3991 | - AB926A750DBCD04E008E5FC6 /* LogSettingsView.mm in Sources */, |
3992 | AB926BE60DBCF087008E5FC6 /* AboutView.mm in Sources */, |
3993 | - AB7207470DBDF01400AE2222 /* LogLevelView.mm in Sources */, |
3994 | - ABBCD6A10DBF89AA00A4C160 /* ContactsSettingsView.mm in Sources */, |
3995 | ABB2C3300DC78162001F56C2 /* SyncMethodsView.mm in Sources */, |
3996 | AB2107D30DE1C5820026FA2F /* FunambolAPIWrapperImpl.cpp in Sources */, |
3997 | - ABF87D880DEE91EC00E433ED /* RecoverView.mm in Sources */, |
3998 | - ABF87D940DEE924900E433ED /* RecoverSyncMethodsView.mm in Sources */, |
3999 | ABF87D980DEE926E00E433ED /* FastSyncMethodsView.mm in Sources */, |
4000 | - AB76D12F0DF434CB00C1F7D3 /* CleanUpView.mm in Sources */, |
4001 | ABC5F1430E249E9100119787 /* MainSingleView.mm in Sources */, |
4002 | - AB69923B0E275770000BE6D9 /* SettingsSingleView.mm in Sources */, |
4003 | AB33A9900E5AD6750098F0A2 /* TimeUtils.mm in Sources */, |
4004 | - 1054008311AA748E0074E5A9 /* LoginManager.mm in Sources */, |
4005 | ); |
4006 | runOnlyForDeploymentPostprocessing = 0; |
4007 | }; |
4008 | @@ -762,7 +708,7 @@ |
4009 | isa = XCBuildConfiguration; |
4010 | buildSettings = { |
4011 | ALWAYS_SEARCH_USER_PATHS = YES; |
4012 | - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Zachery Bir (VQETYLE6H4)"; |
4013 | + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Aaron Brethorst (F47V3NDKL2)"; |
4014 | COPY_PHASE_STRIP = NO; |
4015 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; |
4016 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; |
4017 | @@ -808,7 +754,7 @@ |
4018 | ); |
4019 | PREBINDING = NO; |
4020 | PRODUCT_NAME = Funambol; |
4021 | - "PROVISIONING_PROFILE[sdk=iphoneos*]" = "14D5492C-4ADF-4EC9-B55A-777EAC1AA507"; |
4022 | + "PROVISIONING_PROFILE[sdk=iphoneos*]" = "593A3158-7296-4E4E-9F26-663515C90E99"; |
4023 | SDKROOT = iphoneos4.0; |
4024 | TARGETED_DEVICE_FAMILY = 1; |
4025 | }; |
So much nicer.