Enlightenment CVS committal

Author  : moom
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_alignment.c etk_bin.c etk_button.c etk_combobox.c 
        etk_container.c etk_frame.c etk_image.c etk_label.c 
        etk_menu_item.c etk_object.c etk_object.h etk_radio_button.c 
        etk_range.c etk_scrolled_view.c etk_string.c etk_table.c 
        etk_toggle_button.c etk_widget.c 


Log Message:
* [Object] etk_object_notify() now returns the object, or NULL if it has 
been destroyed by one of the notification callbacks.
* [Existing widgets] Checks if the widget has been destroyed during prop 
notification, and stops (return;) if it has been. It solves potential 
bugs.


===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_alignment.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- etk_alignment.c     13 May 2006 23:44:40 -0000      1.6
+++ etk_alignment.c     8 Aug 2006 18:03:01 -0000       1.7
@@ -88,28 +88,32 @@
    {
       alignment->xalign = xalign;
       etk_widget_redraw_queue(ETK_WIDGET(alignment));
-      etk_object_notify(ETK_OBJECT(alignment), "xalign");
+      if (!etk_object_notify(ETK_OBJECT(alignment), "xalign"))
+         return;
    }
    yalign = ETK_CLAMP(yalign, 0.0, 1.0);
    if (yalign != alignment->yalign)
    {
       alignment->yalign = yalign;
       etk_widget_redraw_queue(ETK_WIDGET(alignment));
-      etk_object_notify(ETK_OBJECT(alignment), "yalign");
+      if (!etk_object_notify(ETK_OBJECT(alignment), "yalign"))
+         return;
    }
    xscale = ETK_CLAMP(xscale, 0.0, 1.0);
    if (xscale != alignment->xscale)
    {
       alignment->xscale = xscale;
       etk_widget_redraw_queue(ETK_WIDGET(alignment));
-      etk_object_notify(ETK_OBJECT(alignment), "xscale");
+      if (!etk_object_notify(ETK_OBJECT(alignment), "xscale"))
+         return;
    }
    yscale = ETK_CLAMP(yscale, 0.0, 1.0);
    if (yscale != alignment->yscale)
    {
       alignment->yscale = yscale;
       etk_widget_redraw_queue(ETK_WIDGET(alignment));
-      etk_object_notify(ETK_OBJECT(alignment), "yscale");
+      if (!etk_object_notify(ETK_OBJECT(alignment), "yscale"))
+         return;
    }
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_bin.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- etk_bin.c   2 Aug 2006 19:17:00 -0000       1.11
+++ etk_bin.c   8 Aug 2006 18:03:01 -0000       1.12
@@ -82,13 +82,12 @@
    if (child)
    {
       etk_widget_parent_set(child, ETK_WIDGET(bin));
-      bin->child = child;
-      
-      /* TODO; warnings? */
       etk_widget_swallow_widget(ETK_WIDGET(bin), "swallow_area", bin->child);
+      bin->child = child;
       
+      if (!etk_signal_emit_by_name("child_added", ETK_OBJECT(bin), NULL, 
child))
+         return;
       etk_object_notify(ETK_OBJECT(bin), "child");
-      etk_signal_emit_by_name("child_added", ETK_OBJECT(bin), NULL, child);
    }
 }
 
@@ -213,8 +212,9 @@
    etk_widget_parent_set_full(widget, NULL, ETK_FALSE);
    bin->child = NULL;
    
+   if (!etk_signal_emit_by_name("child_removed", ETK_OBJECT(bin), NULL, 
widget))
+      return;
    etk_object_notify(ETK_OBJECT(bin), "child");
-   etk_signal_emit_by_name("child_removed", ETK_OBJECT(bin), NULL, widget);
 }
 
 /* Gets the children (the child actually) of the bin */
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_button.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- etk_button.c        8 Aug 2006 17:02:48 -0000       1.18
+++ etk_button.c        8 Aug 2006 18:03:01 -0000       1.19
@@ -278,12 +278,14 @@
    if (button->xalign != xalign)
    {
       button->xalign = xalign;
-      etk_object_notify(ETK_OBJECT(button), "xalign");
+      if (!etk_object_notify(ETK_OBJECT(button), "xalign"))
+         return;
    }
    if (button->yalign != yalign)
    {
       button->yalign = yalign;
-      etk_object_notify(ETK_OBJECT(button), "yalign");
+      if (!etk_object_notify(ETK_OBJECT(button), "yalign"))
+         return;
    }
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_combobox.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -3 -r1.21 -r1.22
--- etk_combobox.c      8 Aug 2006 17:02:48 -0000       1.21
+++ etk_combobox.c      8 Aug 2006 18:03:01 -0000       1.22
@@ -148,7 +148,8 @@
    {
       combobox->item_height = item_height;
       combobox->item_height_set = ETK_TRUE;
-      etk_object_notify(ETK_OBJECT(combobox), "item_height");
+      if (!etk_object_notify(ETK_OBJECT(combobox), "item_height"))
+         return;
    }
    else if (combobox->item_height_set)
    {
@@ -158,7 +159,8 @@
          combobox->item_height = ETK_COMBOBOX_DEFAULT_ITEM_HEIGHT;
       }
       combobox->item_height_set = ETK_FALSE;
-      etk_object_notify(ETK_OBJECT(combobox), "item_height");
+      if (!etk_object_notify(ETK_OBJECT(combobox), "item_height"))
+         return;
    }
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_container.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- etk_container.c     12 May 2006 19:13:39 -0000      1.10
+++ etk_container.c     8 Aug 2006 18:03:01 -0000       1.11
@@ -98,8 +98,8 @@
       return;
 
    container->border_width = border_width;
-   etk_object_notify(ETK_OBJECT(container), "border_width");
    etk_widget_size_recalc_queue(ETK_WIDGET(container));
+   etk_object_notify(ETK_OBJECT(container), "border_width");
 }
 
 /**
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_frame.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- etk_frame.c 8 Aug 2006 17:02:48 -0000       1.8
+++ etk_frame.c 8 Aug 2006 18:03:01 -0000       1.9
@@ -75,7 +75,8 @@
    {
       free(frame->label);
       frame->label = strdup(label);
-      etk_object_notify(ETK_OBJECT(frame), "label");
+      if (!etk_object_notify(ETK_OBJECT(frame), "label"))
+         return;
    }
 
    if (ETK_WIDGET(frame)->theme_object)
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_image.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -3 -r1.22 -r1.23
--- etk_image.c 17 Jun 2006 12:01:26 -0000      1.22
+++ etk_image.c 8 Aug 2006 18:03:01 -0000       1.23
@@ -135,30 +135,35 @@
 
    free(image->filename);
    image->filename = filename ? strdup(filename) : NULL;
-   etk_object_notify(ETK_OBJECT(image), "image_file");
+   if (!etk_object_notify(ETK_OBJECT(image), "image_file"))
+      return;
 
    if (image->edje_group)
    {
       free(image->edje_group);
       image->edje_group = NULL;
-      etk_object_notify(ETK_OBJECT(image), "edje_group");
+      if (!etk_object_notify(ETK_OBJECT(image), "edje_group"))
+         return;
    }
    if (image->edje_filename)
    {
       free(image->edje_filename);
       image->edje_filename = NULL;
-      etk_object_notify(ETK_OBJECT(image), "edje_file");
+      if (!etk_object_notify(ETK_OBJECT(image), "edje_file"))
+         return;
    }
    if (image->use_edje)
    {
       image->use_edje = ETK_FALSE;
       image->object_type_changed = ETK_TRUE;
-      etk_object_notify(ETK_OBJECT(image), "use_edje");
+      if (!etk_object_notify(ETK_OBJECT(image), "use_edje"))
+         return;
    }
    if (image->stock_id != ETK_STOCK_NO_STOCK)
    {
       image->stock_id = ETK_STOCK_NO_STOCK;
-      etk_object_notify(ETK_OBJECT(image), "stock_id");
+      if (!etk_object_notify(ETK_OBJECT(image), "stock_id"))
+         return;
    }
 
    _etk_image_load(image);
@@ -193,31 +198,36 @@
    {
       free(image->edje_filename);
       image->edje_filename = edje_filename ? strdup(edje_filename) : NULL;
-      etk_object_notify(ETK_OBJECT(image), "edje_file");
+      if (!etk_object_notify(ETK_OBJECT(image), "edje_file"))
+         return;
    }
    if (image->edje_group != edje_group)
    {
       free(image->edje_group);
       image->edje_group = edje_group ? strdup(edje_group) : NULL;
-      etk_object_notify(ETK_OBJECT(image), "edje_group");
+      if (!etk_object_notify(ETK_OBJECT(image), "edje_group"))
+         return;
    }
 
    if (image->filename)
    {
       free(image->filename);
       image->filename = NULL;
-      etk_object_notify(ETK_OBJECT(image), "image_file");
+      if (!etk_object_notify(ETK_OBJECT(image), "image_file"))
+         return;
    }
    if (!image->use_edje)
    {
       image->use_edje = ETK_TRUE;
       image->object_type_changed = ETK_TRUE;
-      etk_object_notify(ETK_OBJECT(image), "use_edje");
+      if (!etk_object_notify(ETK_OBJECT(image), "use_edje"))
+         return;
    }
    if (image->stock_id != ETK_STOCK_NO_STOCK)
    {
       image->stock_id = ETK_STOCK_NO_STOCK;
-      etk_object_notify(ETK_OBJECT(image), "stock_id");
+      if (!etk_object_notify(ETK_OBJECT(image), "stock_id"))
+         return;
    }
 
    _etk_image_load(image);
@@ -263,8 +273,11 @@
       etk_image_set_from_edje(image, etk_theme_icon_theme_get(), key);
    image->stock_id = stock_id;
    image->stock_size = stock_size;
-   etk_object_notify(ETK_OBJECT(image), "stock_id");
-   etk_object_notify(ETK_OBJECT(image), "stock_size");
+   
+   if (!etk_object_notify(ETK_OBJECT(image), "stock_id"))
+      return;
+   if (!etk_object_notify(ETK_OBJECT(image), "stock_size"))
+      return;
 }
 
 /**
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_label.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- etk_label.c 8 Aug 2006 02:55:30 -0000       1.18
+++ etk_label.c 8 Aug 2006 18:03:01 -0000       1.19
@@ -132,14 +132,16 @@
    if (label->xalign != xalign)
    {
       label->xalign = xalign;
-      etk_object_notify(ETK_OBJECT(label), "xalign");
       need_redraw = ETK_TRUE;
+      if (!etk_object_notify(ETK_OBJECT(label), "xalign"))
+         return;
    }
    if (label->yalign != yalign)
    {
       label->yalign = yalign;
-      etk_object_notify(ETK_OBJECT(label), "yalign");
       need_redraw = ETK_TRUE;
+      if (!etk_object_notify(ETK_OBJECT(label), "yalign"))
+         return;
    }
 
    if (need_redraw)
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_menu_item.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- etk_menu_item.c     8 Aug 2006 17:02:48 -0000       1.19
+++ etk_menu_item.c     8 Aug 2006 18:03:01 -0000       1.20
@@ -584,7 +584,8 @@
 
    *group = evas_list_append(*group, radio_item);
    radio_item->group = group;
-   etk_object_notify(ETK_OBJECT(radio_item), "group");
+   if (!etk_object_notify(ETK_OBJECT(radio_item), "group"))
+      return;
 
    radio_item->can_uncheck = ETK_TRUE;
    etk_menu_item_check_active_set(check_item, active);
@@ -920,8 +921,9 @@
       return;
    
    check_item->active = active;
+   if 
(!etk_signal_emit(_etk_menu_item_check_signals[ETK_MENU_ITEM_CHECK_TOGGLED_SIGNAL],
 ETK_OBJECT(check_item), NULL))
+      return;
    etk_object_notify(ETK_OBJECT(check_item), "active");
-   
etk_signal_emit(_etk_menu_item_check_signals[ETK_MENU_ITEM_CHECK_TOGGLED_SIGNAL],
 ETK_OBJECT(check_item), NULL);
 }
 
 /* Behavior of the "active_set" function for a radio menu item */
@@ -937,8 +939,9 @@
    if (!check_item->active || (check_item->active && radio_item->can_uncheck))
    {
       check_item->active = active;
-      etk_object_notify(ETK_OBJECT(check_item), "active");
       if 
(!etk_signal_emit(_etk_menu_item_check_signals[ETK_MENU_ITEM_CHECK_TOGGLED_SIGNAL],
 ETK_OBJECT(check_item), NULL))
+         return;
+      if (!etk_object_notify(ETK_OBJECT(check_item), "active"))
          return;
    
       if (check_item->active)
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_object.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- etk_object.c        25 Jul 2006 01:09:25 -0000      1.24
+++ etk_object.c        8 Aug 2006 18:03:01 -0000       1.25
@@ -463,13 +463,14 @@
 }
 
 /**
- * @brief Calls the notification callbacks associated the property of the 
object.
- * It should be called each time the value of the property is changed
+ * @brief Calls the object's notification callbacks associated the given 
property.
+ * It should be called each time the value of a property is changed
  * @param object an object
  * @param property_name the name of the property
- * @note This function is mainly used in object implementations, you usually 
do not need to call it manually
+ * @return Returns the object, or NULL if the object has been destroyed by one 
of the notification callbacks
+ * @object_implementation
  */
-void etk_object_notify(Etk_Object *object, const char *property_name)
+Etk_Object *etk_object_notify(Etk_Object *object, const char *property_name)
 {
    Evas_List *l;
    Evas_List **notification_callbacks;
@@ -477,29 +478,27 @@
    void *object_ptr;
 
    if (!object || !property_name)
-      return;
+      return object;
    if (!(notification_callbacks = 
evas_hash_find(object->notification_callbacks_hash, property_name)))
-      return;
+      return object;
 
    object_ptr = object;
    etk_object_weak_pointer_add(object, &object_ptr);
-   for (l = *notification_callbacks; l; l = l->next)
+   for (l = *notification_callbacks; l && object_ptr; l = l->next)
    {
       callback = l->data;
       if (callback->callback)
          callback->callback(object, property_name, callback->data);
-      
-      /* If the object has been destroyed by the notification callback, we 
return */
-      if (!object_ptr)
-         return;
    }
    etk_object_weak_pointer_remove(object, &object_ptr);
+   
+   return object_ptr;
 }
 
 /**
  * @brief Adds a notification callback associated to a property of the object.
  * The callback will be called each time the value of the property is changed
- * (each time etk_object_notify(object, property_name) is called).
+ * (i.e. each time etk_object_notify(object, property_name) is called).
  * @param object an object
  * @param property_name the name of the property
  * @param callback the callback function
@@ -530,7 +529,7 @@
  * @brief Removes a notification callback associated to a property of the 
object
  * @param object an object
  * @param property_name the name of the property
- * @param callback the callback function
+ * @param callback the callback function to remove
  */
 void etk_object_notification_callback_remove(Etk_Object *object, const char 
*property_name, void (*callback)(Etk_Object *object, const char *property_name, 
void *data))
 {
@@ -615,7 +614,7 @@
  *
  **************************/
 
-/* Frees a list of notification callbacks (called by _etk_object_destructor) */
+/* Frees a list of notification callbacks (called by _etk_object_destructor()) 
*/
 static Evas_Bool _etk_object_notification_callbacks_free_cb(Evas_Hash *hash, 
const char *key, void *data, void *fdata)
 {
    Evas_List **list;
@@ -665,11 +664,11 @@
  * A new object can be created with etk_object_new(). For example:
  * @code
  * //Creates a new focusable slider, for the range [1.0 - 3.0] and with the 
initial value 2.0
- * slider = etk_object_new(ETK_SLIDER_TYPE, "focusable", ETK_TRUE, "lower", 
1.0, "upper", 3.0, "value", 2.0, NULL);
+ * slider = etk_object_new(ETK_SLIDER_TYPE, "theme_group", "slider", 
"focusable", ETK_TRUE, "lower", 1.0, "upper", 3.0, "value", 2.0, NULL);
  * @endcode
  * The first argument is the type of the object to create, followed by any 
number of property-name/property-value pairs,
  * and terminated with NULL. @n
- * etk_object_new() automatically calls the corresponding constructors on the 
object, from the constructor of
+ * etk_object_new() automatically calls the corresponding constructors of the 
object, from the constructor of
  * the base class to the constructor of the more derived class. @n
  *
  * You can also destroy an object with etk_object_destroy(). It sets the weak 
pointers of the object to NULL
@@ -678,8 +677,8 @@
  *
  * <b>Signal concept:</b> @n
  * Each object has a list of signals that can be connected to one or several 
callbacks. The callbacks connected to
- * a signal will automatically be called when the signal is emitted with 
etk_signal_emit(). @n
- * You can connect a callback to a signal with etk_signal_connect(). For 
example:
+ * a signal will be automatically called when the signal is emitted with 
etk_signal_emit(). @n
+ * You can connect a callback to a signal of an object with 
etk_signal_connect(). For example:
  * @code
  * //Callback prototype
  * void clicked_cb(Etk_Button *button, void *data);
@@ -688,16 +687,16 @@
  * etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(clicked_cb), 
user_data);
  * @endcode
  *
- * You can also disconnect a callback from a signal with 
etk_signal_disconnect(). For instance: 
+ * You can also disconnect a callback from a signal of an object with 
etk_signal_disconnect(). For instance: 
  * @code
  * //Disconnects the callback "clicked_cb()" from the signal "clicked"
  * etk_signal_disconnect("clicked", ETK_OBJECT(button), 
ETK_CALLBACK(clicked_cb));
  * @endcode
  *
- * Each object inherits the signals of its parent classes (for instance, an 
Etk_Button has the signals of Etk_Object,
+ * Each object inherits the signals from its parent classes (for instance, an 
Etk_Button has the signals of Etk_Object,
  * Etk_Widget, Etk_Container, Etk_Bin and Etk_Button).
- * Each object's documentation page has a list of its signals with the 
associated callback prototype and a short
- * explanation. @n
+ * Each object's documentation page has a list of the object's signals with 
the associated callback prototype and
+ * a short explanation. @n
  * For more information about signals, see the documentation page of 
Etk_Signal. @n @n
  *
  * <b>Property concept:</b> @n
@@ -717,7 +716,7 @@
  * etk_object_notification_callback_add(ETK_OBJECT(slider), "upper", 
value_changed_cb, user_data);
  * @endcode
  *
- * Each object inherits the properties of its parent classes (for instance, an 
Etk_Button has the properties of
+ * Each object inherits the properties from its parent classes (for instance, 
an Etk_Button has the properties of
  * Etk_Object, Etk_Widget, Etk_Container, Etk_Bin and Etk_Button).
  * <hr>
  * @n @n
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_object.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- etk_object.h        28 May 2006 14:16:32 -0000      1.8
+++ etk_object.h        8 Aug 2006 18:03:01 -0000       1.9
@@ -79,7 +79,7 @@
 void etk_object_properties_get(Etk_Object *object, const char *first_property, 
...);
 void etk_object_properties_get_valist(Etk_Object *object, const char 
*first_property, va_list args);
 
-void etk_object_notify(Etk_Object *object, const char *property_name);
+Etk_Object *etk_object_notify(Etk_Object *object, const char *property_name);
 void etk_object_notification_callback_add(Etk_Object *object, const char 
*property_name, void (*callback)(Etk_Object *object, const char *property_name, 
void *data), void *data);
 void etk_object_notification_callback_remove(Etk_Object *object, const char 
*property_name, void (*callback)(Etk_Object *object, const char *property_name, 
void *data));
 
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_radio_button.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- etk_radio_button.c  8 Aug 2006 00:57:33 -0000       1.9
+++ etk_radio_button.c  8 Aug 2006 18:03:01 -0000       1.10
@@ -123,7 +123,8 @@
 
    *group = evas_list_append(*group, radio_button);
    radio_button->group = group;
-   etk_object_notify(ETK_OBJECT(radio_button), "group");
+   if (!etk_object_notify(ETK_OBJECT(radio_button), "group"))
+      return;
 
    radio_button->can_uncheck = ETK_TRUE;
    etk_toggle_button_active_set(toggle_button, active);
@@ -227,8 +228,9 @@
    if (!toggle_button->active || (toggle_button->active && 
radio_button->can_uncheck))
    {
       toggle_button->active = active;
-      etk_object_notify(ETK_OBJECT(toggle_button), "active");
       if (!etk_signal_emit_by_name("toggled", ETK_OBJECT(toggle_button), NULL))
+         return;
+      if (!etk_object_notify(ETK_OBJECT(toggle_button), "active"))
          return;
    
       if (toggle_button->active)
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_range.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- etk_range.c 8 Aug 2006 00:57:33 -0000       1.12
+++ etk_range.c 8 Aug 2006 18:03:01 -0000       1.13
@@ -126,12 +126,14 @@
    if (range->lower != lower)
    {
       range->lower = lower;
-      etk_object_notify(ETK_OBJECT(range), "lower");
+      if (!etk_object_notify(ETK_OBJECT(range), "lower"))
+         return;
    }
    if (range->upper != upper)
    {
       range->upper = upper;
-      etk_object_notify(ETK_OBJECT(range), "upper");
+      if (!etk_object_notify(ETK_OBJECT(range), "upper"))
+         return;
    }
 
    etk_range_value_set(range, range->value);
@@ -167,12 +169,14 @@
    if (range->step_increment != step)
    {
       range->step_increment = step;
-      etk_object_notify(ETK_OBJECT(range), "step_increment");
+      if (!etk_object_notify(ETK_OBJECT(range), "step_increment"))
+         return;
    }
    if (range->page_increment != page)
    {
       range->page_increment = page;
-      etk_object_notify(ETK_OBJECT(range), "page_increment");
+      if (!etk_object_notify(ETK_OBJECT(range), "page_increment"))
+         return;
    }
 }
 
@@ -204,8 +208,9 @@
    if (page_size != range->page_size)
    {
       range->page_size = page_size;
-      etk_object_notify(ETK_OBJECT(range), "page_size");
       etk_widget_redraw_queue(ETK_WIDGET(range));
+      if (!etk_object_notify(ETK_OBJECT(range), "page_size"))
+         return;
    }
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_scrolled_view.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- etk_scrolled_view.c 26 Jul 2006 14:57:18 -0000      1.19
+++ etk_scrolled_view.c 8 Aug 2006 18:03:01 -0000       1.20
@@ -136,14 +136,16 @@
    if (scrolled_view->hpolicy != hpolicy)
    {
       scrolled_view->hpolicy = hpolicy;
-      etk_object_notify(ETK_OBJECT(scrolled_view), "hpolicy");
       etk_widget_redraw_queue(ETK_WIDGET(scrolled_view));
+      if (!etk_object_notify(ETK_OBJECT(scrolled_view), "hpolicy"))
+         return;
    }
    if (scrolled_view->vpolicy != vpolicy)
    {
       scrolled_view->vpolicy = vpolicy;
-      etk_object_notify(ETK_OBJECT(scrolled_view), "vpolicy");
       etk_widget_redraw_queue(ETK_WIDGET(scrolled_view));
+      if (!etk_object_notify(ETK_OBJECT(scrolled_view), "vpolicy"))
+         return;
    }
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_string.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- etk_string.c        25 Jul 2006 01:09:25 -0000      1.10
+++ etk_string.c        8 Aug 2006 18:03:01 -0000       1.11
@@ -145,7 +145,8 @@
    {
       string->string[length] = 0;
       string->length = length;
-      etk_object_notify(ETK_OBJECT(string), "string");
+      if (!etk_object_notify(ETK_OBJECT(string), "string"))
+         return NULL;
    }
    return string;
 }
@@ -237,7 +238,8 @@
       string->string[string->length] = 0;
    }
    
-   etk_object_notify(ETK_OBJECT(string), "string");
+   if (!etk_object_notify(ETK_OBJECT(string), "string"))
+      return NULL;
    return string;
 }
 
@@ -466,8 +468,8 @@
    string->length += length;
    string->string[string->length] = 0;
    
-   etk_object_notify(ETK_OBJECT(string), "string");
-   
+   if (!etk_object_notify(ETK_OBJECT(string), "string"))
+      return NULL;
    return string;
 }
 
@@ -500,8 +502,8 @@
    string->length++;
    string->string[string->length] = 0;
    
-   etk_object_notify(ETK_OBJECT(string), "string");
-   
+   if (!etk_object_notify(ETK_OBJECT(string), "string"))
+      return NULL;
    return string;
 }
 
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_table.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -3 -r1.15 -r1.16
--- etk_table.c 29 Jul 2006 19:16:13 -0000      1.15
+++ etk_table.c 8 Aug 2006 18:03:01 -0000       1.16
@@ -182,8 +182,10 @@
    table->num_rows = num_rows;
 
    etk_widget_size_recalc_queue(ETK_WIDGET(table));
-   etk_object_notify(ETK_OBJECT(table), "num_cols");
-   etk_object_notify(ETK_OBJECT(table), "num_rows");
+   if (!etk_object_notify(ETK_OBJECT(table), "num_cols"))
+      return;
+   if (!etk_object_notify(ETK_OBJECT(table), "num_rows"))
+      return;
 }
 
 /**
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_toggle_button.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- etk_toggle_button.c 8 Aug 2006 17:02:48 -0000       1.10
+++ etk_toggle_button.c 8 Aug 2006 18:03:02 -0000       1.11
@@ -204,8 +204,9 @@
       return;
    
    toggle_button->active = active;
+   if 
(!etk_signal_emit(_etk_toggle_button_signals[ETK_TOGGLE_BUTTON_TOGGLED_SIGNAL], 
ETK_OBJECT(toggle_button), NULL))
+      return;
    etk_object_notify(ETK_OBJECT(toggle_button), "active");
-   
etk_signal_emit(_etk_toggle_button_signals[ETK_TOGGLE_BUTTON_TOGGLED_SIGNAL], 
ETK_OBJECT(toggle_button), NULL);
 }
 
 /** @} */
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_widget.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- etk_widget.c        8 Aug 2006 17:02:48 -0000       1.67
+++ etk_widget.c        8 Aug 2006 18:03:02 -0000       1.68
@@ -405,9 +405,9 @@
    {
       free(widget->theme_file);
       widget->theme_file = theme_file ? strdup(theme_file) : NULL;
-      etk_object_notify(ETK_OBJECT(widget), "theme_file");
       /* TODO: _realize_on_theme_file_change(): this function name is too 
loooonggg! */
       _etk_widget_realize_on_theme_file_change(widget, ETK_TRUE);
+      etk_object_notify(ETK_OBJECT(widget), "theme_file");
    }
 }
 
@@ -445,8 +445,8 @@
    {
       free(widget->theme_group);
       widget->theme_group = theme_group ? strdup(theme_group) : NULL;
-      etk_object_notify(ETK_OBJECT(widget), "theme_group");
       _etk_widget_realize_on_theme_change(widget);
+      etk_object_notify(ETK_OBJECT(widget), "theme_group");
    }
 }
 
@@ -702,9 +702,10 @@
    if (widget->smart_object && (!parent || (parent->smart_object && 
evas_object_visible_get(parent->smart_object))))
       evas_object_show(widget->smart_object);
    etk_widget_size_recalc_queue(widget);
-   etk_object_notify(ETK_OBJECT(widget), "visible");
    
-   etk_signal_emit(_etk_widget_signals[ETK_WIDGET_SHOW_SIGNAL], 
ETK_OBJECT(widget), NULL);
+   if (!etk_signal_emit(_etk_widget_signals[ETK_WIDGET_SHOW_SIGNAL], 
ETK_OBJECT(widget), NULL))
+      return;
+   etk_object_notify(ETK_OBJECT(widget), "visible");
 }
 
 /**
@@ -737,9 +738,10 @@
    if (widget->smart_object)
       evas_object_hide(widget->smart_object);
    etk_widget_size_recalc_queue(widget);
-   etk_object_notify(ETK_OBJECT(widget), "visible");
    
-   etk_signal_emit(_etk_widget_signals[ETK_WIDGET_HIDE_SIGNAL], 
ETK_OBJECT(widget), NULL);
+   if (!etk_signal_emit(_etk_widget_signals[ETK_WIDGET_HIDE_SIGNAL], 
ETK_OBJECT(widget), NULL))
+      return;
+   etk_object_notify(ETK_OBJECT(widget), "visible");
 }
 
 /**
@@ -782,6 +784,7 @@
 {
    if (!widget || widget->visibility_locked == visibility_locked)
       return;
+   
    widget->visibility_locked = visibility_locked;
    etk_object_notify(ETK_OBJECT(widget), "visibility_locked");
 }
@@ -899,9 +902,11 @@
    widget->requested_size.w = w;
    widget->requested_size.h = h;
    
-   etk_object_notify(ETK_OBJECT(widget), "width_request");
-   etk_object_notify(ETK_OBJECT(widget), "height_request");
    etk_widget_size_recalc_queue(widget);
+   if (!etk_object_notify(ETK_OBJECT(widget), "width_request"))
+      return;
+   if (!etk_object_notify(ETK_OBJECT(widget), "height_request"))
+      return;
 }
 
 /**
@@ -2019,6 +2024,7 @@
          /* TODO: is the widget is the one which is focused, we should change 
the focused widget */
          widget->focusable = etk_property_value_bool_get(value);
          etk_object_notify(object, "focusable");
+         break;
       /* TODO: rename it to "focus_on_click" */
       case ETK_WIDGET_FOCUS_ON_PRESS_PROPERTY:
          widget->focus_on_press = etk_property_value_bool_get(value);



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to