2
* This file is a part of the Cairo-Dock project
4
* Copyright : (C) see the 'copyright' file.
5
* E-mail : see the 'copyright' file.
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License
9
* as published by the Free Software Foundation; either version 3
10
* of the License, or (at your option) any later version.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
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/>.
22
#include "tomboy-struct.h"
23
#include "tomboy-dbus.h"
24
#include "tomboy-config.h"
28
CD_APPLET_GET_CONFIG_BEGIN
29
myConfig.defaultTitle = CD_CONFIG_GET_STRING ("Icon", "name");
30
myConfig.cIconDefault = CD_CONFIG_GET_STRING ("Icon", "default icon");
31
myConfig.cIconClose = CD_CONFIG_GET_STRING ("Icon", "close icon");
32
myConfig.cIconBroken = CD_CONFIG_GET_STRING ("Icon", "broken icon");
33
myConfig.bNoDeletedSignal = CD_CONFIG_GET_BOOLEAN ("Configuration", "no deleted signal");
34
myConfig.cRenderer = CD_CONFIG_GET_STRING ("Configuration", "renderer");
35
myConfig.bDrawContent = CD_CONFIG_GET_BOOLEAN ("Configuration", "draw content");
36
myConfig.cDateFormat = CD_CONFIG_GET_STRING ("Configuration", "date format");
37
if (myConfig.cDateFormat == NULL)
38
myConfig.cDateFormat = g_strdup ("%d/%m/%y");
39
myConfig.bAutoNaming = CD_CONFIG_GET_BOOLEAN ("Configuration", "auto-naming");
40
myConfig.bAskBeforeDelete = CD_CONFIG_GET_BOOLEAN ("Configuration", "ask delete");
41
CD_APPLET_GET_CONFIG_END
44
CD_APPLET_RESET_CONFIG_BEGIN
45
g_free (myConfig.defaultTitle);
47
g_free (myConfig.cIconDefault);
48
g_free (myConfig.cIconClose);
49
g_free (myConfig.cIconBroken);
50
g_free (myConfig.cRenderer);
51
g_free (myConfig.cDateFormat);
52
CD_APPLET_RESET_CONFIG_END
55
CD_APPLET_RESET_DATA_BEGIN
56
cairo_dock_free_task (myData.pTask);
57
cairo_surface_destroy (myData.pSurfaceDefault);
58
cairo_surface_destroy (myData.pSurfaceNote);
61
g_hash_table_destroy (myData.hNoteTable);
63
CD_APPLET_DESTROY_MY_SUBDOCK;
64
CD_APPLET_RESET_DATA_END