/android/import-contacts

To get this branch, use:
bzr branch http://bzr.ed.am/android/import-contacts

« back to all changes in this revision

Viewing changes to src/org/waxworlds/edam/importcontacts/Doit.java

  • Committer: edam
  • Date: 2011-05-05 21:49:43 UTC
  • Revision ID: edam@waxworlds.org-20110505214943-bg0cn6qz0gr49dlk
- updated TODO
- made varibale names consistent (camelCaseVariables now_use_underscores)

Show diffs side-by-side

added added

removed removed

1
1
/*
2
2
 * Doit.java
3
3
 *
4
 
 * Copyright (C) 2009 Tim Marston <tim@ed.am>
 
4
 * Copyright (C) 2009 Tim Marston <edam@waxworlds.org>
5
5
 *
6
6
 * This file is part of the Import Contacts program (hereafter referred
7
 
 * to as "this program").  For more information, see
8
 
 * http://ed.am/dev/android/import-contacts
 
7
 * to as "this program"). For more information, see
 
8
 * http://www.waxworlds.org/edam/software/android/import-contacts
9
9
 *
10
10
 * This program is free software: you can redistribute it and/or modify
11
11
 * it under the terms of the GNU General Public License as published by
21
21
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 */
23
23
 
24
 
package am.ed.importcontacts;
 
24
package org.waxworlds.edam.importcontacts;
25
25
 
26
26
import android.app.AlertDialog;
27
27
import android.app.Dialog;
220
220
                                                public void onClick( DialogInterface dialog,
221
221
                                                        int whichButton )
222
222
                                                {
223
 
                                                        if( Doit.this != null )
224
 
                                                                Doit.this._importer.wake();
 
223
                                                        Doit.this._importer.wake();
225
224
                                                }
226
225
                                        } )
227
226
                                .setOnCancelListener( _dialog_on_cancel_listener )
236
235
                                                public void onClick( DialogInterface dialog,
237
236
                                                        int which_button )
238
237
                                                {
239
 
                                                        if( Doit.this != null )
240
 
                                                                Doit.this._importer.wake(
241
 
                                                                        Importer.RESPONSE_POSITIVE );
 
238
                                                        Doit.this._importer.wake(
 
239
                                                                Importer.RESPONSE_POSITIVE );
242
240
                                                }
243
241
                                        } )
244
242
                                .setNegativeButton( R.string.error_abort,
246
244
                                                public void onClick( DialogInterface dialog,
247
245
                                                        int which_button )
248
246
                                                {
249
 
                                                        if( Doit.this != null )
250
 
                                                                Doit.this._importer.wake(
251
 
                                                                        Importer.RESPONSE_NEGATIVE );
 
247
                                                        Doit.this._importer.wake(
 
248
                                                                Importer.RESPONSE_NEGATIVE );
252
249
                                                }
253
250
                                        } )
254
251
                                .setOnCancelListener( _dialog_on_cancel_listener )
264
261
                                                public void onCheckedChanged(
265
262
                                                        CompoundButton button_view, boolean is_checked )
266
263
                                                {
267
 
                                                        if( Doit.this != null )
268
 
                                                                Doit.this._merge_prompt_always_selected =
269
 
                                                                        is_checked;
 
264
                                                        Doit.this._merge_prompt_always_selected =
 
265
                                                                is_checked;
270
266
                                                }
271
267
                                        } );
272
268
                        ( (Button)dialog_view.findViewById( R.id.merge_keep ) ).
293
289
        {
294
290
                public void onClick( View view )
295
291
                {
296
 
                        if( Doit.this == null ) return;
297
 
 
298
292
                        // handle abort
299
293
                        if( view.getId() == R.id.abort )
300
294
                                manualAbort();
438
432
                ( (Button)findViewById( R.id.back ) ).setEnabled( false );
439
433
 
440
434
                // create importer
441
 
                _importer = new VcardImporter( this );
 
435
                _importer = new VCFImporter( this );
442
436
 
443
437
                // start the service's thread
444
438
                _importer.start();