comparison libgui/src/main-window.cc @ 16638:3c2e457eeb72

ask for saving modified editor files if octave is closed (bug #38689) * files-editor-tab.cc(constrctor): init new flag indicating if app is closing, (check_file_modified): message box is modal if app is closing, no cancel, parent of box is the editor's tab widget for a correct palcement of the box, (conditional_close): new second arg: flag for closing app (default false), it is stored in the tab's class wide flag * file-editor-tab.h: second arg for conditional_close and new class wide flag * file-editor.cc(destructor): sending close requests to all editor tabs with flag indicating the application is closing (add_file_editor_tab): new arg for fetab_close_request and conditional_close * file-editor.h: new 2nd arg for fetab_close_request (closing app, def. false) * main-window.cc(destructor): delete editor window first for showing the message boxes for modified editor files in front of a complete gui
author Torsten <ttl@justmail.de>
date Sat, 11 May 2013 18:20:31 +0200
parents 25e418d23a4b
children e3a0ca9c8836
comparison
equal deleted inserted replaced
16637:b3f4bdd7e5f4 16638:3c2e457eeb72
85 main_window::~main_window (void) 85 main_window::~main_window (void)
86 { 86 {
87 // Destroy the terminal first so that STDERR stream is redirected back 87 // Destroy the terminal first so that STDERR stream is redirected back
88 // to its original pipe to capture error messages at exit. 88 // to its original pipe to capture error messages at exit.
89 89
90 delete editor_window; // first one for dialogs of modified editor-tabs
90 delete command_window; 91 delete command_window;
91 delete workspace_window; 92 delete workspace_window;
92 delete editor_window;
93 delete doc_browser_window; 93 delete doc_browser_window;
94 delete file_browser_window; 94 delete file_browser_window;
95 delete history_window; 95 delete history_window;
96 delete status_bar; 96 delete status_bar;
97 delete _workspace_model; 97 delete _workspace_model;