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

« back to all changes in this revision

Viewing changes to addressbook/backends/groupwise/e-book-backend-groupwise.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-05-17 17:02:06 UTC
  • mfrom: (1.1.79 upstream) (1.6.12 experimental)
  • Revision ID: james.westby@ubuntu.com-20100517170206-4ufr52vwrhh26yh0
Tags: 2.30.1-1ubuntu1
* Merge from debian experimental. Remaining change:
  (LP: #42199, #229669, #173703, #360344, #508494)
  + debian/control:
    - add Vcs-Bzr tag
    - don't use libgnome
    - Use Breaks instead of Conflicts against evolution 2.25 and earlier.
  + debian/evolution-data-server.install,
    debian/patches/45_libcamel_providers_version.patch:
    - use the upstream versioning, not a Debian-specific one 
  + debian/libedata-book1.2-dev.install, debian/libebackend-1.2-dev.install,
    debian/libcamel1.2-dev.install, debian/libedataserverui1.2-dev.install:
    - install html documentation
  + debian/rules:
    - don't build documentation it's shipped with the tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
326
326
                                }
327
327
 
328
328
                        }
329
 
                        if (! ims_matched)
 
329
                        if (!ims_matched)
330
330
                                added_ims = g_list_append (added_ims, im1);
331
331
                }
332
332
 
1780
1780
        if (argc == 1
1781
1781
            && argv[0]->type == ESEXP_RES_STRING) {
1782
1782
                gchar *propname = argv[0]->value.string;
1783
 
                gchar *str = argv[1]->value.string;
 
1783
                const gchar *str = "";
1784
1784
                const gchar *gw_field_name;
1785
1785
 
1786
1786
                gw_field_name = NULL;
1791
1791
                else if (g_str_equal (propname, "file_as") || g_str_equal (propname, "nickname"))
1792
1792
                         gw_field_name = "name";
1793
1793
 
 
1794
                /* FIXME the whole function looks useless. Why does one need str argument to the filter here ?*/
1794
1795
                if (gw_field_name) {
1795
1796
 
1796
1797
                        if (g_str_equal (gw_field_name, "fullName")) {
1855
1856
        sexp_data->auto_completion = 0;
1856
1857
        sexp_data->search_string = NULL;
1857
1858
 
1858
 
        for (i=0;i<sizeof(symbols)/sizeof(symbols[0]);i++) {
 
1859
        for (i = 0; i < G_N_ELEMENTS (symbols); i++) {
1859
1860
                if (symbols[i].type == 1) {
1860
1861
                        e_sexp_add_ifunction(sexp, 0, symbols[i].name,
1861
1862
                                             (ESExpIFunc *)symbols[i].func, sexp_data);
2205
2206
 
2206
2207
                filter = e_book_backend_groupwise_build_gw_filter (gwb, query, &is_auto_completion, &search_string);
2207
2208
                view = "name email default members";
2208
 
                if (is_auto_completion)
 
2209
                if (is_auto_completion && !g_getenv ("AUTOCOMPLETE_EXPAND_CL"))
2209
2210
                        view = "name email";
2210
2211
 
2211
2212
                if (search_string) {
2589
2590
 
2590
2591
        status = e_gw_connection_get_items (ebgw->priv->cnc, ebgw->priv->container_id, "name email default members", NULL, &gw_items);
2591
2592
        if (status != E_GW_CONNECTION_STATUS_OK)
2592
 
                return FALSE;
 
2593
                return NULL;
2593
2594
 
2594
2595
        for (; gw_items != NULL; gw_items = g_list_next(gw_items)) {
2595
2596
                contact_num++;
3261
3262
                if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
3262
3263
                        status = e_gw_connection_get_address_book_id (priv->cnc,  priv->book_name, &id, &is_writable);
3263
3264
                if (status == E_GW_CONNECTION_STATUS_OK) {
3264
 
                        if ( (id == NULL) && !priv->only_if_exists ) {
 
3265
                        if ((id == NULL) && !priv->only_if_exists) {
3265
3266
                                status = e_gw_connection_create_book (priv->cnc, priv->book_name,  &id);
3266
3267
                                is_writable = TRUE;
3267
3268
                                if (status != E_GW_CONNECTION_STATUS_OK ) {
3582
3583
 
3583
3584
                /* the databade didn't exist, so we create the
3584
3585
                   directory then the .db */
3585
 
                rv = g_mkdir_with_parents (dirname, 0777);
 
3586
                rv = g_mkdir_with_parents (dirname, 0700);
3586
3587
                if (rv == -1 && errno != EEXIST) {
3587
3588
                        g_warning ("failed to make directory %s: %s", dirname, g_strerror (errno));
3588
3589
                        g_free (dirname);
3712
3713
}
3713
3714
 
3714
3715
static void
3715
 
e_book_backend_groupwise_set_mode (EBookBackend *backend, gint mode)
 
3716
e_book_backend_groupwise_set_mode (EBookBackend *backend,
 
3717
                                   GNOME_Evolution_Addressbook_BookMode mode)
3716
3718
{
3717
3719
        EBookBackendGroupwise *bg;
3718
3720