comparison libgui/src/main-window.cc @ 19585: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
comparison
equal deleted inserted replaced
19572:6561179c6c22 19585:f9a944b9e1cb
748 _prevent_readline_conflicts = 748 _prevent_readline_conflicts =
749 settings->value ("shortcuts/prevent_readline_conflicts", true).toBool (); 749 settings->value ("shortcuts/prevent_readline_conflicts", true).toBool ();
750 configure_shortcuts (); 750 configure_shortcuts ();
751 set_global_shortcuts (command_window_has_focus ()); 751 set_global_shortcuts (command_window_has_focus ());
752 752
753 _suppress_dbg_location =
754 ! settings->value ("terminal/print_debug_location", false).toBool ();
755
753 resource_manager::update_network_settings (); 756 resource_manager::update_network_settings ();
754 } 757 }
755 758
756 759
757 void 760 void
2028 command_editor::replace_line (command); 2031 command_editor::replace_line (command);
2029 2032
2030 command_editor::redisplay (); 2033 command_editor::redisplay ();
2031 // We are executing inside the command editor event loop. Force 2034 // We are executing inside the command editor event loop. Force
2032 // the current line to be returned for processing. 2035 // the current line to be returned for processing.
2036 Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
2033 command_editor::accept_line (); 2037 command_editor::accept_line ();
2034 } 2038 }
2035 2039
2036 if (repost) // queue not empty, so repost event for further processing 2040 if (repost) // queue not empty, so repost event for further processing
2037 octave_link::post_event (this, &main_window::execute_command_callback); 2041 octave_link::post_event (this, &main_window::execute_command_callback);
2084 repost = true; // not empty, repost at end 2088 repost = true; // not empty, repost at end
2085 _dbg_queue_mutex.unlock (); 2089 _dbg_queue_mutex.unlock ();
2086 2090
2087 if (debug == "step") 2091 if (debug == "step")
2088 { 2092 {
2089 Fdb_next_breakpoint_quiet (); 2093 Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
2090 Fdbstep (); 2094 Fdbstep ();
2091 } 2095 }
2092 else if (debug == "cont") 2096 else if (debug == "cont")
2093 { 2097 {
2094 Fdb_next_breakpoint_quiet (); 2098 Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
2095 Fdbcont (); 2099 Fdbcont ();
2096 } 2100 }
2097 else if (debug == "quit") 2101 else if (debug == "quit")
2098 Fdbquit (); 2102 Fdbquit ();
2099 else 2103 else
2100 { 2104 {
2101 Fdb_next_breakpoint_quiet (); 2105 Fdb_next_breakpoint_quiet (ovl (_suppress_dbg_location));
2102 Fdbstep (ovl (debug.toStdString ())); 2106 Fdbstep (ovl (debug.toStdString ()));
2103 } 2107 }
2104 2108
2105 command_editor::interrupt (true); 2109 command_editor::interrupt (true);
2106 } 2110 }