[nemiver/varobjs-support] Factorize the support for updating unfolded variables
- From: Dodji Seketeli <dodji src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemiver/varobjs-support] Factorize the support for updating unfolded variables
- Date: Sun, 12 Apr 2009 16:51:31 -0400 (EDT)
commit ee95365773fc7f437262049c6b70bfc61c54243e
Author: Dodji Seketeli <dodji redhat com>
Date: Sun Apr 12 22:18:45 2009 +0200
Factorize the support for updating unfolded variables
* src/persp/dbgperspective/nmv-variables-utils.[h|cc]:
(update_unfolded_variable): New function.
This function can update the graphical node of a variable that got
recently unfolded i.e., that recently gained member variables.
---
src/persp/dbgperspective/nmv-variables-utils.cc | 33 +++++++++++++++++++++++
src/persp/dbgperspective/nmv-variables-utils.h | 5 +++
2 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/src/persp/dbgperspective/nmv-variables-utils.cc b/src/persp/dbgperspective/nmv-variables-utils.cc
index 457b7a4..40e45a4 100644
--- a/src/persp/dbgperspective/nmv-variables-utils.cc
+++ b/src/persp/dbgperspective/nmv-variables-utils.cc
@@ -156,6 +156,39 @@ update_a_variable_node (const IDebugger::VariableSafePtr a_var,
set_a_variable_node_type (a_iter, a_var->type ());
}
+
+/// Update a graphical variable to make it show the new graphical children
+/// nodes representing the new children of a variable.
+/// \a_var the variable that got unfolded
+/// \a_tree_view the tree view in which a_var is represented
+/// \a_tree_store the tree store in which a_var is represented
+/// \a_var_it the graphical node of the variable that got unfolded.
+/// So what happened is that a_var got unfolded.
+/// a_var is bound to the graphical node pointed to by a_var_it.
+/// This function then updates a_var_it to make it show new graphical
+/// nodes representing the new children of a_variable.
+void
+update_unfolded_variable (const IDebugger::VariableSafePtr a_var,
+ const Gtk::TreeView &a_tree_view,
+ const Glib::RefPtr<Gtk::TreeStore> &a_tree_store,
+ Gtk::TreeModel::iterator a_var_it)
+{
+ LOG_FUNCTION_SCOPE_NORMAL_DD;
+
+ Gtk::TreeModel::iterator result_var_row_it;
+ IDebugger::VariableList::const_iterator var_it;
+ IDebugger::VariableList::const_iterator member_it;
+ for (member_it = a_var->members ().begin ();
+ member_it != a_var->members ().end ();
+ ++member_it) {
+ append_a_variable (*member_it,
+ a_tree_view,
+ a_tree_store,
+ a_var_it,
+ result_var_row_it);
+ }
+}
+
bool
find_a_variable (const IDebugger::VariableSafePtr a_var,
const Gtk::TreeModel::iterator &a_parent_row_it,
diff --git a/src/persp/dbgperspective/nmv-variables-utils.h b/src/persp/dbgperspective/nmv-variables-utils.h
index be3d2e1..20559d0 100644
--- a/src/persp/dbgperspective/nmv-variables-utils.h
+++ b/src/persp/dbgperspective/nmv-variables-utils.h
@@ -83,6 +83,11 @@ void update_a_variable_node (const IDebugger::VariableSafePtr a_var,
bool a_handle_highlight,
bool a_is_new_frame);
+void update_unfolded_variable (const IDebugger::VariableSafePtr a_var,
+ const Gtk::TreeView &a_tree_view,
+ const Glib::RefPtr<Gtk::TreeStore> &a_tree_store,
+ Gtk::TreeModel::iterator a_var_it);
+
bool find_a_variable (const IDebugger::VariableSafePtr a_var,
const Gtk::TreeModel::iterator &a_parent_row_it,
Gtk::TreeModel::iterator &a_out_row_it);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]