Enlightenment CVS committal

Author  : raster
Project : e17
Module  : apps/e

Dir     : e17/apps/e/src/bin


Modified Files:
        e_icon.c e_icon.h e_slidecore.c e_slidesel.c 


Log Message:


1. fix abort in tiff loader
2. slidesel theme garbage trailing. nuke
3. icon obj can have pre-scale set not. default is as before.
4. printf-- in slidesel

===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_icon.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- e_icon.c    4 Aug 2007 13:12:41 -0000       1.18
+++ e_icon.c    5 Feb 2008 12:00:19 -0000       1.19
@@ -9,6 +9,7 @@
 { 
    Evas_Coord   x, y, w, h;
    Evas_Object *obj;
+   int          size;
    char         fill_inside : 1;
 }; 
 
@@ -44,7 +45,9 @@
    sd = evas_object_smart_data_get(obj);
    if (!sd) return;
    /* smart code here */
-   evas_object_image_load_size_set(sd->obj, 64, 64);
+   /* FIXME: 64x64 - unhappy about this. use icon size */
+   if (sd->size != 0)
+     evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
    evas_object_image_file_set(sd->obj, file, NULL);
    _e_icon_smart_reconfigure(sd);
 }
@@ -57,7 +60,8 @@
    sd = evas_object_smart_data_get(obj);
    if (!sd) return;
    /* smart code here */
-   evas_object_image_load_size_set(sd->obj, 64, 64);
+   if (sd->size != 0)
+     evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
    evas_object_image_file_set(sd->obj, file, key);
    _e_icon_smart_reconfigure(sd);
 }
@@ -215,6 +219,29 @@
    return evas_object_image_data_get(sd->obj, 0);
 }
 
+EAPI void
+e_icon_scale_size_set(Evas_Object *obj, int size)
+{
+   E_Smart_Data *sd;
+   
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL;
+   sd->size = size;
+   if (!strcmp(evas_object_type_get(sd->obj), "edje"))
+     return;   
+   evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
+}
+
+EAPI int
+e_icon_scale_size_get(Evas_Object *obj)
+{
+   E_Smart_Data *sd;
+   
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL;
+   return sd->size;
+}
+
 /* local subsystem globals */
 static void
 _e_icon_smart_reconfigure(E_Smart_Data *sd)
@@ -305,6 +332,7 @@
    sd->w = 0;
    sd->h = 0;
    sd->fill_inside = 1;
+   sd->size = 64;
    evas_object_smart_member_add(sd->obj, obj);
    evas_object_smart_data_set(obj, sd);
 }
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_icon.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- e_icon.h    8 Jul 2006 09:18:03 -0000       1.10
+++ e_icon.h    5 Feb 2008 12:00:19 -0000       1.11
@@ -21,6 +21,8 @@
 EAPI void         e_icon_fill_inside_set  (Evas_Object *obj, int fill_inside);
 EAPI void         e_icon_data_set         (Evas_Object *obj, void *data, int 
w, int h);
 EAPI void        *e_icon_data_get         (Evas_Object *obj, int *w, int *h);
-    
+EAPI void         e_icon_scale_size_set   (Evas_Object *obj, int size);
+EAPI int          e_icon_scale_size_get   (Evas_Object *obj);
+
 #endif
 #endif
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_slidecore.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_slidecore.c       2 Feb 2008 05:26:07 -0000       1.1
+++ e_slidecore.c       5 Feb 2008 12:00:19 -0000       1.2
@@ -145,7 +145,6 @@
    dp = pos - (p1 * sd->dist);
    at = (dp * 255) / (sd->dist - 1);
    
-   printf("? %i %i | %i : %i # %i\n", p1, p2, dp, at, pos);
    while ((p1 < 0) || (p2 < 0))
      {
        p1 += n;
@@ -153,7 +152,6 @@
        at += 255;
        dp += sd->dist;
      }
-   printf("??? %i %i | %i : %i # %i\n", p1, p2, dp, at, pos);
    if ((sd->p1 != p1) || (sd->p2 != p2) || (sd->pn != n))
      {
        E_Smart_Item *it1, *it2;
@@ -170,15 +168,15 @@
             sd->o2 = NULL;
             pl1 = sd->p1 % n;
             pl2 = sd->p2 % n;
-            printf("## %i -> %i | %i -> %i ||| %i\n", p1, pl1, p2, pl2, dp);
             it1 = evas_list_nth(sd->items, pl1);
             it2 = evas_list_nth(sd->items, pl2);
             if (it1 && it2)
               {
-                 sd->o1 =  e_util_icon_theme_icon_add(it1->icon, "480x480", 
+                 sd->o1 =  e_util_icon_theme_icon_add(it1->icon, "512x512", 
                                                       
evas_object_evas_get(sd->smart_obj));
                  if (sd->o1)
                    {
+                      e_icon_scale_size_set(sd->o1, 0);
                       evas_object_stack_below(sd->o1, sd->event_obj);
                       evas_object_pass_events_set(sd->o1, 1);
                       evas_object_smart_member_add(sd->o1, sd->smart_obj);
@@ -186,10 +184,11 @@
                       evas_object_clip_set(sd->o1, 
evas_object_clip_get(sd->smart_obj));
                       evas_object_show(sd->o1);
                    }
-                 sd->o2 =  e_util_icon_theme_icon_add(it2->icon, "480x480", 
+                 sd->o2 =  e_util_icon_theme_icon_add(it2->icon, "512x512", 
                                                       
evas_object_evas_get(sd->smart_obj));
                  if (sd->o2)
                    {
+                      e_icon_scale_size_set(sd->o2, 0);
                       evas_object_stack_below(sd->o2, sd->event_obj);
                       evas_object_pass_events_set(sd->o2, 1);
                       evas_object_smart_member_add(sd->o2, sd->smart_obj);
===================================================================
RCS file: /cvs/e/e17/apps/e/src/bin/e_slidesel.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e_slidesel.c        2 Feb 2008 05:26:07 -0000       1.1
+++ e_slidesel.c        5 Feb 2008 12:00:19 -0000       1.2
@@ -19,6 +19,7 @@
    Evas_Object *slide_obj;
    Evas_List *items;
    Evas_Coord down_x, down_y;
+   E_Smart_Item *cur;
    unsigned char down : 1;
 }; 
 
@@ -59,6 +60,7 @@
    
    it = data;
    edje_object_part_text_set(it->sd->edje_obj, "e.text.label", it->label);
+   it->sd->cur = it;
 }
 
 /* externally accessible functions */
@@ -146,8 +148,10 @@
          {
             if (!(ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD))
               {
-                 printf("RUN!!!!\n");
-                 /* FIXME: call current item callback */
+                 if (sd->cur)
+                   {
+                      if (sd->cur->func) sd->cur->func(sd->cur->data);
+                   }
               }
          }
        sd->down = 0;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to