diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | embed/mozilla/EphyWrapper.cpp | 2 | ||||
-rwxr-xr-x | src/ppview-toolbar.c | 13 |
3 files changed, 18 insertions, 4 deletions
@@ -1,3 +1,10 @@ +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. + 2003-08-14 Christian Persch <chpe@cvs.gnome.org> * lib/egg/egg-toolbars-model.c: (impl_add_item): diff --git a/embed/mozilla/EphyWrapper.cpp b/embed/mozilla/EphyWrapper.cpp index 3b9856716..d9de1d54d 100644 --- a/embed/mozilla/EphyWrapper.cpp +++ b/embed/mozilla/EphyWrapper.cpp @@ -211,7 +211,7 @@ nsresult EphyWrapper::PrintPreviewClose (void) if (NS_FAILED(rv) || !print) return NS_ERROR_FAILURE; rv = print->GetDoingPrintPreview(&isPreview); - if (isPreview == PR_TRUE) + if (NS_SUCCEEDED (rv) && isPreview == PR_TRUE) { rv = print->ExitPrintPreview(); } 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); |