Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        ewl_entry.c ewl_notebook.c 


Log Message:
Fix the bug for entry text not showing up. When re-working the configure
callback, I forgot to give the text a size, so it defaulted to 1x1.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- ewl_entry.c 26 Feb 2003 01:15:23 -0000      1.45
+++ ewl_entry.c 26 Feb 2003 22:35:25 -0000      1.46
@@ -174,7 +174,9 @@
         * First position the text.
         * FIXME: This needs to be scrollable
         */
-       ewl_object_request_position(EWL_OBJECT(e->text), xx, yy);
+       ewl_object_request_geometry(EWL_OBJECT(e->text), xx, yy,
+                       ewl_object_get_preferred_w(EWL_OBJECT(e->text)),
+                       ewl_object_get_preferred_h(EWL_OBJECT(e->text)));
 
        /*
         * Now position the cursor based on the current position in the text.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_notebook.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- ewl_notebook.c      19 Feb 2003 02:18:05 -0000      1.19
+++ ewl_notebook.c      26 Feb 2003 22:35:27 -0000      1.20
@@ -40,6 +40,62 @@
 }
 
 /**
+ * ewl_notebook_init - initialize a notebook to default values and callbacks
+ * @n: the notebook to initialize
+ *
+ * Returns no value. Sets the fields and callbacks of @n to their defaults.
+ */
+void ewl_notebook_init(Ewl_Notebook * n)
+{
+       Ewl_Widget     *w;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("n", n);
+
+       w = EWL_WIDGET(n);
+
+       /*
+        * Initialize the container portion of the notebook and set the fill
+        * policy to fill the area available.
+        */
+       ewl_container_init(EWL_CONTAINER(w), "notebook", NULL, NULL, NULL);
+
+       ewl_object_set_fill_policy(EWL_OBJECT(w), EWL_FILL_POLICY_FILL);
+
+       /*
+        * Create the box to hold tabs and make the box fill the area of the
+        * notebook.
+        */
+       n->tab_box = ewl_hbox_new();
+       ewl_widget_set_appearance(n->tab_box, "tab_box");
+       ewl_object_set_fill_policy(EWL_OBJECT(n->tab_box),
+                                  EWL_FILL_POLICY_FILL);
+       ewl_widget_show(n->tab_box);
+       ewl_container_append_child(EWL_CONTAINER(n), n->tab_box);
+
+       /*
+        * Attach the necessary callbacks for the notebook
+        */
+       ewl_callback_append(w, EWL_CALLBACK_REALIZE, __ewl_notebook_realize,
+                           NULL);
+       ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, __ewl_notebook_configure,
+                           NULL);
+       ewl_callback_prepend(w, EWL_CALLBACK_DESTROY, __ewl_notebook_destroy,
+                            NULL);
+       ewl_callback_del(w, EWL_CALLBACK_CONFIGURE,
+                        __ewl_container_configure_clip_box);
+
+       /*
+        * Create a list to keep track of the pages in the notebook and set
+        * the default position of the tabs.
+        */
+       n->pages = ewd_list_new();
+       n->tabs_position = EWL_POSITION_TOP;
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
  * ewl_notebook_append_page - append a page to the notebook
  * @n: the notebook to append the page
  * @t: the tab of the new page added
@@ -507,60 +563,6 @@
 
        if (n->flags & EWL_NOTEBOOK_FLAG_TABS_HIDDEN)
                ewl_widget_hide(n->tab_box);
-
-       DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
-
-/**
- * ewl_notebook_init - initialize a notebook to default values and callbacks
- * @n: the notebook to initialize
- *
- * Returns no value. Sets the fields and callbacks of @n to their defaults.
- */
-void ewl_notebook_init(Ewl_Notebook * n)
-{
-       Ewl_Widget     *w;
-
-       DENTER_FUNCTION(DLEVEL_STABLE);
-       DCHECK_PARAM_PTR("n", n);
-
-       w = EWL_WIDGET(n);
-
-       /*
-        * Initialize the container portion of the notebook and set the fill
-        * policy to fill the area available.
-        */
-       ewl_container_init(EWL_CONTAINER(w), "/notebook", NULL, NULL, NULL);
-
-       ewl_object_set_fill_policy(EWL_OBJECT(w), EWL_FILL_POLICY_FILL);
-
-       /*
-        * Create the box to hold tabs and make the box fill the area of the
-        * notebook.
-        */
-       n->tab_box = ewl_hbox_new();
-       ewl_widget_set_appearance(n->tab_box, "/notebook/tab_box");
-       ewl_object_set_fill_policy(EWL_OBJECT(n->tab_box),
-                                  EWL_FILL_POLICY_FILL);
-
-       /*
-        * Attach the necessary callbacks for the notebook
-        */
-       ewl_callback_append(w, EWL_CALLBACK_REALIZE, __ewl_notebook_realize,
-                           NULL);
-       ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, __ewl_notebook_configure,
-                           NULL);
-       ewl_callback_prepend(w, EWL_CALLBACK_DESTROY, __ewl_notebook_destroy,
-                            NULL);
-       ewl_callback_del(w, EWL_CALLBACK_CONFIGURE,
-                        __ewl_container_configure_clip_box);
-
-       /*
-        * Create a list to keep track of the pages in the notebook and set
-        * the default position of the tabs.
-        */
-       n->pages = ewd_list_new();
-       n->tabs_position = EWL_POSITION_TOP;
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }




-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to