update for beta release
[framework/uifw/e17.git] / src / modules / wizard / page_070.c
1 /* Setup of default icon theme */
2 #include "e.h"
3 #include "e_mod_main.h"
4
5 EAPI int
6 wizard_page_init(E_Wizard_Page *pg __UNUSED__)
7 {
8    return 1;
9 }
10
11 EAPI int
12 wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
13 {
14    return 1;
15 }
16
17 EAPI int
18 wizard_page_show(E_Wizard_Page *pg __UNUSED__)
19 {
20    Eina_List *l, *themes = efreet_icon_theme_list_get();
21    Efreet_Icon_Theme *th;
22    int i;
23    const char *selected = NULL;
24    const char *search[] =
25      {
26         "gnome",
27         "Humanity",
28         "Humanity-Dark",
29         "ubuntu-mono-light",
30         "ubuntu-mono-dark",
31         "ubuntu-mono-light",
32         "unity-icon-theme",
33         NULL
34      };
35    
36    if (!themes) return 0;
37    for (i = 0; search[i]; i++)
38      {
39         EINA_LIST_FOREACH(themes, l, th)
40           {
41              if (!strcasecmp(search[i], th->name.internal))
42                {
43                   selected = search[i];
44                   goto done;
45                }
46           }
47      }
48 done:
49    if (selected)
50      {
51         if (e_config->icon_theme) eina_stringshare_del(e_config->icon_theme);
52         e_config->icon_theme = eina_stringshare_add(selected);
53      }
54    eina_list_free(themes);
55    return 0; /* 1 == show ui, and wait for user, 0 == just continue */
56 }
57
58 EAPI int
59 wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
60 {
61    return 1;
62 }
63
64 EAPI int
65 wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
66 {
67    return 1;
68 }