nemiver r748 - in trunk: . src/persp/dbgperspective



Author: jjongsma
Date: Mon Feb 11 01:42:11 2008
New Revision: 748
URL: http://svn.gnome.org/viewvc/nemiver?rev=748&view=rev

Log:
Disable setting breakpoints when debugger is not running (Bug #515287).

	* src/persp/dbgperspective/nmv-dbg-perspective.cc: disable setting a
	breakpoint by clicking in the source view margin if the debugger is not
	running (e.g. if a user just opened a source file directly and clicked in
	teh margin).  Also disable querying variable value tooltips when the
	debugger is not running (Bug #515287).


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

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	Mon Feb 11 01:42:11 2008
@@ -1513,11 +1513,13 @@
     LOG_FUNCTION_SCOPE_NORMAL_DD ;
     NEMIVER_TRY
 
-    SourceEditor *cur_editor = get_current_source_editor () ;
-    THROW_IF_FAIL (cur_editor) ;
-    UString path ;
-    cur_editor->get_path (path) ;
-    toggle_breakpoint (path, a_line + 1 ) ;
+    if (m_priv->debugger->get_state () != IDebugger::NOT_STARTED) {
+        SourceEditor *cur_editor = get_current_source_editor () ;
+        THROW_IF_FAIL (cur_editor) ;
+        UString path ;
+        cur_editor->get_path (path) ;
+        toggle_breakpoint (path, a_line + 1 ) ;
+    }
 
     NEMIVER_CATCH
 }
@@ -1567,7 +1569,9 @@
            DBG_PERSPECTIVE_MOUSE_MOTION_DOMAIN) ;
     m_priv->mouse_in_source_editor_x = x ;
     m_priv->mouse_in_source_editor_y = y ;
-    restart_mouse_immobile_timer () ;
+    if (m_priv->debugger->get_state () != IDebugger::NOT_STARTED) {
+        restart_mouse_immobile_timer () ;
+    }
     NEMIVER_CATCH
     return false ;
 }



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