From 5b140dc1c18fa12b56438bd1045bf2960602b022 Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 20 Mar 2001 16:50:43 +0000 Subject: set color in html citation 2001-03-20 Radek Doulik * mail-tools.c (mail_tool_quote_message): set color in html citation * mail-config.c: added citation highlighting configuration * mail-tools.c (mail_tool_quote_message): use citation highlighting * mail-display.c (mail_text_write): use citation highlighting svn path=/trunk/; revision=8848 --- mail/mail-accounts.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'mail/mail-accounts.c') diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 76d91fabaa..9c48df2c00 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -372,6 +372,27 @@ send_html_toggled (GtkToggleButton *button, gpointer data) mail_config_set_send_html (gtk_toggle_button_get_active (button)); } +static void +citation_highlight_toggled (GtkToggleButton *button, gpointer data) +{ + mail_config_set_citation_highlight (gtk_toggle_button_get_active (button)); +} + +static void +citation_color_set (GnomeColorPicker *cp, guint r, guint g, guint b, guint a) +{ + guint32 rgb; + + rgb = r >> 8; + rgb <<= 8; + rgb |= g >> 8; + rgb <<= 8; + rgb |= b >> 8; + + mail_config_set_citation_color (rgb); +} + + static void timeout_changed (GtkEntry *entry, gpointer data) { @@ -404,6 +425,14 @@ pgp_path_changed (GtkEntry *entry, gpointer data) mail_config_set_pgp_type (type); } +static void +set_color (GnomeColorPicker *cp) +{ + guint32 rgb = mail_config_get_citation_color (); + + gnome_color_picker_set_i8 (cp, (rgb & 0xff0000) >> 16, (rgb & 0xff00) >> 8, rgb & 0xff, 0xff); +} + static void construct (MailAccountsDialog *dialog) { @@ -470,6 +499,17 @@ construct (MailAccountsDialog *dialog) gtk_signal_connect (GTK_OBJECT (dialog->send_html), "toggled", GTK_SIGNAL_FUNC (send_html_toggled), dialog); + dialog->citation_highlight = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chckHighlightCitations")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->citation_highlight), + mail_config_get_citation_highlight ()); + gtk_signal_connect (GTK_OBJECT (dialog->citation_highlight), "toggled", + GTK_SIGNAL_FUNC (citation_highlight_toggled), dialog); + + dialog->citation_color = GNOME_COLOR_PICKER (glade_xml_get_widget (gui, "colorpickerCitations")); + set_color (dialog->citation_color); + gtk_signal_connect (GTK_OBJECT (dialog->citation_color), "color_set", + GTK_SIGNAL_FUNC (citation_color_set), dialog); + dialog->timeout = GTK_SPIN_BUTTON (glade_xml_get_widget (gui, "spinMarkTimeout")); gtk_spin_button_set_value (GTK_SPIN_BUTTON (dialog->timeout), (1.0 * mail_config_get_mark_as_seen_timeout ()) / 1000.0); -- cgit v1.2.3