[Commits] [SCM] claws branch, master, updated. 3.11.1-59-g72dbf64

claws at claws-mail.org claws at claws-mail.org
Mon Jan 19 10:22:25 CET 2015


The branch, master has been updated
       via  72dbf64f398e4c56d31819c24aabd83ba3476c9b (commit)
      from  c0810db8bfb77999ceae738e88c7ff11352bb366 (commit)

Summary of changes:
 AUTHORS           |    1 +
 src/codeconv.c    |    3 +++
 src/codeconv.h    |    3 +++
 src/compose.c     |    3 +++
 src/gtk/authors.h |    1 +
 src/mainwindow.c  |    2 ++
 src/messageview.c |    2 ++
 src/prefs_send.c  |    1 +
 src/procmime.c    |    2 ++
 9 files changed, 18 insertions(+)


- Log -----------------------------------------------------------------
commit 72dbf64f398e4c56d31819c24aabd83ba3476c9b
Author: Paul <paul at claws-mail.org>
Date:   Mon Jan 19 09:21:52 2015 +0000

    add support for x-mac-cyrillic encoding.
    
    patch by Anton Butanaev.

diff --git a/AUTHORS b/AUTHORS
index 31a80d7..52d91ee 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -309,3 +309,4 @@ contributors (in addition to the above; based on Changelog)
 	Alessandro Di Federico
 	Timo Teräs
 	H. Merijn Brand
