Fixed bug in lash support.
If other windows were open besides the main window, lash quit messages did not end the program. Fixed.
This commit is contained in:
parent
faec01e7a6
commit
2b768dec58
|
@ -31,16 +31,12 @@
|
|||
#include "config.h"
|
||||
extern UI* ui;
|
||||
|
||||
inline void UI::cb_main_window_i(fltk::Window* o, void*) {
|
||||
inline void UI::cb_main_window_i(fltk::Window*, void*) {
|
||||
if(!fltk::ask("Quit?")){
|
||||
return;
|
||||
}
|
||||
|
||||
config_window->hide();
|
||||
help_window->hide();
|
||||
action_window->hide();
|
||||
scope_window->hide();
|
||||
o->hide();
|
||||
shutdown_gui();
|
||||
|
||||
save_config();
|
||||
}
|
||||
|
|
10
src/ui.fl
10
src/ui.fl
|
@ -55,13 +55,9 @@ class UI {open
|
|||
return;
|
||||
}
|
||||
|
||||
config_window->hide();
|
||||
help_window->hide();
|
||||
action_window->hide();
|
||||
scope_window->hide();
|
||||
o->hide();
|
||||
shutdown_gui();
|
||||
|
||||
save_config();}
|
||||
save_config();} selected
|
||||
xywh {1036 527 640 480} resizable
|
||||
extra_code {\#include <stdio.h>
|
||||
|
||||
|
@ -554,7 +550,7 @@ set_measures_until_record((int)o->value());}
|
|||
}
|
||||
{fltk::CheckButton} check_trackinit {
|
||||
label {track init}
|
||||
callback {set_trackinit(o->value());} selected
|
||||
callback {set_trackinit(o->value());}
|
||||
xywh {145 80 25 25} align 4 value 1
|
||||
}
|
||||
{fltk::CheckButton} check_autotrackname {
|
||||
|
|
|
@ -450,7 +450,7 @@ void playing_timeout_cb(void* v){
|
|||
switch(ret){
|
||||
case SESSION_SAVE: save(filename_string); break;
|
||||
case SESSION_LOAD: load(filename_string); break;
|
||||
case SESSION_QUIT: ui->main_window->hide(); break;
|
||||
case SESSION_QUIT: shutdown_gui(); break;
|
||||
case SESSION_UNHANDLED: break;
|
||||
}
|
||||
free(session_string);
|
||||
|
@ -832,3 +832,10 @@ void init_gui(){
|
|||
ui->pattern_hscroll->value(0);
|
||||
}
|
||||
|
||||
void shutdown_gui(){
|
||||
ui->main_window->hide();
|
||||
ui->config_window->hide();
|
||||
ui->help_window->hide();
|
||||
ui->action_window->hide();
|
||||
ui->scope_window->hide();
|
||||
}
|
||||
|
|
|
@ -88,5 +88,6 @@ void remove_track(int n);
|
|||
|
||||
|
||||
void init_gui();
|
||||
void shutdown_gui();
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue