Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_iconbox.c 


Log Message:
* Odd - the image's coordinates appear to be relative to the window when inside 
an overlay.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -3 -r1.87 -r1.88
--- ewl_iconbox.c       29 Nov 2005 08:01:36 -0000      1.87
+++ ewl_iconbox.c       30 Nov 2005 08:57:27 -0000      1.88
@@ -412,17 +412,20 @@
        /*Add a background image*/
        int w,h;
 
-       if (ib->background) {
-               ewl_widget_destroy(ib->background);
-               ib->background = NULL;
+       if (!file) {
+               if (ib->background) {
+                       ewl_widget_destroy(ib->background);
+                       ib->background = NULL;
+               }
+               return;
        }
 
-       if (!file) return;
-
-       w = CURRENT_W(ib->ewl_iconbox_pane_inner);
-       h= CURRENT_H(ib->ewl_iconbox_pane_inner);
+       w = CURRENT_W(ib);
+       h= CURRENT_H(ib);
 
-       ib->background = ewl_image_new();
+       if (!ib->background) 
+               ib->background = ewl_image_new();
+       
        ewl_object_custom_size_set(EWL_OBJECT(ib->background), w,h);
        ewl_image_file_set(EWL_IMAGE(ib->background), file,0);
        ewl_container_child_append(EWL_CONTAINER(ib->ewl_iconbox_pane_inner), 
ib->background);
@@ -1174,33 +1177,23 @@
  */
 void ewl_iconbox_configure_cb(Ewl_Widget *w, void *ev_data __UNUSED__, void 
*user_data __UNUSED__)
 {
-       /*printf ("Got a configure\n");*/
-
        Ewl_IconBox* ib = EWL_ICONBOX(w);
 
-/*     xx = CURRENT_X(ib->ewl_iconbox_pane_inner);
-       yy = CURRENT_Y(ib->ewl_iconbox_pane_inner);
-       ww = CURRENT_W(ib->ewl_iconbox_pane_inner);
-       hh = CURRENT_H(ib->ewl_iconbox_pane_inner);
-
-       
-
-               
evas_damage_rectangle_add(evas_object_evas_get(EWL_CONTAINER(ib->ewl_iconbox_pane_inner)->clip_box),
-                                                       xx, yy, ww, hh);*/
-
-       
-
        if (REALIZED(ib) && VISIBLE(ib)) { 
                /*ewl_callback_del(EWL_WIDGET(ib), EWL_CALLBACK_CONFIGURE, 
ewl_iconbox_configure_cb);*/
                ewl_iconbox_inner_pane_calculate(EWL_ICONBOX(w));
                ewl_iconbox_icon_arrange(ib); 
 
                if (ib->background) {
-                       int w,h;
-                       w = CURRENT_W(ib->ewl_iconbox_pane_inner);
-                       h= CURRENT_H(ib->ewl_iconbox_pane_inner);
-                       
ewl_object_position_request(EWL_OBJECT(ib->background),0,0);
-                       
ewl_object_custom_size_set(EWL_OBJECT(ib->background),w,h);
+                       int width,height;
+                       Ewl_Widget* parent = w->parent;
+                       Ewl_Widget* parent_parent = parent->parent;
+                       width = CURRENT_W(ib);
+                       height = CURRENT_H(ib);
+                       
ewl_object_position_request(EWL_OBJECT(ib->background),CURRENT_X(parent),CURRENT_Y(parent));
+                       
ewl_object_custom_size_set(EWL_OBJECT(ib->background),width,height);
+
+                       
 
                }
                




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to