aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@.gnome.org>2003-08-15 00:44:35 +0800
committerMarco Pesenti Gritti <marco@src.gnome.org>2003-08-15 00:44:35 +0800
commitcef2c42a07d633d2431872c9a8929f28a052c6f3 (patch)
tree5165fff1882ef7d43178e7328d2cf51d01e143ca /src
parent83d079f0b909106f3c3da16fd62a7cdfdf6b07e2 (diff)
downloadgsoc2013-epiphany-cef2c42a07d633d2431872c9a8929f28a052c6f3.tar
gsoc2013-epiphany-cef2c42a07d633d2431872c9a8929f28a052c6f3.tar.gz
gsoc2013-epiphany-cef2c42a07d633d2431872c9a8929f28a052c6f3.tar.bz2
gsoc2013-epiphany-cef2c42a07d633d2431872c9a8929f28a052c6f3.tar.lz
gsoc2013-epiphany-cef2c42a07d633d2431872c9a8929f28a052c6f3.tar.xz
gsoc2013-epiphany-cef2c42a07d633d2431872c9a8929f28a052c6f3.tar.zst
gsoc2013-epiphany-cef2c42a07d633d2431872c9a8929f28a052c6f3.zip
Make print preview exit code safer.
2003-08-14 Marco Pesenti Gritti <marco@.gnome.org> * embed/mozilla/EphyWrapper.cpp: * src/ppview-toolbar.c: (toolbar_cmd_ppv_close): Make print preview exit code safer.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/ppview-toolbar.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ppview-toolbar.c b/src/ppview-toolbar.c
index d08dbdece..26b52926e 100755
--- a/src/ppview-toolbar.c
+++ b/src/ppview-toolbar.c
@@ -394,16 +394,23 @@ static void
toolbar_cmd_ppv_close (EggMenuMerge *merge,
PPViewToolbar *t)
{
- EphyWindow *window = t->priv->window;
+ EphyWindow *window;
EphyEmbed *embed;
GtkWidget *notebook;
+ g_return_if_fail (IS_PPVIEW_TOOLBAR (t));
+
+ window = t->priv->window;
+ g_return_if_fail (IS_EPHY_WINDOW (window));
+
embed = ephy_window_get_active_embed (window);
- g_return_if_fail (embed != NULL);
+ g_return_if_fail (IS_EPHY_EMBED (embed));
- ephy_window_set_chrome (t->priv->window, t->priv->original_mask);
+ ephy_window_set_chrome (window, t->priv->original_mask);
notebook = ephy_window_get_notebook (window);
+ g_return_if_fail (IS_EPHY_NOTEBOOK (notebook));
+
ephy_notebook_set_show_tabs (EPHY_NOTEBOOK (notebook), TRUE);
ephy_embed_print_preview_close (embed);