forked from enlightenment/enlightenment
make create icon simpler - we just use generic _new_app_21432432.2.eap names
for brand new eaps as we dont knwo what to call them until theyare fileld out - it's also a good way to track what e has created itself :) (filename isnt that important really) SVN revision: 22600
This commit is contained in:
parent
b0f31255e9
commit
4f4d7a566b
|
@ -529,32 +529,9 @@ _e_border_menu_cb_icon_edit(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
|
||||
bd = data;
|
||||
a = bd->app;
|
||||
if ((!a) && (bd->client.icccm.class))
|
||||
if (!a)
|
||||
{
|
||||
static char buf[PATH_MAX];
|
||||
char *name, *homedir, *p;
|
||||
int instance;
|
||||
|
||||
name = alloca(strlen(bd->client.icccm.class) + 1);
|
||||
strcpy(name, bd->client.icccm.class);
|
||||
p = name;
|
||||
while (*p)
|
||||
{
|
||||
if (*p == ' ') *p = '_';
|
||||
else if (*p == '/') *p = '_';
|
||||
else if (*p == '.') *p = '_';
|
||||
p++;
|
||||
}
|
||||
homedir = e_user_homedir_get();
|
||||
snprintf(buf, sizeof(buf), "%s/.e/e/applications/all/%s.eap", homedir, name);
|
||||
instance = 0;
|
||||
while (ecore_file_exists(buf))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/.e/e/applications/all/%s-%i.eap", homedir, name, instance);
|
||||
instance++;
|
||||
}
|
||||
free(homedir);
|
||||
a = e_app_empty_new(buf);
|
||||
a = e_app_empty_new(NULL);
|
||||
if (a)
|
||||
{
|
||||
if (bd->client.icccm.name) a->win_name = evas_stringshare_add(bd->client.icccm.name);
|
||||
|
|
Loading…
Reference in New Issue