forked from enlightenment/enlightenment
Put the add app button back until issues with fm2 .order files are sorted
out. SVN revision: 26990
This commit is contained in:
parent
3aeb56ad83
commit
c3a7cbadfe
|
@ -468,7 +468,8 @@ _cb_button_add(void *data1, void *data2)
|
||||||
_append_to_order(realpath, ecore_file_get_file(buf));
|
_append_to_order(realpath, ecore_file_get_file(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
// e_fm2_refresh(cfdata->gui.o_fm);
|
// FIXME: When fm is fixed to create the .order files for us, then we can remove this.
|
||||||
|
e_fm2_refresh(cfdata->gui.o_fm);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -600,11 +601,11 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
||||||
if (once)
|
if (once)
|
||||||
mt = e_widget_button_add(evas, _(once->label), "enlightenment/e",
|
mt = e_widget_button_add(evas, _(once->label), "enlightenment/e",
|
||||||
_cb_button_add, cfdata, NULL);
|
_cb_button_add, cfdata, NULL);
|
||||||
/*
|
/* Put this back in temporarily until raster fixes fm. */
|
||||||
else
|
else
|
||||||
mt = e_widget_button_add(evas, _("Add application..."), "enlightenment/e",
|
mt = e_widget_button_add(evas, _("Add application ->"), "enlightenment/e",
|
||||||
_cb_button_add, cfdata, NULL);
|
_cb_button_add, cfdata, NULL);
|
||||||
*/
|
/* */
|
||||||
if (mt)
|
if (mt)
|
||||||
{
|
{
|
||||||
cfdata->gui.o_add_button = mt;
|
cfdata->gui.o_add_button = mt;
|
||||||
|
@ -845,32 +846,35 @@ _append_to_order(const char *order, const char *file)
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/.order", order);
|
snprintf(buf, sizeof(buf), "%s/.order", order);
|
||||||
if (!ecore_file_exists(buf)) return;
|
if (ecore_file_exists(buf))
|
||||||
f = fopen(buf, "rb");
|
|
||||||
if (!f) return;
|
|
||||||
|
|
||||||
while (fgets(buf, sizeof(buf), f))
|
|
||||||
{
|
{
|
||||||
int len;
|
f = fopen(buf, "r");
|
||||||
|
if (f)
|
||||||
len = strlen(buf);
|
|
||||||
if (len > 0)
|
|
||||||
{
|
{
|
||||||
if (buf[len - 1] == '\n')
|
while (fgets(buf, sizeof(buf), f))
|
||||||
{
|
{
|
||||||
buf[len - 1] = 0;
|
int len;
|
||||||
len--;
|
|
||||||
}
|
len = strlen(buf);
|
||||||
list = evas_list_append(list, strdup(buf));
|
if (len > 0)
|
||||||
|
{
|
||||||
|
if (buf[len - 1] == '\n')
|
||||||
|
{
|
||||||
|
buf[len - 1] = 0;
|
||||||
|
len--;
|
||||||
|
}
|
||||||
|
list = evas_list_append(list, strdup(buf));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
snprintf(buf, sizeof(buf), "%s/.order", order);
|
||||||
|
ecore_file_unlink(buf);
|
||||||
}
|
}
|
||||||
fclose(f);
|
|
||||||
|
|
||||||
list = evas_list_append(list, strdup(file));
|
list = evas_list_append(list, strdup(file));
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/.order", order);
|
f = fopen(buf, "w");
|
||||||
ecore_file_unlink(buf);
|
|
||||||
f = fopen(buf, "wb");
|
|
||||||
if (!f) return;
|
if (!f) return;
|
||||||
for (l = list; l; l = l->next)
|
for (l = list; l; l = l->next)
|
||||||
{
|
{
|
||||||
|
@ -883,8 +887,5 @@ _append_to_order(const char *order, const char *file)
|
||||||
fclose(f);
|
fclose(f);
|
||||||
evas_list_free(list);
|
evas_list_free(list);
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "%s/.eap.cache.cfg", order);
|
|
||||||
ecore_file_unlink(buf);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue