update for beta release
[framework/uifw/e17.git] / src / modules / wizard / page_120.c
1 /* Setup if we need temperature? */
2 #include "e.h"
3 #include "e_mod_main.h"
4
5 #ifdef __FreeBSD__
6 # include <sys/types.h>
7 # include <sys/sysctl.h>
8 #endif
9
10 /*
11 static char *
12 read_file(const char *file)
13 {
14    FILE *f = fopen(file, "r");
15    size_t len;
16    char buf[4096], *p;
17    if (!f) return NULL;
18    len = fread(buf, 1, sizeof(buf) - 1, f);
19    if (len == 0)
20      {
21         fclose(f);
22         return NULL;
23      }
24    buf[len] = 0;
25    for (p = buf; *p; p++)
26      {
27         if (p[0] == '\n') p[0] = 0;
28      }
29    fclose(f);
30    return strdup(buf);
31 }
32 */
33
34 EAPI int
35 wizard_page_init(E_Wizard_Page *pg __UNUSED__)
36 {
37    return 1;
38 }
39
40 EAPI int
41 wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
42 {
43    return 1;
44 }
45
46 EAPI int
47 wizard_page_show(E_Wizard_Page *pg __UNUSED__)
48 {
49    int hav_temperature = 1;
50 #ifdef __FreeBSD__
51    // figure out on bsd if we have temp sensors
52 #else
53    // figure out on linux if we have temp sensors
54 #endif
55    if (!hav_temperature)
56      {
57         E_Config_Module *em;
58         Eina_List *l;
59         
60         EINA_LIST_FOREACH(e_config->modules, l, em)
61           {
62              if (!em->name) continue;
63              if (!strcmp(em->name, "temperature"))
64                {
65                   e_config->modules = eina_list_remove_list
66                      (e_config->modules, l);
67                   if (em->name) eina_stringshare_del(em->name);
68                   free(em);
69                   break;
70                }
71           }
72         e_config_save_queue();
73      }
74    return 0; /* 1 == show ui, and wait for user, 0 == just continue */
75 }
76
77 EAPI int
78 wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
79 {
80    return 1;
81 }
82
83 EAPI int
84 wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
85 {
86    return 1;
87 }