Enlightenment CVS committal

Author  : pfritz
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_filelist.c ewl_tree.c ewl_tree.h 


Log Message:
add
- ewl_tree_column_fixed_size_set/get()
- ewl_tree_column_initial_size_set/get()
- a very dirty hack to let the icon filelist work again

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_filelist.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -3 -r1.55 -r1.56
--- ewl_filelist.c      20 Apr 2008 15:27:31 -0000      1.55
+++ ewl_filelist.c      21 Apr 2008 23:22:23 -0000      1.56
@@ -194,6 +194,9 @@
        else
        {
                ewl_tree_column_count_set(EWL_TREE(fl->controller), 1);
+               /* XXX dirty hack, please remove it after we have a
+                * freebox mvc implementation */
+               
ewl_container_reset(EWL_CONTAINER(EWL_TREE(fl->controller)->header));
                ewl_tree_headers_visible_set(EWL_TREE(fl->controller),
                                                                FALSE);
                ewl_tree_alternate_row_colors_set
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_tree.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- ewl_tree.c  21 Apr 2008 22:41:38 -0000      1.67
+++ ewl_tree.c  21 Apr 2008 23:22:23 -0000      1.68
@@ -243,6 +243,118 @@
 
 /**
  * @param tree: The tree to work with
+ * @param col: The number of the column to change the fixed size flag
+ * @return Returns no value
+ * @brief Set the fixed size flag of the give column
+ */
+void
+ewl_tree_column_fixed_size_set(Ewl_Tree *tree, unsigned int col, unsigned int 
fixed)
+{
+       Ewl_Widget *box;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR(tree);
+       DCHECK_TYPE(tree, EWL_TREE_TYPE);
+
+       if (col >= tree->columns)
+       {
+               DWARNING("parameter col is out of bounds (%i >= %i)",
+                               col, tree->columns);
+               DRETURN(DLEVEL_STABLE);
+       }
+
+       box = ewl_container_child_get(EWL_CONTAINER(tree->header), col);        
+       ewl_paned_fixed_size_set(EWL_PANED(tree->header), box, fixed);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param tree: The tree to work with
+ * @param col: the column to get the fixed size flag
+ * @return Retrieve fixed size flag of the given column
+ */
+unsigned int
+ewl_tree_column_fixed_size_get(Ewl_Tree *tree, unsigned int col)
+{
+       unsigned int ret = 0;
+       Ewl_Widget *box;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET(tree, 0);
+       DCHECK_TYPE_RET(tree, EWL_TREE_TYPE, 0);
+
+       if (col >= tree->columns)
+       {
+               DWARNING("parameter col is out of bounds (%i >= %i)",
+                               col, tree->columns);
+               DRETURN_INT(ret, DLEVEL_STABLE);
+       }
+
+       box = ewl_container_child_get(EWL_CONTAINER(tree->header), col);        
+       ret = ewl_paned_fixed_size_get(EWL_PANED(tree->header), box);
+
+       DRETURN_INT(ret, DLEVEL_STABLE);
+}
+
+/**
+ * @param tree: The tree to work with
+ * @param col: The number of the column to change the initial size
+ * @return Returns no value
+ * @brief Set the initial size of the give column
+ */
+void
+ewl_tree_column_initial_size_set(Ewl_Tree *tree, unsigned int col, int size)
+{
+       Ewl_Widget *box;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR(tree);
+       DCHECK_TYPE(tree, EWL_TREE_TYPE);
+
+       if (col >= tree->columns)
+       {
+               DWARNING("parameter col is out of bounds (%i >= %i)",
+                               col, tree->columns);
+               DRETURN(DLEVEL_STABLE);
+       }
+
+       box = ewl_container_child_get(EWL_CONTAINER(tree->header), col);        
+       ewl_paned_initial_size_set(EWL_PANED(tree->header), box, size);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @param tree: The tree to work with
+ * @param col: the column to get the initial size
+ * @return Retrieve initial size of the given column
+ */
+int
+ewl_tree_column_initial_size_get(Ewl_Tree *tree, unsigned int col)
+{
+       int ret = 0;
+       Ewl_Widget *box;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR_RET(tree, 0);
+       DCHECK_TYPE_RET(tree, EWL_TREE_TYPE, 0);
+
+       if (col >= tree->columns)
+       {
+               DWARNING("parameter col is out of bounds (%i >= %i)",
+                               col, tree->columns);
+               DRETURN_INT(ret, DLEVEL_STABLE);
+       }
+
+       box = ewl_container_child_get(EWL_CONTAINER(tree->header), col);        
+       ret = ewl_paned_initial_size_get(EWL_PANED(tree->header), box);
+
+       DRETURN_INT(ret, DLEVEL_STABLE);
+}
+
+/**
+ * @param tree: The tree to work with
  * @return Returns the number of columns in the tree
  * @brief Retrives the number of columns in the tree
  */
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_tree.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- ewl_tree.h  21 Apr 2008 22:49:24 -0000      1.37
+++ ewl_tree.h  21 Apr 2008 23:22:23 -0000      1.38
@@ -130,6 +130,14 @@
 void            ewl_tree_column_count_set(Ewl_Tree *tree,
                                                unsigned int count);
 unsigned int    ewl_tree_column_count_get(Ewl_Tree *tree);
+void            ewl_tree_column_fixed_size_set(Ewl_Tree *tree, 
+                                       unsigned int col, unsigned int fixed);
+unsigned int    ewl_tree_column_fixed_size_get(Ewl_Tree *tree, 
+                                       unsigned int col);
+void            ewl_tree_column_initial_size_set(Ewl_Tree *tree, 
+                                       unsigned int col, int size);
+int             ewl_tree_column_initial_size_get(Ewl_Tree *tree, 
+                                       unsigned int col);
 
 void            ewl_tree_headers_visible_set(Ewl_Tree *tree,
                                               unsigned char visible);



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to