~ubuntu-branches/ubuntu/saucy/cairo-dock-plug-ins/saucy

« back to all changes in this revision

Viewing changes to Remote-Control/src/applet-config.c

Tags: upstream-3.0.0.0beta1
ImportĀ upstreamĀ versionĀ 3.0.0.0beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
//\_________________ 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.
29
29
CD_APPLET_GET_CONFIG_BEGIN
30
 
        myConfig.cShortkeyNav = CD_CONFIG_GET_STRING ("Configuration", "shortkey");
 
30
        myConfig.cShortkey = CD_CONFIG_GET_STRING ("Configuration", "shortkey");
 
31
        myConfig.cDockName = CD_CONFIG_GET_STRING ("Configuration", "dock name");
31
32
        myConfig.iCloseDuration = CD_CONFIG_GET_INTEGER ("Configuration", "stop duration");
32
33
        myConfig.cIconAnimation = CD_CONFIG_GET_STRING ("Configuration", "animation");
33
34
        
36
37
 
37
38
//\_________________ 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.
38
39
CD_APPLET_RESET_CONFIG_BEGIN
39
 
        if (myConfig.cShortkeyNav)
40
 
        {
41
 
                cd_keybinder_unbind (myConfig.cShortkeyNav, (CDBindkeyHandler) cd_do_on_shortkey_nav);
42
 
                g_free (myConfig.cShortkeyNav);
43
 
        }
 
40
        g_free (myConfig.cShortkey);
44
41
        
45
42
CD_APPLET_RESET_CONFIG_END
46
43