[PATCH] fix for properties crash when document does not implement the fonts property interface
- From: Matt Wilson <msw rpath com>
- To: evince-list gnome org
- Subject: [PATCH] fix for properties crash when document does not implement the fonts property interface
- Date: Mon, 4 Jul 2005 16:05:34 -0400
Marco,
You're calling ev_properties_fonts_set_document() on documents that
don't implement the fonts properties interface.
Cheers,
Matt
--
Matt Wilson
rpath, Inc.
msw rpath com
Index: shell/ev-properties-dialog.c
===================================================================
RCS file: /cvs/gnome/evince/shell/ev-properties-dialog.c,v
retrieving revision 1.1
diff -u -r1.1 ev-properties-dialog.c
--- shell/ev-properties-dialog.c 4 Jul 2005 11:58:56 -0000 1.1
+++ shell/ev-properties-dialog.c 4 Jul 2005 20:05:02 -0000
@@ -95,14 +95,17 @@
}
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 *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]