[nemiver] Display "source file not found" error msg only once (Closes: #604436)



commit 8e80fcd7c6f50fe0af6d2461a21ab37203f416a4
Author: Dodji Seketeli <dodji redhat com>
Date:   Sun Dec 13 19:11:22 2009 +0100

    Display "source file not found" error msg only once (Closes: #604436)
    
    	* src/dbgengine/nmv-gdb-engine.cc (GDBEngine::set_breakpoint):
    	Don't list breakpoints after setting it a breakpoint.
    	* src/persp/dbgperspective/nmv-dbg-perspective.cc:
    	(DBGPerspective::append_visual_breakpoint): Don't try to get the
    	source editor of an empty source path.
    	One message box saying we couldn't find the source file is enough.

 src/dbgengine/nmv-gdb-engine.cc                 |    2 --
 src/persp/dbgperspective/nmv-dbg-perspective.cc |   11 +++++------
 2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index 84b5b77..1e35c9e 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -3504,7 +3504,6 @@ GDBEngine::set_breakpoint (const UString &a_path,
     }
     break_cmd += UString::from_int (a_line_num);
     queue_command (Command ("set-breakpoint", break_cmd, a_cookie));
-    list_breakpoints (a_cookie);
 }
 
 void
@@ -3623,7 +3622,6 @@ GDBEngine::set_breakpoint (const UString &a_func_name,
     break_cmd +=  " " + a_func_name;
 
     queue_command (Command ("set-breakpoint", break_cmd, a_cookie));
-    list_breakpoints (a_cookie);
 }
 
 void
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index afc1f2f..65a949e 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -6069,9 +6069,11 @@ DBGPerspective::append_visual_breakpoint (const UString &a_file_name,
             }
         }
 
-        open_file (file_path);
-        source_editor = get_source_editor_from_path (file_path,
-                                                     actual_file_name);
+        if (!file_path.empty ()) {
+            open_file (file_path);
+            source_editor = get_source_editor_from_path (file_path,
+                                                         actual_file_name);
+        }
     }
 
     //finally, if none of these things worked, display an error
@@ -6079,9 +6081,6 @@ DBGPerspective::append_visual_breakpoint (const UString &a_file_name,
         LOG_ERROR ("Could not find source editor for file: '"
                 << a_file_name
                 << "'");
-        UString message;
-        message.printf (_("Could not find file: %s\n"), a_file_name.c_str ());
-        ui_utils::display_error (message);
         return false;
     } else {
         LOG_DD ("setting actual visual bp in the source editor");



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