diff libgui/src/main-window.h @ 29439:fe06fafb4cac

fix en-/disabling some editor actions depending on file type (bug #60214) * file-editor-tab.cc (handle_request_add_breakpoint): just return if the file is not an octave file * file-editor.cc (check_actions): en-/disable the run action and debug actions depending on tabs and file type, emit signal of changed tabs also with flag if octave file or not; (handle_editor_state_changed): store if current file is an octave file, emit signal with possibly changed file type; * file-editor.h: signal editor_tabs_changed_signal with two args, new flag m_is_octave_file * main-window.cc (handle_exit_debugger): en/-disable step action depending on editor tabs and file type; (construct): slot editor_tabs_changed has two args now; (editor_tabs_changed): two args, store editor file type in flag and en-/disable step action accordingly * main-window.h: slot editor_tabs_changed with two args, new flag m_editor_is_octave_file
author Torsten Lilge <ttl-octave@mailbox.org>
date Sun, 14 Mar 2021 22:45:42 +0100
parents 7854d5752dd2
children a0eb1ae33192
line wrap: on
line diff
--- a/libgui/src/main-window.h	Sat Mar 13 10:56:43 2021 +0100
+++ b/libgui/src/main-window.h	Sun Mar 14 22:45:42 2021 +0100
@@ -183,7 +183,7 @@
     void debug_step_over (void);
     void debug_step_out (void);
     void debug_quit (void);
-    void editor_tabs_changed (bool);
+    void editor_tabs_changed (bool, bool);
 
     void request_open_file (void);
     void request_new_script (const QString& commands = QString ());
@@ -438,6 +438,7 @@
     bool m_prevent_readline_conflicts_menu;
     bool m_suppress_dbg_location;
     bool m_editor_has_tabs;
+    bool m_editor_is_octave_file;
 
     //! Flag for closing the whole application.