e22d659a93a89ac275c0844c4845aceeeb67501c
[claws.git] / src / prefs_logging.c
1 /*
2  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2011 Tristan Chabredier <wwp@claws-mail.org> and 
4  * the Claws Mail team
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  * 
19  */
20
21 #ifdef HAVE_CONFIG_H
22 #  include "config.h"
23 #endif
24
25 #include "defs.h"
26
27 #include <stdio.h>
28 #include <stdlib.h>
29
30 #include <glib.h>
31 #include <glib/gi18n.h>
32 #include <gtk/gtk.h>
33
34 #include "prefs_common.h"
35 #include "prefs_gtk.h"
36
37 #include "gtk/gtkutils.h"
38 #include "gtk/prefswindow.h"
39 #include "gtk/menu.h"
40
41 #include "manage_window.h"
42
43 #include "log.h"
44 #include "combobox.h"
45
46 typedef struct _LoggingPage
47 {
48         PrefsPage page;
49
50         GtkWidget *window;
51
52         GtkWidget *checkbtn_clip_network_log;
53         GtkWidget *spinbtn_network_log_length;
54         GtkWidget *checkbtn_log_standard;
55         GtkWidget *checkbtn_log_warning;
56         GtkWidget *checkbtn_log_error;
57         GtkWidget *checkbtn_log_status;
58 #ifndef G_OS_WIN32
59         GtkWidget *checkbtn_clip_filtering_log;
60         GtkWidget *spinbtn_filtering_log_length;
61         GtkWidget *checkbtn_filtering_log;
62         GtkWidget *checkbtn_filtering_log_inc;
63         GtkWidget *checkbtn_filtering_log_manual;
64         GtkWidget *checkbtn_filtering_log_folder_proc;
65         GtkWidget *checkbtn_filtering_log_pre_proc;
66         GtkWidget *checkbtn_filtering_log_post_proc;
67         GtkWidget *optmenu_filtering_log_level;
68 #endif
69 } LoggingPage;
70
71 static GtkWidget *prefs_logging_create_check_buttons(GtkWidget **checkbtn1,
72                         gchar *label1, GtkWidget **checkbtn2, gchar *label2)
73 {
74         GtkWidget *hbox_checkbtn;
75
76         hbox_checkbtn = gtk_hbox_new(FALSE, VBOX_BORDER);
77         gtk_widget_show(hbox_checkbtn);
78         
79         PACK_CHECK_BUTTON (hbox_checkbtn, *checkbtn1, label1); 
80         gtk_label_set_line_wrap(GTK_LABEL(gtk_bin_get_child(GTK_BIN((*checkbtn1)))), TRUE);
81
82         PACK_CHECK_BUTTON (hbox_checkbtn, *checkbtn2, label2);
83         gtk_label_set_line_wrap(GTK_LABEL(gtk_bin_get_child(GTK_BIN((*checkbtn2)))), TRUE);
84         
85         return hbox_checkbtn;
86 }
87
88 static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window, 
89                                   gpointer data)
90 {
91         LoggingPage *prefs_logging = (LoggingPage *) _page;
92         
93         GtkWidget *vbox1;
94
95         GtkWidget *frame_logging;
96         GtkWidget *vbox_network_log;
97         GtkWidget *hbox_clip_network_log;
98         GtkWidget *checkbtn_clip_network_log;
99         GtkWidget *spinbtn_network_log_length;
100         GtkAdjustment *spinbtn_network_log_length_adj;
101         GtkWidget *hbox_checkbtn;
102 #ifndef G_OS_WIN32
103         GtkWidget *vbox1_filtering_log;
104         GtkWidget *hbox_clip_filtering_log;
105         GtkWidget *checkbtn_clip_filtering_log;
106         GtkWidget *spinbtn_filtering_log_length;
107         GtkAdjustment *spinbtn_filtering_log_length_adj;
108         GtkWidget *hbox_filtering_log;
109         GtkWidget *checkbtn_filtering_log;
110         GtkWidget *frame_filtering_log;
111         GtkWidget *vbox2_filtering_log;
112         GtkWidget *checkbtn_filtering_log_inc;
113         GtkWidget *checkbtn_filtering_log_manual;
114         GtkWidget *checkbtn_filtering_log_folder_proc;
115         GtkWidget *checkbtn_filtering_log_pre_proc;
116         GtkWidget *checkbtn_filtering_log_post_proc;
117         GtkWidget *hbox_filtering_log_level;
118         GtkWidget *label_filtering_log_level;
119         GtkWidget *optmenu_filtering_log_level;
120         GtkSizeGroup *filter_size_group;
121         GtkListStore *menu;
122         GtkTreeIter iter;
123 #endif
124         GtkWidget *frame_disk_log;
125         GtkWidget *vbox_disk_log;
126         GtkWidget *label;
127         GtkWidget *hbox;
128         GtkWidget *checkbtn_log_standard;
129         GtkWidget *checkbtn_log_warning;
130         GtkWidget *checkbtn_log_error;
131         GtkWidget *checkbtn_log_status;
132         GtkSizeGroup *log_size_group;
133         CLAWS_TIP_DECL();
134         
135         vbox1 = gtk_vbox_new (FALSE, VSPACING);
136         gtk_widget_show (vbox1);
137         gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
138
139         /* Protocol log */
140         vbox_network_log = gtkut_get_options_frame(vbox1, &frame_logging, _("Network log"));
141
142         hbox_clip_network_log = gtk_hbox_new (FALSE, 8);
143         gtk_container_add (GTK_CONTAINER (vbox_network_log), hbox_clip_network_log);
144         gtk_widget_show (hbox_clip_network_log);
145
146         PACK_CHECK_BUTTON (hbox_clip_network_log, checkbtn_clip_network_log,
147                            _("Restrict the log window to"));
148         
149         spinbtn_network_log_length_adj = gtk_adjustment_new (500, 0, G_MAXINT, 1, 10, 0);
150         spinbtn_network_log_length = gtk_spin_button_new
151                 (GTK_ADJUSTMENT (spinbtn_network_log_length_adj), 1, 0);
152         gtk_widget_show (spinbtn_network_log_length);
153         gtk_box_pack_start (GTK_BOX (hbox_clip_network_log), spinbtn_network_log_length,
154                             FALSE, FALSE, 0);
155         gtk_widget_set_size_request (GTK_WIDGET (spinbtn_network_log_length), 64, -1);
156         gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_network_log_length), TRUE);
157
158         CLAWS_SET_TIP(spinbtn_network_log_length,
159                              _("0 to stop logging in the log window"));
160
161         label = gtk_label_new(_("lines"));
162         gtk_widget_show (label);
163         gtk_box_pack_start(GTK_BOX(hbox_clip_network_log), label, FALSE, FALSE, 0);
164
165         SET_TOGGLE_SENSITIVITY(checkbtn_clip_network_log, spinbtn_network_log_length);
166         SET_TOGGLE_SENSITIVITY(checkbtn_clip_network_log, label);
167
168 #ifndef G_OS_WIN32
169         /* Filtering/processing debug log */
170         vbox1_filtering_log = gtkut_get_options_frame(vbox1,
171                                 &frame_logging, _("Filtering/processing log"));
172
173         PACK_CHECK_BUTTON (vbox1_filtering_log, checkbtn_filtering_log,
174                            _("Enable logging of filtering/processing rules"));
175         hbox_filtering_log = gtk_hbox_new (FALSE, 8);
176         gtk_container_add (GTK_CONTAINER (vbox1_filtering_log), hbox_filtering_log);
177         gtk_widget_show (hbox_filtering_log);
178
179         CLAWS_SET_TIP(checkbtn_filtering_log,
180                              _("If checked, turns on logging of filtering and processing rules.\n"
181                                 "The log is accessible from 'Tools/Filtering log'.\n"
182                                 "Caution: enabling this option will slow down the filtering/processing, "
183                                 "this might be critical when applying many rules upon thousands of "
184                                 "messages."));
185
186         vbox2_filtering_log = gtkut_get_options_frame(vbox1_filtering_log, &frame_filtering_log,
187                                                         _("Log filtering/processing when..."));
188
189         hbox_checkbtn = prefs_logging_create_check_buttons(
190                                                 &checkbtn_filtering_log_inc,
191                                                 _("filtering at incorporation"),
192                                                 &checkbtn_filtering_log_pre_proc,
193                                                 _("pre-processing folders"));
194         gtk_box_pack_start(GTK_BOX(vbox2_filtering_log), hbox_checkbtn, FALSE, FALSE, 0);
195
196         hbox_checkbtn = prefs_logging_create_check_buttons(
197                                                 &checkbtn_filtering_log_manual,
198                                                 _("manually filtering"),
199                                                 &checkbtn_filtering_log_post_proc,
200                                                 _("post-processing folders"));
201         gtk_box_pack_start(GTK_BOX(vbox2_filtering_log), hbox_checkbtn, FALSE, FALSE, 0);
202         
203         hbox_checkbtn = gtk_hbox_new(TRUE, VBOX_BORDER);
204         gtk_widget_show(hbox_checkbtn);
205         gtk_box_pack_start(GTK_BOX(vbox2_filtering_log), hbox_checkbtn, FALSE, FALSE, 0);
206         PACK_CHECK_BUTTON (hbox_checkbtn, checkbtn_filtering_log_folder_proc,
207                            _("processing folders"));
208         gtk_box_pack_start(GTK_BOX(hbox_checkbtn), gtk_label_new(""),
209                            FALSE, TRUE, 0);
210
211         filter_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
212         gtk_size_group_add_widget(filter_size_group, checkbtn_filtering_log_inc);
213         gtk_size_group_add_widget(filter_size_group, checkbtn_filtering_log_manual);
214         gtk_size_group_add_widget(filter_size_group, checkbtn_filtering_log_folder_proc);
215
216         SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, frame_filtering_log);
217
218         hbox_filtering_log_level = gtk_hbox_new (FALSE, 8);
219         gtk_widget_show (hbox_filtering_log_level);
220         gtk_box_pack_start(GTK_BOX (vbox1_filtering_log), hbox_filtering_log_level, FALSE, FALSE, 0);
221
222         label_filtering_log_level = gtk_label_new (_("Log level"));
223         gtk_widget_show (label_filtering_log_level);
224         gtk_box_pack_start(GTK_BOX(hbox_filtering_log_level), label_filtering_log_level, FALSE, FALSE, 0);
225
226         optmenu_filtering_log_level = gtkut_sc_combobox_create(NULL, FALSE);
227         gtk_widget_show (optmenu_filtering_log_level);
228         
229         menu = GTK_LIST_STORE(gtk_combo_box_get_model(
230                                 GTK_COMBO_BOX(optmenu_filtering_log_level)));
231         COMBOBOX_ADD (menu, _("Low"), 0);
232         COMBOBOX_ADD (menu, _("Medium"), 1);
233         COMBOBOX_ADD (menu, _("High"), 2);
234
235         gtk_box_pack_start(GTK_BOX(hbox_filtering_log_level), optmenu_filtering_log_level, FALSE, FALSE, 0);
236
237         CLAWS_SET_TIP(optmenu_filtering_log_level,
238                              _("Select the level of detail of the logging.\n"
239                                 "Choose Low to see when rules are applied, which "
240                                 "conditions match or don't match and what actions are "
241                                 "performed.\n"
242                                 "Choose Medium to see more details about the message "
243                                 "that is being processed, and why rules are skipped.\n"
244                                 "Choose High to explicitly show the reason why all "
245                                 "rules are processed or skipped, and why all conditions "
246                                 "are matched or not matched.\n"
247                                 "Caution: the higher the level, the greater the "
248                                 "impact on performance."));
249
250         hbox_clip_filtering_log = gtk_hbox_new (FALSE, 8);
251         gtk_container_add (GTK_CONTAINER (vbox1_filtering_log), hbox_clip_filtering_log);
252         gtk_widget_show (hbox_clip_filtering_log);
253         PACK_CHECK_BUTTON (hbox_clip_filtering_log, checkbtn_clip_filtering_log,
254                            _("Restrict the log window to"));
255         
256         spinbtn_filtering_log_length_adj = gtk_adjustment_new (500, 0, G_MAXINT, 1, 10, 0);
257         spinbtn_filtering_log_length = gtk_spin_button_new
258                 (GTK_ADJUSTMENT (spinbtn_filtering_log_length_adj), 1, 0);
259         gtk_widget_show (spinbtn_filtering_log_length);
260         gtk_box_pack_start (GTK_BOX (hbox_clip_filtering_log), spinbtn_filtering_log_length,
261                             FALSE, FALSE, 0);
262         gtk_widget_set_size_request (GTK_WIDGET (spinbtn_filtering_log_length), 64, -1);
263         gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (spinbtn_filtering_log_length), TRUE);
264
265         CLAWS_SET_TIP(spinbtn_filtering_log_length,
266                              _("0 to stop logging in the log window"));
267
268         label = gtk_label_new(_("lines"));
269         gtk_widget_show (label);
270         gtk_box_pack_start(GTK_BOX(hbox_clip_filtering_log), label, FALSE, FALSE, 0);
271
272         SET_TOGGLE_SENSITIVITY(checkbtn_clip_filtering_log, spinbtn_filtering_log_length);
273         SET_TOGGLE_SENSITIVITY(checkbtn_clip_filtering_log, label);
274         SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, hbox_clip_filtering_log);
275         SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, optmenu_filtering_log_level);
276         SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, checkbtn_clip_filtering_log);
277         SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, label_filtering_log_level);
278 #endif
279         /* disk log */
280         vbox_disk_log = gtkut_get_options_frame(vbox1, &frame_disk_log, _("Disk log"));
281
282         label = gtk_label_new(_("Write the following information to disk..."));
283         gtk_widget_show(label);
284         hbox = gtk_hbox_new (FALSE, 8);
285         gtk_container_add (GTK_CONTAINER (vbox_disk_log), hbox);
286         gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 0);
287         gtk_widget_show (hbox);
288
289         hbox_checkbtn = prefs_logging_create_check_buttons(&checkbtn_log_warning,
290                                 _("Warning messages"), &checkbtn_log_standard,
291                                 _("Network protocol messages"));
292         gtk_box_pack_start(GTK_BOX(vbox_disk_log), hbox_checkbtn, FALSE, FALSE, 0);
293
294         hbox_checkbtn = prefs_logging_create_check_buttons(&checkbtn_log_error, 
295                                 _("Error messages"), &checkbtn_log_status,
296                                 _("Status messages for filtering/processing log"));
297         gtk_box_pack_start(GTK_BOX(vbox_disk_log), hbox_checkbtn, FALSE, FALSE, 0);
298         
299         log_size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
300         gtk_size_group_add_widget(log_size_group, checkbtn_log_warning);
301         gtk_size_group_add_widget(log_size_group, checkbtn_log_error);
302
303         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_clip_network_log), 
304                 prefs_common.cliplog);
305 #ifndef G_OS_WIN32
306         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_clip_filtering_log), 
307                 prefs_common.filtering_debug_cliplog);
308 #endif
309         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_log_standard), 
310                 prefs_common.enable_log_standard);
311         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_log_warning), 
312                 prefs_common.enable_log_warning);
313         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_log_error), 
314                 prefs_common.enable_log_error);
315         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_log_status), 
316                 prefs_common.enable_log_status);
317 #ifndef G_OS_WIN32
318         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log), 
319                 prefs_common.enable_filtering_debug);
320         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log_inc), 
321                 prefs_common.enable_filtering_debug_inc);
322         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log_manual), 
323                 prefs_common.enable_filtering_debug_manual);
324         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log_folder_proc), 
325                 prefs_common.enable_filtering_debug_folder_proc);
326         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log_pre_proc), 
327                 prefs_common.enable_filtering_debug_pre_proc);
328         gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log_post_proc), 
329                 prefs_common.enable_filtering_debug_post_proc);
330 #endif
331         gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_network_log_length),
332                 prefs_common.loglength);
333 #ifndef G_OS_WIN32
334         gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_filtering_log_length),
335                 prefs_common.filtering_debug_loglength);
336         combobox_select_by_data(GTK_COMBO_BOX(optmenu_filtering_log_level),
337                         prefs_common.filtering_debug_level);
338 #endif
339
340         prefs_logging->checkbtn_clip_network_log = checkbtn_clip_network_log;
341         prefs_logging->spinbtn_network_log_length = spinbtn_network_log_length;
342         prefs_logging->checkbtn_log_standard = checkbtn_log_standard;
343         prefs_logging->checkbtn_log_warning = checkbtn_log_warning;
344         prefs_logging->checkbtn_log_error = checkbtn_log_error;
345         prefs_logging->checkbtn_log_status = checkbtn_log_status;
346 #ifndef G_OS_WIN32
347         prefs_logging->checkbtn_clip_filtering_log = checkbtn_clip_filtering_log;
348         prefs_logging->spinbtn_filtering_log_length = spinbtn_filtering_log_length;
349         prefs_logging->checkbtn_filtering_log = checkbtn_filtering_log;
350         prefs_logging->checkbtn_filtering_log_inc = checkbtn_filtering_log_inc;
351         prefs_logging->checkbtn_filtering_log_manual = checkbtn_filtering_log_manual;
352         prefs_logging->checkbtn_filtering_log_folder_proc = checkbtn_filtering_log_folder_proc;
353         prefs_logging->checkbtn_filtering_log_pre_proc = checkbtn_filtering_log_pre_proc;
354         prefs_logging->checkbtn_filtering_log_post_proc = checkbtn_filtering_log_post_proc;
355         prefs_logging->optmenu_filtering_log_level = optmenu_filtering_log_level;
356 #endif
357         prefs_logging->page.widget = vbox1;
358 }
359
360 static void prefs_logging_save(PrefsPage *_page)
361 {
362         LoggingPage *page = (LoggingPage *) _page;
363         MainWindow *mainwindow;
364 #ifndef G_OS_WIN32
365         gboolean filtering_debug_enabled;
366         prefs_common.filtering_debug_level =
367                 combobox_get_active_data(GTK_COMBO_BOX(page->optmenu_filtering_log_level));
368 #endif
369
370         prefs_common.cliplog = gtk_toggle_button_get_active(
371                 GTK_TOGGLE_BUTTON(page->checkbtn_clip_network_log));
372         prefs_common.loglength = gtk_spin_button_get_value_as_int(
373                 GTK_SPIN_BUTTON(page->spinbtn_network_log_length));
374         prefs_common.enable_log_standard = gtk_toggle_button_get_active(
375                 GTK_TOGGLE_BUTTON(page->checkbtn_log_standard));
376         prefs_common.enable_log_warning = gtk_toggle_button_get_active(
377                 GTK_TOGGLE_BUTTON(page->checkbtn_log_warning));
378         prefs_common.enable_log_error = gtk_toggle_button_get_active(
379                 GTK_TOGGLE_BUTTON(page->checkbtn_log_error));
380         prefs_common.enable_log_status = gtk_toggle_button_get_active(
381                 GTK_TOGGLE_BUTTON(page->checkbtn_log_status));
382 #ifndef G_OS_WIN32
383         prefs_common.filtering_debug_cliplog = gtk_toggle_button_get_active(
384                 GTK_TOGGLE_BUTTON(page->checkbtn_clip_filtering_log));
385         prefs_common.filtering_debug_loglength = gtk_spin_button_get_value_as_int(
386                 GTK_SPIN_BUTTON(page->spinbtn_filtering_log_length));
387         filtering_debug_enabled = prefs_common.enable_filtering_debug;
388         prefs_common.enable_filtering_debug = gtk_toggle_button_get_active(
389                 GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log));
390         if (filtering_debug_enabled != prefs_common.enable_filtering_debug) {
391                 if (prefs_common.enable_filtering_debug)
392                         log_message(LOG_DEBUG_FILTERING, _("filtering log enabled\n"));
393                 else
394                         log_message(LOG_DEBUG_FILTERING, _("filtering log disabled\n"));
395         }
396         prefs_common.enable_filtering_debug_inc = gtk_toggle_button_get_active(
397                 GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log_inc));
398         prefs_common.enable_filtering_debug_manual = gtk_toggle_button_get_active(
399                 GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log_manual));
400         prefs_common.enable_filtering_debug_folder_proc = gtk_toggle_button_get_active(
401                 GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log_folder_proc));
402         prefs_common.enable_filtering_debug_pre_proc = gtk_toggle_button_get_active(
403                 GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log_pre_proc));
404         prefs_common.enable_filtering_debug_post_proc = gtk_toggle_button_get_active(
405                 GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log_post_proc));
406 #endif
407         mainwindow = mainwindow_get_mainwindow();
408         log_window_set_clipping(mainwindow->logwin, prefs_common.cliplog,
409                                 prefs_common.loglength);
410 #ifndef G_OS_WIN32
411         log_window_set_clipping(mainwindow->filtering_debugwin, prefs_common.filtering_debug_cliplog,
412                                 prefs_common.filtering_debug_loglength);
413 #endif
414 }
415
416 static void prefs_logging_destroy_widget(PrefsPage *_page)
417 {
418 }
419
420 LoggingPage *prefs_logging;
421
422 void prefs_logging_init(void)
423 {
424         LoggingPage *page;
425         static gchar *path[3];
426
427         path[0] = _("Other");
428         path[1] = _("Logging");
429         path[2] = NULL;
430
431         page = g_new0(LoggingPage, 1);
432         page->page.path = path;
433         page->page.create_widget = prefs_logging_create_widget;
434         page->page.destroy_widget = prefs_logging_destroy_widget;
435         page->page.save_page = prefs_logging_save;
436         page->page.weight = 5.0;
437         prefs_gtk_register_page((PrefsPage *) page);
438         prefs_logging = page;
439 }
440
441 void prefs_logging_done(void)
442 {
443         prefs_gtk_unregister_page((PrefsPage *) prefs_logging);
444         g_free(prefs_logging);
445 }