~ubuntu-branches/ubuntu/precise/evolution/precise

« back to all changes in this revision

Viewing changes to plugins/groupwise-features/addressbook-groupwise.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-06-24 00:27:53 UTC
  • mfrom: (1.1.80 upstream)
  • Revision ID: james.westby@ubuntu.com-20110624002753-2vh1vjavlya7r103
Tags: 3.1.2-0ubuntu1
* New upstream release 3.1.2.
* debian/control: adjust Build-Depends to match new upstream requirements for
  the new release.
* debian/control: update evolution and evolution-dev Depends to require the
  right versions of e-d-s (>= 3.1, << 3.2), and drop libunique-3.0-dev.
* debian/control,
  debian/evolution.install: remove groupwise-features from the plugin list,
  it's now split out into a separate module.
* debian/patches/03_lpi.patch: refreshed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * This program is free software; you can redistribute it and/or
3
 
 * modify it under the terms of the GNU Lesser General Public
4
 
 * License as published by the Free Software Foundation; either
5
 
 * version 2 of the License, or (at your option) version 3.
6
 
 *
7
 
 * This program is distributed in the hope that it will be useful,
8
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10
 
 * Lesser General Public License for more details.
11
 
 *
12
 
 * You should have received a copy of the GNU Lesser General Public
13
 
 * License along with the program; if not, see <http://www.gnu.org/licenses/>
14
 
 *
15
 
 *
16
 
 * Authors:
17
 
 *
18
 
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
19
 
 *
20
 
 */
21
 
 
22
 
#include <gtk/gtk.h>
23
 
#include <e-util/e-config.h>
24
 
#include <addressbook/gui/widgets/eab-config.h>
25
 
#include <libedataserver/e-source.h>
26
 
#include <libedataserver/e-source-group.h>
27
 
#include <glib/gi18n.h>
28
 
#include <string.h>
29
 
 
30
 
void commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target);
31
 
GtkWidget *e_book_groupwise_dummy (EPlugin *epl, EConfigHookItemFactoryData *data);
32
 
 
33
 
void
34
 
commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target)
35
 
{
36
 
        EABConfigTargetSource *t = (EABConfigTargetSource *) target;
37
 
        ESource *source = t->source;
38
 
        gchar *uri_text;
39
 
        ESourceGroup *source_group;
40
 
        gchar *relative_uri;
41
 
        GSList *l;
42
 
 
43
 
        uri_text = e_source_get_uri (source);
44
 
        if (strncmp (uri_text, "groupwise", 9)) {
45
 
                g_free (uri_text);
46
 
 
47
 
                return;
48
 
        }
49
 
        e_source_set_property (source, "auth-domain", "Groupwise");
50
 
        relative_uri = g_strconcat (";", e_source_peek_name (source), NULL);
51
 
        e_source_set_relative_uri (source, relative_uri);
52
 
        g_free (relative_uri);
53
 
 
54
 
        source_group = e_source_peek_group (source);
55
 
        l = e_source_group_peek_sources (source_group);
56
 
        if (l && l->data ) {
57
 
                e_source_set_property(source, "auth", e_source_get_property(l->data, "auth"));
58
 
                e_source_set_property(source, "user", e_source_get_property(l->data, "user"));
59
 
                e_source_set_property(source, "use_ssl", e_source_get_property(l->data, "use_ssl"));
60
 
                e_source_set_property(source, "port", e_source_get_property(l->data, "port"));
61
 
        }
62
 
}
63
 
 
64
 
GtkWidget *
65
 
e_book_groupwise_dummy (EPlugin *epl, EConfigHookItemFactoryData *data)
66
 
{
67
 
 
68
 
        return NULL;
69
 
}