1 /* Setup if we need temperature? */
3 #include "e_mod_main.h"
6 # include <sys/types.h>
7 # include <sys/sysctl.h>
12 read_file(const char *file)
14 FILE *f = fopen(file, "r");
18 len = fread(buf, 1, sizeof(buf) - 1, f);
25 for (p = buf; *p; p++)
27 if (p[0] == '\n') p[0] = 0;
35 wizard_page_init(E_Wizard_Page *pg __UNUSED__)
41 wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
47 wizard_page_show(E_Wizard_Page *pg __UNUSED__)
49 int hav_temperature = 1;
51 // figure out on bsd if we have temp sensors
53 // figure out on linux if we have temp sensors
60 EINA_LIST_FOREACH(e_config->modules, l, em)
62 if (!em->name) continue;
63 if (!strcmp(em->name, "temperature"))
65 e_config->modules = eina_list_remove_list
66 (e_config->modules, l);
67 if (em->name) eina_stringshare_del(em->name);
72 e_config_save_queue();
74 return 0; /* 1 == show ui, and wait for user, 0 == just continue */
78 wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
84 wizard_page_apply(E_Wizard_Page *pg __UNUSED__)