From 8ea3e8e38b1626e918782252f97d405ed152a86c Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Wed, 25 Jun 2003 19:28:02 +0000 Subject: Make sure there's only one print dialog per window. Fixes bug #115933. 2003-06-25 Christian Persch * src/ephy-window.c: (ephy_window_print): Make sure there's only one print dialog per window. Fixes bug #115933. --- ChangeLog | 6 ++++++ src/ephy-window.c | 17 ++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d9bff0c56..058931121 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-06-25 Christian Persch + + * src/ephy-window.c: (ephy_window_print): + + Make sure there's only one print dialog per window. Fixes bug #115933. + 2003-06-25 Christian Persch * configure.in: diff --git a/src/ephy-window.c b/src/ephy-window.c index f821b4e48..c263b6e5a 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1888,22 +1888,21 @@ ephy_window_print (EphyWindow *window) EphyDialog *dialog; EphyEmbed *embed; - if (window->priv->print_dialog) - { - dialog = window->priv->print_dialog; - } - else + if (window->priv->print_dialog == NULL) { embed = ephy_window_get_active_embed (window); - dialog = print_dialog_new_with_parent (GTK_WIDGET(window), - embed, NULL); - g_signal_connect (G_OBJECT(dialog), + dialog = print_dialog_new_with_parent + (GTK_WIDGET(window), embed, NULL); + g_signal_connect (G_OBJECT (dialog), "preview", G_CALLBACK (print_dialog_preview_cb), window); + window->priv->print_dialog = dialog; + g_object_add_weak_pointer(G_OBJECT (dialog), + (gpointer *) &window->priv->print_dialog); } - ephy_dialog_show (EPHY_DIALOG (dialog)); + ephy_dialog_show (window->priv->print_dialog); } void -- cgit v1.2.3