[Pkg-e-commits] [SCM] Enlightenment DR17 toolkit based (based on the EFL) branch, upstream-vcs, updated. 447de88121d145a078f1754a0cfebb704d363821
pfritz
pfritz at alioth.debian.org
Sat Jun 7 18:34:14 UTC 2008
The following commit has been merged in the upstream-vcs branch:
commit 6ee38f79cd209a73d6c83925fce3ee19b9650f68
Author: pfritz <pfritz>
Date: Mon Apr 21 23:22:23 2008 +0000
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
diff --git a/src/lib/ewl_filelist.c b/src/lib/ewl_filelist.c
index 0361eed..552be93 100644
--- a/src/lib/ewl_filelist.c
+++ b/src/lib/ewl_filelist.c
@@ -194,6 +194,9 @@ ewl_filelist_view_setup(Ewl_Filelist *fl)
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
diff --git a/src/lib/ewl_tree.c b/src/lib/ewl_tree.c
index e69a915..9ae583a 100644
--- a/src/lib/ewl_tree.c
+++ b/src/lib/ewl_tree.c
@@ -243,6 +243,118 @@ ewl_tree_column_count_set(Ewl_Tree *tree, unsigned int count)
/**
* @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
*/
diff --git a/src/lib/ewl_tree.h b/src/lib/ewl_tree.h
index fdaec7b..c16a98b 100644
--- a/src/lib/ewl_tree.h
+++ b/src/lib/ewl_tree.h
@@ -130,6 +130,14 @@ int ewl_tree_init(Ewl_Tree *tree);
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);
--
Enlightenment DR17 toolkit based (based on the EFL)
More information about the Pkg-e-commits
mailing list