[evolution-patches] fix for #41751
- From: Larry Ewing <lewing ximian com>
- To: patches <evolution-patches ximian com>, Radek Doulik <rodo ximian com>
- Subject: [evolution-patches] fix for #41751
- Date: 13 May 2003 19:52:36 -0500
This is fix for the strange behavior danw was seeing in
http://bugzilla.ximian.com/show_bug.cgi?id=41751
it isn't very pretty but it should be safe.
--Larry
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.1793
diff -u -p -r1.1793 ChangeLog
--- ChangeLog 8 May 2003 19:08:15 -0000 1.1793
+++ ChangeLog 13 May 2003 19:47:16 -0000
@@ -1,3 +1,10 @@
+2003-05-13 Larry Ewing <lewing ximian com>
+
+ * htmlfontmanager.c (html_font_manager_set_default): clear both
+ fonts if either font description changes so that if the fixed font
+ changes but the variable does not the plain painter will still
+ pick up the change.
+
2003-05-07 Larry Ewing <lewing ximian com>
* gtkhtml.c (button_press_event): pass event->time to
Index: htmlfontmanager.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmlfontmanager.c,v
retrieving revision 1.38
diff -u -p -r1.38 htmlfontmanager.c
--- htmlfontmanager.c 23 Mar 2003 21:57:57 -0000 1.38
+++ htmlfontmanager.c 13 May 2003 19:47:16 -0000
@@ -151,27 +151,31 @@ html_font_manager_set_default (HTMLFontM
gboolean changed = FALSE;
/* variable width fonts */
- changed = html_font_set_face (&manager->variable, variable);
+ changed |= html_font_set_face (&manager->variable, variable);
if (manager->var_size != var_size || manager->var_points != var_points) {
manager->var_size = var_size;
manager->var_points = var_points;
clear_additional_font_sets (manager);
changed = TRUE;
}
- if (changed) {
- html_font_set_release (&manager->variable, manager->painter);
- }
- changed = FALSE;
/* fixed width fonts */
- changed = html_font_set_face (&manager->fixed, fixed);
+ changed |= html_font_set_face (&manager->fixed, fixed);
if (manager->fix_size != fix_size || manager->fix_points != fix_points) {
manager->fix_size = fix_size;
manager->fix_points = fix_points;
changed = TRUE;
}
- if (changed)
+
+ if (changed) {
+ /*
+ * NOTE we clear both if either changes because the plain painter pulls nasty
+ * tricks with using fixed fonts in the variable manager so if the fixed font changes
+ * the variable font may change too.
+ */
+ html_font_set_release (&manager->variable, manager->painter);
html_font_set_release (&manager->fixed, manager->painter);
+ }
}
static gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]