Enlightenment CVS committal

Author  : andrunko
Project : e17
Module  : libs/etk

Dir     : e17/libs/etk/src/lib


Modified Files:
        etk_combobox.c etk_tree.c etk_textblock.h 


Log Message:
Make combobox respect item_height set from theme if none is set from code.
Make tree respect row_height set from theme if none is set from code.
Fixed documentation in textblock.

===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_combobox.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -3 -r1.49 -r1.50
--- etk_combobox.c      15 Aug 2007 00:12:38 -0000      1.49
+++ etk_combobox.c      15 Aug 2007 22:54:11 -0000      1.50
@@ -964,7 +964,7 @@
    combobox->active_item = NULL;
    combobox->active_item_widget = NULL;
    combobox->active_item_children = NULL;
-   combobox->items_height = DEFAULT_ITEM_HEIGHT;
+   combobox->items_height = -1;
    combobox->built = ETK_FALSE;
    
    ETK_WIDGET(combobox)->size_request = _etk_combobox_size_request;
@@ -1252,6 +1252,8 @@
       combobox->popup_offset_y = 0;
    if (etk_widget_theme_data_get(ETK_WIDGET(combobox), "popup_extra_width", 
"%d", &combobox->popup_extra_w) != 1)
       combobox->popup_extra_w = 0;
+   if (combobox->items_height == -1 && 
etk_widget_theme_data_get(ETK_WIDGET(combobox), "item_height", "%d", 
&combobox->items_height) != 1)
+      combobox->items_height = DEFAULT_ITEM_HEIGHT;
 }
 
 /* Called when a child-label of the combobox's button is realized */
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_tree.c,v
retrieving revision 1.101
retrieving revision 1.102
diff -u -3 -r1.101 -r1.102
--- etk_tree.c  4 Aug 2007 14:13:35 -0000       1.101
+++ etk_tree.c  15 Aug 2007 22:54:11 -0000      1.102
@@ -1881,7 +1881,7 @@
    tree->purge_pool = NULL;
    tree->row_objects = NULL;
    
-   tree->rows_height = DEFAULT_ROW_HEIGHT;
+   tree->rows_height = -1;
    tree->scroll_x = 0;
    tree->scroll_y = 0;
    
@@ -2774,6 +2774,19 @@
    {
       evas_color_argb_premul(tree->separator_color.a, &tree->separator_color.r,
             &tree->separator_color.g, &tree->separator_color.b);
+   }
+   /* if rows_height is not set */
+   if (tree->rows_height == -1)
+   {
+      /* try to get the value from theme or fallback to default value */
+      if (etk_widget_theme_data_get(ETK_WIDGET(tree), "row_height", "%d", 
&tree->rows_height) != 1)
+         tree->rows_height = DEFAULT_ROW_HEIGHT;
+      else
+      {
+         Etk_Range *vscrollbar;
+         vscrollbar = 
etk_scrolled_view_vscrollbar_get(ETK_SCROLLED_VIEW(tree->scrolled_view));
+         etk_range_increments_set(vscrollbar, tree->rows_height, 5 * 
tree->rows_height);
+      }
    }
    
    /* Reparent the column headers if the "tree-contains-headers" setting has 
changed */
===================================================================
RCS file: /cvs/e/e17/libs/etk/src/lib/etk_textblock.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -3 -r1.19 -r1.20
--- etk_textblock.h     27 Jul 2007 16:24:14 -0000      1.19
+++ etk_textblock.h     15 Aug 2007 22:54:11 -0000      1.20
@@ -34,7 +34,7 @@
    ETK_TEXTBLOCK_NODE_ROOT,        /**< The node is the root node */
    ETK_TEXTBLOCK_NODE_PARAGRAPH,   /**< The node is a paragraph node */
    ETK_TEXTBLOCK_NODE_LINE,        /**< The node is a line node */
-   ETK_TEXTBLOCK_NODE_NORMAL       /**< The node is a normal normal 
(containing some text or a format) */
+   ETK_TEXTBLOCK_NODE_NORMAL       /**< The node is a normal node (containing 
some text or a format) */
 } Etk_Textblock_Node_Type;
 
 /** @brief The different types of tag for a node */



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to