*/ #include "applet-struct.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.cRenderer = CD_CONFIG_GET_STRING ("Configuration", "renderer"); myConfig.iDeskletRendererType = CD_CONFIG_GET_INTEGER ("Configuration", "desklet renderer"); gsize length = 0; myConfig.cMimeTypes = CD_CONFIG_GET_STRING_LIST ("Configuration", "mime", &length); myConfig.bFilter = CD_CONFIG_GET_BOOLEAN ("Configuration", "filter"); myConfig.iSortType = CD_CONFIG_GET_INTEGER ("Configuration", "sort by"); myConfig.bSelectionClipBoard = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "selection_", FALSE); myConfig.cTextIcon = CD_CONFIG_GET_FILE_PATH ("Configuration", "text icon", NULL); if (myConfig.cTextIcon == NULL) { myConfig.cTextIcon = cairo_dock_search_icon_s_path ("text-x-generic", MAX (myIcon->image.iWidth, myIcon->image.iHeight)); if (myConfig.cTextIcon == NULL) myConfig.cTextIcon = g_strdup (MY_APPLET_SHARE_DATA_DIR"/"CD_STACK_DEFAULT_TEXT_ICON); } myConfig.cUrlIcon = CD_CONFIG_GET_FILE_PATH ("Configuration", "url icon", NULL); if (myConfig.cUrlIcon == NULL) {
#include <string.h> #include "tomboy-struct.h" #include "tomboy-dbus.h" #include "tomboy-config.h" CD_APPLET_GET_CONFIG_BEGIN myConfig.defaultTitle = CD_CONFIG_GET_STRING ("Icon", "name"); myConfig.cIconDefault = CD_CONFIG_GET_STRING ("Icon", "default icon"); myConfig.cIconClose = CD_CONFIG_GET_STRING ("Icon", "close icon"); myConfig.cIconBroken = CD_CONFIG_GET_STRING ("Icon", "broken icon"); myConfig.bNoDeletedSignal = CD_CONFIG_GET_BOOLEAN ("Configuration", "no deleted signal"); // Ce problème n'étant vu que sur Gutsy, on pourrait le supprimer myConfig.iAppControlled = CD_CONFIG_GET_INTEGER ("Configuration", "app controlled"); myConfig.cRenderer = CD_CONFIG_GET_STRING ("Configuration", "renderer"); myConfig.bDrawContent = CD_CONFIG_GET_BOOLEAN ("Configuration", "draw content"); myConfig.bPopupContent = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "popup content", TRUE); myConfig.cDateFormat = CD_CONFIG_GET_STRING ("Configuration", "date format"); if (myConfig.cDateFormat == NULL) myConfig.cDateFormat = g_strdup ("%d/%m/%y"); myConfig.bAutoNaming = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "auto-naming", TRUE); myConfig.bAskBeforeDelete = CD_CONFIG_GET_BOOLEAN ("Configuration", "ask delete"); double couleur[3] = {1., 0., 0.}; CD_CONFIG_GET_COLOR_RVB_WITH_DEFAULT ("Configuration", "text color", myConfig.fTextColor, couleur); CD_APPLET_GET_CONFIG_END CD_APPLET_RESET_CONFIG_BEGIN g_free (myConfig.defaultTitle); g_free (myConfig.cIconDefault);
myConfig.quickInfoType = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "quick-info_type", POWER_MANAGER_TIME); myConfig.lowBatteryWitness = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "low battery", TRUE); myConfig.highBatteryWitness = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "high battery", TRUE); myConfig.criticalBatteryWitness = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "critical battery", TRUE); myConfig.batteryWitness = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "battery witness", TRUE); myConfig.batteryWitnessAnimation = CD_CONFIG_GET_STRING ("Configuration", "battery_animation"); myConfig.lowBatteryValue = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "low value", 15); myConfig.bUseDBusFallback = CD_CONFIG_GET_BOOLEAN ("Configuration", "use_dbus"); if (! g_key_file_has_key (CD_APPLET_MY_KEY_FILE, "Configuration", "renderer", NULL)) // old version. { myConfig.iDisplayType = (g_key_file_get_boolean (CD_APPLET_MY_KEY_FILE, "Configuration", "use gauge", NULL) ? CD_POWERMANAGER_GAUGE : CD_POWERMANAGER_ICONS); int dummy = CD_CONFIG_GET_INTEGER ("Configuration", "renderer"); } else myConfig.iDisplayType = CD_CONFIG_GET_INTEGER ("Configuration", "renderer"); myConfig.cGThemePath = CD_CONFIG_GET_GAUGE_THEME ("Configuration", "theme"); myConfig.iGraphType = CD_CONFIG_GET_INTEGER ("Configuration", "graphic type"); CD_CONFIG_GET_COLOR_RVB ("Configuration", "low color", myConfig.fLowColor); CD_CONFIG_GET_COLOR_RVB ("Configuration", "high color", myConfig.fHigholor); CD_CONFIG_GET_COLOR ("Configuration", "bg color", myConfig.fBgColor);
******************************************************************************/ #include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-notifications.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN gsize length = 0; myConfig.cURI_to_load = CD_CONFIG_GET_STRING ("Configuration", "weblet URI"); myConfig.bShowScrollbars = CD_CONFIG_GET_BOOLEAN ("Configuration", "show scrollbars"); myConfig.bIsTransparent = CD_CONFIG_GET_BOOLEAN ("Configuration", "transparent background"); myConfig.iPosScrollX = CD_CONFIG_GET_INTEGER ("Configuration", "scroll x"); myConfig.iPosScrollY = CD_CONFIG_GET_INTEGER ("Configuration", "scroll y"); myConfig.iReloadTimeout = CD_CONFIG_GET_INTEGER ("Configuration", "reload timeout"); myConfig.cListURI = CD_CONFIG_GET_STRING_LIST ("Configuration", "uri list", &length); myConfig.iRightMargin = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Configuration", "right margin", 5); if (myConfig.cListURI == NULL) { g_key_file_set_string (CD_APPLET_MY_KEY_FILE, "Configuration", "uri list", "www.cairo-dock.org;www.google.com;m.google.com/mail;www.rememberthemilk.com/services/modules/googleig;https://www.meebo.com/mobile;https://www.pandora.com/radio/tuner_8_7_0_0_pandora.swf;http://digg.com/iphone#_stories;http://www.bashfr.org/?sort=top50;about:plugins"); cairo_dock_write_keys_to_file (CD_APPLET_MY_KEY_FILE, CD_APPLET_MY_CONF_FILE); myConfig.cListURI = CD_CONFIG_GET_STRING_LIST ("Configuration", "uri list", &length); } CD_APPLET_GET_CONFIG_END
#include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.iParticleLifeTime = CD_CONFIG_GET_INTEGER ("Configuration", "life"); CD_CONFIG_GET_COLOR_RVB ("Configuration", "color1", myConfig.pColor1); CD_CONFIG_GET_COLOR_RVB ("Configuration", "color2", myConfig.pColor2); myConfig.iNbParticles = CD_CONFIG_GET_INTEGER ("Configuration", "nb part"); myConfig.iParticleSize = CD_CONFIG_GET_INTEGER ("Configuration", "part size"); myConfig.bMysticalFire = CD_CONFIG_GET_BOOLEAN ("Configuration", "mystical"); myConfig.iNbSources = CD_CONFIG_GET_INTEGER ("Configuration", "nb sources"); myConfig.fRotationSpeed = CD_CONFIG_GET_DOUBLE ("Configuration", "rotation speed"); myConfig.fScattering = CD_CONFIG_GET_DOUBLE ("Configuration", "scattering"); myConfig.iContainerType = CD_CONFIG_GET_INTEGER ("Configuration", "container") + 1; CD_APPLET_GET_CONFIG_END //\_________________ 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. CD_APPLET_RESET_CONFIG_BEGIN CD_APPLET_RESET_CONFIG_END //\_________________ 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.
#define _get_particle_system_config(cGroupName, parameters) \ parameters.iDuration = CD_CONFIG_GET_INTEGER (cGroupName, "duration");\ parameters.bContinue = CD_CONFIG_GET_BOOLEAN (cGroupName, "continue");\ CD_CONFIG_GET_COLOR_RVB (cGroupName, "color1", parameters.pColor1);\ CD_CONFIG_GET_COLOR_RVB (cGroupName, "color2", parameters.pColor2);\ parameters.bMystical = CD_CONFIG_GET_BOOLEAN (cGroupName, "mystical");\ parameters.iNbParticles = CD_CONFIG_GET_INTEGER (cGroupName, "nb part");\ parameters.iParticleSize = CD_CONFIG_GET_INTEGER (cGroupName, "part size");\ parameters.fParticleSpeed = CD_CONFIG_GET_DOUBLE (cGroupName, "part speed") //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.bBackGround = CD_CONFIG_GET_BOOLEAN ("Global", "background"); myConfig.bRotateEffects = CD_CONFIG_GET_BOOLEAN ("Global", "rotate"); int i,j; for (i = 0; i < CD_ICON_EFFECT_NB_EFFECTS; i ++) { myConfig.iEffectsUsed[i] = -1; } for (j = 0; j < CAIRO_DOCK_NB_TYPES; j += 2) { for (i = 0; i < CD_ICON_EFFECT_NB_EFFECTS; i ++) { myConfig.iEffectsOnClick[j][i] = -1; } } CD_CONFIG_GET_INTEGER_LIST ("Global", "effects", CD_ICON_EFFECT_NB_EFFECTS, (int *)myConfig.iEffectsUsed);
#include <string.h> #include "applet-struct.h" #include "applet-config.h" CD_APPLET_GET_CONFIG_BEGIN //\_________________ On recupere toutes les valeurs de notre fichier de conf. myConfig.cThemePath = CD_CONFIG_GET_THEME_PATH ("Configuration", "theme", "themes", "Classic"); myConfig.iDelayBetweenChanges = MAX (2, CD_CONFIG_GET_INTEGER ("Configuration", "change delay")); myConfig.fAlpha = CD_CONFIG_GET_DOUBLE ("Configuration", "alpha"); myConfig.bFree = CD_CONFIG_GET_BOOLEAN ("Configuration", "free"); myConfig.iGroundOffset = CD_CONFIG_GET_INTEGER ("Configuration", "ground"); CD_APPLET_GET_CONFIG_END CD_APPLET_RESET_CONFIG_BEGIN g_free (myConfig.cThemePath); CD_APPLET_RESET_CONFIG_END static void _penguin_reset_one_animation (PenguinAnimation *pAnimation) { if (pAnimation->pSurfaces != NULL) { int i, j;
This file is a part of the cairo-dock program, released under the terms of the GNU General Public License. Written by Fabrice Rey (for any bug report, please mail me to [email protected]) ******************************************************************************/ #include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-disk-usage.h" #include "applet-config.h" CD_APPLET_GET_CONFIG_BEGIN myConfig.bListDrives = CD_CONFIG_GET_BOOLEAN ("Module", "list drives"); myConfig.bListNetwork = CD_CONFIG_GET_BOOLEAN ("Module", "list network"); myConfig.bListBookmarks = CD_CONFIG_GET_BOOLEAN ("Module", "list bookmarks"); myConfig.bUseSeparator = CD_CONFIG_GET_BOOLEAN ("Module", "use separator"); myConfig.iDisplayType = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Module", "disk usage", CD_SHOW_USED_SPACE_PERCENT); myConfig.iCheckInterval = CD_CONFIG_GET_INTEGER_WITH_DEFAULT ("Module", "check interval", 10); myConfig.bDrawBar = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Module", "draw bar", TRUE); myConfig.cRenderer = CD_CONFIG_GET_STRING ("Module", "renderer"); myConfig.iDeskletRendererType = CD_CONFIG_GET_INTEGER ("Module", "desklet renderer"); CD_APPLET_GET_CONFIG_END CD_APPLET_RESET_CONFIG_BEGIN g_free (myConfig.cRenderer);
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.bEnablePopUp = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable pop-up"); myConfig.bEnableReboot = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable reboot"); myConfig.bEnableDesklets = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable desklets"); myConfig.bEnableReloadModule = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable reload module"); myConfig.bEnableActivateModule = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable reload module"); myConfig.bEnableQuit = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable quit"); myConfig.bEnableShowDock = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable show dock"); myConfig.bEnableTweakingLauncher = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable add launcher"); myConfig.bEnableCreateLauncher = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable add launcher"); myConfig.bEnableSetQuickInfo = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable set quickinfo"); myConfig.bEnableSetLabel = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable set label"); myConfig.bEnableSetIcon = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable set icon"); myConfig.bEnableAnimateIcon = CD_CONFIG_GET_BOOLEAN ("Configuration", "enable animate icon"); myConfig.bLaunchLauncherAPIDaemon = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "launcher api daemon", TRUE); CD_APPLET_GET_CONFIG_END
released under the terms of the GNU General Public License. Written by Fabrice Rey (for any bug report, please mail me to [email protected]) ******************************************************************************/ #include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.bSomeBooleanValue = CD_CONFIG_GET_BOOLEAN ("Configuration", "yes_no"); myConfig.iSomeIntegerValue = CD_CONFIG_GET_INTEGER ("Configuration", "int"); myConfig.cSomeStringValue = CD_CONFIG_GET_STRING ("Configuration", "text"); CD_APPLET_GET_CONFIG_END //\_________________ 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. CD_APPLET_RESET_CONFIG_BEGIN g_free (myConfig.cSomeStringValue); CD_APPLET_RESET_CONFIG_END //\_________________ 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. CD_APPLET_RESET_DATA_BEGIN
#include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-config.h" CD_APPLET_GET_CONFIG_BEGIN //\_________________ On recupere toutes les valeurs de notre fichier de conf. myConfig.defaultTitle = CD_CONFIG_GET_STRING ("Icon", "name"); myConfig.iCheckInterval = CD_CONFIG_GET_INTEGER ("Configuration", "delay"); myConfig.fSmoothFactor = CD_CONFIG_GET_DOUBLE ("Configuration", "smooth"); myConfig.bShowCpu = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "show cpu", TRUE); myConfig.bShowRam = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "show ram", TRUE); myConfig.bShowSwap = CD_CONFIG_GET_BOOLEAN ("Configuration", "show swap"); myConfig.bShowNvidia = CD_CONFIG_GET_BOOLEAN ("Configuration", "show nvidia"); #ifdef HAVE_SENSORS myConfig.bShowCpuTemp = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "show cpu temp", FALSE); myConfig.bShowFanSpeed = CD_CONFIG_GET_BOOLEAN_WITH_DEFAULT ("Configuration", "show fan", FALSE); #endif // donc toujours a false si non defini myConfig.bShowFreeMemory = CD_CONFIG_GET_BOOLEAN ("Configuration", "show free"); myConfig.iInfoDisplay = CD_CONFIG_GET_INTEGER ("Configuration", "info display"); myConfig.iDisplayType = CD_CONFIG_GET_INTEGER ("Configuration", "renderer"); myConfig.cGThemePath = CD_CONFIG_GET_GAUGE_THEME ("Configuration", "theme"); myConfig.iRotateTheme = CD_CONFIG_GET_INTEGER ("Configuration", "rotate theme"); myConfig.iGraphType = CD_CONFIG_GET_INTEGER ("Configuration", "graphic type"); myConfig.bMixGraph = CD_CONFIG_GET_BOOLEAN ("Configuration", "mix graph");
Written by Fabrice Rey (for any bug report, please mail me to [email protected]) ******************************************************************************/ #include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-theme.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.iLoadingModifier = (CD_CONFIG_GET_BOOLEAN ("Configuration", "keep ratio") ? CAIRO_DOCK_KEEP_RATIO : 0); myConfig.cThemePath = CD_CONFIG_GET_THEME_PATH ("Configuration", "theme", "themes", "Classic"); myConfig.iWinkDelay = CD_CONFIG_GET_INTEGER ("Configuration", "wink delay"); myConfig.iWinkDuration = CD_CONFIG_GET_INTEGER ("Configuration", "wink duration"); myConfig.bFastCheck = CD_CONFIG_GET_BOOLEAN ("Configuration", "fast"); CD_APPLET_GET_CONFIG_END //\_________________ 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. CD_APPLET_RESET_CONFIG_BEGIN g_free (myConfig.cThemePath); CD_APPLET_RESET_CONFIG_END //\_________________ 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.
* You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-notifications.h" #include "applet-menu.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.bHasIcons = CD_CONFIG_GET_BOOLEAN ("Configuration", "has icons"); myConfig.cMenuShortkey = CD_CONFIG_GET_STRING ("Configuration", "menu shortkey"); myConfig.cDirPath = CD_CONFIG_GET_STRING ("Configuration", "dir path"); myConfig.bFoldersFirst = CD_CONFIG_GET_BOOLEAN ("Configuration", "folders first"); myConfig.bCaseUnsensitive = CD_CONFIG_GET_BOOLEAN ("Configuration", "case unsensitive"); myConfig.bShowHiddenFiles = CD_CONFIG_GET_BOOLEAN ("Configuration", "show hidden"); myConfig.iNbSubItemsAtOnce = CD_CONFIG_GET_INTEGER ("Configuration", "granularity"); if (myConfig.iNbSubItemsAtOnce < 1) myConfig.iNbSubItemsAtOnce = 1; // On gere les chemins relatifs. if (myConfig.cDirPath != NULL && *myConfig.cDirPath == '~') { gchar *tmp = myConfig.cDirPath; myConfig.cDirPath = g_strdup_printf ("%s%s", g_getenv ("HOME"), myConfig.cDirPath+1); g_free (tmp);
released under the terms of the GNU General Public License. Written by Fabrice Rey (for any bug report, please mail me to [email protected]) ******************************************************************************/ #include <string.h> #include <cairo-dock.h> #include "applet-struct.h" #include "applet-config.h" //\_________________ 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. CD_APPLET_GET_CONFIG_BEGIN myConfig.bShowKbdIndicator = CD_CONFIG_GET_BOOLEAN ("Configuration", "show indic"); myConfig.cBackgroundImage = CD_CONFIG_GET_STRING ("Configuration", "bg image"); myConfig.iTransitionDuration = CD_CONFIG_GET_INTEGER ("Configuration", "transition"); myConfig.fTextRatio = CD_CONFIG_GET_DOUBLE_WITH_DEFAULT ("Configuration", "text ratio", 1.); CD_CONFIG_GET_COLOR_RVB("Configuration", "text color", myConfig.textDescription.fColorStart); CD_CONFIG_GET_COLOR_RVB("Configuration", "text color", myConfig.textDescription.fColorStop); int iWeight = CD_CONFIG_GET_INTEGER ("Configuration", "text weight"); myConfig.textDescription.iWeight = cairo_dock_get_pango_weight_from_1_9 (iWeight); myConfig.textDescription.iStyle = PANGO_STYLE_NORMAL; myConfig.textDescription.bOutlined = CD_CONFIG_GET_BOOLEAN ("Configuration", "outlined"); myConfig.textDescription.cFont = CD_CONFIG_GET_STRING ("Configuration", "font"); CD_APPLET_GET_CONFIG_END //\_________________ 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. CD_APPLET_RESET_CONFIG_BEGIN