Enlightenment CVS committal

Author  : rephorm
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_ilist.c e_ilist.h e_int_config_apps.c e_widget_framelist.c 
        e_widget_framelist.h e_widget_ilist.c e_widget_ilist.h 


Log Message:
when going back to categories list, scroll to the category we were just in
get rid of some warnings

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_ilist.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -3 -r1.33 -r1.34
--- e_ilist.c   12 May 2007 02:43:13 -0000      1.33
+++ e_ilist.c   7 Jun 2007 03:49:09 -0000       1.34
@@ -1,3 +1,6 @@
+/*
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
+ */
 #include "e.h"
 
 #define SMART_NAME "e_ilist"
@@ -401,6 +404,23 @@
    si = evas_list_nth(sd->items, n);
    if (si) return si->header;
    return 0;
+}
+
+EAPI void
+e_ilist_nth_geometry_get(Evas_Object *obj, int n, Evas_Coord *x, Evas_Coord 
*y, Evas_Coord *w, Evas_Coord *h)
+{
+  E_Ilist_Item *si;
+  int error;
+
+  API_ENTRY return;
+  if (!sd->items) return;
+
+  si = evas_list_nth(sd->items, n);
+  if (!si) return;
+
+  evas_object_geometry_get(si->o_base, x, y, w, h);
+  *x -= sd->x;
+  *y -= sd->y;
 }
 
 EAPI void 
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_ilist.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- e_ilist.h   12 May 2007 02:43:13 -0000      1.17
+++ e_ilist.h   7 Jun 2007 03:49:09 -0000       1.18
@@ -44,6 +44,7 @@
 EAPI Evas_Object *e_ilist_nth_icon_get          (Evas_Object *obj, int n);
 EAPI void         e_ilist_nth_icon_set          (Evas_Object *obj, int n, 
Evas_Object *icon);
 EAPI int          e_ilist_nth_is_header         (Evas_Object *obj, int n);
+EAPI void         e_ilist_nth_geometry_get      (Evas_Object *obj, int n, 
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
 EAPI void         e_ilist_icon_size_set         (Evas_Object *obj, Evas_Coord 
w, Evas_Coord h);
 EAPI Evas_List   *e_ilist_items_get             (Evas_Object *obj);
 EAPI void         e_ilist_multi_select          (Evas_Object *obj, int n);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_int_config_apps.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- e_int_config_apps.c 7 Jun 2007 02:47:29 -0000       1.67
+++ e_int_config_apps.c 7 Jun 2007 03:49:09 -0000       1.68
@@ -44,6 +44,7 @@
    Evas_Object *o_add, *o_del, *o_categories;
    Ecore_List *apps;
    const char *category;
+   int category_n;
    
    char *fav, *app;
 };
@@ -491,6 +492,7 @@
    
    cfdata = data;
 
+   cfdata->category_n = e_widget_ilist_selected_get(cfdata->o_apps);
    if (cfdata->category) ecore_string_release(cfdata->category);
    cfdata->category = ecore_string_instance(cfdata->app);
    _fill_apps(cfdata);
@@ -525,6 +527,8 @@
    if (cfdata->category) ecore_string_release(cfdata->category);
    cfdata->category = NULL;
    _fill_categories(cfdata);
+   e_widget_ilist_nth_show(cfdata->o_apps, cfdata->category_n, 1);
+   cfdata->category_n = 0;
 }
 
 static void 
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_framelist.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- e_widget_framelist.c        17 Apr 2007 05:37:15 -0000      1.13
+++ e_widget_framelist.c        7 Jun 2007 03:49:09 -0000       1.14
@@ -16,7 +16,7 @@
 
 /* externally accessible functions */
 EAPI Evas_Object *
-e_widget_framelist_add(Evas *evas, char *label, int horiz)
+e_widget_framelist_add(Evas *evas, const char *label, int horiz)
 {
    Evas_Object *obj, *o;
    E_Widget_Data *wd;
@@ -88,7 +88,7 @@
 }
 
 EAPI void
-e_widget_framelist_label_set(Evas_Object *obj, char *label)
+e_widget_framelist_label_set(Evas_Object *obj, const char *label)
 {
    E_Widget_Data *wd;
    
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_framelist.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- e_widget_framelist.h        21 Feb 2007 03:55:18 -0000      1.5
+++ e_widget_framelist.h        7 Jun 2007 03:49:09 -0000       1.6
@@ -6,10 +6,10 @@
 #ifndef E_WIDGET_FRAMELIST_H
 #define E_WIDGET_FRAMELIST_H
 
-EAPI Evas_Object *e_widget_framelist_add(Evas *evas, char *label, int horiz);
+EAPI Evas_Object *e_widget_framelist_add(Evas *evas, const char *label, int 
horiz);
 EAPI void e_widget_framelist_object_append(Evas_Object *obj, Evas_Object 
*sobj);
 EAPI void e_widget_framelist_content_align_set(Evas_Object *obj, double 
halign, double valign);
-EAPI void e_widget_framelist_label_set(Evas_Object *obj, char *label);
+EAPI void e_widget_framelist_label_set(Evas_Object *obj, const char *label);
 
 #endif
 #endif
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_ilist.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -3 -r1.35 -r1.36
--- e_widget_ilist.c    7 Jun 2007 01:09:24 -0000       1.35
+++ e_widget_ilist.c    7 Jun 2007 03:49:09 -0000       1.36
@@ -242,6 +242,26 @@
      return wcb->data;
 }
 
+/**
+ * Show the nth element of an ilist
+ * @param obj the ilist
+ * @param n the number of the element to show
+ * @param top if true, place this item at the top, otherwise scroll just 
+ * enough to show the element (from the current position).
+ */
+EAPI void
+e_widget_ilist_nth_show(Evas_Object *obj, int n, int top)
+{
+   E_Widget_Data *wd;
+   Evas_Coord x, y, w, h;
+   wd = e_widget_data_get(obj);
+   e_ilist_nth_geometry_get(wd->o_ilist, n, &x, &y, &w, &h);
+   if (top)
+     e_scrollframe_child_pos_set(wd->o_scrollframe, x, y);
+   else
+     e_scrollframe_child_region_show(wd->o_scrollframe, x, y, w, h);
+}
+
 EAPI void
 e_widget_ilist_selected_set(Evas_Object *obj, int n)
 {
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_widget_ilist.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- e_widget_ilist.h    12 May 2007 02:43:13 -0000      1.19
+++ e_widget_ilist.h    7 Jun 2007 03:49:09 -0000       1.20
@@ -22,6 +22,7 @@
 EAPI void         e_widget_ilist_nth_icon_set(Evas_Object *obj, int n, 
Evas_Object *icon);
 EAPI Evas_Object *e_widget_ilist_nth_icon_get(Evas_Object *obj, int n);
 EAPI void        *e_widget_ilist_nth_data_get(Evas_Object *obj, int n);
+EAPI void         e_widget_ilist_nth_show(Evas_Object *obj, int n, int top);
 EAPI void         e_widget_ilist_selected_set(Evas_Object *obj, int n);
 EAPI int          e_widget_ilist_selected_get(Evas_Object *obj);
 EAPI const char  *e_widget_ilist_selected_label_get(Evas_Object *obj);



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to