From: Jim Evins Date: Thu, 3 Oct 2002 03:23:07 +0000 (+0000) Subject: Now original window propogates to open_ok() as object data. X-Git-Tag: glabels-2_3_0~743 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c94df7e04ef6232c90c433ad796bd965b3a62b9c;p=glabels Now original window propogates to open_ok() as object data. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@143 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/src/file.c b/glabels2/src/file.c index 7c498bc7..36f6b1aa 100644 --- a/glabels2/src/file.c +++ b/glabels2/src/file.c @@ -248,6 +248,8 @@ gl_file_open (GtkWindow *window) gtk_window_set_transient_for (GTK_WINDOW (fsel), window); gtk_window_set_title (GTK_WINDOW (fsel), _("Open label")); + g_object_set_data (G_OBJECT (fsel), "parent_window", window); + g_signal_connect (G_OBJECT (fsel->ok_button), "clicked", G_CALLBACK (open_ok), fsel); @@ -277,6 +279,7 @@ open_ok (GtkWidget *widget, GtkWidget *dlg; gint ret; GnomeRecentModel *recent; + GtkWindow *window; gl_debug (DEBUG_FILE, "START"); @@ -314,7 +317,10 @@ open_ok (GtkWidget *widget, } else { - if ( gl_file_open_real (filename, GTK_WINDOW(fsel)) ) { + window = g_object_get_data (G_OBJECT(fsel), + "parent_window"); + + if ( gl_file_open_real (filename, window) ) { gtk_widget_destroy (GTK_WIDGET (fsel)); }