From bbc6a0f5736ed843754902eb9a829dd5e173e1ac Mon Sep 17 00:00:00 2001 From: "Matthew S. Wilson" Date: Tue, 5 Jul 2005 02:47:49 +0000 Subject: [PATCH] only call ev_properties_fonts_set_document() if the document implements 2005-07-04 Matthew S. Wilson * shell/ev-properties-dialog.c (ev_properties_dialog_set_document): only call ev_properties_fonts_set_document() if the document implements the fonts interface --- ChangeLog | 7 +++++++ shell/ev-properties-dialog.c | 17 ++++++++++------- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2653ffa4..52ec3665 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-07-04 Matthew S. Wilson + + * shell/ev-properties-dialog.c + (ev_properties_dialog_set_document): only call + ev_properties_fonts_set_document() if the document implements the + fonts interface + 2005-07-05 Marco Pesenti Gritti * configure.ac: diff --git a/shell/ev-properties-dialog.c b/shell/ev-properties-dialog.c index aa6142af..7bf20e17 100644 --- a/shell/ev-properties-dialog.c +++ b/shell/ev-properties-dialog.c @@ -95,14 +95,17 @@ ev_properties_dialog_set_document (EvPropertiesDialog *properties, } ev_properties_view_set_info (EV_PROPERTIES_VIEW (properties->general_page), info); - if (properties->fonts_page == NULL && EV_IS_DOCUMENT_FONTS (document)) { - label = gtk_label_new (_("Fonts")); - properties->fonts_page = ev_properties_fonts_new (); - gtk_notebook_append_page (GTK_NOTEBOOK (properties->notebook), - properties->fonts_page, label); - gtk_widget_show (properties->fonts_page); + if (EV_IS_DOCUMENT_FONTS (document)) { + if (properties->fonts_page == NULL) { + label = gtk_label_new (_("Fonts")); + properties->fonts_page = ev_properties_fonts_new (); + gtk_notebook_append_page (GTK_NOTEBOOK (properties->notebook), + properties->fonts_page, label); + gtk_widget_show (properties->fonts_page); + } + + ev_properties_fonts_set_document (EV_PROPERTIES_FONTS (properties->fonts_page), document); } - ev_properties_fonts_set_document (EV_PROPERTIES_FONTS (properties->fonts_page), document); } GtkWidget * -- 2.43.5