Debian Codegraph @

logout/src/applet-config.c

raw
1 /**
2 * This file is a part of the Cairo-Dock project
3 *
4 * Copyright : (C) see the 'copyright' file.
5 * E-mail : see the 'copyright' file.
6 *
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.
11 *
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/>.
18 */
19
20 #include <string.h>
21 #include <cairo-dock.h>
22
23 #include "applet-struct.h"
24 #include "applet-config.h"
25
26
27 CD_APPLET_GET_CONFIG_BEGIN
28 myConfig.iActionOnMiddleClick = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "middle-click", 2);
29 myConfig.cShortkey = CD_CONFIG_GET_STRING_WITH_DEFAULT ("Configuration", "shortkey", "<Super>L");
30 myConfig.cShortkey2 = CD_CONFIG_GET_STRING_WITH_DEFAULT ("Configuration", "shortkey2", "<Control>F12");
31 myConfig.bConfirmAction = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "confirm action", TRUE);
32 myConfig.cUserAction = CD_CONFIG_GET_STRING ("Configuration", "user action");
33 myConfig.cUserActionShutdown = CD_CONFIG_GET_STRING ("Configuration", "user action2");
34 myConfig.cUserActionSwitchUser = CD_CONFIG_GET_STRING ("Configuration", "user action switch");
35 myConfig.iShutdownTime = CD_CONFIG_GET_INTEGER ("Configuration", "shutdown time");
36 myConfig.cEmblemPath = CD_CONFIG_GET_STRING ("Configuration", "emblem");
37 myConfig.cDefaultLabel = CD_CONFIG_GET_STRING ("Icon", "name");
38 myConfig.cDefaultIcon = CD_CONFIG_GET_STRING ("Icon", "icon");
39 myConfig.iRebootNeededImage = CD_CONFIG_GET_INTEGER ("Configuration", "replace image");
40 CD_APPLET_GET_CONFIG_END
41
42
43 CD_APPLET_RESET_CONFIG_BEGIN
44 g_free (myConfig.cUserAction);
45 g_free (myConfig.cUserActionShutdown);
46 g_free (myConfig.cUserActionSwitchUser);
47 g_free (myConfig.cDefaultLabel);
48 g_free (myConfig.cDefaultIcon);
49 g_free (myConfig.cEmblemPath);
50 g_free (myConfig.cShortkey);
51 g_free (myConfig.cShortkey2);
52 CD_APPLET_RESET_CONFIG_END
53
54
55 CD_APPLET_RESET_DATA_BEGIN
56
57 CD_APPLET_RESET_DATA_END