+Sat Jan 27 09:48:21 WST 2007 John Darrington <john@darrington.wattle.id.au>
+
+ * var-type-dialog.c: Fixed bugs closing window, apparent when compiled
+ against gtk.2.10
+
Fri Jan 26 15:51:34 WST 2007 John Darrington <john@darrington.wattle.id.au>
* psppire-var-select.c psppire-var-select.h : Deleted.
static gint on_var_type_ok_clicked (GtkWidget *w, gpointer data);
+static gint hide_dialog (GtkWidget *w, gpointer data);
-#define LEN 20
static void
add_to_group (GtkWidget *w, gpointer data)
dialog->window = get_widget_assert (xml,"var_type_dialog");
+
+ g_signal_connect (dialog->window, "delete-event",
+ G_CALLBACK (gtk_widget_hide_on_delete), NULL);
+
gtk_window_set_transient_for (GTK_WINDOW (dialog->window),
GTK_WINDOW (get_widget_assert (xml, "data_editor")));
GTK_SIGNAL_FUNC (preview_custom), dialog);
- /* Connect the OK button */
+ /* Connect to the OK button */
g_signal_connect (dialog->ok, "clicked", G_CALLBACK (on_var_type_ok_clicked),
dialog);
+ /* And the cancel button */
+ g_signal_connect (get_widget_assert (xml, "var_type_cancel") , "clicked",
+ G_CALLBACK (hide_dialog),
+ dialog);
+
+
}
return dialog;
-gint
-on_var_type_cancel_clicked (GtkWidget *w, gpointer data)
+static gint
+hide_dialog (GtkWidget *w, gpointer data)
{
- gtk_widget_hide (w);
+ struct var_type_dialog *dialog = data;
+
+ gtk_widget_hide (dialog->window);
return FALSE;
}