changeset 9049:f01eef2c264a

[gaim-migrate @ 9825] Split Ignore Formatting into Ignore Font, Ignore Colors and whatever else. Is that cool? I was never really comfortable with removing this in the first place. Someone should test this. G'night. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 24 May 2004 04:29:40 +0000
parents f2f8a56acdb6
children f5fd42679095
files src/gaimrc.c src/gtkconv.c src/gtknotify.c src/gtkprefs.c
diffstat 4 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/gaimrc.c	Mon May 24 00:46:12 2004 +0000
+++ b/src/gaimrc.c	Mon May 24 04:29:40 2004 +0000
@@ -913,6 +913,10 @@
 						 ? GAIM_BUTTON_IMAGE : GAIM_BUTTON_TEXT_IMAGE)
 					 : ((display_options & OPT_DISP_NO_BUTTONS)
 						 ? GAIM_BUTTON_NONE : GAIM_BUTTON_TEXT)));
+#if 1 /* PREFSLASH04 */
+			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_colors",
+								display_options & OPT_DISP_IGNORE_COLOUR);
+#endif
 			gaim_prefs_set_int("/gaim/gtk/conversations/im/button_type",
 					((display_options & OPT_DISP_CONV_BUTTON_XPM)
 					 ? ((display_options & OPT_DISP_CONV_BUTTON_TEXT)
@@ -927,6 +931,12 @@
 						 ? GAIM_BUTTON_TEXT : GAIM_BUTTON_NONE)));
 			gaim_prefs_set_bool("/gaim/gtk/blist/show_warning_level",
 					display_options & OPT_DISP_SHOW_WARN);
+#if 1 /* PREFSLASH04 */
+			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_fonts",
+								display_options & OPT_DISP_IGNORE_FONTS);
+			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_font_sizes",
+								display_options & OPT_DISP_IGNORE_SIZES);
+#endif
 			gaim_prefs_set_int("/gaim/gtk/conversations/tab_side",
 					((display_options & OPT_DISP_CONV_SIDE_TAB)
 					 ? ((display_options & OPT_DISP_CONV_BR_TAB)
@@ -986,6 +996,14 @@
 					convo_options & OPT_CONVO_CTL_ENTER);
 			gaim_prefs_set_bool("/gaim/gtk/conversations/show_timestamps",
 					convo_options & OPT_CONVO_SHOW_TIME);
+#if 1 /* PREFSLASH04 */
+			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_colors",
+								convo_options & OPT_CONVO_IGNORE_COLOUR);
+			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_fonts",
+								convo_options & OPT_CONVO_IGNORE_FONTS);
+			gaim_prefs_set_bool("/gaim/gtk/conversations/ignore_font_sizes",
+								convo_options & OPT_CONVO_IGNORE_SIZES);
+#endif
 			gaim_prefs_set_bool("/core/conversations/combine_chat_im",
 					convo_options & OPT_CONVO_COMBINE);
 			gaim_prefs_set_bool("/gaim/gtk/conversations/close_on_tabs",
--- a/src/gtkconv.c	Mon May 24 00:46:12 2004 +0000
+++ b/src/gtkconv.c	Mon May 24 04:29:40 2004 +0000
@@ -4587,11 +4587,20 @@
 
 	gtk_font_options ^= GTK_IMHTML_NO_COMMENTS;
 
+#if 1 /* PREFSLASH04 */
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_colors"))
+		gtk_font_options ^= GTK_IMHTML_NO_COLOURS;
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_fonts"))
+		gtk_font_options ^= GTK_IMHTML_NO_FONTS;
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_font_sizes"))
+		gtk_font_options ^= GTK_IMHTML_NO_SIZES;
+#else
 	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_formatting")) {
 		gtk_font_options ^= GTK_IMHTML_NO_COLOURS;
 		gtk_font_options ^= GTK_IMHTML_NO_FONTS;
 		gtk_font_options ^= GTK_IMHTML_NO_SIZES;
 	}
