Enlightenment CVS committal

Author  : devilhorns
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_int_config_shelf.c 


Log Message:
Remove _cb_list function as it does nothing, so no point in calling it.

When getting the shelf via e_shelf_list we cannot rely on using the ilist
index as it may not coorespond to the shelf_list. Since ilist label uses the
shelf id, parse out the id and use that to get from e_shelf_list.

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_shelf.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -3 -r1.14 -r1.15
--- e_int_config_shelf.c        21 Jul 2006 05:41:24 -0000      1.14
+++ e_int_config_shelf.c        23 Jul 2006 13:36:48 -0000      1.15
@@ -39,7 +39,6 @@
    
    cfdata = E_NEW(E_Config_Dialog_Data, 1);
    cfdata->cfd = cfd;
-   _fill_data(cfdata);
    return cfdata;
 }
 
@@ -50,14 +49,6 @@
 }
 
 static void
-_cb_list(void *data)
-{
-   E_Config_Dialog_Data *cfdata;
-   
-   cfdata = data;
-}
-
-static void
 _ilist_fill(E_Config_Dialog_Data *cfdata)
 {
    Evas_List *l;
@@ -70,6 +61,8 @@
    
    n = e_widget_ilist_selected_get(cfdata->ilist);
    e_widget_ilist_clear(cfdata->ilist);
+   e_widget_ilist_go(cfdata->ilist);
+   
    for (l = e_shelf_list(); l; l = l->next)
      {
        es = l->data;
@@ -78,6 +71,8 @@
        label = es->name;
        if (!label) label = "";
        snprintf(buf, sizeof(buf), "%s #%i", label, es->id);
+
+       printf("\n\n\nBuf: %s\n", buf);
        
        /* FIXME: proper icon */
        ob = edje_object_add(evas_object_evas_get(cfdata->ilist));
@@ -125,7 +120,7 @@
              break;
           }
        
-       e_widget_ilist_append(cfdata->ilist, ob, buf, _cb_list, cfdata, NULL);
+       e_widget_ilist_append(cfdata->ilist, ob, buf, NULL, NULL, NULL);
      }
    
    e_widget_min_size_set(cfdata->ilist, 155, 250);
@@ -167,9 +162,13 @@
    E_Shelf *es;
    E_Config_Shelf *cfg;
    E_Config_Dialog_Data *cfdata;
-
+   char *dummy;
+   int i;
+   
    cfdata = data;
-   es = evas_list_nth(e_shelf_list(), 
e_widget_ilist_selected_get(cfdata->ilist));
+   sscanf(e_widget_ilist_selected_label_get(cfdata->ilist), "%s #%i", &dummy, 
&i);
+
+   es = evas_list_nth(e_shelf_list(), i);
    if (es)
      {
        cfg = es->cfg;
@@ -205,9 +204,13 @@
 {
    E_Config_Dialog_Data *cfdata;
    E_Shelf *es;
+   char *dummy;
+   int i;
    
    cfdata = data;
-   es = evas_list_nth(e_shelf_list(), 
e_widget_ilist_selected_get(cfdata->ilist));
+   sscanf(e_widget_ilist_selected_label_get(cfdata->ilist), "%s #%i", &dummy, 
&i);
+
+   es = evas_list_nth(e_shelf_list(), i);
    if (!es) return;
    if (!es->config_dialog) e_int_shelf_config(es);
 }



-------------------------------------------------------------------------
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