nemiver r974 - in trunk: . src/persp/dbgperspective src/uicommon



Author: dodji
Date: Sat Jan 31 22:54:00 2009
New Revision: 974
URL: http://svn.gnome.org/viewvc/nemiver?rev=974&view=rev

Log:
Fix 570029 â Print a message on the terminal when the user calls a function

2009-01-31  Dodji Seketeli  <dodji redhat com>

	* src/uicommon/nmv-terminal.[cc|h] (Terminal::feed): New entry point.
	* src/persp/dbgperspective/nmv-dbg-perspective.cc:
	(DBGPerspective::call_function): Add a message to the terminal
	about the function we are calling.

Modified:
   trunk/ChangeLog
   trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
   trunk/src/uicommon/nmv-terminal.cc
   trunk/src/uicommon/nmv-terminal.h

Modified: trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc
==============================================================================
--- trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc	(original)
+++ trunk/src/persp/dbgperspective/nmv-dbg-perspective.cc	Sat Jan 31 22:54:00 2009
@@ -28,6 +28,7 @@
 #include "config.h"
 #include <algorithm>
 #include <iostream>
+#include <sstream>
 #include <glib/gi18n.h>
 
 #ifdef WITH_GIO
@@ -5835,7 +5836,18 @@
 {
     THROW_IF_FAIL (debugger ());
 
-    debugger ()->call_function (a_call_expr);
+    if (!a_call_expr.empty ()) {
+        // Print a little message on the terminal
+        // saying that we are calling a_call_expr
+        std::stringstream s;
+        s << "\n<Nemiver call_function>"
+            << a_call_expr
+            << "</Nemiver>\n";
+        get_terminal ().feed (s.str ());
+
+        // Really hit the debugger now.
+        debugger ()->call_function (a_call_expr);
+    }
 }
 
 

Modified: trunk/src/uicommon/nmv-terminal.cc
==============================================================================
--- trunk/src/uicommon/nmv-terminal.cc	(original)
+++ trunk/src/uicommon/nmv-terminal.cc	Sat Jan 31 22:54:00 2009
@@ -175,5 +175,14 @@
     vte_terminal_set_font (m_priv->vte, font_desc.gobj());
 }
 
+void
+Terminal::feed (const UString &a_text)
+{
+    THROW_IF_FAIL (m_priv);
+    if (!a_text.empty ())
+        vte_terminal_feed (m_priv->vte, a_text.c_str (), a_text.size ());
+}
+
+
 NEMIVER_END_NAMESPACE(nemiver)
 

Modified: trunk/src/uicommon/nmv-terminal.h
==============================================================================
--- trunk/src/uicommon/nmv-terminal.h	(original)
+++ trunk/src/uicommon/nmv-terminal.h	Sat Jan 31 22:54:00 2009
@@ -62,6 +62,7 @@
     Gtk::Adjustment& adjustment () const ;
     UString slave_pts_name () const ;
     void modify_font (const Pango::FontDescription &font_desc) ;
+    void feed (const UString &a_text);
 };//end class Terminal
 
 NEMIVER_END_NAMESPACE(nemiver)



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