~ubuntu-branches/ubuntu/maverick/empathy/maverick

« back to all changes in this revision

Viewing changes to libempathy/empathy-tp-contact-factory.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-07-16 18:34:37 UTC
  • mto: (6.4.1 sid) (1.11.1) (107.1.1 maverick)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090716183437-19adf9kb5066d4xq
Tags: upstream-2.27.4
ImportĀ upstreamĀ versionĀ 2.27.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
494
494
 
495
495
        address = geoclue_address_details_new ();
496
496
 
 
497
        str = get_dup_string (location, EMPATHY_LOCATION_COUNTRY_CODE);
 
498
        if (str != NULL) {
 
499
                g_hash_table_insert (address,
 
500
                        g_strdup (GEOCLUE_ADDRESS_KEY_COUNTRYCODE), str);
 
501
                DEBUG ("\t - countrycode: %s", str);
 
502
        }
 
503
 
497
504
        str = get_dup_string (location, EMPATHY_LOCATION_COUNTRY);
498
 
        if (str != NULL)
499
 
                g_hash_table_insert (address, g_strdup ("country"), str);
 
505
        if (str != NULL) {
 
506
                g_hash_table_insert (address,
 
507
                        g_strdup (GEOCLUE_ADDRESS_KEY_COUNTRY), str);
 
508
                DEBUG ("\t - country: %s", str);
 
509
        }
500
510
 
501
511
        str = get_dup_string (location, EMPATHY_LOCATION_POSTAL_CODE);
502
 
        if (str != NULL)
503
 
                g_hash_table_insert (address, g_strdup ("postalcode"), str);
 
512
        if (str != NULL) {
 
513
                g_hash_table_insert (address,
 
514
                        g_strdup (GEOCLUE_ADDRESS_KEY_POSTALCODE), str);
 
515
                DEBUG ("\t - postalcode: %s", str);
 
516
        }
 
517
 
 
518
        str = get_dup_string (location, EMPATHY_LOCATION_REGION);
 
519
        if (str != NULL) {
 
520
                g_hash_table_insert (address,
 
521
                        g_strdup (GEOCLUE_ADDRESS_KEY_REGION), str);
 
522
                DEBUG ("\t - region: %s", str);
 
523
        }
504
524
 
505
525
        str = get_dup_string (location, EMPATHY_LOCATION_LOCALITY);
506
 
        if (str != NULL)
507
 
                g_hash_table_insert (address, g_strdup ("locality"), str);
 
526
        if (str != NULL) {
 
527
                g_hash_table_insert (address,
 
528
                        g_strdup (GEOCLUE_ADDRESS_KEY_LOCALITY), str);
 
529
                DEBUG ("\t - locality: %s", str);
 
530
        }
508
531
 
509
532
        str = get_dup_string (location, EMPATHY_LOCATION_STREET);
510
 
        if (str != NULL)
511
 
                g_hash_table_insert (address, g_strdup ("street"), str);
 
533
        if (str != NULL) {
 
534
                g_hash_table_insert (address,
 
535
                        g_strdup (GEOCLUE_ADDRESS_KEY_STREET), str);
 
536
                DEBUG ("\t - street: %s", str);
 
537
        }
512
538
 
513
539
        g_object_ref (contact);
514
540
        geoclue_geocode_address_to_position_async (geocode, address,