+#endif
 
 	/* this is gonna crash one day, I can feel it. */
 	if (GAIM_PLUGIN_PROTOCOL_INFO(gaim_find_prpl(gaim_account_get_protocol_id(conv->account)))->options &
@@ -5784,7 +5793,13 @@
 	gaim_prefs_add_bool("/gaim/gtk/conversations/send_underline", FALSE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/show_timestamps", TRUE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/spellcheck", TRUE);
+#if 1
+	gaim_prefs_add_bool("/gaim/gtk/conversations/ignore_colors", FALSE);
+	gaim_prefs_add_bool("/gaim/gtk/conversations/ignore_fonts", FALSE);
+	gaim_prefs_add_bool("/gaim/gtk/conversations/ignore_font_sizes", FALSE);
+#else
 	gaim_prefs_add_bool("/gaim/gtk/conversations/ignore_formatting", FALSE);
+#endif
 	gaim_prefs_add_bool("/gaim/gtk/conversations/html_shortcuts", FALSE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/smiley_shortcuts", FALSE);
 	gaim_prefs_add_bool("/gaim/gtk/conversations/show_formatting_toolbar", TRUE);
--- a/src/gtknotify.c	Mon May 24 00:46:12 2004 +0000
+++ b/src/gtknotify.c	Mon May 24 04:29:40 2004 +0000
@@ -365,11 +365,20 @@
 
 
 	/* Add the text to the gtkimhtml */
+#if 1 /* PREFSLASH04 */
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_colors"))
+		options ^= GTK_IMHTML_NO_COLOURS;
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_fonts"))
+		options ^= GTK_IMHTML_NO_FONTS;
+	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_font_sizes"))
+		options ^= GTK_IMHTML_NO_SIZES;
+#else
 	if (gaim_prefs_get_bool("/gaim/gtk/conversations/ignore_formatting")) {
 		options ^= GTK_IMHTML_NO_COLOURS;
 		options ^= GTK_IMHTML_NO_FONTS;
 		options ^= GTK_IMHTML_NO_SIZES;
 	}
+#endif
 
 	options ^= GTK_IMHTML_NO_COMMENTS;
 	options ^= GTK_IMHTML_NO_TITLE;
--- a/src/gtkprefs.c	Mon May 24 00:46:12 2004 +0000
+++ b/src/gtkprefs.c	Mon May 24 04:29:40 2004 +0000
@@ -779,8 +779,18 @@
 	gaim_gtk_prefs_checkbox(_("_Highlight misspelled words"),
 			"/gaim/gtk/conversations/spellcheck", vbox);
 #endif
+#if 1 /* PREFSLASH04 */
+	vbox = gaim_gtk_make_frame (ret, _("Ignore"));
+	gaim_gtk_prefs_checkbox(_("Ignore c_olors"),
+							"/gaim/gtk/conversations/ignore_colors", vbox);
+	gaim_gtk_prefs_checkbox(_("Ignore font _faces"),
+							"/gaim/gtk/conversations/ignore_fonts", vbox);
+	gaim_gtk_prefs_checkbox(_("Ignore font si_zes"),
+							"/gaim/gtk/conversations/ignore_font_sizes", vbox);
+#else
 	gaim_gtk_prefs_checkbox(_("_Ignore formatting on incoming messages"),
 			"/gaim/gtk/conversations/ignore_formatting", vbox);
+#endif
 
 	vbox = gaim_gtk_make_frame (ret, _("Default Formatting"));
 
@@ -2830,9 +2840,11 @@
 	/* Remove some no-longer-used prefs */
 	gaim_prefs_remove("/gaim/gtk/blist/show_group_count");
 	gaim_prefs_remove("/gaim/gtk/conversations/icons_on_tabs");
+#if 0 /* PREFSLASH04 */
 	gaim_prefs_remove("/gaim/gtk/conversations/ignore_colors");
 	gaim_prefs_remove("/gaim/gtk/conversations/ignore_fonts");
 	gaim_prefs_remove("/gaim/gtk/conversations/ignore_font_sizes");
+#endif
 	gaim_prefs_remove("/gaim/gtk/conversations/show_urls_as_links");
 	gaim_prefs_remove("/gaim/gtk/conversations/show_smileys");
 	gaim_prefs_remove("/gaim/gtk/conversations/chat/tab_completion");