Example #1
0
/* Callback when the configuration dialog is to be shown. */
static GtkWidget *wincmd_configure(LXPanel *panel, GtkWidget *p)
{
    WinCmdPlugin * wc = lxpanel_plugin_get_data(p);
    return lxpanel_generic_config_dlg(_("Minimize All Windows"),
        panel, wincmd_apply_configuration, p,
        _("Alternately iconify/shade and raise"), &wc->toggle_preference, CONF_TYPE_BOOL,
        /* FIXME: configure buttons 1 and 2 */
        NULL);
}
Example #2
0
/* Callback when the configuration dialog is to be shown. */
static GtkWidget *dirmenu_configure(LXPanel *panel, GtkWidget *p)
{
    DirMenuPlugin * dm = lxpanel_plugin_get_data(p);
    return lxpanel_generic_config_dlg(_("Directory Menu"),
        panel, dirmenu_apply_configuration, p,
        _("Directory"), &dm->path, CONF_TYPE_DIRECTORY_ENTRY,
        _("Label"), &dm->name, CONF_TYPE_STR,
        _("Icon"), &dm->image, CONF_TYPE_FILE_ENTRY,
        NULL);
}
Example #3
0
/* Callback when the configuration dialog is to be shown. */
static GtkWidget *space_configure(Panel *panel, GtkWidget *instance, GtkWindow *parent)
{
    SpacePlugin * sp = lxpanel_plugin_get_data(instance);
    GtkWidget * dlg;

    dlg = lxpanel_generic_config_dlg(_("Spacer"), panel,
                                     space_apply_configuration, instance,
                                     _("Size"), &sp->size, CONF_TYPE_INT, NULL);
    gtk_widget_set_size_request(dlg, 200, -1);	/* Improve geometry */
    return dlg;
}
Example #4
0
static GtkWidget *config(LXPanel *panel, GtkWidget *p)
{
    ENTER;

    GtkWidget *dialog;
    thermal *th = lxpanel_plugin_get_data(p);
    dialog = lxpanel_generic_config_dlg(_("Temperature Monitor"),
            panel, applyConfig, p,
            _("Normal color"), &th->str_cl_normal, CONF_TYPE_STR,
            _("Warning1 color"), &th->str_cl_warning1, CONF_TYPE_STR,
            _("Warning2 color"), &th->str_cl_warning2, CONF_TYPE_STR,
            _("Automatic sensor location"), &th->auto_sensor, CONF_TYPE_BOOL,
            _("Sensor"), &th->sensor, CONF_TYPE_STR,
            _("Automatic temperature levels"), &th->not_custom_levels, CONF_TYPE_BOOL,
            _("Warning1 temperature"), &th->warning1, CONF_TYPE_INT,
            _("Warning2 temperature"), &th->warning2, CONF_TYPE_INT,
            NULL);

    RET(dialog);
}
Example #5
0
static GtkWidget *
monitors_config (LXPanel *panel, GtkWidget *p)
{
    ENTER;

    GtkWidget *dialog;
    MonitorsPlugin *mp;

    mp = lxpanel_plugin_get_data(p);

    dialog = lxpanel_generic_config_dlg(_("Resource monitors"),
        panel, monitors_apply_config, p,
        _("Display CPU usage"), &mp->displayed_monitors[0], CONF_TYPE_BOOL,
        _("CPU color"), &colors[CPU_POSITION], CONF_TYPE_STR,
        _("Display RAM usage"), &mp->displayed_monitors[1], CONF_TYPE_BOOL,
        _("RAM color"), &colors[MEM_POSITION], CONF_TYPE_STR,
        _("Action when clicked (default: lxtask)"), &mp->action, CONF_TYPE_STR,
        NULL);

    RET(dialog);
}