~cairo-dock-team/cairo-dock-plug-ins/experimental

« back to all changes in this revision

Viewing changes to Toons/src/applet-config.c

  • Committer: fabounet
  • Date: 2009-04-05 00:40:29 UTC
  • Revision ID: svn-v4:620951bb-bb42-0410-82c3-830e739ed170:trunk/plug-ins:1638
ajout de l'applet Toons, qui vient concurrencer Cairo-Penguin dans le créneau des applets indispensables :o) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 
 
3
This file is a part of the cairo-dock program, 
 
4
released under the terms of the GNU General Public License.
 
5
 
 
6
Written by Fabrice Rey (for any bug report, please mail me to fabounet@users.berlios.de)
 
7
 
 
8
******************************************************************************/
 
9
 
 
10
#include <string.h>
 
11
#include <cairo-dock.h>
 
12
 
 
13
#include "applet-struct.h"
 
14
#include "applet-theme.h"
 
15
#include "applet-config.h"
 
16
 
 
17
 
 
18
//\_________________ Here you have to get all your parameters from the conf file. Use the macros CD_CONFIG_GET_BOOLEAN, CD_CONFIG_GET_INTEGER, CD_CONFIG_GET_STRING, etc. myConfig has been reseted to 0 at this point. This function is called at the beginning of init and reload.
 
19
CD_APPLET_GET_CONFIG_BEGIN
 
20
        myConfig.iLoadingModifier = (CD_CONFIG_GET_BOOLEAN ("Configuration", "keep ratio") ? CAIRO_DOCK_KEEP_RATIO : 0);
 
21
        myConfig.cThemePath = CD_CONFIG_GET_THEME_PATH ("Configuration", "theme", "themes", "Classic");
 
22
        myConfig.iWinkDelay = CD_CONFIG_GET_INTEGER ("Configuration", "wink delay");
 
23
        myConfig.iWinkDuration = CD_CONFIG_GET_INTEGER ("Configuration", "wink duration");
 
24
        myConfig.bFastCheck = CD_CONFIG_GET_BOOLEAN ("Configuration", "fast");
 
25
CD_APPLET_GET_CONFIG_END
 
26
 
 
27
 
 
28
//\_________________ Here you have to free all ressources allocated for myConfig. This one will be reseted to 0 at the end of this function. This function is called right before you get the applet's config, and when your applet is stopped, in the end.
 
29
CD_APPLET_RESET_CONFIG_BEGIN
 
30
        g_free (myConfig.cThemePath);
 
31
        
 
32
CD_APPLET_RESET_CONFIG_END
 
33
 
 
34
 
 
35
//\_________________ Here you have to free all ressources allocated for myData. This one will be reseted to 0 at the end of this function. This function is called when your applet is stopped, in the very end.
 
36
CD_APPLET_RESET_DATA_BEGIN
 
37
        cd_xeyes_unload_theme (myApplet);
 
38
        
 
39
CD_APPLET_RESET_DATA_END