forked from enlightenment/enlightenment
always write icon file with edje_cc first.
SVN revision: 22606
This commit is contained in:
parent
62034acf5a
commit
380d7992a1
|
@ -1210,13 +1210,13 @@ e_app_fields_save(E_App *a)
|
||||||
unsigned char tmp[1];
|
unsigned char tmp[1];
|
||||||
int img;
|
int img;
|
||||||
|
|
||||||
if ((!a->path) || (!ecore_file_exists(a->path)))
|
// if ((!a->path) || (!ecore_file_exists(a->path)))
|
||||||
{
|
// {
|
||||||
_e_app_new_save(a);
|
_e_app_new_save(a);
|
||||||
img = 0;
|
// img = 0;
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
img = 1;
|
// img = 1;
|
||||||
|
|
||||||
/* get our current language */
|
/* get our current language */
|
||||||
lang = e_intl_language_alias_get();
|
lang = e_intl_language_alias_get();
|
||||||
|
@ -1276,6 +1276,7 @@ e_app_fields_save(E_App *a)
|
||||||
tmp[0] = 0;
|
tmp[0] = 0;
|
||||||
eet_write(ef, "app/info/wait_exit", tmp, 1, 0);
|
eet_write(ef, "app/info/wait_exit", tmp, 1, 0);
|
||||||
|
|
||||||
|
/*
|
||||||
if ((a->image) && (img))
|
if ((a->image) && (img))
|
||||||
{
|
{
|
||||||
int alpha;
|
int alpha;
|
||||||
|
@ -1298,7 +1299,6 @@ e_app_fields_save(E_App *a)
|
||||||
a->height = EAP_MIN_HEIGHT;
|
a->height = EAP_MIN_HEIGHT;
|
||||||
if ((iw > 0) && (ih > 0))
|
if ((iw > 0) && (ih > 0))
|
||||||
{
|
{
|
||||||
/* we need to change the sizes */
|
|
||||||
ecore_evas_resize(buf, a->width, a->height);
|
ecore_evas_resize(buf, a->width, a->height);
|
||||||
evas_object_image_fill_set(im, 0, 0, a->width, a->height);
|
evas_object_image_fill_set(im, 0, 0, a->width, a->height);
|
||||||
evas_object_resize(im, a->height, a->width);
|
evas_object_resize(im, a->height, a->width);
|
||||||
|
@ -1308,6 +1308,7 @@ e_app_fields_save(E_App *a)
|
||||||
eet_data_image_write(ef, "images/0", (void *)data, a->width, a->height, alpha, 1, 0, 0);
|
eet_data_image_write(ef, "images/0", (void *)data, a->width, a->height, alpha, 1, 0, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
eet_close(ef);
|
eet_close(ef);
|
||||||
if (a->parent)
|
if (a->parent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -526,6 +526,8 @@ _e_border_menu_cb_icon_edit(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
{
|
{
|
||||||
E_App *a;
|
E_App *a;
|
||||||
E_Border *bd;
|
E_Border *bd;
|
||||||
|
char *bname = NULL, *bclass = NULL;
|
||||||
|
|
||||||
|
|
||||||
bd = data;
|
bd = data;
|
||||||
a = bd->app;
|
a = bd->app;
|
||||||
|
@ -534,13 +536,18 @@ _e_border_menu_cb_icon_edit(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
a = e_app_empty_new(NULL);
|
a = e_app_empty_new(NULL);
|
||||||
if (a)
|
if (a)
|
||||||
{
|
{
|
||||||
if (bd->client.icccm.name) a->win_name = evas_stringshare_add(bd->client.icccm.name);
|
bname = bd->client.icccm.name;
|
||||||
if (bd->client.icccm.class) a->win_class = evas_stringshare_add(bd->client.icccm.class);
|
if ((bname) && (strlen(bname) < 1)) bname = NULL;
|
||||||
|
bclass = bd->client.icccm.class;
|
||||||
|
if ((bclass) && (strlen(bclass) < 1)) bclass = NULL;
|
||||||
|
|
||||||
|
if (bname) a->win_name = evas_stringshare_add(bname);
|
||||||
|
if (bclass) a->win_class = evas_stringshare_add(bclass);
|
||||||
if (bd->client.icccm.window_role)
|
if (bd->client.icccm.window_role)
|
||||||
a->win_role = evas_stringshare_add(bd->client.icccm.window_role);
|
a->win_role = evas_stringshare_add(bd->client.icccm.window_role);
|
||||||
if (bd->client.icccm.class) a->icon_class = evas_stringshare_add(bd->client.icccm.class);
|
if (bclass) a->icon_class = evas_stringshare_add(bclass);
|
||||||
if (bd->client.icccm.class) a->name = evas_stringshare_add(bd->client.icccm.class);
|
if (bclass) a->name = evas_stringshare_add(bclass);
|
||||||
if (bd->client.icccm.name) a->exe = evas_stringshare_add(bd->client.icccm.name);
|
if (bname) a->exe = evas_stringshare_add(bname);
|
||||||
if (bd->client.netwm.startup_id > 0)
|
if (bd->client.netwm.startup_id > 0)
|
||||||
a->startup_notify = 1;
|
a->startup_notify = 1;
|
||||||
bd->app = a;
|
bd->app = a;
|
||||||
|
@ -552,6 +559,19 @@ _e_border_menu_cb_icon_edit(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||||
e_eap_edit_show(m->zone->container, a->orig);
|
e_eap_edit_show(m->zone->container, a->orig);
|
||||||
else
|
else
|
||||||
e_eap_edit_show(m->zone->container, a);
|
e_eap_edit_show(m->zone->container, a);
|
||||||
|
if ((!bname) && (!bclass))
|
||||||
|
{
|
||||||
|
e_util_dialog_show(_("Incomplete Window Properties"),
|
||||||
|
_("The window you are creating an icon for<br>"
|
||||||
|
"does not contain window name and class<br>"
|
||||||
|
"properties, so the needed properties for<br>"
|
||||||
|
"the icon so that it will be used for this<br>"
|
||||||
|
"window cannot be guessed. You will need to<br>"
|
||||||
|
"use the window title instead. This will only<br>"
|
||||||
|
"work if the window title is the same at<br>"
|
||||||
|
"the time the window starts up, and does not<br>"
|
||||||
|
"change."));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue