Enlightenment CVS committal

Author  : moom
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_notebook.c etk_notebook.h etk_object.c etk_widget.c 


Log Message:
* etk_notebook_page_remove() no longer destroys the child of the page. 
It just unpacks it and the function returns it. 


===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_notebook.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- etk_notebook.c      16 Aug 2006 11:53:00 -0000      1.29
+++ etk_notebook.c      19 Aug 2006 19:18:03 -0000      1.30
@@ -161,21 +161,24 @@
 }
 
 /**
- * @brief Removes from the notebook the page corresponding to the index
+ * @brief Removes from the notebook the page corresponding to the index, after 
having unpacked the child of the page
  * @param notebook a notebook
  * @param page_num the index of the page to remove
- * @warning The widget of the child of the page will be automatically 
destroyed too.
- * To avoid this, call etk_notebook_page_child_set(notebook, page_num, NULL); 
before
+ * @return Returns the child that was packed in the page, or NULL if the page 
had no child
+ * @note This function does not destroy the child of the page, it just unpack 
it
  */
-void etk_notebook_page_remove(Etk_Notebook *notebook, int page_num)
+Etk_Widget *etk_notebook_page_remove(Etk_Notebook *notebook, int page_num)
 {
    Evas_List *l;
    Etk_Notebook_Page *page, *new_current = NULL;
+   Etk_Widget *child;
    
    if (!notebook || !(l = evas_list_nth_list(notebook->pages, page_num)))
-      return;
+      return NULL;
    
    page = l->data;
+   child = etk_bin_child_get(ETK_BIN(page->frame));
+   etk_bin_child_set(ETK_BIN(page->frame), NULL);
    etk_object_destroy(ETK_OBJECT(page->frame));
    etk_object_destroy(ETK_OBJECT(page->tab));
    
@@ -203,6 +206,7 @@
    }
    
    etk_widget_size_recalc_queue(ETK_WIDGET(notebook));
+   return child;
 }
 
 /**
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_notebook.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- etk_notebook.h      15 Aug 2006 22:26:55 -0000      1.18
+++ etk_notebook.h      19 Aug 2006 19:18:03 -0000      1.19
@@ -56,10 +56,10 @@
 Etk_Type *etk_notebook_type_get();
 Etk_Widget *etk_notebook_new();
 
-int  etk_notebook_page_prepend(Etk_Notebook *notebook, const char *tab_label, 
Etk_Widget *page_child);
-int  etk_notebook_page_append(Etk_Notebook *notebook, const char *tab_label, 
Etk_Widget *page_child);
-int  etk_notebook_page_insert(Etk_Notebook *notebook, const char *tab_label, 
Etk_Widget *page_child, int position);
-void etk_notebook_page_remove(Etk_Notebook *notebook, int page_num);
+int         etk_notebook_page_prepend(Etk_Notebook *notebook, const char 
*tab_label, Etk_Widget *page_child);
+int         etk_notebook_page_append(Etk_Notebook *notebook, const char 
*tab_label, Etk_Widget *page_child);
+int         etk_notebook_page_insert(Etk_Notebook *notebook, const char 
*tab_label, Etk_Widget *page_child, int position);
+Etk_Widget *etk_notebook_page_remove(Etk_Notebook *notebook, int page_num);
 
 int  etk_notebook_num_pages_get(Etk_Notebook *notebook);
 void etk_notebook_current_page_set(Etk_Notebook *notebook, int page_num);
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_object.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -3 -r1.28 -r1.29
--- etk_object.c        18 Aug 2006 22:02:19 -0000      1.28
+++ etk_object.c        19 Aug 2006 19:18:03 -0000      1.29
@@ -91,7 +91,7 @@
 /**
  * @brief Creates a new object: it calls the corresponding constructors (from 
the constructor of the base class to the
  * constructor of the more derived class) and then sets the values of the 
given properties
- * @param object_type the type of the object to create
+ * @param object_type the type of object to create
  * @param first_property the name of the first property to set
  * @param ... the value of the first property, followed by any number of 
property-name/property-value pairs,
  * terminated with NULL
@@ -115,7 +115,7 @@
 /**
  * @brief Creates a new object: it calls the corresponding constructors (from 
the constructor of the base class to the
  * constructor of the more derived class) and then sets the values of the 
given properties
- * @param object_type the type of the object to create
+ * @param object_type the type of object to create
  * @param first_property the name of the first property to set
  * @param args the value of the first property, followed by any number of 
property-name/property-value pairs,
  * terminated with NULL
===================================================================
RCS file: /cvs/e/e17/proto/etk/src/lib/etk_widget.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -3 -r1.72 -r1.73
--- etk_widget.c        16 Aug 2006 22:56:24 -0000      1.72
+++ etk_widget.c        19 Aug 2006 19:18:03 -0000      1.73
@@ -282,12 +282,12 @@
 /**
  * @brief Creates a new widget: it calls the corresponding constructors (from 
the constructor of the base class to the
  * constructor of the more derived class) and then sets the values of the 
given properties
- * @param widget_type the type of the widget to create
+ * @param widget_type the type of widget to create
  * @param first_property the name of the first property to set
  * @param ... the value of the first property, followed by any number of 
property-name/property-value pairs,
  * terminated with NULL
  * @return Returns the new Etk_Widget of type @a widget_type
- * @note This function just call etk_object_new() and casts the result to an 
"Etk_Widget *"
+ * @note This function just calls etk_object_new() and casts the result to an 
"Etk_Widget *"
  */
 Etk_Widget *etk_widget_new(Etk_Type *widget_type, const char *first_property, 
...)
 {
@@ -305,7 +305,7 @@
 }
 
 /**
- * @brief Sets the name of the widget
+ * @brief Sets the name of the widget. This is used mainly for debugging
  * @param widget a widget
  * @param name the name to set
  */
@@ -320,7 +320,7 @@
 }
 
 /**
- * @brief Gets the name of the widget
+ * @brief Gets the name of the widget. This is used mainly for debugging
  * @param widget a widget
  * @return Returns the name of the widget
  */
@@ -349,8 +349,7 @@
 
 /**
  * @brief Gets the inner geometry of the widget, relative to the top left 
corner of the Evas where it is drawn. @n
- * The inner geometry takes the inset values (horizontal and vertical 
paddings) into account (inset values are defined
- * by the theme)
+ * The inner geometry takes the inset values (horizontal and vertical 
paddings) into account
  * @param widget a widget
  * @param x the location where to store the inner x position of the widget
  * @param y the location where to store the inner y position of the widget
@@ -368,7 +367,7 @@
 /**
  * @brief Gets the toplevel widget that contains @a widget
  * @param widget a widget
- * @return Returns the toplevel widget if @a widget is contained in a toplevel 
widget, NULL on failure
+ * @return Returns the toplevel widget if @a widget is contained by toplevel 
widget, NULL on failure
  */
 Etk_Toplevel_Widget *etk_widget_toplevel_parent_get(Etk_Widget *widget)
 {
@@ -380,7 +379,7 @@
 /**
  * @brief Gets the evas of the toplevel widget that contains @a widget
  * @param widget a widget
- * @return Returns the evas if @a widget is contained in a toplevel widget, or 
NULL on failure
+ * @return Returns the evas if @a widget is contained by toplevel widget, or 
NULL on failure
  */
 Evas *etk_widget_toplevel_evas_get(Etk_Widget *widget)
 {
@@ -393,7 +392,7 @@
  * @brief Sets the theme-file of the widget
  * @param widget a widget
  * @param theme_file the path of the .edj theme-file. If NULL, it will use the 
theme-file of its theme-parent
- * (or parent if is has no theme-parent). If none of its theme-parents has a 
non-null theme file, it will use the
+ * (or parent if it is has no theme-parent). If none of its theme-parents has 
a non-null theme-file, it will use the
  * current theme-file of Etk. @n
  * Children of the widget will automatically inherit this theme-file if they 
have no theme-file already set
  */



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