Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_gadcon_config.c 


Log Message:
Fix the "Shelf Contents" remove bug.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_gadcon_config.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- e_int_gadcon_config.c       21 Aug 2006 16:18:49 -0000      1.29
+++ e_int_gadcon_config.c       10 Oct 2006 12:13:30 -0000      1.30
@@ -168,20 +168,32 @@
 {
    int i;
    E_Config_Dialog_Data *cfdata;
-   E_Config_Gadcon_Client *cf_gcc;
    Evas_List *l;
-
+   const char *name;
+   
    cfdata = data;
    i = e_widget_ilist_selected_get(cfdata->o_instances);
-   l = evas_list_nth_list(cfdata->cf_gc->clients, i);
-   cf_gcc = l->data;
+   name = e_widget_ilist_selected_label_get(cfdata->o_instances);
+   printf("Name: %s\n", name);
    
-   if (cf_gcc->name) evas_stringshare_del(cf_gcc->name);
-   if (cf_gcc->id) evas_stringshare_del(cf_gcc->id);
-   if (cf_gcc->style) evas_stringshare_del(cf_gcc->style);
-   free(cf_gcc);
+   for (l = cfdata->cf_gc->clients; l; l = l->next) 
+     {
+       E_Config_Gadcon_Client *cf_gcc;
 
-   cfdata->cf_gc->clients = evas_list_remove_list(cfdata->cf_gc->clients, l);
+       cf_gcc = l->data;
+       if (!cf_gcc) continue;
+       if (!cf_gcc->name) continue;
+       printf("Cf Name: %s\n", cf_gcc->name);  
+       if (!strcasecmp(cf_gcc->name, name)) 
+         {
+            if (cf_gcc->name) evas_stringshare_del(cf_gcc->name);
+            if (cf_gcc->id) evas_stringshare_del(cf_gcc->id);
+            if (cf_gcc->style) evas_stringshare_del(cf_gcc->style);
+            cfdata->cf_gc->clients = evas_list_remove(cfdata->cf_gc->clients, 
cf_gcc);
+            free(cf_gcc);
+            break;
+         }     
+     }
 
    _load_selected_gadgets(cfdata);
 



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to