From: John Darrington Date: Fri, 13 Mar 2009 03:52:51 +0000 (+0900) Subject: Fix critical when opening fonts dialog X-Git-Tag: v0.7.3~233 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c3064d66169931db09e9579b9594444d01a5af2;p=pspp-builds.git Fix critical when opening fonts dialog --- diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index 5d35551a..c754f730 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -690,6 +690,7 @@ static void fonts_activate (GtkMenuItem *menuitem, gpointer data) { PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (data); + GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (de)); PangoFontDescription *current_font; gchar *font_name; GtkWidget *dialog = @@ -704,8 +705,8 @@ fonts_activate (GtkMenuItem *menuitem, gpointer data) g_free (font_name); gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (get_widget_assert (de->builder, - "data_editor"))); + GTK_WINDOW (toplevel)); + if ( GTK_RESPONSE_OK == gtk_dialog_run (GTK_DIALOG (dialog)) ) { const gchar *font = gtk_font_selection_dialog_get_font_name