diff libgui/src/main-window.cc @ 19619:f9a944b9e1cb gui-release

provide a user preference for printing the debug location in the terminal * main-window.cc (notice_settings): get new preference from settings file; (execute_command_callback): set next breakpoint quiet if desired; (execute_debug_callback): set next breakpoint quiet only if desired * main-window.h: new class attribute storing the preference * settings-dialog.cc (constructor): get new preference from settings file and initialize the new checkbox, put terminal related settings together; (write_changed_settings): write state of checkbox into settings file; * settings-dialog.ui: new checkbox for printing debug location in terminal tab
author Torsten <ttl@justmail.de>
date Sat, 17 Jan 2015 09:33:15 +0100
parents 6561179c6c22
children 4fe86a372f10
line wrap: on
line diff
--- a/libgui/src/main-window.cc	Tue Jan 13 21:46:18 2015 +0100
+++ b/libgui/src/main-window.cc	Sat Jan 17 09:33:15 2015 +0100
@@ -750,6 +750,9 @@
   configure_shortcuts ();
   set_global_shortcuts (command_window_has_focus ());
 
+  _suppress_dbg_location =
+        ! settings->value ("terminal/print_debug_location", false).toBool ();
+
   resource_manager::update_network_settings ();
 }
 
@@ -2030,6 +2033,7 @@
       command_editor::redisplay ();
       // We are executing inside the command editor event loop.  Force
       // the current line to be returned for processing.
+      Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
       command_editor::accept_line ();
     }
 
@@ -2086,19 +2090,19 @@
 
       if (debug == "step")
         {
-          Fdb_next_breakpoint_quiet ();
+          Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
           Fdbstep ();
         }
       else if (debug == "cont")
         {
-          Fdb_next_breakpoint_quiet ();
+          Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
           Fdbcont ();
         }
       else if (debug == "quit")
         Fdbquit ();
       else
         {
-          Fdb_next_breakpoint_quiet ();
+          Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
           Fdbstep (ovl (debug.toStdString ()));
         }