Enlightenment CVS committal
Author : handyande
Project : misc
Module : engage
Dir : misc/engage/src
Modified Files:
userconfig.c
Log Message:
Oh mamma... build_icon.sh now installs the icons it creates and engage will pick them
up _immediately :)
Also if you then delete the icon from ~/.e/apps/engage/launcher it will be removed :)
===================================================================
RCS file: /cvsroot/enlightenment/misc/engage/src/userconfig.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- userconfig.c 6 Oct 2004 13:34:42 -0000 1.8
+++ userconfig.c 8 Oct 2004 21:34:22 -0000 1.9
@@ -7,12 +7,13 @@
#include "engage.h"
-E_App *od_unmatched_app;
+E_App *od_unmatched_app, *applist, *maplist;
+
+static void _userconfig_applinks_change(void *data, E_App *a, E_App_Change ch);
static void
userconfig_mappings_load(char* fp)
{
- E_App *maplist;
Evas_List *l;
od_unmatched_app = e_app_new(PACKAGE_DATA_DIR "/icons/xapp.eet", 0);
@@ -40,9 +41,44 @@
}
static void
+_userconfig_applinks_change(void *data, E_App *a, E_App_Change ch)
+{
+ OD_Icon *tmp;
+ Evas_List *l;
+ if (a->parent == applist) {
+ switch (ch) {
+ case E_APP_ADD:
+ tmp = od_icon_new_applnk(a, NULL, NULL);
+ tmp->launcher = 1;
+ od_dock_add_applnk(tmp);
+ break;
+ case E_APP_DEL:
+ l = dock.applnks;
+ while (l) {
+ if (strcmp(((OD_Icon *) l->data)->winclass, a->winclass) == 0) {
+ tmp = l->data;
+ break;
+ }
+ l = l->next;
+ }
+ if (tmp) {
+ dock.icons = evas_list_remove(dock.icons, tmp);
+ dock.applnks = evas_list_remove(dock.applnks, tmp);
+ od_dock_reposition();
+ od_icon_del(tmp);
+ }
+ break;
+ default:
+ printf("Unhandled callback on applinks %d\n", ch);
+ }
+ } else {
+ // FIXME: handle mapping changes
+ }
+}
+
+static void
userconfig_applinks_load(char* fp)
{
- E_App *applist;
Evas_List *l;
applist = e_app_new(fp, 0);
@@ -51,6 +87,7 @@
return;
}
e_app_subdir_scan(applist, 0);
+ e_app_change_callback_add(_userconfig_applinks_change, NULL);
l = applist->subapps;
while(l) {
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs