2011-08-15 02:21:12 -07:00
|
|
|
/* Setup of default icon theme */
|
2008-10-25 22:46:45 -07:00
|
|
|
#include "e.h"
|
|
|
|
#include "e_mod_main.h"
|
|
|
|
|
|
|
|
EAPI int
|
2012-11-26 04:40:31 -08:00
|
|
|
wizard_page_init(E_Wizard_Page *pg __UNUSED__, Eina_Bool *need_xdg_desktops __UNUSED__, Eina_Bool *need_xdg_icons)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
2012-11-26 04:40:31 -08:00
|
|
|
*need_xdg_icons = EINA_TRUE;
|
2008-10-25 22:46:45 -07:00
|
|
|
return 1;
|
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
2010-08-19 09:52:09 -07:00
|
|
|
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2010-08-19 09:52:09 -07:00
|
|
|
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
2011-08-15 02:21:12 -07:00
|
|
|
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
2012-11-26 04:28:04 -08:00
|
|
|
/* TODO: Wait until icon theme list is built */
|
2011-08-15 02:21:12 -07:00
|
|
|
Eina_List *l, *themes = efreet_icon_theme_list_get();
|
|
|
|
Efreet_Icon_Theme *th;
|
2009-01-05 18:10:45 -08:00
|
|
|
int i;
|
2011-08-15 02:21:12 -07:00
|
|
|
const char *selected = NULL;
|
|
|
|
const char *search[] =
|
2012-06-28 06:12:13 -07:00
|
|
|
{
|
|
|
|
"gnome",
|
|
|
|
"Humanity",
|
|
|
|
"Humanity-Dark",
|
|
|
|
"ubuntu-mono-light",
|
|
|
|
"ubuntu-mono-dark",
|
|
|
|
"ubuntu-mono-light",
|
|
|
|
"unity-icon-theme",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2011-08-15 02:21:12 -07:00
|
|
|
if (!themes) return 0;
|
|
|
|
for (i = 0; search[i]; i++)
|
2008-10-26 02:04:05 -07:00
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
EINA_LIST_FOREACH(themes, l, th)
|
2009-01-05 18:10:45 -08:00
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
if (!strcasecmp(search[i], th->name.internal))
|
|
|
|
{
|
|
|
|
selected = search[i];
|
|
|
|
goto done;
|
|
|
|
}
|
2009-01-05 18:10:45 -08:00
|
|
|
}
|
2008-10-26 02:04:05 -07:00
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
done:
|
|
|
|
if (selected)
|
|
|
|
{
|
|
|
|
if (e_config->icon_theme) eina_stringshare_del(e_config->icon_theme);
|
|
|
|
e_config->icon_theme = eina_stringshare_add(selected);
|
|
|
|
}
|
|
|
|
eina_list_free(themes);
|
|
|
|
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
|
2008-10-25 22:46:45 -07:00
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
2011-08-15 02:21:12 -07:00
|
|
|
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2011-08-15 02:21:12 -07:00
|
|
|
|
2008-10-25 22:46:45 -07:00
|
|
|
EAPI int
|
2010-08-19 09:52:09 -07:00
|
|
|
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
|
2008-10-25 22:46:45 -07:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|