forked from enlightenment/enlightenment
parent
5a4e004564
commit
ec8e145dcd
|
@ -23,10 +23,8 @@ struct _E_Config_Dialog_Data
|
||||||
int unit_method;
|
int unit_method;
|
||||||
Unit units;
|
Unit units;
|
||||||
|
|
||||||
int low_method;
|
int low_method, low_temp;
|
||||||
int low_temp;
|
int high_method, high_temp;
|
||||||
int high_method;
|
|
||||||
int high_temp;
|
|
||||||
|
|
||||||
int sensor;
|
int sensor;
|
||||||
Eina_List *sensors;
|
Eina_List *sensors;
|
||||||
|
@ -47,7 +45,7 @@ config_temperature_module(Config_Face *inst)
|
||||||
{
|
{
|
||||||
E_Config_Dialog *cfd;
|
E_Config_Dialog *cfd;
|
||||||
E_Config_Dialog_View *v;
|
E_Config_Dialog_View *v;
|
||||||
char buf[4096];
|
char buf[PATH_MAX];
|
||||||
|
|
||||||
v = E_NEW(E_Config_Dialog_View, 1);
|
v = E_NEW(E_Config_Dialog_View, 1);
|
||||||
|
|
||||||
|
@ -58,7 +56,8 @@ config_temperature_module(Config_Face *inst)
|
||||||
v->advanced.apply_cfdata = _advanced_apply_data;
|
v->advanced.apply_cfdata = _advanced_apply_data;
|
||||||
v->advanced.create_widgets = _advanced_create_widgets;
|
v->advanced.create_widgets = _advanced_create_widgets;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/e-module-temperature.edj", e_module_dir_get(inst->module));
|
snprintf(buf, sizeof(buf), "%s/e-module-temperature.edj",
|
||||||
|
e_module_dir_get(inst->module));
|
||||||
cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
|
cfd = e_config_dialog_new(e_container_current_get(e_manager_current_get()),
|
||||||
_("Temperature Settings"),
|
_("Temperature Settings"),
|
||||||
"E", "_e_mod_temperature_config_dialog",
|
"E", "_e_mod_temperature_config_dialog",
|
||||||
|
@ -71,10 +70,8 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
double p;
|
double p;
|
||||||
int pi;
|
int pi;
|
||||||
Eina_List *therms;
|
Eina_List *therms, *l;
|
||||||
Eina_List *l;
|
char path[PATH_MAX], *name;
|
||||||
char *name;
|
|
||||||
char path[PATH_MAX];
|
|
||||||
|
|
||||||
cfdata->units = cfdata->inst->units;
|
cfdata->units = cfdata->inst->units;
|
||||||
if (cfdata->inst->units == CELCIUS)
|
if (cfdata->inst->units == CELCIUS)
|
||||||
|
@ -129,8 +126,6 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
therms = temperature_get_bus_files("i2c");
|
therms = temperature_get_bus_files("i2c");
|
||||||
if (therms)
|
if (therms)
|
||||||
{
|
{
|
||||||
char *name;
|
|
||||||
|
|
||||||
EINA_LIST_FREE(therms, name)
|
EINA_LIST_FREE(therms, name)
|
||||||
{
|
{
|
||||||
if (ecore_file_exists(name))
|
if (ecore_file_exists(name))
|
||||||
|
@ -164,8 +159,6 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
therms = temperature_get_bus_files("pci");
|
therms = temperature_get_bus_files("pci");
|
||||||
if (therms)
|
if (therms)
|
||||||
{
|
{
|
||||||
char *name;
|
|
||||||
|
|
||||||
EINA_LIST_FREE(therms, name)
|
EINA_LIST_FREE(therms, name)
|
||||||
{
|
{
|
||||||
if (ecore_file_exists(name))
|
if (ecore_file_exists(name))
|
||||||
|
@ -205,9 +198,7 @@ _fill_data(E_Config_Dialog_Data *cfdata)
|
||||||
{
|
{
|
||||||
cfdata->sensors = eina_list_append(cfdata->sensors, name);
|
cfdata->sensors = eina_list_append(cfdata->sensors, name);
|
||||||
if (!strcmp(cfdata->inst->sensor_name, name))
|
if (!strcmp(cfdata->inst->sensor_name, name))
|
||||||
{
|
|
||||||
cfdata->sensor = n;
|
cfdata->sensor = n;
|
||||||
}
|
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -265,7 +256,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
||||||
e_widget_framelist_object_append(of, ob);
|
e_widget_framelist_object_append(of, ob);
|
||||||
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
e_widget_list_object_append(o, of, 1, 1, 0.5);
|
||||||
|
|
||||||
|
|
||||||
if (cfdata->units == FAHRENHEIT)
|
if (cfdata->units == FAHRENHEIT)
|
||||||
{
|
{
|
||||||
of = e_widget_framelist_add(evas, _("High Temperature"), 0);
|
of = e_widget_framelist_add(evas, _("High Temperature"), 0);
|
||||||
|
|
Loading…
Reference in New Issue