From f15a2bd9185819365e3d84f878d1225822a93e3e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 12 Jan 2010 14:47:59 +0100 Subject: Allow hdfsee to read peak list at startup --- src/displaywindow.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/displaywindow.c') diff --git a/src/displaywindow.c b/src/displaywindow.c index 008aa19f..f78977e9 100644 --- a/src/displaywindow.c +++ b/src/displaywindow.c @@ -929,7 +929,7 @@ static gint displaywindow_press(GtkWidget *widget, GdkEventButton *event, } -DisplayWindow *displaywindow_open(const char *filename) +DisplayWindow *displaywindow_open(const char *filename, const char *peaks) { DisplayWindow *dw; char *title; @@ -994,6 +994,12 @@ DisplayWindow *displaywindow_open(const char *filename) dw->binning = INITIAL_BINNING; displaywindow_update(dw); + /* Peak list provided at startup? */ + if ( peaks != NULL ) { + load_features_from_file(hdfile_get_image(dw->hdfile), peaks); + displaywindow_update(dw); + } + gtk_widget_add_events(GTK_WIDGET(dw->drawingarea), GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK -- cgit v1.2.3