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/>.
20
/******************************************************************************
22
This file is a part of the cairo-dock program,
23
released under the terms of the GNU General Public License.
25
Written by Rémy Robertson (for any bug report, please mail me to changfu@cairo-dock.org)
26
Fabrice Rey (fabounet@users.berlios.de)
28
******************************************************************************/
32
#include "applet-struct.h"
33
#include "applet-config.h"
37
CD_APPLET_GET_CONFIG_BEGIN
38
//\_________________ On recupere toutes les valeurs de notre fichier de conf.
39
myConfig.quickInfoType = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "quick-info_type", MY_APPLET_TIME_ELAPSED);
41
myConfig.defaultTitle = CD_CONFIG_GET_STRING ("Icon", "name");
42
myConfig.iPlayer = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "current-player", MY_XMMS);
43
myConfig.iExtendedMode = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "extended_mode", MY_DESKLET_INFO);
45
myConfig.enableDialogs = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable_dialogs");
46
myConfig.timeDialogs = CD_CONFIG_GET_DOUBLE_WITH_DEFAULT ("Configuration", "time_dialogs", 3000);
47
myConfig.extendedDesklet = CD_CONFIG_GET_BOOLEAN ("Configuration", "extended_desklet");
49
myConfig.enableAnim = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable_anim");
50
myConfig.changeAnimation = CD_CONFIG_GET_STRING ("Configuration", "change animation");
52
myConfig.bStealTaskBarIcon = CD_CONFIG_GET_BOOLEAN ("Configuration", "inhibate appli");
53
myConfig.bIconBubble = CD_CONFIG_GET_BOOLEAN ("Configuration", "bubble icon");
55
myConfig.cUserImage[PLAYER_NONE] = CD_CONFIG_GET_STRING ("Configuration", "default icon");
56
myConfig.cUserImage[PLAYER_PLAYING] = CD_CONFIG_GET_STRING ("Configuration", "play icon");
57
myConfig.cUserImage[PLAYER_PAUSED] = CD_CONFIG_GET_STRING ("Configuration", "pause icon");
58
myConfig.cUserImage[PLAYER_STOPPED] = CD_CONFIG_GET_STRING ("Configuration", "stop icon");
59
myConfig.cUserImage[PLAYER_BROKEN] = CD_CONFIG_GET_STRING ("Configuration", "broken icon");
60
CD_APPLET_GET_CONFIG_END
63
CD_APPLET_RESET_CONFIG_BEGIN
64
g_free (myConfig.defaultTitle);
65
g_free (myConfig.changeAnimation);
68
for (i = 0; i < PLAYER_NB_STATUS; i ++)
69
g_free (myConfig.cUserImage[i]);
70
CD_APPLET_RESET_CONFIG_END
73
CD_APPLET_RESET_DATA_BEGIN
74
cairo_dock_free_task (myData.pTask);
77
for (i = 0; i < PLAYER_NB_STATUS; i ++) {
78
if (myData.pSurfaces[i] != NULL)
79
cairo_surface_destroy (myData.pSurfaces[i]);
82
g_free (myData.playingTitle);
83
myData.playingTitle = NULL;
84
g_free (myData.cQuickInfo);
85
myData.cQuickInfo = NULL;
86
CD_APPLET_RESET_DATA_END