static void multiload_save_configuration(Plugin * p, FILE * fp) { MultiloadLxpanelPlugin *multiload = PRIV(p); MultiloadPlugin *ma = &multiload->ma; guint i; /* Write size and speed */ lxpanel_put_int (fp, "speed", ma->speed); lxpanel_put_int (fp, "size", ma->size); for ( i = 0; i < NGRAPHS; i++ ) { char *key, list[8*MAX_COLORS]; /* Visibility */ key = g_strdup_printf("%sVisible", graph_types[i].name); lxpanel_put_int (fp, key, ma->graph_config[i].visible); g_free (key); /* Save colors */ multiload_colorconfig_stringify (ma, i, list); key = g_strdup_printf("%sColors", graph_types[i].name); lxpanel_put_str(fp, key, list); g_free (key); } }
/* Callback when the configuration is to be saved. */ static void dclock_save_configuration(Plugin * p, FILE * fp) { DClockPlugin * dc = (DClockPlugin *) p->priv; lxpanel_put_str(fp, "ClockFmt", dc->clock_format); lxpanel_put_str(fp, "TooltipFmt", dc->tooltip_format); lxpanel_put_str(fp, "Action", dc->action); lxpanel_put_int(fp, "BoldFont", dc->bold); lxpanel_put_int(fp, "IconOnly", dc->icon_only); lxpanel_put_int(fp, "CenterText", dc->center_text); }
static void save(Plugin* p, FILE* fp) { batt *b = (batt *) p->priv; char l_char=(char)b->hide_if_no_battery; lxpanel_put_str(fp, "HideIfNoBattery",&l_char); lxpanel_put_str(fp, "AlarmCommand", b->alarmCommand); lxpanel_put_int(fp, "AlarmTime", b->alarmTime); lxpanel_put_str(fp, "BackgroundColor", b->backgroundColor); lxpanel_put_int(fp, "BorderWidth", b->requestedBorder); lxpanel_put_str(fp, "ChargingColor1", b->chargingColor1); lxpanel_put_str(fp, "ChargingColor2", b->chargingColor2); lxpanel_put_str(fp, "DischargingColor1", b->dischargingColor1); lxpanel_put_str(fp, "DischargingColor2", b->dischargingColor2); lxpanel_put_int(fp, "Size", b->thickness); }
static void save_config( Plugin* p, FILE* fp ) { cpufreq *cf = (cpufreq *)p->priv; lxpanel_put_bool( fp, "Remember", cf->remember); lxpanel_put_str( fp, "Governor", cf->cur_governor ); lxpanel_put_int( fp, "Frequency", cf->cur_freq ); }
/* Callback when the configuration is to be saved. */ static void space_save_configuration(Plugin * p, FILE * fp) { SpacePlugin * sp = (SpacePlugin *) p->priv; lxpanel_put_int(fp, "Size", sp->size); }