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

« back to all changes in this revision

Viewing changes to services/evolution-addressbook-factory/evolution-addressbook-factory.c

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2015-07-20 13:34:59 UTC
  • mfrom: (1.1.126) (1.2.48 sid)
  • Revision ID: package-import@ubuntu.com-20150720133459-g6y46hnu5ewtoz08
Tags: 3.16.4-0ubuntu2
debian/patches/0001-Bug-752373-Monthly-events-do-not-recur-correctly.patch:
Cherry-pick patch from upstream to fix events not recurring correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * evolution-addressbook-factory.c
3
3
 *
4
 
 * This library is free software you can redistribute it and/or modify it
 
4
 * This program is free software: you can redistribute it and/or modify it
5
5
 * under the terms of the GNU Lesser General Public License as published by
6
6
 * the Free Software Foundation.
7
7
 *
8
 
 * This library is distributed in the hope that it will be useful, but
 
8
 * This program is distributed in the hope that it will be useful, but
9
9
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
 
 * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 
10
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
11
11
 * for more details.
12
12
 *
13
13
 * You should have received a copy of the GNU Lesser General Public License
14
 
 * along with this library; if not, see <http://www.gnu.org/licenses/>.
 
14
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15
15
 *
16
16
 */
17
17
 
24
24
#include <gtk/gtk.h>
25
25
#endif
26
26
 
27
 
#ifdef G_OS_WIN32
28
 
#include <windows.h>
29
 
#include <conio.h>
30
 
#ifndef PROCESS_DEP_ENABLE
31
 
#define PROCESS_DEP_ENABLE 0x00000001
32
 
#endif
33
 
#ifndef PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION
34
 
#define PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION 0x00000002
35
 
#endif
36
 
#endif
37
 
 
 
27
#include <libedataserver/libedataserver.h>
38
28
#include <libedata-book/libedata-book.h>
39
29
 
40
30
static gboolean opt_keep_running = FALSE;
58
48
        GError *error = NULL;
59
49
 
60
50
#ifdef G_OS_WIN32
61
 
        /* Reduce risks */
62
 
        {
63
 
                typedef BOOL (WINAPI *t_SetDllDirectoryA) (LPCSTR lpPathName);
64
 
                t_SetDllDirectoryA p_SetDllDirectoryA;
65
 
 
66
 
                p_SetDllDirectoryA = GetProcAddress (
67
 
                        GetModuleHandle ("kernel32.dll"),
68
 
                        "SetDllDirectoryA");
69
 
 
70
 
                if (p_SetDllDirectoryA != NULL)
71
 
                        p_SetDllDirectoryA ("");
72
 
        }
73
 
#ifndef _WIN64
74
 
        {
75
 
                typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags);
76
 
                t_SetProcessDEPPolicy p_SetProcessDEPPolicy;
77
 
 
78
 
                p_SetProcessDEPPolicy = GetProcAddress (
79
 
                        GetModuleHandle ("kernel32.dll"),
80
 
                        "SetProcessDEPPolicy");
81
 
 
82
 
                if (p_SetProcessDEPPolicy != NULL)
83
 
                        p_SetProcessDEPPolicy (
84
 
                                PROCESS_DEP_ENABLE |
85
 
                                PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
86
 
        }
87
 
#endif
 
51
        e_util_win32_initialize ();
88
52
#endif
89
53
 
90
54
        setlocale (LC_ALL, "");
91
55
        bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
92
56
        bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
93
57
 
 
58
        /* Workaround https://bugzilla.gnome.org/show_bug.cgi?id=674885 */
 
59
        g_type_ensure (G_TYPE_DBUS_CONNECTION);
 
60
 
94
61
#if defined (ENABLE_MAINTAINER_MODE) && defined (HAVE_GTK)
95
62
        if (g_getenv ("EDS_TESTING") == NULL)
96
63
                /* This is only to load gtk-modules, like