Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_misc.c ewl_misc.h ewl_notebook.c ewl_theme.c ewl_widget.c 
        ewl_widget.h 


Log Message:
Fix theme changing to update sub-widgets.
Clean up the theme data correctly.
Documentation update to the notebook.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ewl_misc.c  1 Dec 2005 01:23:58 -0000       1.31
+++ ewl_misc.c  6 Dec 2005 03:46:53 -0000       1.32
@@ -536,6 +536,12 @@
                        }
                        matched ++;
                }
+               else if (!strcmp(argv[i], "--ewl-help")) {
+                       ewl_print_help();
+                       exit(0);
+                       matched ++;
+               }
+
                if (matched > 0) {
                        while (matched) {
                                ewl_init_remove_option(argc, argv, i);
@@ -564,6 +570,23 @@
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
 
+void
+ewl_print_help(void)
+{
+       printf("EWL Help\n"
+               "\t--ewl-backtrace        Print a stack trace warnings occur.\n"
+               "\t--ewl-debug <level>    Set the debugging printf level.\n"
+               "\t--ewl-fb               Use framebuffer display engine.\n"
+               "\t--ewl-gl-x11           Use GL X11 display engine.\n"
+               "\t--ewl-help             Print this help message.\n"
+               "\t--ewl-print-gc-reap    Print garbage collection stats.\n"
+               "\t--ewl-print-theme-keys Print theme keys matched widgets.\n"
+               "\t--ewl-segv             Trigger crash when warning printed.\n"
+               "\t--ewl-software-x11     Use software X11 display engine.\n"
+               "\t--ewl-theme <theme>    Set the theme to use for widgets.\n"
+               );
+}
+
 /**
  * @param w: the widget to register for configuration
  * @return Returns no value.
@@ -721,10 +744,13 @@
 
        if (!ewl_object_flags_get(EWL_OBJECT(w), EWL_FLAG_PROPERTY_TOPLEVEL)) {
                Ewl_Object *o = EWL_OBJECT(w->parent);
-               if (!o|| (!ewl_object_queued_has(EWL_OBJECT(o),
-                                               EWL_FLAG_QUEUED_RSCHEDULED) &&
-                                       !REALIZED(o)))
+               if (!o)
                        DRETURN(DLEVEL_STABLE);
+
+               if (!ewl_object_queued_has(EWL_OBJECT(o), 
EWL_FLAG_QUEUED_RPROCESS)) {
+                       if (!REALIZED(o))
+                               DRETURN(DLEVEL_STABLE);
+               }
        }
 
        ewl_object_queued_add(EWL_OBJECT(w), EWL_FLAG_QUEUED_RSCHEDULED);
@@ -772,11 +798,7 @@
        ecore_list_goto_first(realize_list);
        while ((w = ecore_list_remove_first(realize_list))) {
                if (VISIBLE(w) && !REALIZED(w)) {
-                       ewl_object_queued_add(EWL_OBJECT(w),
-                                             EWL_FLAG_QUEUED_RPROCESS);
                        ewl_widget_realize(EWL_WIDGET(w));
-                       ewl_object_queued_remove(EWL_OBJECT(w),
-                                                EWL_FLAG_QUEUED_RPROCESS);
                        ecore_list_prepend(child_add_list, w);
                }
        }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_misc.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_misc.h  22 Nov 2005 17:28:15 -0000      1.10
+++ ewl_misc.h  6 Dec 2005 03:46:54 -0000       1.11
@@ -20,6 +20,7 @@
 };
 
 int             ewl_init(int *argc, char **argv);
+void            ewl_print_help(void);
 int             ewl_shutdown(void);
 void            ewl_main(void);
 void            ewl_main_quit(void);
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_notebook.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_notebook.c      16 Nov 2005 16:18:57 -0000      1.7
+++ ewl_notebook.c      6 Dec 2005 03:46:54 -0000       1.8
@@ -7,9 +7,8 @@
                                Ewl_Notebook_Page *p);
 
 /**
- * ewl_notebook_new - create a new notebook
- * 
- * Returns a newly allocated notebook on success, NULL on failure.
+ * @brief Create a new notebook container
+ * @return Returns a newly allocated notebook on success, NULL on failure.
  */
 Ewl_Widget *
 ewl_notebook_new(void)
@@ -31,11 +30,9 @@
 }
 
 /**
- * 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.
+ * @param n: Notebook widget to initialize
+ * @brief Initialize a notebook to default values and callbacks
+ * @return Returns no value.
  */
 int
 ewl_notebook_init(Ewl_Notebook * n)
@@ -52,7 +49,7 @@
        }
 
        ewl_box_orientation_set(EWL_BOX(n), EWL_ORIENTATION_VERTICAL);
-       ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_FILL);
+       ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_ALL);
 
        ewl_widget_appearance_set(w, "notebook");
        ewl_widget_inherit(w, "notebook");
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_theme.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_theme.c 1 Nov 2005 05:58:34 -0000       1.18
+++ ewl_theme.c 6 Dec 2005 03:46:54 -0000       1.19
@@ -276,8 +276,7 @@
        if (w->theme && w->theme != def_theme_data)
                ecore_hash_destroy(w->theme);
 
-       else
-               w->theme = NULL;
+       w->theme = NULL;
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -3 -r1.48 -r1.49
--- ewl_widget.c        2 Dec 2005 21:07:39 -0000       1.48
+++ ewl_widget.c        6 Dec 2005 03:46:54 -0000       1.49
@@ -9,8 +9,8 @@
                                                int *t, int *b);
 static void ewl_widget_theme_insets_get(Ewl_Widget *w, int *l, int *r,
                                                int *t, int *b);
-static void ewl_widget_appearance_part_text_apply(Ewl_Widget * w, char *part,
-                                               char *text);
+static void ewl_widget_appearance_part_text_apply(Ewl_Widget * w,
+                                                 const char *part, char *text);
 
 /* static int edjes = 0; */
 
@@ -199,7 +199,10 @@
        if (w->parent && !REALIZED(w->parent))
                ewl_widget_realize(w->parent);
        else if (w->parent || ewl_object_toplevel_get(EWL_OBJECT(w))) {
+               ewl_object_queued_add(EWL_OBJECT(w), EWL_FLAG_QUEUED_RPROCESS);
                ewl_callback_call(w, EWL_CALLBACK_REALIZE);
+               ewl_object_queued_remove(EWL_OBJECT(w),
+                                        EWL_FLAG_QUEUED_RPROCESS);
                ewl_object_visible_add(EWL_OBJECT(w),
                                        EWL_FLAG_VISIBLE_REALIZED);
                ewl_widget_obscure(w);
@@ -741,7 +744,7 @@
  * Changes the text of a given Edje-define TEXT part.
  */
 static void
-ewl_widget_appearance_part_text_apply(Ewl_Widget * w, char *part, char *text)
+ewl_widget_appearance_part_text_apply(Ewl_Widget * w, const char *part, char 
*text)
 {
        Evas_Coord nw, nh;
 
@@ -1297,7 +1300,7 @@
 {
        int len;
        char *tmp = NULL;
-       char *tmp2 = NULL;
+       const char *tmp2 = NULL;
 
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("widget", widget);
@@ -1665,11 +1668,6 @@
                w->bit_state = NULL;
        }
 
-       if (w->theme) {
-               ecore_hash_destroy(w->theme);
-               w->theme = NULL;
-       }
-
        if (w->theme_text.list) {
                if (w->theme_text.direct) {
                        ecore_string_release(EWL_PAIR(w->theme_text.list)->key);
@@ -1810,7 +1808,7 @@
                 * Set the state of the theme object
                 */
                if (w->bit_state)
-                       ewl_widget_state_set(w, w->bit_state);
+                       ewl_widget_state_set(w, (char *)w->bit_state);
 
                if (ewl_object_state_has(EWL_OBJECT(w),
                                        EWL_FLAG_STATE_DISABLED))
@@ -1820,7 +1818,8 @@
                 * Apply any text overrides
                 */
                if (w->theme_object && w->theme_text.list) {
-                       char *key, *value;
+                       const char *key;
+                       char *value;
 
                        if (w->theme_text.direct) {
                                key = EWL_PAIR(w->theme_text.list)->key;
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -3 -r1.24 -r1.25
--- ewl_widget.h        2 Dec 2005 19:53:44 -0000       1.24
+++ ewl_widget.h        6 Dec 2005 03:46:54 -0000       1.25
@@ -26,7 +26,7 @@
 #define EWL_PAIR(p) ((Ewl_Pair *)p)
 struct Ewl_Pair
 {
-       char *key;
+       const char *key;
        char *value;
 };
 
@@ -86,11 +86,11 @@
        Evas_Object     *fx_clip_box;  /**< Clipping rectangle of widget */
 
        Evas_Object     *theme_object; /**< Appearance shown on canvas */
-       char            *bit_path;     /**< Path to the file for loading */
-       char            *bit_group;    /**< Group in theme to use */
-       char            *bit_state;    /**< State of the appearance */
-       char            *appearance;   /**< Key to lookup appearance in theme */
-       char            *inheritance;  /**< Inheritance of path widget */
+       const char      *bit_path;     /**< Path to the file for loading */
+       const char      *bit_group;    /**< Group in theme to use */
+       const char      *bit_state;    /**< State of the appearance */
+       const char      *appearance;   /**< Key to lookup appearance in theme */
+       const char      *inheritance;  /**< Inheritance of path widget */
        int              layer;        /**< Current layer of widget on canvas */
 
        Ecore_Hash      *theme;        /**< Overriding theme settings */




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