]> git.sur5r.net Git - glabels/commitdiff
Now original window propogates to open_ok() as object data.
authorJim Evins <evins@snaught.com>
Thu, 3 Oct 2002 03:23:07 +0000 (03:23 +0000)
committerJim Evins <evins@snaught.com>
Thu, 3 Oct 2002 03:23:07 +0000 (03:23 +0000)
git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@143 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/src/file.c

index 7c498bc73a5b8bdb2a643a5d94843f0efdbea698..36f6b1aa8da39c70f175817963ee7a45ac2c2e4a 100644 (file)
@@ -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));
                        }