[PATCH 3/5] Add VarInspectorDialog::inspector getter



It turned out to be useful to be able to get the inspector used by the
VarInspectorDialog.

Tested and applying to master.

	* src/persp/dbgperspective/nmv-var-inspector-dialog.h
	(VarInspectorDialog::inspector): Declare new getter.
	* src/persp/dbgperspective/nmv-var-inspector-dialog.cc
	(VarInspectorDialog::inspector): New getter
---
 .../dbgperspective/nmv-var-inspector-dialog.cc     |    8 ++++++++
 .../dbgperspective/nmv-var-inspector-dialog.h      |    2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/persp/dbgperspective/nmv-var-inspector-dialog.cc b/src/persp/dbgperspective/nmv-var-inspector-dialog.cc
index 6b5856d..fd870aa 100644
--- a/src/persp/dbgperspective/nmv-var-inspector-dialog.cc
+++ b/src/persp/dbgperspective/nmv-var-inspector-dialog.cc
@@ -413,6 +413,14 @@ VarInspectorDialog::variable () const
     return m_priv->var_inspector->get_variable ();
 }
 
+/// Return the variable inspector used by this dialog
+VarInspector& 
+VarInspectorDialog::inspector () const
+{
+    THROW_IF_FAIL (m_priv);
+    return *m_priv->var_inspector;
+}
+
 /// Set the history of variable expression to a new one.
 ///
 /// \param a_hist the new history.
diff --git a/src/persp/dbgperspective/nmv-var-inspector-dialog.h b/src/persp/dbgperspective/nmv-var-inspector-dialog.h
index 6f59adc..ce4998b 100644
--- a/src/persp/dbgperspective/nmv-var-inspector-dialog.h
+++ b/src/persp/dbgperspective/nmv-var-inspector-dialog.h
@@ -28,6 +28,7 @@
 #include "nmv-dialog.h"
 #include "nmv-i-perspective.h"
 #include "nmv-i-debugger.h"
+#include "nmv-var-inspector.h"
 
 NEMIVER_BEGIN_NAMESPACE (nemiver)
 
@@ -54,6 +55,7 @@ public:
 			   const sigc::slot<void, 
 			                    const IDebugger::VariableSafePtr> &);
     const IDebugger::VariableSafePtr variable () const;
+    VarInspector& inspector () const;
     void set_history (const std::list<UString> &);
     void get_history (std::list<UString> &) const;
 };//end class VarInspectorDialog
-- 
1.7.6.5


-- 
		Dodji


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]