[yast-commit] r51814 - in /trunk/gtk/src: YGSelectionModel.cc YGTable.cc
Author: rpmcruz Date: Thu Oct 2 22:53:31 2008 New Revision: 51814 URL: http://svn.opensuse.org/viewcvs/yast?rev=51814&view=rev Log: Ups, not quite functional... Modified: trunk/gtk/src/YGSelectionModel.cc trunk/gtk/src/YGTable.cc Modified: trunk/gtk/src/YGSelectionModel.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGSelectionModel.cc?rev=51814&r1=51813&r2=51814&view=diff ============================================================================== --- trunk/gtk/src/YGSelectionModel.cc (original) +++ trunk/gtk/src/YGSelectionModel.cc Thu Oct 2 22:53:31 2008 @@ -191,22 +191,23 @@ if (gtk_tree_model_iter_children (model, &iter, parent)) { do { depth = MAX (depth, getChildrenDepth (model, &iter, rows)); - *rows++; + (*rows)++; } while (gtk_tree_model_iter_next (model, &iter)); + return depth+1; } - return depth+1; + return 0; } int YGSelectionModel::getMaxDepth (int *rows) { if (!isTree) return 0; GtkTreeModel *model = getModel(); - int depth = 0; + int depth = 0; *rows = 0; GtkTreeIter iter; if (gtk_tree_model_get_iter_first (model, &iter)) { do { depth = MAX (depth, getChildrenDepth (model, &iter, rows)); - *rows++; + (*rows)++; } while (gtk_tree_model_iter_next (model, &iter)); } return depth; Modified: trunk/gtk/src/YGTable.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/gtk/src/YGTable.cc?rev=51814&r1=51813&r2=51814&view=diff ============================================================================== --- trunk/gtk/src/YGTable.cc (original) +++ trunk/gtk/src/YGTable.cc Thu Oct 2 22:53:31 2008 @@ -450,8 +450,8 @@ doAddItem (*it); int depth, rows; depth = getMaxDepth (&rows); - gtk_tree_view_set_show_expanders (getView(), depth > 1); - gtk_tree_view_set_enable_tree_lines (getView(), depth > 4 && rows > 100); + gtk_tree_view_set_show_expanders (getView(), depth > 0); + gtk_tree_view_set_enable_tree_lines (getView(), depth > 3 && rows > 100); } virtual const YTreeItem *getCurrentItem() const -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
rpmcruz@svn.opensuse.org