[evolution-patches] [gtkhtml] #66006 When editing HTML, the TT button does not unapply
- From: Radek Doulík <rodo novell com>
- To: Patches <evolution-patches ximian com>
- Cc: Larry Ewing <lewing ximian com>
- Subject: [evolution-patches] [gtkhtml] #66006 When editing HTML, the TT button does not unapply
- Date: Mon, 20 Sep 2004 12:49:04 +0200
Index: components/html-editor/ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/ChangeLog,v
retrieving revision 1.472
diff -u -p -r1.472 ChangeLog
--- components/html-editor/ChangeLog 17 Sep 2004 16:23:51 -0000 1.472
+++ components/html-editor/ChangeLog 20 Sep 2004 10:16:48 -0000
@@ -1,3 +1,7 @@
+2004-09-20 Radek Doulik <rodo ximian com>
+
+ * menubar.c (font_style_cb): toggle style instead of setting it on
+
2004-09-17 Radek Doulik <rodo ximian com>
* Makefile.am: api version 3.1 -> 3.6
Index: components/html-editor/menubar.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/menubar.c,v
retrieving revision 1.105
diff -u -p -r1.105 menubar.c
--- components/html-editor/menubar.c 13 Aug 2004 16:51:37 -0000 1.105
+++ components/html-editor/menubar.c 20 Sep 2004 10:16:48 -0000
@@ -539,16 +539,8 @@ font_style_cb (BonoboUIComponent *uic, G
/* g_warning ("wowee %s :: %s", path, state); */
for (i = 0; font_style_assoc[i].verb != NULL; i++) {
- if (!strcmp (cname, font_style_assoc[i].verb)) {
- if (font_style_assoc[i].style > GTK_HTML_FONT_STYLE_MAX)
- gtk_html_set_font_style (cd->html, ~0,
- font_style_assoc[i].style);
- else
- gtk_html_set_font_style (cd->html,
- GTK_HTML_FONT_STYLE_MAX
- & ~GTK_HTML_FONT_STYLE_SIZE_MASK,
- font_style_assoc[i].style);
- }
+ if (!strcmp (cname, font_style_assoc[i].verb))
+ gtk_html_toggle_font_style (cd->html, font_style_assoc[i].style);
}
}
Index: src/ChangeLog
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/ChangeLog,v
retrieving revision 1.2039
diff -u -p -r1.2039 ChangeLog
--- src/ChangeLog 17 Sep 2004 16:23:51 -0000 1.2039
+++ src/ChangeLog 20 Sep 2004 10:16:55 -0000
@@ -1,3 +1,9 @@
+2004-09-20 Radek Doulik <rodo ximian com>
+
+ * htmltext.c (style_from_attrs): handle PANGO_ATTR_FAMILY, we use
+ that now only for FIXED style
+ (unset_style_filter): ditto
+
2004-09-17 Radek Doulik <rodo ximian com>
* Makefile.am: api version 3.1 -> 3.6
Index: src/htmltext.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/src/htmltext.c,v
retrieving revision 1.260
diff -u -p -r1.260 htmltext.c
--- src/htmltext.c 4 Aug 2004 09:12:43 -0000 1.260
+++ src/htmltext.c 20 Sep 2004 10:16:56 -0000
@@ -3156,6 +3156,9 @@ style_from_attrs (PangoAttrIterator *ite
case PANGO_ATTR_SIZE:
style |= ((HTMLPangoAttrFontSize *) attr)->style;
break;
+ case PANGO_ATTR_FAMILY:
+ style |= GTK_HTML_FONT_STYLE_FIXED;
+ break;
default:
break;
}
@@ -3300,6 +3303,10 @@ unset_style_filter (PangoAttribute *attr
break;
case PANGO_ATTR_SIZE:
if (((HTMLPangoAttrFontSize *) attr)->style & style)
+ return TRUE;
+ break;
+ case PANGO_ATTR_FAMILY:
+ if (style & GTK_HTML_FONT_STYLE_FIXED)
return TRUE;
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]