From 697225a5e5dda3149190e6796ad86f37ac6f6064 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 8 Apr 2009 09:58:03 +0200 Subject: don't exit on escape --- src/gipfel.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/gipfel.cxx') diff --git a/src/gipfel.cxx b/src/gipfel.cxx index d0c87bd..1e038d2 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -132,6 +132,9 @@ void quit_cb() { exit(0); } +void dummy_cb() { +} + void open_cb() { char *file = fl_file_chooser("Open File?", "*.jpg", img_file); if (file) { @@ -611,22 +614,23 @@ int main(int argc, char** argv) { } Fl::get_system_colors(); - if (getenv("FLTK_SCHEME")) { + if (getenv("FLTK_SCHEME")) Fl::scheme(NULL); - } else { + else Fl::scheme("plastic"); - } control_win = create_control_window(); + control_win->callback((Fl_Callback*) dummy_cb); view_win = new Fl_Window(800, 600); + view_win->callback((Fl_Callback*) dummy_cb); // The Fl_Group is used to avoid FL_DAMAGE_ALL in Fl_Scroll::position Fl_Group *g = new Fl_Group(0, 0, view_win->w(), view_win->h()); view_win->resizable(g); scroll = new Fl_Scroll(0, 0, view_win->w(), view_win->h()); - gipf = new GipfelWidget(0,0,800,600); + gipf = new GipfelWidget(0, 0, 800, 600); if (img_file) { gipf->load_image(img_file); view_win->label(img_file); -- cgit v1.2.3