Enlightenment CVS committal Author : dj2 Project : e17 Module : libs/ewl
Dir : e17/libs/ewl/src Modified Files: ewl_border.c ewl_box.c ewl_button.c ewl_cell.c ewl_check.c ewl_checkbutton.c ewl_colorpicker.c ewl_combo.c ewl_container.c ewl_dialog.c ewl_embed.c ewl_entry.c ewl_filedialog.c ewl_fileselector.c ewl_floater.c ewl_grid.c ewl_image.c ewl_imenu.c ewl_media.c ewl_menu.c ewl_menu_base.c ewl_menubar.c ewl_notebook.c ewl_overlay.c ewl_paned.c ewl_password.c ewl_progressbar.c ewl_radiobutton.c ewl_row.c ewl_scrollbar.c ewl_scrollpane.c ewl_seeker.c ewl_selectionbar.c ewl_selectionbook.c ewl_separator.c ewl_spacer.c ewl_spectrum.c ewl_spinner.c ewl_statusbar.c ewl_table.c ewl_text.c ewl_tooltip.c ewl_tree.c ewl_widget.c ewl_widget.h ewl_window.c Log Message: - make inheritance explicit. This way it won't grow out of control with a lot of appearance switching - just need to put a call to ewl_widget_inhert(w, "type") in your _init routines =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_border.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_border.c 9 Dec 2004 02:09:55 -0000 1.7 +++ ewl_border.c 9 Dec 2004 05:26:08 -0000 1.8 @@ -55,6 +55,7 @@ ewl_container_redirect_set(EWL_CONTAINER(b), EWL_CONTAINER(b->body)); ewl_widget_appearance_set(EWL_WIDGET(b), "border"); + ewl_widget_inherit(EWL_WIDGET(b), "border"); DRETURN_INT(TRUE, DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_box.c,v retrieving revision 1.73 retrieving revision 1.74 diff -u -3 -r1.73 -r1.74 --- ewl_box.c 8 Dec 2004 21:17:27 -0000 1.73 +++ ewl_box.c 9 Dec 2004 05:26:08 -0000 1.74 @@ -137,6 +137,8 @@ b->orientation = 0xdeadbeef; ewl_box_orientation_set(b, o); + ewl_widget_inherit(w, "box"); + DRETURN_INT(TRUE, DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_button.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- ewl_button.c 20 Aug 2004 16:48:41 -0000 1.57 +++ ewl_button.c 9 Dec 2004 05:26:09 -0000 1.58 @@ -41,6 +41,7 @@ DRETURN_INT(FALSE, DLEVEL_STABLE); ewl_widget_appearance_set(w, "button"); + ewl_widget_inherit(w, "button"); /* * Create and setup the label for the button if it's desired. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_cell.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- ewl_cell.c 18 Aug 2004 03:15:20 -0000 1.16 +++ ewl_cell.c 9 Dec 2004 05:26:09 -0000 1.17 @@ -44,6 +44,8 @@ ewl_callback_append(EWL_WIDGET(cell), EWL_CALLBACK_CONFIGURE, ewl_cell_configure_cb, NULL); + ewl_widget_inherit(EWL_WIDGET(cell), "cell"); + DRETURN_INT(TRUE, DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_check.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- ewl_check.c 18 Aug 2004 04:41:59 -0000 1.15 +++ ewl_check.c 9 Dec 2004 05:26:09 -0000 1.16 @@ -84,6 +84,8 @@ ewl_callback_append(w, EWL_CALLBACK_FOCUS_OUT, ewl_check_update_check_cb, NULL); + ewl_widget_inherit(w, "check"); + DLEAVE_FUNCTION(DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_checkbutton.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -3 -r1.45 -r1.46 --- ewl_checkbutton.c 9 Dec 2004 02:09:55 -0000 1.45 +++ ewl_checkbutton.c 9 Dec 2004 05:26:09 -0000 1.46 @@ -42,6 +42,7 @@ ewl_button_init(b, label); ewl_widget_appearance_set(w, "checkbutton"); + ewl_widget_inherit(w, "checkbutton"); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); ewl_callback_append(w, EWL_CALLBACK_CLICKED, =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_colorpicker.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ewl_colorpicker.c 19 Aug 2004 20:03:32 -0000 1.7 +++ ewl_colorpicker.c 9 Dec 2004 05:26:09 -0000 1.8 @@ -33,6 +33,8 @@ DRETURN_INT(FALSE, DLEVEL_STABLE); ewl_widget_appearance_set(EWL_WIDGET(cp), "colorpicker"); + ewl_widget_inherit(EWL_WIDGET(cp), "colorpicker"); + ewl_box_spacing_set(EWL_BOX(cp), 20); /* =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_combo.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ewl_combo.c 27 Sep 2004 04:56:17 -0000 1.13 +++ ewl_combo.c 9 Dec 2004 05:26:09 -0000 1.14 @@ -43,6 +43,7 @@ EWL_FLAG_FILL_HSHRINK); ewl_widget_appearance_set( EWL_WIDGET(combo), "combo" ); + ewl_widget_inherit(EWL_WIDGET(combo), "combo"); if (EWL_MENU_ITEM(combo)->icon) ewl_widget_destroy(EWL_MENU_ITEM(combo)->icon); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_container.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -3 -r1.80 -r1.81 --- ewl_container.c 11 Nov 2004 05:56:33 -0000 1.80 +++ ewl_container.c 9 Dec 2004 05:26:09 -0000 1.81 @@ -26,6 +26,7 @@ DRETURN_INT(0, DLEVEL_STABLE); ewl_widget_appearance_set(w, appearance); + ewl_widget_inherit(w, "container"); ewl_object_recursive_set(EWL_OBJECT(w), TRUE); /* =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_dialog.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -3 -r1.12 -r1.13 --- ewl_dialog.c 28 Aug 2004 06:26:33 -0000 1.12 +++ ewl_dialog.c 9 Dec 2004 05:26:09 -0000 1.13 @@ -41,6 +41,7 @@ DRETURN_INT(FALSE, DLEVEL_STABLE); ewl_widget_appearance_set(w, "window"); + ewl_widget_inherit(w, "dialog"); dialog->position = pos; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_embed.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -3 -r1.51 -r1.52 --- ewl_embed.c 14 Oct 2004 18:44:41 -0000 1.51 +++ ewl_embed.c 9 Dec 2004 05:26:09 -0000 1.52 @@ -91,6 +91,7 @@ if (!ewl_overlay_init(EWL_OVERLAY(w))) DRETURN_INT(FALSE, DLEVEL_STABLE); ewl_widget_appearance_set(EWL_WIDGET(w), "embed"); + ewl_widget_inherit(EWL_WIDGET(w), "embed"); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); ewl_object_toplevel_set(EWL_OBJECT(w), EWL_FLAG_PROPERTY_TOPLEVEL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v retrieving revision 1.117 retrieving revision 1.118 diff -u -3 -r1.117 -r1.118 --- ewl_entry.c 26 Oct 2004 22:02:23 -0000 1.117 +++ ewl_entry.c 9 Dec 2004 05:26:09 -0000 1.118 @@ -100,6 +100,8 @@ if (!ewl_container_init(EWL_CONTAINER(w), "entry")) DRETURN_INT(FALSE, DLEVEL_STABLE); + ewl_widget_inherit(EWL_WIDGET(w), "entry"); + e->in_select_mode = FALSE; e->multiline = FALSE; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_filedialog.c,v retrieving revision 1.42 retrieving revision 1.43 diff -u -3 -r1.42 -r1.43 --- ewl_filedialog.c 6 Sep 2004 20:38:08 -0000 1.42 +++ ewl_filedialog.c 9 Dec 2004 05:26:09 -0000 1.43 @@ -50,6 +50,7 @@ ewl_box_init(EWL_BOX(fd), EWL_ORIENTATION_VERTICAL); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_ALL); ewl_widget_appearance_set(w, "filedialog"); + ewl_widget_inherit(w, "filedialog"); /* the file selector */ =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_fileselector.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -3 -r1.49 -r1.50 --- ewl_fileselector.c 4 Sep 2004 04:14:50 -0000 1.49 +++ ewl_fileselector.c 9 Dec 2004 05:26:09 -0000 1.50 @@ -73,6 +73,8 @@ EWL_FLAG_FILL_SHRINK | EWL_FLAG_FILL_HFILL); + ewl_widget_inherit(w, "fileselector"); + /* The entry for the current directory */ /* and some icons */ hbox = ewl_hbox_new(); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_floater.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -3 -r1.20 -r1.21 --- ewl_floater.c 23 Aug 2004 01:17:30 -0000 1.20 +++ ewl_floater.c 9 Dec 2004 05:26:09 -0000 1.21 @@ -51,6 +51,7 @@ ewl_box_init(EWL_BOX(w), EWL_ORIENTATION_VERTICAL); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NORMAL); ewl_widget_appearance_set(w, "floater"); + ewl_widget_inherit(w, "floater"); f->follows = parent; /* =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_grid.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- ewl_grid.c 23 Aug 2004 01:07:16 -0000 1.23 +++ ewl_grid.c 9 Dec 2004 05:26:09 -0000 1.24 @@ -46,6 +46,8 @@ if (!ewl_container_init(EWL_CONTAINER(g), "vbox")) DRETURN_INT(FALSE, DLEVEL_STABLE); + ewl_widget_inherit(EWL_WIDGET(g), "grid"); + ewl_container_show_notify_set(EWL_CONTAINER(g), ewl_grid_child_show_cb); ewl_container_resize_notify_set(EWL_CONTAINER(g), ewl_grid_child_resize_cb); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_image.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -3 -r1.52 -r1.53 --- ewl_image.c 20 Nov 2004 16:00:27 -0000 1.52 +++ ewl_image.c 9 Dec 2004 05:26:09 -0000 1.53 @@ -46,6 +46,7 @@ w = EWL_WIDGET(i); ewl_widget_init(w, "image"); + ewl_widget_inherit(w, "image"); /* * Append necessary callbacks. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_imenu.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_imenu.c 23 Aug 2004 18:51:52 -0000 1.25 +++ ewl_imenu.c 9 Dec 2004 05:26:09 -0000 1.26 @@ -40,6 +40,7 @@ * Initialize the defaults of the inherited fields. */ ewl_menu_base_init(EWL_MENU_BASE(menu), image, title); + ewl_widget_inherit(EWL_WIDGET(menu), "imenu"); ewl_callback_append(EWL_WIDGET(menu), EWL_CALLBACK_SELECT, ewl_imenu_expand_cb, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_media.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -3 -r1.13 -r1.14 --- ewl_media.c 23 Aug 2004 18:51:52 -0000 1.13 +++ ewl_media.c 9 Dec 2004 05:26:09 -0000 1.14 @@ -44,6 +44,7 @@ w = EWL_WIDGET(m); ewl_widget_init(EWL_WIDGET(w), "media"); + ewl_widget_inherit(EWL_WIDGET(w), "media"); ewl_callback_append(w, EWL_CALLBACK_REALIZE, ewl_media_realize_cb, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- ewl_menu.c 23 Aug 2004 18:51:52 -0000 1.24 +++ ewl_menu.c 9 Dec 2004 05:26:09 -0000 1.25 @@ -40,6 +40,7 @@ * Initialize the defaults of the inherited fields. */ ewl_menu_base_init(EWL_MENU_BASE(menu), image, title); + ewl_widget_inherit(EWL_WIDGET(menu), "menu"); ewl_callback_append(EWL_WIDGET(menu), EWL_CALLBACK_SELECT, ewl_menu_expand_cb, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menu_base.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -3 -r1.41 -r1.42 --- ewl_menu_base.c 30 Aug 2004 06:23:23 -0000 1.41 +++ ewl_menu_base.c 9 Dec 2004 05:26:09 -0000 1.42 @@ -24,6 +24,7 @@ */ ewl_menu_item_init(EWL_MENU_ITEM(menu), image, title); ewl_widget_appearance_set(EWL_WIDGET(menu), "menu_base"); + ewl_widget_inherit(EWL_WIDGET(menu), "menu_base"); ewl_callback_append(EWL_WIDGET(menu), EWL_CALLBACK_SELECT, ewl_menu_base_expand_cb, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_menubar.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -3 -r1.1 -r1.2 --- ewl_menubar.c 6 Sep 2004 22:24:41 -0000 1.1 +++ ewl_menubar.c 9 Dec 2004 05:26:09 -0000 1.2 @@ -64,6 +64,7 @@ ewl_widget_show(EWL_WIDGET(mb->inner_box)); ewl_widget_appearance_set(w, "menubar"); + ewl_widget_inherit(w, "menubar"); DRETURN_INT(TRUE, DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_notebook.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -3 -r1.54 -r1.55 --- ewl_notebook.c 9 Dec 2004 02:09:55 -0000 1.54 +++ ewl_notebook.c 9 Dec 2004 05:26:09 -0000 1.55 @@ -86,6 +86,7 @@ ewl_notebook_tabs_position_set(n, EWL_POSITION_TOP); ewl_notebook_tabs_alignment_set(n, EWL_FLAG_ALIGN_CENTER); ewl_widget_appearance_set(w, "notebook"); + ewl_widget_inherit(w, "notebook"); ewl_callback_append(EWL_WIDGET(n), EWL_CALLBACK_DESTROY, ewl_notebook_destroy_cb, NULL); @@ -592,7 +593,6 @@ ewl_notebook_destroy_cb(Ewl_Widget *w, void *ev_data, void *user_data) { Ewl_Notebook *n; - Ewl_Notebook_Page *p; n = EWL_NOTEBOOK(w); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_overlay.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -3 -r1.8 -r1.9 --- ewl_overlay.c 18 Aug 2004 03:15:20 -0000 1.8 +++ ewl_overlay.c 9 Dec 2004 05:26:09 -0000 1.9 @@ -40,6 +40,8 @@ if (!ewl_container_init(EWL_CONTAINER(w), "overlay")) DRETURN_INT(FALSE, DLEVEL_STABLE); + ewl_widget_inherit(EWL_WIDGET(w), "overlay"); + ewl_container_show_notify_set(EWL_CONTAINER(w), ewl_overlay_child_show_cb); ewl_container_resize_notify_set(EWL_CONTAINER(w), ewl_overlay_child_resize_cb); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_paned.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -3 -r1.5 -r1.6 --- ewl_paned.c 21 Sep 2004 22:43:40 -0000 1.5 +++ ewl_paned.c 9 Dec 2004 05:26:09 -0000 1.6 @@ -94,6 +94,7 @@ ewl_container_redirect_set(EWL_CONTAINER(p), EWL_CONTAINER(p->first)); ewl_widget_appearance_set(w, "paned"); + ewl_widget_inherit(w, "paned"); ewl_widget_appearance_set(EWL_WIDGET(p->first), "first"); ewl_widget_appearance_set(EWL_WIDGET(p->second), "second"); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_password.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -3 -r1.11 -r1.12 --- ewl_password.c 5 Oct 2004 23:34:52 -0000 1.11 +++ ewl_password.c 9 Dec 2004 05:26:09 -0000 1.12 @@ -38,6 +38,7 @@ w = EWL_WIDGET(e); ewl_entry_init(EWL_ENTRY(w), NULL); + ewl_widget_inherit(w, "password"); e->obscure = '*'; /* =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_progressbar.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- ewl_progressbar.c 1 Nov 2004 04:48:17 -0000 1.15 +++ ewl_progressbar.c 9 Dec 2004 05:26:09 -0000 1.16 @@ -38,6 +38,8 @@ if (!ewl_container_init(EWL_CONTAINER(w), "progressbar")) DRETURN(DLEVEL_STABLE); + ewl_widget_inherit(w, "progressbar"); + ewl_container_show_notify_set(EWL_CONTAINER(w), ewl_progressbar_child_show_cb); ewl_container_resize_notify_set(EWL_CONTAINER(w), =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_radiobutton.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -3 -r1.34 -r1.35 --- ewl_radiobutton.c 18 Aug 2004 04:41:59 -0000 1.34 +++ ewl_radiobutton.c 9 Dec 2004 05:26:09 -0000 1.35 @@ -76,6 +76,7 @@ ewl_checkbutton_init(cb, label); ewl_widget_appearance_set(w, "radiobutton"); + ewl_widget_inherit(w, "radiobutton"); ewl_widget_appearance_set(cb->check, "radio"); ewl_callback_append(w, EWL_CALLBACK_CLICKED, ewl_radiobutton_clicked_cb, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_row.c,v retrieving revision 1.33 retrieving revision 1.34 diff -u -3 -r1.33 -r1.34 --- ewl_row.c 5 Sep 2004 07:14:20 -0000 1.33 +++ ewl_row.c 9 Dec 2004 05:26:09 -0000 1.34 @@ -37,7 +37,8 @@ if (!ewl_container_init(EWL_CONTAINER(row), "row")) DRETURN_INT(FALSE, DLEVEL_STABLE); - + ewl_widget_inherit(EWL_WIDGET(row), "row"); + ewl_container_show_notify_set(EWL_CONTAINER(row), ewl_row_child_show_cb); ewl_container_resize_notify_set(EWL_CONTAINER(row), ewl_row_resize_cb); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollbar.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -3 -r1.37 -r1.38 --- ewl_scrollbar.c 29 Aug 2004 02:47:39 -0000 1.37 +++ ewl_scrollbar.c 9 Dec 2004 05:26:09 -0000 1.38 @@ -44,6 +44,7 @@ w = EWL_WIDGET(s); ewl_box_init(EWL_BOX(w), orientation); + ewl_widget_inherit(w, "scrollbar"); /* * Create the basic widgets that are contained in the scrollbar. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_scrollpane.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -3 -r1.47 -r1.48 --- ewl_scrollpane.c 29 Aug 2004 02:47:39 -0000 1.47 +++ ewl_scrollpane.c 9 Dec 2004 05:26:10 -0000 1.48 @@ -40,6 +40,7 @@ if (!ewl_container_init(EWL_CONTAINER(s), "scrollpane")) DRETURN_INT(FALSE, DLEVEL_STABLE); + ewl_widget_inherit(w, "scrollpane"); ewl_container_show_notify_set(EWL_CONTAINER(s), ewl_scrollpane_child_resize_cb); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_seeker.c,v retrieving revision 1.61 retrieving revision 1.62 diff -u -3 -r1.61 -r1.62 --- ewl_seeker.c 18 Aug 2004 04:13:38 -0000 1.61 +++ ewl_seeker.c 9 Dec 2004 05:26:10 -0000 1.62 @@ -59,6 +59,7 @@ EWL_FLAG_FILL_VFILL | EWL_FLAG_FILL_VSHRINK); } + ewl_widget_inherit(w, "seeker"); ewl_container_show_notify_set(EWL_CONTAINER(w), ewl_seeker_child_show_cb); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_selectionbar.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -3 -r1.24 -r1.25 --- ewl_selectionbar.c 23 Aug 2004 18:51:52 -0000 1.24 +++ ewl_selectionbar.c 9 Dec 2004 05:26:10 -0000 1.25 @@ -63,6 +63,7 @@ if (!ewl_container_init(EWL_CONTAINER(s->bar), "selectionbar")) DRETURN_INT(FALSE, DLEVEL_STABLE); + ewl_widget_init(w, "selectionbar"); ewl_object_fill_policy_set(EWL_OBJECT(s->bar), EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_HSHRINK); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_selectionbook.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- ewl_selectionbook.c 18 Aug 2004 03:52:37 -0000 1.17 +++ ewl_selectionbook.c 9 Dec 2004 05:26:10 -0000 1.18 @@ -46,6 +46,8 @@ * Initialize the inherited box fields */ ewl_box_init(EWL_BOX(w), EWL_ORIENTATION_VERTICAL); + ewl_widget_inherit(w, "selectionbook"); + ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_FILL); ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_separator.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -3 -r1.25 -r1.26 --- ewl_separator.c 12 Aug 2004 16:20:45 -0000 1.25 +++ ewl_separator.c 9 Dec 2004 05:26:10 -0000 1.26 @@ -45,6 +45,7 @@ ewl_widget_init(w, "vseparator"); ewl_object_fill_policy_set(EWL_OBJECT(s), EWL_FLAG_FILL_VFILL); } + ewl_widget_inherit(w, "separator"); ewl_object_alignment_set(EWL_OBJECT(s), EWL_FLAG_ALIGN_LEFT); @@ -52,3 +53,4 @@ DLEAVE_FUNCTION(DLEVEL_STABLE); } + =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spacer.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -3 -r1.4 -r1.5 --- ewl_spacer.c 12 Nov 2003 20:07:17 -0000 1.4 +++ ewl_spacer.c 9 Dec 2004 05:26:10 -0000 1.5 @@ -32,6 +32,7 @@ DENTER_FUNCTION(DLEVEL_STABLE); ewl_widget_init(EWL_WIDGET(s), "spacer"); + ewl_widget_inherit(EWL_WIDGET(s), "spacer"); DLEAVE_FUNCTION(DLEVEL_STABLE); } =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spectrum.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- ewl_spectrum.c 22 Aug 2004 05:17:38 -0000 1.10 +++ ewl_spectrum.c 9 Dec 2004 05:26:10 -0000 1.11 @@ -39,6 +39,8 @@ ewl_image_init(EWL_IMAGE(w), NULL, NULL); ewl_widget_appearance_set(w, "spectrum"); + ewl_widget_inherit(w, "spectrum"); + ewl_callback_append(w, EWL_CALLBACK_CONFIGURE, ewl_spectrum_configure_cb, NULL); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_spinner.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -3 -r1.62 -r1.63 --- ewl_spinner.c 5 Oct 2004 23:34:52 -0000 1.62 +++ ewl_spinner.c 9 Dec 2004 05:26:10 -0000 1.63 @@ -39,6 +39,7 @@ if (!ewl_container_init(EWL_CONTAINER(w), "spinner")) DRETURN_INT(FALSE, DLEVEL_STABLE); + ewl_widget_inherit(w, "spinner"); ewl_container_show_notify_set(EWL_CONTAINER(w), ewl_spinner_child_show_cb); ewl_container_resize_notify_set(EWL_CONTAINER(w), =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_statusbar.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- ewl_statusbar.c 11 Nov 2004 13:50:46 -0000 1.2 +++ ewl_statusbar.c 9 Dec 2004 05:26:10 -0000 1.3 @@ -57,6 +57,7 @@ EWL_FLAG_FILL_HFILL | EWL_FLAG_FILL_VSHRINK); ewl_widget_appearance_set(w, "statusbar"); + ewl_widget_inherit(w, "statusbar"); sb->left = ewl_hbox_new(); ewl_container_child_append(EWL_CONTAINER(sb), sb->left); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_table.c,v retrieving revision 1.49 retrieving revision 1.50 diff -u -3 -r1.49 -r1.50 --- ewl_table.c 23 Aug 2004 01:07:16 -0000 1.49 +++ ewl_table.c 9 Dec 2004 05:26:10 -0000 1.50 @@ -49,8 +49,10 @@ /* * Iniitialize the tables inherited fields */ - if (!ewl_container_init(EWL_CONTAINER(t), "table")) + if (!ewl_container_init(EWL_CONTAINER(t), "table")) { DRETURN_INT(FALSE, DLEVEL_STABLE); + } + ewl_widget_inherit(EWL_WIDGET(t), "table"); ewl_object_fill_policy_set(EWL_OBJECT(t), EWL_FLAG_FILL_FILL); /* =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_text.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -3 -r1.80 -r1.81 --- ewl_text.c 8 Oct 2004 23:40:27 -0000 1.80 +++ ewl_text.c 9 Dec 2004 05:26:10 -0000 1.81 @@ -47,6 +47,7 @@ ewl_entry_editable_set(EWL_ENTRY(ta), FALSE); ewl_widget_appearance_set(w, "text"); + ewl_widget_inherit(w, "text"); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); DLEAVE_FUNCTION(DLEVEL_STABLE); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tooltip.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- ewl_tooltip.c 26 Aug 2004 20:32:55 -0000 1.17 +++ ewl_tooltip.c 9 Dec 2004 05:26:10 -0000 1.18 @@ -40,6 +40,7 @@ ewl_box_init(EWL_BOX(w), EWL_ORIENTATION_VERTICAL); ewl_widget_appearance_set(EWL_WIDGET (w), "tooltip"); + ewl_widget_inherit(EWL_WIDGET(w), "tooltip"); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NONE); ewl_widget_layer_set(w, 2000); =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v retrieving revision 1.57 retrieving revision 1.58 diff -u -3 -r1.57 -r1.58 --- ewl_tree.c 17 Sep 2004 22:54:45 -0000 1.57 +++ ewl_tree.c 9 Dec 2004 05:26:10 -0000 1.58 @@ -50,6 +50,8 @@ DCHECK_PARAM_PTR_RET("columns", columns, FALSE); ewl_container_init(EWL_CONTAINER(tree), "tree"); + ewl_widget_inherit(EWL_WIDGET(tree), "tree"); + ewl_container_show_notify_set(EWL_CONTAINER(tree), (Ewl_Child_Show)ewl_tree_child_resize_cb); ewl_container_hide_notify_set(EWL_CONTAINER(tree), =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.c,v retrieving revision 1.126 retrieving revision 1.127 diff -u -3 -r1.126 -r1.127 --- ewl_widget.c 9 Dec 2004 03:04:21 -0000 1.126 +++ ewl_widget.c 9 Dec 2004 05:26:10 -0000 1.127 @@ -72,7 +72,7 @@ ewl_callback_append(w, EWL_CALLBACK_MOUSE_MOVE, ewl_widget_mouse_move_cb, NULL); - w->inheritance = strdup(":widget:"); + ewl_widget_inherit(w, "widget"); ewl_widget_appearance_set(w, appearance); DRETURN_INT(TRUE, DLEVEL_STABLE); @@ -388,8 +388,7 @@ */ void ewl_widget_appearance_set(Ewl_Widget * w, char *appearance) { - int il = 0, al; - char *current; + int al; DENTER_FUNCTION(DLEVEL_STABLE); DCHECK_PARAM_PTR("w", w); @@ -413,21 +412,6 @@ snprintf(w->appearance, al, "%s", appearance); /* - * We don't throw away any inheritance info, so we can just allocate - * the memory we need and place the new info on the end. - */ - if (w->inheritance) - il = strlen(w->inheritance); - - il += al + 2; - current = (char *)malloc(il); - if (current) { - snprintf(current, il, "%s:%s:", w->inheritance, appearance); - FREE(w->inheritance); - w->inheritance = current; - } - - /* * Recreate the visible components of the widget if necessary. */ if (REALIZED(w)) { @@ -771,6 +755,33 @@ } /** + * @param widget: the widget to set the inheritance on + * @param inherit: the string to append to the inheritance + * @return Returns no value. + * @brief Appends the given inheritance to this widgets inheritance string. + */ +void ewl_widget_inherit(Ewl_Widget *widget, char *inherit) +{ + char *tmp = NULL; + + DENTER_FUNCTION(DLEVEL_STABLE); + DCHECK_PARAM_PTR("widget", widget); + DCHECK_PARAM_PTR("inherit", inherit); + + if (widget->inheritance) + tmp = widget->inheritance; + else + tmp = strdup(""); + + widget->inheritance = malloc(sizeof(char) * + (strlen(inherit) + strlen(tmp) + 3)); + sprintf(widget->inheritance, "%s:%s:", tmp, inherit); + FREE(tmp); + + DLEAVE_FUNCTION(DLEVEL_STABLE); +} + +/** * @param widget: the widget to determine if a type is inherited * @param type: the type to check for inheritance in the widget * @return Returns TRUE if @a w inherited the type @a t, otherwise FALSE. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_widget.h,v retrieving revision 1.45 retrieving revision 1.46 diff -u -3 -r1.45 -r1.46 --- ewl_widget.h 13 Aug 2004 00:41:14 -0000 1.45 +++ ewl_widget.h 9 Dec 2004 05:26:11 -0000 1.46 @@ -123,6 +123,12 @@ * Retrieve the appearance string of a widget. */ char *ewl_widget_appearance_get(Ewl_Widget * w); + +/* + * Append to the inherited string + */ +void ewl_widget_inherit(Ewl_Widget *widget, char *type); + unsigned int ewl_widget_type_is(Ewl_Widget *widget, char *type); /* =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_window.c,v retrieving revision 1.92 retrieving revision 1.93 diff -u -3 -r1.92 -r1.93 --- ewl_window.c 24 Aug 2004 16:02:04 -0000 1.92 +++ ewl_window.c 9 Dec 2004 05:26:11 -0000 1.93 @@ -348,6 +348,7 @@ */ ewl_embed_init(EWL_EMBED(w)); ewl_widget_appearance_set(EWL_WIDGET(w), "window"); + ewl_widget_inherit(EWL_WIDGET(w), "window"); ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_FILL); w->title = strdup("EWL"); w->name = strdup("EWL"); ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs