Enlightenment CVS committal
Author : raster
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_apps.c e_apps.h e_border.c e_eap_editor.c
e_int_border_menu.c
Log Message:
eap icons update realtime in borders based off on-disk changes etc. etc.
(editing icons seems to work like a charm for me so far).
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.c,v
retrieving revision 1.134
retrieving revision 1.135
diff -u -3 -r1.134 -r1.135
--- e_apps.c 13 May 2006 16:05:15 -0000 1.134
+++ e_apps.c 14 May 2006 01:13:42 -0000 1.135
@@ -444,6 +444,7 @@
{
Ecore_Exe *exe;
E_App_Instance *inst;
+ Evas_List *l;
E_OBJECT_CHECK_RETURN(a, 0);
E_OBJECT_TYPE_CHECK_RETURN(a, E_APP_TYPE, 0);
@@ -476,6 +477,13 @@
// e_object_ref(E_OBJECT(a));
_e_apps_start_pending = evas_list_append(_e_apps_start_pending, a);
if (a->startup_notify) a->starting = 1;
+ for (l = a->references; l; l = l->next)
+ {
+ E_App *a2;
+
+ a2 = l->data;
+ _e_app_change(a2, E_APP_EXEC);
+ }
_e_app_change(a, E_APP_EXEC);
return 1;
}
@@ -759,13 +767,13 @@
EAPI void
e_app_remove(E_App *a)
{
+ Evas_List *l;
char buf[PATH_MAX];
if (!a) return;
if (!a->parent) return;
a->parent->subapps = evas_list_remove(a->parent->subapps, a);
-
/* Check if this app is in a repository or in the parents dir */
snprintf(buf, sizeof(buf), "%s/%s", a->parent->path,
ecore_file_get_file(a->path));
if (ecore_file_exists(buf))
@@ -777,8 +785,16 @@
a->path = evas_stringshare_add(buf);
}
_e_app_save_order(a->parent);
+ for (l = a->references; l; l = l->next)
+ {
+ E_App *a2;
+
+ a2 = l->data;
+ e_app_remove(a2);
+ }
_e_app_change(a, E_APP_DEL);
a->parent = NULL;
+ e_object_unref(E_OBJECT(a));
}
EAPI void
@@ -1295,7 +1311,17 @@
eet_close(ef);
if (a->parent)
{
+ Evas_List *l;
+
_e_app_change(a->parent, E_APP_CHANGE);
+ _e_app_change(a, E_APP_CHANGE);
+ for (l = a->references; l; l = l->next)
+ {
+ E_App *a2;
+
+ a2 = l->data;
+ if (_e_app_copy(a2, a)) _e_app_change(a2, E_APP_CHANGE);
+ }
_e_app_subdir_rescan(a->parent);
}
}
@@ -1565,8 +1591,13 @@
}
/* If this is an original, it wont be deleted until all references
* are gone */
- if (a->references)
+ while (a->references)
{
+ E_App *a2;
+
+ a2 = a->references->data;
+ a2->orig = NULL;
+ a->references = evas_list_remove_list(a->references,
a->references);
printf("BUG: An original eapp shouldn't have any references when
freed! %d\n", evas_list_count(a->references));
}
@@ -1603,16 +1634,19 @@
{
Evas_List *l;
+ if (ch == E_APP_DEL)
+ printf("APP_DEL %s\n", a->path);
+ if (ch == E_APP_CHANGE)
+ printf("APP_CHANGE %s\n", a->path);
+ if (ch == E_APP_ADD)
+ printf("APP_ADD %s\n", a->path);
_e_apps_callbacks_walking = 1;
for (l = _e_apps_change_callbacks; l; l = l->next)
{
E_App_Callback *cb;
cb = l->data;
- if (!cb->delete_me)
- {
- cb->func(cb->data, a, ch);
- }
+ if (!cb->delete_me) cb->func(cb->data, a, ch);
}
_e_apps_callbacks_walking = 0;
if (_e_apps_callbacks_delete_me)
@@ -1641,6 +1675,7 @@
{
E_App *app;
char *file;
+ Evas_List *l;
app = data;
if ((!app) || (app->deleted))
@@ -1675,6 +1710,13 @@
e_app_fields_empty(app);
e_app_fields_fill(app, path);
_e_app_change(app, E_APP_CHANGE);
+ for (l = app->references; l; l = l->next)
+ {
+ E_App *a2;
+
+ a2 = l->data;
+ if (_e_app_copy(a2, app)) _e_app_change(a2, E_APP_CHANGE);
+ }
}
else if (event == ECORE_FILE_EVENT_DELETED_FILE)
{
@@ -1720,7 +1762,6 @@
else
{
_e_app_change(a, E_APP_CHANGE);
-
for (l = a->references; l; l = l->next)
{
E_App *a2;
@@ -1996,6 +2037,7 @@
Ecore_Exe_Event_Del *ev;
E_App_Instance *ai;
E_App *a;
+ Evas_List *l;
ev = event;
if (!ev->exe) return 1;
@@ -2049,6 +2091,13 @@
free(ai);
a->instances = evas_list_remove(a->instances, ai);
_e_apps_start_pending = evas_list_remove(_e_apps_start_pending, a);
+ for (l = a->references; l; l = l->next)
+ {
+ E_App *a2;
+
+ a2 = l->data;
+ _e_app_change(a2, E_APP_EXIT);
+ }
_e_app_change(a, E_APP_EXIT);
return 1;
}
@@ -2085,6 +2134,13 @@
while (removes)
{
a = removes->data;
+ for (l = a->references; l; l = l->next)
+ {
+ E_App *a2;
+
+ a2 = l->data;
+ _e_app_change(a2, E_APP_READY);
+ }
_e_app_change(a, E_APP_READY);
_e_apps_start_pending = evas_list_remove(_e_apps_start_pending, a);
e_object_unref(E_OBJECT(a));
@@ -2098,11 +2154,19 @@
{
E_App_Instance *inst;
E_App *a;
+ Evas_List *l;
inst = data;
a = inst->app;
_e_apps_start_pending = evas_list_remove(_e_apps_start_pending, a);
inst->expire_timer = NULL;
+ for (l = a->references; l; l = l->next)
+ {
+ E_App *a2;
+
+ a2 = l->data;
+ _e_app_change(a2, E_APP_READY_EXPIRE);
+ }
_e_app_change(a, E_APP_READY_EXPIRE);
return 0;
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_apps.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- e_apps.h 25 Mar 2006 05:28:57 -0000 1.31
+++ e_apps.h 14 May 2006 01:13:42 -0000 1.32
@@ -52,7 +52,6 @@
Evas_List *references; /* If this app is in a main repository,
this would
be a list to other eapp pointing to this
*/
-
Ecore_File_Monitor *monitor; /* Check for changes and files */
unsigned char startup_notify : 1; /* disable while starting etc. */
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.486
retrieving revision 1.487
diff -u -3 -r1.486 -r1.487
--- e_border.c 20 Apr 2006 11:30:23 -0000 1.486
+++ e_border.c 14 May 2006 01:13:42 -0000 1.487
@@ -6571,20 +6571,36 @@
_e_border_app_change(void *data, E_App *app, E_App_Change change)
{
Evas_List *l;
-
- for (l = borders; l; l = l->next)
- {
- E_Border *bd;
- bd = l->data;
- if (e_app_equals(bd->app, app))
+ switch (change)
+ {
+ case E_APP_ADD:
+ case E_APP_DEL:
+ case E_APP_CHANGE:
+ for (l = borders; l; l = l->next)
{
- e_object_unref(E_OBJECT(bd->app));
- bd->app = NULL;
-
- bd->changes.icon = 1;
- bd->changed = 1;
+ E_Border *bd;
+
+ bd = l->data;
+// if (e_app_equals(bd->app, app))
+ {
+ if (bd->app)
+ {
+ e_object_unref(E_OBJECT(bd->app));
+ bd->app = NULL;
+ }
+
+ bd->changes.icon = 1;
+ bd->changed = 1;
+ }
}
+ break;
+ case E_APP_EXEC:
+ case E_APP_READY:
+ case E_APP_READY_EXPIRE:
+ case E_APP_EXIT:
+ default:
+ break;
}
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_eap_editor.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- e_eap_editor.c 13 May 2006 14:57:20 -0000 1.24
+++ e_eap_editor.c 14 May 2006 01:13:42 -0000 1.25
@@ -170,8 +170,9 @@
/* FIXME: hardcoded until the eap editor provides fields to change it */
eap->width = 128;
eap->height = 128;
-
- e_app_fields_save(eap);
+
+ if ((eap->name) && (eap->exe))
+ e_app_fields_save(eap);
return 1;
}
@@ -224,7 +225,8 @@
eap->width = 128;
eap->height = 128;
- e_app_fields_save(eap);
+ if ((eap->name) && (eap->exe))
+ e_app_fields_save(eap);
return 1;
}
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_border_menu.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- e_int_border_menu.c 12 Apr 2006 14:08:06 -0000 1.15
+++ e_int_border_menu.c 14 May 2006 01:13:42 -0000 1.16
@@ -566,10 +566,15 @@
if (bd->client.icccm.name) a->exe =
evas_stringshare_add(bd->client.icccm.name);
if (bd->client.netwm.startup_id > 0)
a->startup_notify = 1;
+ bd->app = a;
+ e_object_ref(E_OBJECT(bd->app));
}
}
if (!a) return;
- e_eap_edit_show(m->zone->container, a);
+ if (a->orig)
+ e_eap_edit_show(m->zone->container, a->orig);
+ else
+ e_eap_edit_show(m->zone->container, a);
}
static void
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs