Ejemplo n.º 1
0
/* 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 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);
    }
}
Ejemplo n.º 3
0
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 );
}
Ejemplo n.º 4
0
static void
monitors_save(Plugin *p, FILE *fp)
{
    ENTER;

    MonitorsPlugin *mp;
    
    mp = (MonitorsPlugin *) p->priv;

    lxpanel_put_bool(fp, "DisplayCPU", mp->displayed_monitors[CPU_POSITION]);
    lxpanel_put_bool(fp, "DisplayRAM", mp->displayed_monitors[MEM_POSITION]);
    lxpanel_put_str(fp, "Action", mp->action);

    if (mp->monitors[CPU_POSITION])
        lxpanel_put_str(fp, "CPUColor", colors[CPU_POSITION]);

    if (mp->monitors[MEM_POSITION])
        lxpanel_put_str(fp, "RAMColor", colors[MEM_POSITION]);

    RET();    
}
Ejemplo n.º 5
0
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);
}
Ejemplo n.º 6
0
static void save_config( Plugin* p, FILE* fp )
{
    netstatus *ns = (netstatus*)p->priv;
    lxpanel_put_str( fp, "iface", ns->iface );
    lxpanel_put_str( fp, "configtool", ns->config_tool );
}