evolution-3.6.4/modules/calendar/e-cal-config-model.c

No issues found

Incomplete coverage

Tool Failure ID Location Function Message Data
clang-analyzer no-output-found e-cal-config-model.c Message(text='Unable to locate XML output from invoke-clang-analyzer') None
clang-analyzer no-output-found e-cal-config-model.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  * e-cal-config-model.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 #ifdef HAVE_CONFIG_H
 20 #include <config.h>
 21 #endif
 22 
 23 #include "e-cal-config-model.h"
 24 
 25 #include <shell/e-shell.h>
 26 #include <calendar/gui/e-cal-model.h>
 27 #include <calendar/gui/e-cal-model-tasks.h>
 28 
 29 #define E_CAL_CONFIG_MODEL_GET_PRIVATE(obj) \
 30 	(G_TYPE_INSTANCE_GET_PRIVATE \
 31 	((obj), E_TYPE_CAL_CONFIG_MODEL, ECalConfigModelPrivate))
 32 
 33 struct _ECalConfigModelPrivate {
 34 	gint placeholder;
 35 };
 36 
 37 G_DEFINE_DYNAMIC_TYPE (
 38 	ECalConfigModel,
 39 	e_cal_config_model,
 40 	E_TYPE_EXTENSION)
 41 
 42 static void
 43 cal_config_model_constructed (GObject *object)
 44 {
 45 	EExtension *extension;
 46 	EExtensible *extensible;
 47 	EShellSettings *shell_settings;
 48 	EShell *shell;
 49 
 50 	extension = E_EXTENSION (object);
 51 	extensible = e_extension_get_extensible (extension);
 52 
 53 	shell = e_shell_get_default ();
 54 	shell_settings = e_shell_get_shell_settings (shell);
 55 
 56 	/*** ECalModel ***/
 57 
 58 	g_object_bind_property (
 59 		shell_settings, "cal-compress-weekend",
 60 		extensible, "compress-weekend",
 61 		G_BINDING_SYNC_CREATE);
 62 
 63 	g_object_bind_property (
 64 		shell_settings, "cal-confirm-delete",
 65 		extensible, "confirm-delete",
 66 		G_BINDING_SYNC_CREATE);
 67 
 68 	g_object_bind_property (
 69 		shell_settings, "cal-default-reminder-interval",
 70 		extensible, "default-reminder-interval",
 71 		G_BINDING_SYNC_CREATE);
 72 
 73 	g_object_bind_property (
 74 		shell_settings, "cal-default-reminder-units",
 75 		extensible, "default-reminder-units",
 76 		G_BINDING_SYNC_CREATE);
 77 
 78 	g_object_bind_property (
 79 		shell_settings, "cal-timezone",
 80 		extensible, "timezone",
 81 		G_BINDING_SYNC_CREATE);
 82 
 83 	g_object_bind_property (
 84 		shell_settings, "cal-use-24-hour-format",
 85 		extensible, "use-24-hour-format",
 86 		G_BINDING_SYNC_CREATE);
 87 
 88 	g_object_bind_property (
 89 		shell_settings, "cal-use-default-reminder",
 90 		extensible, "use-default-reminder",
 91 		G_BINDING_SYNC_CREATE);
 92 
 93 	g_object_bind_property (
 94 		shell_settings, "cal-week-start-day",
 95 		extensible, "week-start-day",
 96 		G_BINDING_SYNC_CREATE);
 97 
 98 	g_object_bind_property (
 99 		shell_settings, "cal-work-day-end-hour",
100 		extensible, "work-day-end-hour",
101 		G_BINDING_SYNC_CREATE);
102 
103 	g_object_bind_property (
104 		shell_settings, "cal-work-day-end-minute",
105 		extensible, "work-day-end-minute",
106 		G_BINDING_SYNC_CREATE);
107 
108 	g_object_bind_property (
109 		shell_settings, "cal-work-day-start-hour",
110 		extensible, "work-day-start-hour",
111 		G_BINDING_SYNC_CREATE);
112 
113 	g_object_bind_property (
114 		shell_settings, "cal-work-day-start-minute",
115 		extensible, "work-day-start-minute",
116 		G_BINDING_SYNC_CREATE);
117 
118 	/*** ECalModelTasks ***/
119 
120 	if (E_IS_CAL_MODEL_TASKS (extensible)) {
121 
122 		g_object_bind_property (
123 			shell_settings, "cal-tasks-highlight-due-today",
124 			extensible, "highlight-due-today",
125 			G_BINDING_SYNC_CREATE);
126 
127 		g_object_bind_property (
128 			shell_settings, "cal-tasks-color-due-today",
129 			extensible, "color-due-today",
130 			G_BINDING_SYNC_CREATE);
131 
132 		g_object_bind_property (
133 			shell_settings, "cal-tasks-highlight-overdue",
134 			extensible, "highlight-overdue",
135 			G_BINDING_SYNC_CREATE);
136 
137 		g_object_bind_property (
138 			shell_settings, "cal-tasks-color-overdue",
139 			extensible, "color-overdue",
140 			G_BINDING_SYNC_CREATE);
141 	}
142 
143 	/* Chain up to parent's constructed() method. */
144 	G_OBJECT_CLASS (e_cal_config_model_parent_class)->constructed (object);
145 }
146 
147 static void
148 e_cal_config_model_class_init (ECalConfigModelClass *class)
149 {
150 	GObjectClass *object_class;
151 	EExtensionClass *extension_class;
152 
153 	g_type_class_add_private (class, sizeof (ECalConfigModelPrivate));
154 
155 	object_class = G_OBJECT_CLASS (class);
156 	object_class->constructed = cal_config_model_constructed;
157 
158 	extension_class = E_EXTENSION_CLASS (class);
159 	extension_class->extensible_type = E_TYPE_CAL_MODEL;
160 }
161 
162 static void
163 e_cal_config_model_class_finalize (ECalConfigModelClass *class)
164 {
165 }
166 
167 static void
168 e_cal_config_model_init (ECalConfigModel *extension)
169 {
170 	extension->priv = E_CAL_CONFIG_MODEL_GET_PRIVATE (extension);
171 }
172 
173 void
174 e_cal_config_model_type_register (GTypeModule *type_module)
175 {
176 	/* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
177 	 *     function, so we have to wrap it with a public function in
178 	 *     order to register types from a separate compilation unit. */
179 	e_cal_config_model_register_type (type_module);
180 }