Enlightenment CVS committal Author : onefang Project : e17 Module : apps/e
Dir : e17/apps/e/src/bin Modified Files: e_eap_editor.c Log Message: Uses the standard icon search method now. =================================================================== RCS file: /cvs/e/e17/apps/e/src/bin/e_eap_editor.c,v retrieving revision 1.46 retrieving revision 1.47 diff -u -3 -r1.46 -r1.47 --- e_eap_editor.c 1 Sep 2006 10:43:20 -0000 1.46 +++ e_eap_editor.c 1 Sep 2006 13:57:28 -0000 1.47 @@ -21,25 +21,26 @@ struct _E_Config_Dialog_Data { + E_App eap; /*- BASIC -*/ - char *name; - char *exe; + char *name; + char *exe; /*- ADVANCED -*/ - char *generic; - char *comment; - char *wname; - char *wclass; - char *wtitle; - char *wrole; - char *iclass; - char *ipath; - int icon_theme; - int startup_notify; - int wait_exit; + char *generic; + char *comment; + char *wname; + char *wclass; + char *wtitle; + char *wrole; + char *iclass; + char *ipath; + int startup_notify; + int wait_exit; /*- common -*/ - char *image; - int width; - int height; + char *image; + int width; + int height; + int icon_theme; E_App_Edit *editor; }; @@ -122,6 +123,11 @@ cfdata->height = cfdata->editor->eap->height; cfdata->width = cfdata->editor->eap->width; if (cfdata->image) cfdata->editor->img_set = 1; + + IFDUP(cfdata->editor->eap->path, cfdata->eap.path); + IFDUP(cfdata->editor->eap->icon_class, cfdata->eap.icon_class); + IFDUP(cfdata->editor->eap->icon_path, cfdata->eap.icon_path); + } static void * @@ -151,6 +157,14 @@ E_FREE(data->iclass); E_FREE(data->ipath); E_FREE(data->image); + + if (data->eap.path) + free((char *) data->eap.path); + if (data->eap.icon_class) + free((char *) data->eap.icon_class); + if (data->eap.icon_path) + free((char *) data->eap.icon_path); + if (data->editor->eap->tmpfile) ecore_file_unlink(data->editor->eap->image); data->editor->eap->tmpfile = 0; if (data->editor->eap->image) evas_stringshare_del(data->editor->eap->image); @@ -183,7 +197,11 @@ if (data->name) eap->name = evas_stringshare_add(data->name); if (data->exe) eap->exe = evas_stringshare_add(data->exe); - if (data->image) eap->image = evas_stringshare_add(data->image); + if (data->image) + { + eap->image = evas_stringshare_add(data->image); + eap->icon_class = evas_stringshare_add(""); /* Call this temporary, until I reconsider the icon search order. */ + } eap->startup_notify = data->startup_notify; eap->wait_exit = data->wait_exit; @@ -228,7 +246,6 @@ if (data->name) eap->name = evas_stringshare_add(data->name); if (data->exe) eap->exe = evas_stringshare_add(data->exe); - if (data->image) eap->image = evas_stringshare_add(data->image); if (data->generic) eap->generic = evas_stringshare_add(data->generic); if (data->comment) eap->comment = evas_stringshare_add(data->comment); @@ -238,6 +255,12 @@ if (data->wrole) eap->win_role = evas_stringshare_add(data->wrole); if (data->iclass) eap->icon_class = evas_stringshare_add(data->iclass); + if (data->image) + { + eap->image = evas_stringshare_add(data->image); + eap->icon_class = evas_stringshare_add(""); /* Call this temporary, until I reconsider the icon search order. */ + } + /* FIXME: hardcoded until the eap editor provides fields to change it */ if (data->width) eap->width = data->width; else eap->width = 128; @@ -272,6 +295,8 @@ editor->img = NULL; } + editor->img = e_app_icon_add(evas, &(data->eap)); +#if 0 if ((editor->img_set) && (data->image)) { if (editor->img) evas_object_del(editor->img); @@ -288,6 +313,7 @@ e_icon_fill_inside_set(editor->img, 1); } } +#endif if (editor->img_widget) evas_object_del(editor->img_widget); editor->img_widget = e_widget_button_add(evas, "", NULL, @@ -501,9 +527,23 @@ { cfdata->editor->img_set = 1; if (cfdata->editor->img) evas_object_del(cfdata->editor->img); + + if (cfdata->eap.path) + free((char *) cfdata->eap.path); + if (cfdata->eap.icon_class) + free((char *) cfdata->eap.icon_class); + if (cfdata->eap.icon_path) + free((char *) cfdata->eap.icon_path); + + cfdata->eap.icon_path = strdup(cfdata->image); + cfdata->eap.path = strdup(""); + cfdata->eap.icon_class = strdup(""); + cfdata->editor->img = e_app_icon_add(cfdata->editor->evas, &(cfdata->eap)); +#if 0 cfdata->editor->img = e_icon_add(cfdata->editor->evas); e_icon_file_set(cfdata->editor->img, cfdata->image); e_icon_fill_inside_set(cfdata->editor->img, 1); +#endif e_widget_button_icon_set(cfdata->editor->img_widget, cfdata->editor->img); } else ------------------------------------------------------------------------- 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 enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs