evolution-3.6.4/modules/mail/e-mail-shell-settings.c

No issues found

Incomplete coverage

Tool Failure ID Location Function Message Data
clang-analyzer no-output-found e-mail-shell-settings.c Message(text='Unable to locate XML output from invoke-clang-analyzer') None
clang-analyzer no-output-found e-mail-shell-settings.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-mail-shell-settings.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  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 19  *
 20  */
 21 
 22 #ifdef HAVE_CONFIG_H
 23 #include <config.h>
 24 #endif
 25 
 26 #include "e-mail-shell-settings.h"
 27 
 28 #include <mail/e-mail-backend.h>
 29 
 30 #include <shell/e-shell.h>
 31 
 32 #define MAIL_SCHEMA "org.gnome.evolution.mail"
 33 
 34 static gboolean
 35 transform_no_folder_dots_to_ellipsize (GBinding *binding,
 36                                        const GValue *source_value,
 37                                        GValue *target_value,
 38                                        gpointer user_data)
 39 {
 40 	PangoEllipsizeMode ellipsize;
 41 
 42 	if (g_value_get_boolean (source_value))
 43 		ellipsize = PANGO_ELLIPSIZE_NONE;
 44 	else
 45 		ellipsize = PANGO_ELLIPSIZE_END;
 46 
 47 	g_value_set_enum (target_value, ellipsize);
 48 
 49 	return TRUE;
 50 }
 51 
 52 void
 53 e_mail_shell_settings_init (EShellBackend *shell_backend)
 54 {
 55 	EShell *shell;
 56 	EShellSettings *shell_settings;
 57 	EMailBackend *backend;
 58 	EMailSession *session;
 59 
 60 	shell = e_shell_backend_get_shell (shell_backend);
 61 	shell_settings = e_shell_get_shell_settings (shell);
 62 
 63 	backend = E_MAIL_BACKEND (shell_backend);
 64 	session = e_mail_backend_get_session (backend);
 65 
 66 	/*** Global Objects ***/
 67 
 68 	e_shell_settings_install_property (
 69 		g_param_spec_pointer (
 70 			"mail-session",
 71 			NULL,
 72 			NULL,
 73 			G_PARAM_READWRITE));
 74 
 75 	e_shell_settings_set_pointer (
 76 		shell_settings, "mail-session",
 77 		g_object_ref (session));
 78 
 79 	/*** Mail Preferences ***/
 80 
 81 	e_shell_settings_install_property_for_key (
 82 		"mail-address-compress",
 83 		MAIL_SCHEMA,
 84 		"address-compress");
 85 
 86 	e_shell_settings_install_property_for_key (
 87 		"mail-address-count",
 88 		MAIL_SCHEMA,
 89 		"address-count");
 90 
 91 	e_shell_settings_install_property_for_key (
 92 		"mail-charset",
 93 		MAIL_SCHEMA,
 94 		"charset");
 95 
 96 	e_shell_settings_install_property_for_key (
 97 		"mail-check-for-junk",
 98 		MAIL_SCHEMA,
 99 		"junk-check-incoming");
100 
101 	e_shell_settings_install_property_for_key (
102 		"mail-check-on-start",
103 		MAIL_SCHEMA,
104 		"send-recv-on-start");
105 
106 	e_shell_settings_install_property_for_key (
107 		"mail-check-all-on-start",
108 		MAIL_SCHEMA,
109 		"send-recv-all-on-start");
110 
111 	e_shell_settings_install_property_for_key (
112 		"mail-citation-color",
113 		MAIL_SCHEMA,
114 		"citation-color");
115 
116 	e_shell_settings_install_property_for_key (
117 		"mail-confirm-expunge",
118 		MAIL_SCHEMA,
119 		"prompt-on-expunge");
120 
121 	e_shell_settings_install_property_for_key (
122 		"mail-confirm-unwanted-html",
123 		MAIL_SCHEMA,
124 		"prompt-on-unwanted-html");
125 
126 	e_shell_settings_install_property_for_key (
127 		"mail-empty-junk-on-exit",
128 		MAIL_SCHEMA,
129 		"junk-empty-on-exit");
130 
131 	e_shell_settings_install_property_for_key (
132 		"mail-empty-trash-on-exit",
133 		MAIL_SCHEMA,
134 		"trash-empty-on-exit");
135 
136 	e_shell_settings_install_property_for_key (
137 		"mail-enable-unmatched-search-folder",
138 		MAIL_SCHEMA,
139 		"enable-unmatched");
140 
141 	e_shell_settings_install_property_for_key (
142 		"mail-font-monospace",
143 		MAIL_SCHEMA,
144 		"monospace-font");
145 
146 	e_shell_settings_install_property_for_key (
147 		"mail-font-variable",
148 		MAIL_SCHEMA,
149 		"variable-width-font");
150 
151 	/* This value corresponds to the EMailForwardStyle enum. */
152 	e_shell_settings_install_property_for_key (
153 		"mail-forward-style",
154 		MAIL_SCHEMA,
155 		"forward-style");
156 
157 	/* This value corresponds to MailConfigHTTPMode enum. */
158 	e_shell_settings_install_property_for_key (
159 		"mail-image-loading-policy",
160 		MAIL_SCHEMA,
161 		"load-http-images");
162 
163 	e_shell_settings_install_property_for_key (
164 		"mail-magic-spacebar",
165 		MAIL_SCHEMA,
166 		"magic-spacebar");
167 
168 	e_shell_settings_install_property_for_key (
169 		"mail-global-view-setting",
170 		MAIL_SCHEMA,
171 		"global-view-setting");
172 
173 	e_shell_settings_install_property_for_key (
174 		"mail-mark-citations",
175 		MAIL_SCHEMA,
176 		"mark-citations");
177 
178 	e_shell_settings_install_property_for_key (
179 		"mail-mark-seen",
180 		MAIL_SCHEMA,
181 		"mark-seen");
182 
183 	e_shell_settings_install_property_for_key (
184 		"mail-mark-seen-timeout",
185 		MAIL_SCHEMA,
186 		"mark-seen-timeout");
187 
188 	/* Do not bind to this.  Use "mail-sidebar-ellipsize" instead. */
189 	e_shell_settings_install_property_for_key (
190 		"mail-no-folder-dots",
191 		MAIL_SCHEMA,
192 		"no-folder-dots");
193 
194 	e_shell_settings_install_property_for_key (
195 		"mail-only-local-photos",
196 		MAIL_SCHEMA,
197 		"photo-local");
198 
199 	e_shell_settings_install_property_for_key (
200 		"mail-show-real-date",
201 		MAIL_SCHEMA,
202 		"show-real-date");
203 
204 	e_shell_settings_install_property_for_key (
205 		"mail-sort-accounts-alpha",
206 		MAIL_SCHEMA,
207 		"sort-accounts-alpha");
208 
209 	e_shell_settings_install_property_for_key (
210 		"mail-prompt-delete-in-vfolder",
211 		MAIL_SCHEMA,
212 		"prompt-on-delete-in-vfolder");
213 
214 	/* This value corresponds to the EMailReplyStyle enum,
215 	 * but the ordering of the combo box items in preferences
216 	 * has changed.  We use transformation functions there. */
217 	e_shell_settings_install_property_for_key (
218 		"mail-reply-style",
219 		MAIL_SCHEMA,
220 		"reply-style");
221 
222 	e_shell_settings_install_property_for_key (
223 		"mail-safe-list",
224 		MAIL_SCHEMA,
225 		"safe-list");
226 
227 	e_shell_settings_install_property_for_key (
228 		"mail-show-animated-images",
229 		MAIL_SCHEMA,
230 		"show-animated-images");
231 
232 	e_shell_settings_install_property_for_key (
233 		"mail-show-sender-photo",
234 		MAIL_SCHEMA,
235 		"show-sender-photo");
236 
237 	e_shell_settings_install_property_for_key (
238 		"mail-sidebar-search",
239 		MAIL_SCHEMA,
240 		"side-bar-search");
241 
242 	e_shell_settings_install_property_for_key (
243 		"mail-thread-by-subject",
244 		MAIL_SCHEMA,
245 		"thread-subject");
246 
247 	e_shell_settings_install_property_for_key (
248 		"mail-use-custom-fonts",
249 		MAIL_SCHEMA,
250 		"use-custom-font");
251 
252 	/*** Composer Preferences ***/
253 
254 	e_shell_settings_install_property_for_key (
255 		"composer-charset",
256 		MAIL_SCHEMA,
257 		"composer-charset");
258 
259 	e_shell_settings_install_property_for_key (
260 		"composer-format-html",
261 		MAIL_SCHEMA,
262 		"composer-send-html");
263 
264 	e_shell_settings_install_property_for_key (
265 		"composer-inline-spelling",
266 		MAIL_SCHEMA,
267 		"composer-inline-spelling");
268 
269 	e_shell_settings_install_property_for_key (
270 		"composer-magic-links",
271 		MAIL_SCHEMA,
272 		"composer-magic-links");
273 
274 	e_shell_settings_install_property_for_key (
275 		"composer-magic-smileys",
276 		MAIL_SCHEMA,
277 		"composer-magic-smileys");
278 
279 	e_shell_settings_install_property_for_key (
280 		"composer-outlook-filenames",
281 		MAIL_SCHEMA,
282 		"composer-outlook-filenames");
283 
284 	e_shell_settings_install_property_for_key (
285 		"composer-localized-re",
286 		MAIL_SCHEMA,
287 		"composer-localized-re");
288 
289 	e_shell_settings_install_property_for_key (
290 		"composer-ignore-list-reply-to",
291 		MAIL_SCHEMA,
292 		"composer-ignore-list-reply-to");
293 
294 	e_shell_settings_install_property_for_key (
295 		"composer-group-reply-to-list",
296 		MAIL_SCHEMA,
297 		"composer-group-reply-to-list");
298 
299 	e_shell_settings_install_property_for_key (
300 		"composer-sign-reply-if-signed",
301 		MAIL_SCHEMA,
302 		"composer-sign-reply-if-signed");
303 
304 	e_shell_settings_install_property_for_key (
305 		"composer-prompt-only-bcc",
306 		MAIL_SCHEMA,
307 		"prompt-on-only-bcc");
308 
309 	e_shell_settings_install_property_for_key (
310 		"composer-prompt-private-list-reply",
311 		MAIL_SCHEMA,
312 		"prompt-on-private-list-reply");
313 
314 	e_shell_settings_install_property_for_key (
315 		"composer-prompt-reply-many-recips",
316 		MAIL_SCHEMA,
317 		"prompt-on-reply-many-recips");
318 
319 	e_shell_settings_install_property_for_key (
320 		"composer-prompt-list-reply-to",
321 		MAIL_SCHEMA,
322 		"prompt-on-list-reply-to");
323 
324 	e_shell_settings_install_property_for_key (
325 		"composer-prompt-empty-subject",
326 		MAIL_SCHEMA,
327 		"prompt-on-empty-subject");
328 
329 	e_shell_settings_install_property_for_key (
330 		"composer-prompt-send-invalid-recip",
331 		MAIL_SCHEMA,
332 		"prompt-on-invalid-recip");
333 
334 	e_shell_settings_install_property_for_key (
335 		"composer-reply-start-bottom",
336 		MAIL_SCHEMA,
337 		"composer-reply-start-bottom");
338 
339 	e_shell_settings_install_property_for_key (
340 		"composer-request-receipt",
341 		MAIL_SCHEMA,
342 		"composer-request-receipt");
343 
344 	e_shell_settings_install_property_for_key (
345 		"composer-spell-color",
346 		MAIL_SCHEMA,
347 		"composer-spell-color");
348 
349 	e_shell_settings_install_property_for_key (
350 		"composer-top-signature",
351 		MAIL_SCHEMA,
352 		"composer-top-signature");
353 
354 	e_shell_settings_install_property_for_key (
355 		"composer-no-signature-delim",
356 		MAIL_SCHEMA,
357 		"composer-no-signature-delim");
358 
359 	e_shell_settings_install_property_for_key (
360 		"composer-gallery-path",
361 		MAIL_SCHEMA,
362 		"composer-gallery-path");
363 
364 	e_shell_settings_install_property_for_key (
365 		"paned-view-headers-state",
366 		MAIL_SCHEMA,
367 		"paned-view-headers-state");
368 
369 	e_shell_settings_install_property (
370 		g_param_spec_enum (
371 			"mail-sidebar-ellipsize",
372 			NULL,
373 			NULL,
374 			PANGO_TYPE_ELLIPSIZE_MODE,
375 			PANGO_ELLIPSIZE_NONE,
376 			G_PARAM_READWRITE));
377 
378 	g_object_bind_property_full (
379 		shell_settings, "mail-no-folder-dots",
380 		shell_settings, "mail-sidebar-ellipsize",
381 		G_BINDING_SYNC_CREATE,
382 		transform_no_folder_dots_to_ellipsize,
383 		NULL,
384 		g_object_ref (shell_settings),
385 		(GDestroyNotify) g_object_unref);
386 }