Enlightenment CVS committal
Author : handyande
Project : e17
Module : apps/e
Dir : e17/apps/e/src/bin
Modified Files:
e_border.c
Log Message:
Finish icon creation code, a little feeble now, but works
big feature:
passes in window class - no moew xprop nonsense :)
===================================================================
RCS file: /cvsroot/enlightenment/e17/apps/e/src/bin/e_border.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- e_border.c 23 Dec 2004 06:38:27 -0000 1.31
+++ e_border.c 23 Dec 2004 11:39:08 -0000 1.32
@@ -2318,10 +2318,28 @@
}
else
{
+ static char buf[PATH_MAX + 50];
+ char *name, *homedir;
+ int i;
+
+ buf[0] = '\0';
+ /* generate a reasonable file name from the window class */
+ /* FIXME - I think there could be duplicates - how better to do this? */
+ name = strdup(bd->client.icccm.class);
+ for (i = 0; i < strlen(name); i++)
+ {
+ if (name[i] == ' ')
+ name[i] = '_';
+ }
+ /* previously this could be null, but it will exist now */
+ homedir = e_user_homedir_get();
+
+ snprintf(buf, sizeof(buf),
+ "--win-class %s %s/.e/e/applications/all/%s.eapp",
+ bd->client.icccm.class, homedir, name);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, "Create Icon");
- /* FIXME need to create path for newly created icon */
- e_menu_item_callback_set(mi, _e_border_menu_cb_icon_edit, "");
+ e_menu_item_callback_set(mi, _e_border_menu_cb_icon_edit, buf);
}
e_menu_activate_mouse(m, bd->container, x, y, 1, 1,
@@ -2389,7 +2407,7 @@
full = malloc(strlen(file) + strlen(command) + 1);
strcpy(full, command);
strcat(full, file);
- printf("e_util_eapp_edit %s\n", full);
+ printf("EXEC %s\n", full);
process = ecore_exe_run(full, NULL);
if (!process || !ecore_exe_pid_get(process))
e_error_dialog_show("Icon Edit Error", "Error starting icon editor\n\n \
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs