evolution-3.6.4/modules/itip-formatter/evolution-module-itip-formatter.c

No issues found

Incomplete coverage

Tool Failure ID Location Function Message Data
clang-analyzer no-output-found evolution-module-itip-formatter.c Message(text='Unable to locate XML output from invoke-clang-analyzer') None
clang-analyzer no-output-found evolution-module-itip-formatter.c Message(text='Unable to locate XML output from invoke-clang-analyzer') None
Failure running clang-analyzer ('no-output-found')
Message
Unable to locate XML output from invoke-clang-analyzer
Failure running clang-analyzer ('no-output-found')
Message
Unable to locate XML output from invoke-clang-analyzer
 1 /*
 2  * evolution-module-itip-formatter.c
 3  *
 4  * This program is free software; you can redistribute it and/or
 5  * modify it under the terms of the GNU Lesser General Public
 6  * License as published by the Free Software Foundation; either
 7  * version 2 of the License, or (at your option) version 3.
 8  *
 9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with the program; if not, see <http://www.gnu.org/licenses/>
16  *
17  */
18 
19 #include "e-mail-formatter-itip.h"
20 #include "e-mail-parser-itip.h"
21 
22 #include <gmodule.h>
23 #include <gio/gio.h>
24 
25 void e_module_load (GTypeModule *type_module);
26 void e_module_unload (GTypeModule *type_module);
27 const gchar * g_module_check_init (GModule *module);
28 
29 G_MODULE_EXPORT void
30 e_module_load (GTypeModule *type_module)
31 {
32 	GSettings *settings;
33 	gchar **disabled_plugins;
34 	gint i = 0;
35 
36 	settings = g_settings_new ("org.gnome.evolution");
37 	disabled_plugins = g_settings_get_strv (settings, "disabled-eplugins");
38 
39 	for (i = 0; disabled_plugins && disabled_plugins[i] != NULL; i++) {
40 
41 		if (g_strcmp0 (
42 			disabled_plugins[i],
43 			"org.gnome.evolution.itip_formatter") == 0) {
44 
45 			g_strfreev (disabled_plugins);
46 			g_object_unref (settings);
47 			return;
48 		}
49 
50 	}
51 
52 	e_mail_parser_itip_type_register (type_module);
53 	e_mail_formatter_itip_type_register (type_module);
54 
55 	g_strfreev (disabled_plugins);
56 	g_object_unref (settings);
57 }
58 
59 G_MODULE_EXPORT void
60 e_module_unload (GTypeModule *type_module)
61 {
62 }
63 
64 G_MODULE_EXPORT const gchar *
65 g_module_check_init (GModule *module)
66 {
67 	/* FIXME Until mail is split into a module library and a
68 	 *       reusable shared library, prevent the module from
69 	 *       being unloaded.  Unloading the module resets all
70 	 *       static variables, which screws up foo_get_type()
71 	 *       functions among other things. */
72 	g_module_make_resident (module);
73 
74 	return NULL;
75 }