Enlightenment CVS committal Author : moom Project : e17 Module : proto
Dir : e17/proto/etk/src/lib Modified Files: etk_label.c etk_notebook.c etk_notebook.h Log Message: * [Label] Fix a bug of clipping * [Notebook] Revert the changes made by lok since they ware causing errors with valgrind (uninitialized vars). I will add them back soon, I just don't have time to investigate now =================================================================== RCS file: /cvs/e/e17/proto/etk/src/lib/etk_label.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -3 -r1.17 -r1.18 --- etk_label.c 4 Aug 2006 18:46:26 -0000 1.17 +++ etk_label.c 8 Aug 2006 02:55:30 -0000 1.18 @@ -354,7 +354,9 @@ /* Called when the label is unrealized */ static void _etk_label_unrealize_cb(Etk_Object *object, void *data) { - if (!object) + Etk_Label *label; + + if (!(label = ETK_LABEL(object))) return; _etk_label_style_use--; @@ -363,6 +365,7 @@ evas_textblock_style_free(_etk_label_style); _etk_label_style = NULL; } + label->clip = NULL; } /** @} */ =================================================================== RCS file: /cvs/e/e17/proto/etk/src/lib/etk_notebook.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -3 -r1.23 -r1.24 --- etk_notebook.c 1 Aug 2006 05:40:57 -0000 1.23 +++ etk_notebook.c 8 Aug 2006 02:55:30 -0000 1.24 @@ -27,7 +27,6 @@ static void _etk_notebook_child_add(Etk_Container *container, Etk_Widget *widget); static void _etk_notebook_child_remove(Etk_Container *container, Etk_Widget *widget); static Evas_List *_etk_notebook_children_get(Etk_Container *container); -static void _etk_notebook_show_frame_borders_set(Etk_Notebook_Page *page, Etk_Bool tab_bar_visible); static void _etk_notebook_tab_toggled_cb(Etk_Object *object, void *data); static void _etk_notebook_tab_bar_focused_cb(Etk_Object *object, void *data); @@ -380,47 +379,6 @@ return etk_bin_child_get(ETK_BIN(page->frame)); } -/** - * @brief Sets the visibility of the tab bar - * @param notebook a notebook - * @param show_tabs if show_tabs is ETK_FALSE, then the tab bar will be hidden - */ -void etk_notebook_show_tabs_set(Etk_Notebook *notebook, Etk_Bool show_tabs) -{ - Evas_List *page = NULL; - - if (notebook == NULL) - return; - - notebook->tab_bar_visible = show_tabs; - if (notebook->tab_bar) - { - show_tabs ? etk_widget_show(notebook->tab_bar) : etk_widget_hide(notebook->tab_bar); - } - if (notebook->pages) - { - page = notebook->pages; - while (page) - { - if (page->data) - { - _etk_notebook_show_frame_borders_set(page->data, show_tabs); - } - page = evas_list_next(page); - } - } -} - -/** - * @brief Gets the visibility of the tab bar - * @param notebook a notebook - * @return Returns ETK_TRUE if the tab bar is visible, ETK_FALSE otherwise - */ -Etk_Bool etk_notebook_show_tabs_get(Etk_Notebook *notebook) -{ - return notebook->tab_bar_visible; -} - /************************** * * Etk specific functions @@ -436,7 +394,6 @@ notebook->pages = NULL; notebook->current_page = NULL; notebook->tab_bar_focused = ETK_FALSE; - notebook->tab_bar_focused = ETK_TRUE; _etk_notebook_tab_bar_create(notebook); @@ -617,19 +574,6 @@ return children; } -/* Set the frame borders visible if tab_bar_visible is true */ -static void _etk_notebook_show_frame_borders_set(Etk_Notebook_Page *page, Etk_Bool tab_bar_visible) -{ - if (tab_bar_visible == ETK_TRUE) - { - etk_widget_theme_group_set(page->frame, "frame"); - } - else - { - etk_widget_theme_group_set(page->frame, NULL); - } -} - /************************** * * Callbacks and handlers @@ -767,10 +711,7 @@ etk_widget_show(new_page->tab); etk_signal_connect("toggled", ETK_OBJECT(new_page->tab), ETK_CALLBACK(_etk_notebook_tab_toggled_cb), notebook); - if (notebook->tab_bar_visible) - new_page->frame = etk_widget_new(ETK_BIN_TYPE, "theme_group", "frame", NULL); - else - new_page->frame = etk_widget_new(ETK_BIN_TYPE, "theme_group", NULL, NULL); + new_page->frame = etk_widget_new(ETK_BIN_TYPE, "theme_group", "frame", NULL); etk_widget_parent_set(new_page->frame, ETK_WIDGET(notebook)); etk_widget_visibility_locked_set(new_page->frame, ETK_TRUE); etk_widget_hide(new_page->frame); @@ -781,7 +722,6 @@ _etk_notebook_page_switch(notebook, new_page); etk_widget_size_recalc_queue(ETK_WIDGET(notebook)); - return new_page; } =================================================================== RCS file: /cvs/e/e17/proto/etk/src/lib/etk_notebook.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -3 -r1.15 -r1.16 --- etk_notebook.h 1 Aug 2006 05:40:57 -0000 1.15 +++ etk_notebook.h 8 Aug 2006 02:55:30 -0000 1.16 @@ -45,7 +45,6 @@ Etk_Widget *tab_bar; Etk_Bool tab_bar_focused; - Etk_Bool tab_bar_visible; Evas_List *pages; Etk_Notebook_Page *current_page; @@ -75,8 +74,6 @@ void etk_notebook_page_child_set(Etk_Notebook *notebook, int page_num, Etk_Widget *child); Etk_Widget *etk_notebook_page_child_get(Etk_Notebook *notebook, int page_num); -void etk_notebook_show_tabs_set(Etk_Notebook *notebook, Etk_Bool show_tabs); -Etk_Bool etk_notebook_show_tabs_get(Etk_Notebook *notebook); /** @} */ #endif ------------------------------------------------------------------------- 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