aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/ephy-window.c17
2 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index d9bff0c56..058931121 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2003-06-25 Christian Persch <chpe@cvs.gnome.org>
+ * 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 <chpe@cvs.gnome.org>
+
* configure.in:
Added 'mk' (Macedonian) to ALL_LINGUAS.
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