diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2003-06-26 03:28:02 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-06-26 03:28:02 +0800 |
commit | 8ea3e8e38b1626e918782252f97d405ed152a86c (patch) | |
tree | 6ad80a30cfa44fc1a8d8f20d9725fe8e025a10ff /src/ephy-window.c | |
parent | 685b2ace571d07c4aa831288cc62fd2e9b444fe5 (diff) | |
download | gsoc2013-epiphany-8ea3e8e38b1626e918782252f97d405ed152a86c.tar gsoc2013-epiphany-8ea3e8e38b1626e918782252f97d405ed152a86c.tar.gz gsoc2013-epiphany-8ea3e8e38b1626e918782252f97d405ed152a86c.tar.bz2 gsoc2013-epiphany-8ea3e8e38b1626e918782252f97d405ed152a86c.tar.lz gsoc2013-epiphany-8ea3e8e38b1626e918782252f97d405ed152a86c.tar.xz gsoc2013-epiphany-8ea3e8e38b1626e918782252f97d405ed152a86c.tar.zst gsoc2013-epiphany-8ea3e8e38b1626e918782252f97d405ed152a86c.zip |
Make sure there's only one print dialog per window. Fixes bug #115933.
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.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 17 |
1 files changed, 8 insertions, 9 deletions
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 |