diff options
Diffstat (limited to 'src/displaywindow.c')
-rw-r--r-- | src/displaywindow.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c index ea03a22..215d5e2 100644 --- a/src/displaywindow.c +++ b/src/displaywindow.c @@ -1149,8 +1149,21 @@ static gint displaywindow_refinestack(GtkWidget *widget, DisplayWindow *dw) { } static gint displaywindow_extract(GtkWidget *widget, DisplayWindow *dw) { + + GtkWidget *d; + intensities_extract(dw->ctx); + dw->mode = DW_MEASURED; displaywindow_update(dw); + + d = gtk_ui_manager_get_widget(dw->ui, "/ui/displaywindow/file/savehkl"); + gtk_widget_set_sensitive(d, TRUE); + + return 0; +} + +static gint displaywindow_savehkl(GtkWidget *widget, DisplayWindow *dw) { + intensities_save(dw->ctx); return 0; } @@ -1159,7 +1172,8 @@ static void displaywindow_addmenubar(DisplayWindow *dw) { GtkActionEntry entries[] = { { "FileAction", NULL, "_File", NULL, NULL, NULL }, - { "SaveCacheAction", GTK_STOCK_SAVE, "Save Image Analysis to _Cache", NULL, NULL, G_CALLBACK(displaywindow_savecache) }, + { "SaveCacheAction", "filesave", "Save Image Analysis to _Cache", NULL, NULL, G_CALLBACK(displaywindow_savecache) }, + { "SaveHKLAction", GTK_STOCK_SAVE, "Save Reflections", NULL, NULL, G_CALLBACK(displaywindow_savehkl) }, { "CloseAction", GTK_STOCK_QUIT, "_Quit", NULL, NULL, G_CALLBACK(displaywindow_close) }, { "ViewAction", NULL, "_View", NULL, NULL, NULL }, @@ -1318,6 +1332,7 @@ DisplayWindow *displaywindow_open(ControlContext *ctx) { GdkGLConfig *glconfig; DisplayWindow *dw; GtkWidget *notebook; + GtkWidget *d; dw = malloc(sizeof(DisplayWindow)); @@ -1384,6 +1399,8 @@ DisplayWindow *displaywindow_open(ControlContext *ctx) { displaywindow_enable_cell_functions(dw, FALSE); displaywindow_update_dirax(ctx, dw); + d = gtk_ui_manager_get_widget(dw->ui, "/ui/displaywindow/file/savehkl"); + gtk_widget_set_sensitive(d, FALSE); gtk_window_set_default_size(GTK_WINDOW(dw->window), 840, 800); gtk_widget_show_all(dw->window); |