summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-04-08 09:58:03 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2009-04-08 09:58:03 +0200
commit697225a5e5dda3149190e6796ad86f37ac6f6064 (patch)
treeb956473344d45e87132c5702654f3c7fd13f0aba
parent21d592ff721e50be3a74c7834b04aca3af41fd23 (diff)
don't exit on escape
-rw-r--r--NEWS3
-rw-r--r--src/gipfel.cxx12
2 files changed, 11 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index ae49701..d67bbb4 100644
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,9 @@ gipfel-0.3.0
* Use exiv2 library for image metadata reading and writing.
(initial patch by Konrad Golling).
* Make gipfel compile on [MinGW](http://www.mingw.org/)
+* Check for files in local tarball to make gipfel work without
+ installing it.
+* Don't exit on Escape.
gipfel-0.2.9
* Add rpm spec file.
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);