Mercurial > hg > octave-lyh
changeset 15343:b565850bdce7
don't display hidden variables in workspace view
* symbol-information.h (symbol_information::Scope): Delete hidden.
New field, unknown. Change all uses.
* workspace-model.cc (workspace_model::workspace_model): Don't add
"Hidden" tree_item to the top-level item list.
(workspace_model::event_accepted): Don't delete 3rd item from
top_level_item list. Don't add hidden items to the list.
* workspace-view.h, workspace-view.cc
(workspace_view::_explicit_collapse): Delete hidden.
Change all uses.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 10 Sep 2012 15:56:17 -0400 |
parents | 67fabb3d81f4 |
children | cd499f25f7be |
files | libgui/src/symbol-information.cc libgui/src/symbol-information.h libgui/src/workspace-model.cc libgui/src/workspace-view.cc libgui/src/workspace-view.h |
diffstat | 5 files changed, 6 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/symbol-information.cc +++ b/libgui/src/symbol-information.cc @@ -41,8 +41,8 @@ _scope = global; else if (symbol_record.is_persistent ()) _scope = persistent; - else if (symbol_record.is_hidden ()) - _scope = hidden; + else + _scope = unknown; _symbol = QString (symbol_record.name ().c_str ()); _class = QString (symbol_record.varval ().class_name ().c_str ());
--- a/libgui/src/symbol-information.h +++ b/libgui/src/symbol-information.h @@ -49,10 +49,10 @@ { enum Scope { - local = 0, - global = 1, - persistent = 2, - hidden = 3 + unknown = 0, + local = 1, + global = 2, + persistent = 3 }; QString _symbol;
--- a/libgui/src/workspace-model.cc +++ b/libgui/src/workspace-model.cc @@ -44,7 +44,6 @@ insert_top_level_item(0, new tree_item ("Local")); insert_top_level_item(1, new tree_item ("Global")); insert_top_level_item(2, new tree_item ("Persistent")); - insert_top_level_item(3, new tree_item ("Hidden")); connect(&_update_workspace_model_timer, SIGNAL (timeout ()), @@ -88,7 +87,6 @@ top_level_item (0)->delete_child_items (); top_level_item (1)->delete_child_items (); top_level_item (2)->delete_child_items (); - top_level_item (3)->delete_child_items (); foreach (const symbol_information& s, _symbol_information) { @@ -104,7 +102,6 @@ case symbol_information::local: top_level_item (0)->add_child (child); break; case symbol_information::global: top_level_item (1)->add_child (child); break; case symbol_information::persistent: top_level_item (2)->add_child (child); break; - case symbol_information::hidden: top_level_item (3)->add_child (child); break; } }
--- a/libgui/src/workspace-view.cc +++ b/libgui/src/workspace-view.cc @@ -67,7 +67,6 @@ _explicit_collapse.local = settings->value ("workspaceview/local_collapsed", false).toBool (); _explicit_collapse.global = settings->value ("workspaceview/global_collapsed", false).toBool ();; _explicit_collapse.persistent = settings->value ("workspaceview/persistent_collapsed", false).toBool ();; - _explicit_collapse.hidden = settings->value ("workspaceview/hidden_collapsed", false).toBool ();; // Connect signals and slots. connect (this, SIGNAL (visibilityChanged (bool)), @@ -95,7 +94,6 @@ settings->setValue("workspaceview/local_collapsed", _explicit_collapse.local); settings->setValue("workspaceview/global_collapsed", _explicit_collapse.global); settings->setValue("workspaceview/persistent_collapsed", _explicit_collapse.persistent); - settings->setValue("workspaceview/hidden_collapsed", _explicit_collapse.hidden); } void @@ -125,7 +123,6 @@ QModelIndex local_model_index = _workspace_model->index (0, 0); QModelIndex global_model_index = _workspace_model->index (1, 0); QModelIndex persistent_model_index = _workspace_model->index (2, 0); - QModelIndex hidden_model_index = _workspace_model->index (3, 0); if (_explicit_collapse.local) { _workspace_tree_view->collapse (local_model_index); @@ -144,12 +141,6 @@ } else { _workspace_tree_view->expand (persistent_model_index); } - - if (_explicit_collapse.hidden) { - _workspace_tree_view->collapse (hidden_model_index); - } else { - _workspace_tree_view->expand (hidden_model_index); - } } void @@ -177,8 +168,6 @@ _explicit_collapse.global = true; if (item_data[0] == "Persistent") _explicit_collapse.persistent = true; - if (item_data[0] == "Hidden") - _explicit_collapse.hidden = true; } void @@ -206,8 +195,6 @@ _explicit_collapse.global = false; if (item_data[0] == "Persistent") _explicit_collapse.persistent = false; - if (item_data[0] == "Hidden") - _explicit_collapse.hidden = false; } void