From 34dcaea22c7659d3831920d5c95c71624b1fd762 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 27 Mar 2008 11:09:32 +0000 Subject: ** Fix for bug #502826 (original patch by nickspoon0) 2008-03-27 Milan Crha ** Fix for bug #502826 (original patch by nickspoon0) * mail-config.glade: * em-composer-prefs.c: (attach_style_reply_new_order), (attach_style_info_reply), (em_composer_prefs_construct): Reword and reorder Reply Style items in the Preferences. svn path=/trunk/; revision=35262 --- mail/ChangeLog | 9 +++++++++ mail/em-composer-prefs.c | 27 +++++++++++++++++++++++++-- mail/mail-config.glade | 18 +++++++++--------- 3 files changed, 43 insertions(+), 11 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 1cf028425a..053cf113a8 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2008-03-27 Milan Crha + + ** Fix for bug #502826 (original patch by nickspoon0) + + * mail-config.glade: + * em-composer-prefs.c: (attach_style_reply_new_order), + (attach_style_info_reply), (em_composer_prefs_construct): + Reword and reorder Reply Style items in the Preferences. + 2008-03-27 Milan Crha ** Fix for bug #488175 diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 11857c14ba..1f90b6ee3b 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -720,6 +720,19 @@ spell_setup_check_options (EMComposerPrefs *prefs) * End of Spell checking */ +static int +attach_style_reply_new_order (int style_id, gboolean from_enum_to_option_id) +{ + int values[] = {MAIL_CONFIG_REPLY_ATTACH, 0, MAIL_CONFIG_REPLY_OUTLOOK, 1, MAIL_CONFIG_REPLY_QUOTED, 2, MAIL_CONFIG_REPLY_DO_NOT_QUOTE, 3, -1, -1}; + int i; + + for (i = from_enum_to_option_id ? 0 : 1; values[i] != -1; i += 2) { + if (values[i] == style_id) + return values [from_enum_to_option_id ? i + 1 : i - 1]; + } + + return style_id; +} static void attach_style_info (GtkWidget *item, gpointer user_data) @@ -731,6 +744,16 @@ attach_style_info (GtkWidget *item, gpointer user_data) (*style)++; } +static void +attach_style_info_reply (GtkWidget *item, gpointer user_data) +{ + int *style = user_data; + + g_object_set_data ((GObject *) item, "style", GINT_TO_POINTER (attach_style_reply_new_order (*style, FALSE))); + + (*style)++; +} + static void toggle_button_toggled (GtkToggleButton *toggle, EMComposerPrefs *prefs) { @@ -975,10 +998,10 @@ em_composer_prefs_construct (EMComposerPrefs *prefs) prefs->reply_style = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuReplyStyle")); style = gconf_client_get_int (prefs->gconf, "/apps/evolution/mail/format/reply_style", NULL); - gtk_option_menu_set_history (prefs->reply_style, style); + gtk_option_menu_set_history (prefs->reply_style, attach_style_reply_new_order (style, TRUE)); style = 0; gtk_container_foreach (GTK_CONTAINER (gtk_option_menu_get_menu (prefs->reply_style)), - attach_style_info, &style); + attach_style_info_reply, &style); option_menu_connect (prefs, prefs->reply_style, G_CALLBACK (style_activate), "/apps/evolution/mail/format/reply_style"); diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 8c722ed581..25a83cf157 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -7146,38 +7146,38 @@ For example: "Work" or "Personal" True - - + True - Quote original message + Attachment True - + True - Do not quote original message + Inline (Outlook style) True - + True - Attach original message + Quoted True - + True - Inline original message (Outlook style) + Do not quote True + -- cgit v1.2.3