2011-08-15 02:21:12 -07:00
|
|
|
/* Ibar setup */
|
2009-01-05 18:10:45 -08:00
|
|
|
#include "e.h"
|
|
|
|
#include "e_mod_main.h"
|
|
|
|
|
|
|
|
EAPI int
|
2010-08-19 09:52:09 -07:00
|
|
|
wizard_page_init(E_Wizard_Page *pg __UNUSED__)
|
2009-01-05 18:10:45 -08:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2010-08-19 09:52:09 -07:00
|
|
|
|
2009-01-05 18:10:45 -08:00
|
|
|
EAPI int
|
2010-08-19 09:52:09 -07:00
|
|
|
wizard_page_shutdown(E_Wizard_Page *pg __UNUSED__)
|
2009-01-05 18:10:45 -08:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
2010-08-19 09:52:09 -07:00
|
|
|
|
2009-01-05 18:10:45 -08:00
|
|
|
EAPI int
|
2010-08-19 09:52:09 -07:00
|
|
|
wizard_page_show(E_Wizard_Page *pg __UNUSED__)
|
2009-01-05 18:10:45 -08:00
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
FILE *f, *fin;
|
2009-01-05 18:10:45 -08:00
|
|
|
char buf[PATH_MAX];
|
2009-04-13 07:56:38 -07:00
|
|
|
|
2011-08-15 02:21:12 -07:00
|
|
|
snprintf(buf, sizeof(buf), "%s/def-ibar.txt", e_wizard_dir_get());
|
|
|
|
fin = fopen(buf, "r");
|
|
|
|
if (!fin) return 0;
|
2009-04-13 07:56:38 -07:00
|
|
|
e_user_dir_concat_static(buf, "applications/bar/default");
|
2009-01-05 18:10:45 -08:00
|
|
|
ecore_file_mkpath(buf);
|
2009-04-13 07:56:38 -07:00
|
|
|
e_user_dir_concat_static(buf, "applications/bar/default/.order");
|
2009-01-05 18:10:45 -08:00
|
|
|
f = fopen(buf, "w");
|
|
|
|
if (f)
|
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
while (fgets(buf, sizeof(buf), fin))
|
2009-01-05 18:10:45 -08:00
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
Efreet_Desktop *desk;
|
2012-08-22 00:32:12 -07:00
|
|
|
char name[4096], buf2[PATH_MAX], *p;
|
2011-08-15 02:21:12 -07:00
|
|
|
int n;
|
2012-06-28 06:12:13 -07:00
|
|
|
|
2011-08-15 02:21:12 -07:00
|
|
|
if (buf[0] == '#') continue;
|
|
|
|
p = buf;
|
2012-06-28 06:12:13 -07:00
|
|
|
while (isspace(*p))
|
|
|
|
p++;
|
|
|
|
for (;; )
|
2009-01-05 18:10:45 -08:00
|
|
|
{
|
2011-08-15 02:21:12 -07:00
|
|
|
n = sscanf(p, "%s", name);
|
|
|
|
if (n != 1) break;
|
|
|
|
p += strlen(name);
|
2012-06-28 06:12:13 -07:00
|
|
|
while (isspace(*p))
|
|
|
|
p++;
|
2011-08-15 02:21:12 -07:00
|
|
|
snprintf(buf2, sizeof(buf2), "%s.desktop", name);
|
|
|
|
desk = efreet_util_desktop_file_id_find(buf2);
|
|
|
|
if (desk)
|
|
|
|
{
|
|
|
|
fprintf(f, "%s\n", buf2);
|
|
|
|
efreet_desktop_free(desk);
|
|
|
|
break;
|
|
|
|
}
|
2009-01-05 18:10:45 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(f);
|
|
|
|
}
|
2012-07-28 07:29:26 -07:00
|
|
|
fclose(fin);
|
2011-08-15 02:21:12 -07:00
|
|
|
return 0; /* 1 == show ui, and wait for user, 0 == just continue */
|
|
|
|
}
|
* estickies,
* etk,
* PROTO/exalt,
* E-MODULES-EXTRA/diskio,
* E-MODULES-EXTRA/drawer,
* E-MODULES-EXTRA/penguins,
* E-MODULES-EXTRA/slideshow,
* E-MODULES-EXTRA/mail,
* E-MODULES-EXTRA/forecasts,
* E-MODULES-EXTRA/iiirk,
* E-MODULES-EXTRA/places,
* e,
* ewl,
* ecore,
* elitaire,
* entrance,
* e_dbus,
* efreet: Here we go, move from Ecore_List to Eina_List.
NOTE: This patch is huge, I did test it a lot, and I hope nothing is
broken. But if you think something change after this commit, please
contact me ASAP.
SVN revision: 39200
2009-02-25 03:03:47 -08:00
|
|
|
|
2011-08-15 02:21:12 -07:00
|
|
|
EAPI int
|
|
|
|
wizard_page_hide(E_Wizard_Page *pg __UNUSED__)
|
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI int
|
|
|
|
wizard_page_apply(E_Wizard_Page *pg __UNUSED__)
|
|
|
|
{
|
2009-01-05 18:10:45 -08:00
|
|
|
return 1;
|
|
|
|
}
|
2012-06-28 06:12:13 -07:00
|
|
|
|