1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
3 /*----------------------------------------------------------------------
5 gpiv - Graphic program for Particle Image Velocimetry, based on gtk/gnome
9 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
12 This file is part of gpiv.
14 Gpiv is free software; you can redistribute it and/or modify
15 it under the terms of the GNU General Public License as published by
16 the Free Software Foundation; either version 2, or (at your option)
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 GNU General Public License for more details.
24 You should have received a copy of the GNU General Public License
25 along with this program; if not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
28 ----------------------------------------------------------------------*/
31 * (Callback) functions for dialogs
32 * $Id: dialog.c,v 1.1 2008-09-16 11:20:18 gerber Exp $
43 on_button_quit_gpiv_clicked (GtkDialog
*dialog
,
47 /*-----------------------------------------------------------------------------
48 * exit, message dialog callbacks
51 g_assert( response
== GTK_RESPONSE_ACCEPT
52 || response
== GTK_RESPONSE_REJECT
);
55 case GTK_RESPONSE_ACCEPT
:
56 free_all_bufmems(display_act
);
60 case GTK_RESPONSE_REJECT
:
61 gtk_widget_destroy(GTK_WIDGET (dialog
));
65 g_warning("on_button_quit_gpiv_clicked: should not arrive here");
73 on_close_buffer_response (GtkDialog
*dialog
,
77 /*-----------------------------------------------------------------------------
80 GpivConsole
*gpiv
= gtk_object_get_data (GTK_OBJECT(dialog
), "gpiv");
81 Display
*disp
= gtk_object_get_data (GTK_OBJECT(dialog
), "display");
84 g_assert ( response
== GTK_RESPONSE_ACCEPT
85 || response
== GTK_RESPONSE_REJECT
);
87 /* g_message ("on_close_buffer_response:: id = %d", */
88 /* display_act->id); */
91 case GTK_RESPONSE_ACCEPT
:
94 * Deleting buffer and data
96 close_buffer (gpiv
, disp
/* , row */);
99 case GTK_RESPONSE_REJECT
:
101 * No action; just keep buffer with (unstored) data
106 g_warning("on_close_buffer_response: should not arrive here");
110 /* g_message ("on_close_buffer_response:: FINISHED"); */