~ubuntu-branches/ubuntu/breezy/evolution-data-server/breezy

« back to all changes in this revision

Viewing changes to libedataserver/e-source.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2005-10-10 11:30:56 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051010113056-rb4vj4kbs8yxft85
Tags: 1.4.1-0ubuntu3
* debian/patches/camel-imap-store.c.patch:
  - Ubuntu 17465: apply patch from
  http://bugzilla.gnome.org/attachment.cgi?id=53234&action=view
  (additional NULL pointer check)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Copyright (C) 2003  Ximian, Inc.
5
5
 *
6
6
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of version 2 of the GNU General Public
 
7
 * modify it under the terms of version 2 of the GNU Lesser General Public
8
8
 * License as published by the Free Software Foundation.
9
9
 *
10
10
 * This program is distributed in the hope that it will be useful,
12
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
13
 * General Public License for more details.
14
14
 *
15
 
 * You should have received a copy of the GNU General Public
 
15
 * You should have received a copy of the GNU Lesser General Public
16
16
 * License along with this program; if not, write to the
17
17
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18
18
 * Boston, MA 02111-1307, USA.
114
114
/* Initialization.  */
115
115
 
116
116
static void
117
 
class_init (ESourceClass *class)
 
117
e_source_class_init (ESourceClass *class)
118
118
{
119
119
        GObjectClass *object_class = G_OBJECT_CLASS (class);
120
120
 
134
134
}
135
135
 
136
136
static void
137
 
init (ESource *source)
 
137
e_source_init (ESource *source)
138
138
{
139
139
        ESourcePrivate *priv;
140
140
 
155
155
                        sizeof (ESourceClass),
156
156
                        (GBaseInitFunc) NULL,
157
157
                        (GBaseFinalizeFunc) NULL,
158
 
                        (GClassInitFunc) class_init,
 
158
                        (GClassInitFunc) e_source_class_init,
159
159
                        NULL, NULL,
160
160
                        sizeof (ESource),
161
161
                        0,
162
 
                        (GInstanceInitFunc) init
 
162
                        (GInstanceInitFunc) e_source_init
163
163
                };
164
164
                e_source_type = g_type_register_static (G_TYPE_OBJECT, "ESource", &info, 0);
165
165
        }
509
509
e_source_set_relative_uri (ESource *source,
510
510
                           const char *relative_uri)
511
511
{
 
512
        char *absolute_uri;
 
513
 
512
514
        g_return_if_fail (E_IS_SOURCE (source));
513
515
 
514
516
        if (source->priv->readonly)
520
522
        g_free (source->priv->relative_uri);
521
523
        source->priv->relative_uri = g_strdup (relative_uri);
522
524
 
 
525
        /* reset the absolute uri */
 
526
        if (source->priv->absolute_uri && 
 
527
            (absolute_uri = e_source_build_absolute_uri (source))) {
 
528
                g_free (source->priv->absolute_uri);
 
529
                source->priv->absolute_uri = absolute_uri;
 
530
        }
 
531
 
523
532
        g_signal_emit (source, signals[CHANGED], 0);
524
533
}
525
534