Enlightenment CVS committal
Author : devilhorns
Project : e_modules
Module : mbar
Dir : e_modules/mbar
Modified Files:
e_mod_config_point.c
Log Message:
Allow setting exec to emtpy string without mount points disappearing.
===================================================================
RCS file: /cvs/e/e_modules/mbar/e_mod_config_point.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- e_mod_config_point.c 7 Apr 2006 09:12:31 -0000 1.4
+++ e_mod_config_point.c 8 Apr 2006 11:15:42 -0000 1.5
@@ -88,11 +88,12 @@
{
/*- BASIC -*/
IFDUP(cfdata->editor->eap->name, cfdata->name);
- if (cfdata->editor->eap->exe)
- IFDUP(cfdata->editor->eap->exe, cfdata->exe);
- else
- IFDUP(cfdata->editor->eap->name, cfdata->exe);
-
+ if (cfdata->editor->eap->exe)
+ {
+ if (strcmp(cfdata->editor->eap->exe, cfdata->editor->eap->name))
+ IFDUP(cfdata->editor->eap->exe, cfdata->exe);
+ }
+
IFDUP(cfdata->editor->eap->generic, cfdata->generic);
IFDUP(cfdata->editor->eap->comment, cfdata->comment);
//IFDUP(cfdata->editor->eap->icon_class, cfdata->iclass);
@@ -169,10 +170,20 @@
eap->name = evas_stringshare_add(cfdata->name);
if (cfdata->exe)
- eap->exe = evas_stringshare_add(cfdata->exe);
- else
- if (cfdata->name)
- eap->exe = evas_stringshare_add(cfdata->name);
+ {
+ if (strlen(cfdata->exe) > 0)
+ eap->exe = evas_stringshare_add(cfdata->exe);
+ else
+ {
+ if (cfdata->name)
+ eap->exe = evas_stringshare_add(cfdata->name);
+ }
+ }
+ else
+ {
+ if (cfdata->name)
+ eap->exe = evas_stringshare_add(cfdata->name);
+ }
if (cfdata->image)
eap->image = evas_stringshare_add(cfdata->image);
@@ -186,7 +197,7 @@
eap->height = 128;
e_app_fields_save(eap);
-
+
if (cfdata->is_new)
{
e_app_append(eap, editor->apps);
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs