aboutsummaryrefslogtreecommitdiff
path: root/src/displaywindow.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-01-12 14:47:59 +0100
committerThomas White <taw@physics.org>2010-01-12 14:47:59 +0100
commitf15a2bd9185819365e3d84f878d1225822a93e3e (patch)
tree2dbf116ac52d58d6459a60caafc27fb9a520cc0f /src/displaywindow.c
parent0b17be9c96c4082b7cf2334c6a2cc35bb6a5814c (diff)
Allow hdfsee to read peak list at startup
Diffstat (limited to 'src/displaywindow.c')
-rw-r--r--src/displaywindow.c8
1 files changed, 7 insertions, 1 deletions
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