~ubuntu-branches/ubuntu/maverick/evolution-data-server/maverick-updates

« back to all changes in this revision

Viewing changes to libedataserver/e-source.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-07-27 16:04:20 UTC
  • mfrom: (1.1.70 upstream)
  • Revision ID: james.westby@ubuntu.com-20090727160420-dr27rzbz6ddjqo04
Tags: 2.27.5-0ubuntu1
* New upstream version: 
  Bug Fixes:
  Address Book:
  - #587558 - Removing a picture of a contact in an LDAP addressbook
              crashes evolution 
  - #589325 - Evolution Contacts reports ambiguous error on Google
              Contacts authentication failure with bad password 
  Calendar:
  - #572176 - Allow local iCal files to be selected as calendar source
  - #586342 - CalDAV backend does not support attachments 
  - #588857 - CalDAV for Google calendars should allow email notifications
  Mail:
  - #524219 (bnc) - Unable to read forward groupwise mails in other clients.
  - #588220 - Evolution crashed when starting with local account configured 
  - #588573 - NULL string comparison in camel-search-sql-sexp.c
  Miscellaneous:
  - #583374 - The broken Google calendar import should be replaced by
              the working CalDAV support 
  - #588277 - Unnecessary special-purpose configure flag 
  Other Fixes:
  Handle quota error messages. 
  Return the proper timezone to get the counts right in all timezones.
  CamelVeeFolder - pass exceptions to functions instead of NULL
  Migrate caldav, groupwise, http, weather backends to ECalBackendStore.   
  Translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
304
304
 
305
305
        if (source->priv->name == NULL
306
306
            || strcmp ((gchar *)name, source->priv->name) != 0
307
 
            || source->priv->relative_uri == NULL
308
 
            || relative_uri == NULL
309
 
            || strcmp ((gchar *)relative_uri, source->priv->relative_uri) != 0) {
 
307
            || (source->priv->relative_uri == NULL && relative_uri != NULL)
 
308
            || (source->priv->relative_uri != NULL && relative_uri == NULL)
 
309
            || (relative_uri && source->priv->relative_uri && strcmp ((gchar *)relative_uri, source->priv->relative_uri) != 0)) {
 
310
                gchar *abs_uri = NULL;
 
311
 
310
312
                g_free (source->priv->name);
311
313
                source->priv->name = g_strdup ((gchar *)name);
312
314
 
313
315
                if (source->priv->group) {
314
 
                        /* reset the absolute uri to NULL to be regenerated when asked for */
 
316
                        abs_uri = e_source_build_absolute_uri (source);
 
317
                }
 
318
 
 
319
                if (abs_uri && source->priv->absolute_uri && g_str_equal (abs_uri, source->priv->absolute_uri)) {
 
320
                        /* reset the absolute uri to NULL to be regenerated when asked for,
 
321
                           but only when it was generated also before */
315
322
                        g_free (source->priv->absolute_uri);
316
323
                        source->priv->absolute_uri = NULL;
317
324
                } else if (source->priv->absolute_uri &&
325
332
                        g_free (tmp);
326
333
                }
327
334
 
 
335
                g_free (abs_uri);
 
336
 
328
337
                g_free (source->priv->relative_uri);
329
338
                source->priv->relative_uri = g_strdup ((gchar *)relative_uri);
330
339
 
493
502
e_source_set_relative_uri (ESource *source,
494
503
                           const gchar *relative_uri)
495
504
{
496
 
        gchar *absolute_uri;
 
505
        gchar *absolute_uri, *old_abs_uri = NULL;
497
506
 
498
507
        g_return_if_fail (E_IS_SOURCE (source));
499
508
 
500
509
        if (source->priv->readonly)
501
510
                return;
502
511
 
503
 
        if (source->priv->relative_uri == relative_uri)
 
512
        if (source->priv->relative_uri == relative_uri ||
 
513
            (source->priv->relative_uri && relative_uri && g_str_equal (source->priv->relative_uri, relative_uri)))
504
514
                return;
505
515
 
 
516
        if (source->priv->group)
 
517
                old_abs_uri = e_source_build_absolute_uri (source);
 
518
 
506
519
        g_free (source->priv->relative_uri);
507
520
        source->priv->relative_uri = g_strdup (relative_uri);
508
521
 
509
 
        /* reset the absolute uri */
 
522
        /* reset the absolute uri, if it's a generated one */
510
523
        if (source->priv->absolute_uri &&
 
524
            (!old_abs_uri || g_str_equal (source->priv->absolute_uri, old_abs_uri)) &&
511
525
            (absolute_uri = e_source_build_absolute_uri (source))) {
512
526
                g_free (source->priv->absolute_uri);
513
527
                source->priv->absolute_uri = absolute_uri;
514
528
        }
515
529
 
 
530
        g_free (old_abs_uri);
 
531
 
516
532
        g_signal_emit (source, signals[CHANGED], 0);
517
533
}
518
534
 
522
538
{
523
539
        g_return_if_fail (E_IS_SOURCE (source));
524
540
 
525
 
        if (!!absolute_uri == !!source->priv->absolute_uri
 
541
        if ((absolute_uri == source->priv->absolute_uri && absolute_uri == NULL)
526
542
            || (absolute_uri && source->priv->absolute_uri && !strcmp (source->priv->absolute_uri, absolute_uri)))
527
543
                return;
528
544