diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Fl_Search_Chooser.cxx | 4 | ||||
-rw-r--r-- | src/gipfel.cxx | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/src/Fl_Search_Chooser.cxx b/src/Fl_Search_Chooser.cxx index bfcf7fb..bc77309 100644 --- a/src/Fl_Search_Chooser.cxx +++ b/src/Fl_Search_Chooser.cxx @@ -22,6 +22,7 @@ #include <stdio.h> #include <string.h> +#include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Button.H> #include "Fl_Search_Chooser.H" @@ -86,13 +87,14 @@ Fl_Search_Chooser::Fl_Search_Chooser(const char *title) { Fl_Group *g = new Fl_Group(10, 10, w->w() - 10, w->h() - 10); sb = new Fl_Search_Browser(g->x(), g->y(), g->w() , g->h() - 100, NULL); sb->type(FL_HOLD_BROWSER); - Fl_Input *in = new Fl_Input(g->x(), g->h() - 80, g->w()-10, 20); + Fl_Input *in = new Fl_Input(g->x()+50, g->h()-80, g->w()-80, 20, "Search"); in->callback((Fl_Callback*) input_cb, this); in->when(FL_WHEN_CHANGED); Fl_Button *cancel_b = new Fl_Button(g->w()-200, g->h()-30, 80, 20, "Cancel"); cancel_b->callback((Fl_Callback*) cancel_cb, this); Fl_Button *ok_b = new Fl_Button(g->w()-100, g->h()-30, 80, 20, "Ok"); ok_b->callback((Fl_Callback*) ok_cb, this); + Fl::focus(in); g->end(); w->end(); } diff --git a/src/gipfel.cxx b/src/gipfel.cxx index 221bcec..37eaaf4 100644 --- a/src/gipfel.cxx +++ b/src/gipfel.cxx @@ -32,8 +32,6 @@ #include <errno.h> #include <signal.h> -#include "../config.h" - #include <FL/Fl.H> #include <FL/Fl_Window.H> #include <FL/Fl_Scroll.H> @@ -329,7 +327,6 @@ int main(int argc, char** argv) { exit(1); } -fprintf(stderr, "%s\n", data_file); control_win = create_control_window(); view_win = new Fl_Window(800, 600); @@ -343,9 +340,6 @@ fprintf(stderr, "%s\n", data_file); } gipf->load_data(data_file); - if (view_point) { - gipf->set_viewpoint(view_point); - } scroll->end(); set_values(); @@ -355,6 +349,12 @@ fprintf(stderr, "%s\n", data_file); view_win->end(); view_win->show(1, argv); control_win->show(1, argv); + + if (view_point) { + gipf->set_viewpoint(view_point); + } else if (gipf->get_view_lat() == 0.0 && gipf->get_view_long() == 0.0) { + viewpoint_cb(NULL, NULL); + } return Fl::run(); } |