+	Anton Butanaev
diff --git a/src/codeconv.c b/src/codeconv.c
index 565c0c2..419e291 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -695,6 +695,8 @@ conv_get_fallback_for_private_encoding(const gchar *encoding)
 {
 	if (encoding && (encoding[0] == 'X' || encoding[0] == 'x') &&
 	    encoding[1] == '-') {
+		if (!g_ascii_strcasecmp(encoding, CS_X_MACCYR))
+			return CS_MACCYR;
 		if (!g_ascii_strcasecmp(encoding, CS_X_GBK))
 			return CS_GBK;
 	}
@@ -1022,6 +1024,7 @@ static const struct {
 	{C_WINDOWS_1257,	CS_WINDOWS_1257},
 	{C_WINDOWS_1258,	CS_WINDOWS_1258},
 	{C_KOI8_R,		CS_KOI8_R},
+	{C_MACCYR,		CS_MACCYR},
 	{C_KOI8_T,		CS_KOI8_T},
 	{C_KOI8_U,		CS_KOI8_U},
 	{C_ISO_2022_JP,		CS_ISO_2022_JP},
diff --git a/src/codeconv.h b/src/codeconv.h
index d293c9e..bdc6dff 100644
--- a/src/codeconv.h
+++ b/src/codeconv.h
@@ -69,6 +69,7 @@ typedef enum
 	C_WINDOWS_1257,
 	C_WINDOWS_1258,
 	C_KOI8_R,
+	C_MACCYR,
 	C_KOI8_T,
 	C_KOI8_U,
 	C_ISO_2022_JP,
@@ -141,6 +142,8 @@ struct _CodeConverter
 #define CS_WINDOWS_1257		"Windows-1257"
 #define CS_WINDOWS_1258		"Windows-1258"
 #define CS_KOI8_R		"KOI8-R"
+#define CS_X_MACCYR		"x-mac-cyrillic"
+#define CS_MACCYR		"mac-cyrillic"
 #define CS_KOI8_T		"KOI8-T"
 #define CS_KOI8_U		"KOI8-U"
 #define CS_ISO_2022_JP		"ISO-2022-JP"
diff --git a/src/compose.c b/src/compose.c
index e9ecf08..d4156ca 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -737,6 +737,7 @@ static GtkRadioActionEntry compose_radio_enc_entries[] =
 	ENC_ACTION(CS_ISO_8859_9, C_ISO_8859_9, N_("Turkish (ISO-8859-_9)")), /* RADIO compose_set_encoding_cb */
 	ENC_ACTION("Cyrillic/"CS_ISO_8859_5, C_ISO_8859_5, "ISO-8859-_5"), /* RADIO compose_set_encoding_cb */
 	ENC_ACTION("Cyrillic/"CS_KOI8_R, C_KOI8_R, "KOI8-_R"), /* RADIO compose_set_encoding_cb */
+	ENC_ACTION("Cyrillic/"CS_MACCYR, C_MACCYR, "MAC_CYR"), /* RADIO compose_set_encoding_cb */
 	ENC_ACTION("Cyrillic/"CS_KOI8_U, C_KOI8_U, "KOI8-_U"), /* RADIO compose_set_encoding_cb */
 	ENC_ACTION("Cyrillic/"CS_WINDOWS_1251, C_WINDOWS_1251, "Windows-1251"), /* RADIO compose_set_encoding_cb */
 	ENC_ACTION("Japanese/"CS_ISO_2022_JP, C_ISO_2022_JP, "ISO-2022-_JP"), /* RADIO compose_set_encoding_cb */
@@ -7658,6 +7659,7 @@ static Compose *compose_create(PrefsAccount *account,
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Options/Encoding", "Cyrillic", "Options/Encoding/Cyrillic", GTK_UI_MANAGER_MENU)
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Options/Encoding/Cyrillic", CS_ISO_8859_5, "Options/Encoding/Cyrillic/"CS_ISO_8859_5, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Options/Encoding/Cyrillic", CS_KOI8_R, "Options/Encoding/Cyrillic/"CS_KOI8_R, GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Options/Encoding/Cyrillic", CS_MACCYR, "Options/Encoding/Cyrillic/"CS_MACCYR, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Options/Encoding/Cyrillic", CS_KOI8_U, "Options/Encoding/Cyrillic/"CS_KOI8_U, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Options/Encoding/Cyrillic", CS_WINDOWS_1251, "Options/Encoding/Cyrillic/"CS_WINDOWS_1251, GTK_UI_MANAGER_MENUITEM)
 
@@ -8334,6 +8336,7 @@ static void compose_set_out_encoding(Compose *compose)
 		case C_WINDOWS_1256: branch = "Menu/Options/Encoding/Arabic/" CS_WINDOWS_1256; break;
 		case C_ISO_8859_5: branch = "Menu/Options/Encoding/Cyrillic/" CS_ISO_8859_5; break;
 		case C_KOI8_R: branch = "Menu/Options/Encoding/Cyrillic/" CS_KOI8_R; break;
+		case C_MACCYR: branch = "Menu/Options/Encoding/Cyrillic/" CS_MACCYR; break;
 		case C_KOI8_U: branch = "Menu/Options/Encoding/Cyrillic/" CS_KOI8_U; break;
 		case C_WINDOWS_1251: branch = "Menu/Options/Encoding/Cyrillic/" CS_WINDOWS_1251; break;
 		case C_ISO_2022_JP: branch = "Menu/Options/Encoding/Japanese/" CS_ISO_2022_JP; break;
diff --git a/src/gtk/authors.h b/src/gtk/authors.h
index 02d36e0..63e11da 100644
--- a/src/gtk/authors.h
+++ b/src/gtk/authors.h
@@ -97,6 +97,7 @@ static char *CONTRIBS_LIST[] = {
 "H. Merijn Brand",
 "Eugene Brevdo",
 "Sean Buckheister",
+"Anton Butanaev",
 "Henrik Carlqvist",
 "Luca Cavalli",
 "David Chalmers",
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 0e614b7..377d1b9 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -882,6 +882,7 @@ static GtkRadioActionEntry mainwin_radio_enc_entries[] =
 	ENC_ACTION(CS_ISO_8859_9, C_ISO_8859_9, N_("Turkish (ISO-8859-_9)")), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_ISO_8859_5, C_ISO_8859_5, "ISO-8859-_5"), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_KOI8_R, C_KOI8_R, "KOI8-_R"), /* RADIO set_charset_cb */
+	ENC_ACTION("Cyrillic/"CS_MACCYR, C_MACCYR, "MAC_CYR"), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_KOI8_U, C_KOI8_U, "KOI8-_U"), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_WINDOWS_1251, C_WINDOWS_1251, "Windows-1251"), /* RADIO set_charset_cb */
 	ENC_ACTION("Japanese/"CS_ISO_2022_JP, C_ISO_2022_JP, "ISO-2022-_JP"), /* RADIO set_charset_cb */
@@ -1672,6 +1673,7 @@ MainWindow *main_window_create()
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding", "Cyrillic", "View/Encoding/Cyrillic", GTK_UI_MANAGER_MENU)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_ISO_8859_5, "View/Encoding/Cyrillic/"CS_ISO_8859_5, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_KOI8_R, "View/Encoding/Cyrillic/"CS_KOI8_R, GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_MACCYR, "View/Encoding/Cyrillic/"CS_MACCYR, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_KOI8_U, "View/Encoding/Cyrillic/"CS_KOI8_U, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_WINDOWS_1251, "View/Encoding/Cyrillic/"CS_WINDOWS_1251, GTK_UI_MANAGER_MENUITEM)
 
diff --git a/src/messageview.c b/src/messageview.c
index 6618c8b..e6fc2ad 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -366,6 +366,7 @@ static GtkRadioActionEntry msgview_radio_enc_entries[] =
 	ENC_ACTION(CS_ISO_8859_9, C_ISO_8859_9, N_("Turkish (ISO-8859-_9)")), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_ISO_8859_5, C_ISO_8859_5, "ISO-8859-_5"), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_KOI8_R, C_KOI8_R, "KOI8-_R"), /* RADIO set_charset_cb */
+	ENC_ACTION("Cyrillic/"CS_MACCYR, C_MACCYR, "MAC_CYR"), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_KOI8_U, C_KOI8_U, "KOI8-_U"), /* RADIO set_charset_cb */
 	ENC_ACTION("Cyrillic/"CS_WINDOWS_1251, C_WINDOWS_1251, "Windows-1251"), /* RADIO set_charset_cb */
 	ENC_ACTION("Japanese/"CS_ISO_2022_JP, C_ISO_2022_JP, "ISO-2022-_JP"), /* RADIO set_charset_cb */
@@ -572,6 +573,7 @@ static void messageview_add_toolbar(MessageView *msgview, GtkWidget *window)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Encoding", "Cyrillic", "View/Encoding/Cyrillic", GTK_UI_MANAGER_MENU)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_ISO_8859_5, "View/Encoding/Cyrillic/"CS_ISO_8859_5, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_KOI8_R, "View/Encoding/Cyrillic/"CS_KOI8_R, GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_MACCYR, "View/Encoding/Cyrillic/"CS_MACCYR, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_KOI8_U, "View/Encoding/Cyrillic/"CS_KOI8_U, GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Encoding/Cyrillic", CS_WINDOWS_1251, "View/Encoding/Cyrillic/"CS_WINDOWS_1251, GTK_UI_MANAGER_MENUITEM)
 
diff --git a/src/prefs_send.c b/src/prefs_send.c
index ee8f876..b76ac9b 100644
--- a/src/prefs_send.c
+++ b/src/prefs_send.c
@@ -242,6 +242,7 @@ static void prefs_send_create_widget(PrefsPage *_page, GtkWindow *window,
 	SET_MENUITEM(NULL, NULL);
 	SET_MENUITEM(_("Cyrillic (ISO-8859-5)"),	 CS_ISO_8859_5);
 	SET_MENUITEM(_("Cyrillic (KOI8-R)"),		 CS_KOI8_R);
+	SET_MENUITEM(_("Cyrillic (X-MAC-CYRILLIC)"),		 CS_MACCYR);
 	SET_MENUITEM(_("Cyrillic (KOI8-U)"),		 CS_KOI8_U);
 	SET_MENUITEM(_("Cyrillic (Windows-1251)"),	 CS_WINDOWS_1251);
 	SET_MENUITEM(NULL, NULL);
diff --git a/src/procmime.c b/src/procmime.c
index 20401d8..78ef192 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -1269,6 +1269,8 @@ EncodingType procmime_get_encoding_for_charset(const gchar *charset)
 		return ENC_7BIT;
 	else if (!g_ascii_strcasecmp(charset, "ISO-8859-5") ||
 		 !g_ascii_strncasecmp(charset, "KOI8-", 5) ||
+		 !g_ascii_strcasecmp(charset, "X-MAC-CYRILLIC") ||
+		 !g_ascii_strcasecmp(charset, "MACCYRILLIC") ||
 		 !g_ascii_strcasecmp(charset, "Windows-1251"))
 		return ENC_8BIT;
 	else if (!g_ascii_strncasecmp(charset, "ISO-8859-", 9))

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list