[pan2] iconv fix
- From: Heinrich MÃller <henmull src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pan2] iconv fix
- Date: Sun, 18 Dec 2011 16:33:31 +0000 (UTC)
commit c07626c4915590a5d58654c7f21898b8cb7ea991
Author: Heinrich MÃller <henmull src gnome org>
Date: Sun Dec 18 17:33:14 2011 +0100
iconv fix
pan/gui/gui.cc | 6 +++++-
pan/gui/header-pane.cc | 3 ---
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index 1585dc9..a4c2187 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -369,6 +369,8 @@ GUI :: ~GUI ()
foreach (std::set<GtkWidget*>, unref, it)
g_object_unref (*it);
g_object_unref (G_OBJECT(_ui_manager));
+
+ if (iconv_inited) iconv_close(conv);
}
/***
@@ -1637,8 +1639,10 @@ void GUI :: do_read_selected_group ()
char buf[256];
g_snprintf(buf, sizeof(buf), "%s//IGNORE", _prefs.get_string("default-charset", "UTF-8").c_str());
const char * to = g_mime_charset_iconv_name(buf);
- if (strncmp (from, buf, strlen(from)) != 0)
+// if (strncmp (from, buf, strlen(from)) != 0)
{
+ if (iconv_inited)
+ iconv_close(conv);
conv = iconv_open (to, from);
if (conv == (iconv_t)-1)
{
diff --git a/pan/gui/header-pane.cc b/pan/gui/header-pane.cc
index 97af79b..46d56e4 100644
--- a/pan/gui/header-pane.cc
+++ b/pan/gui/header-pane.cc
@@ -1627,9 +1627,6 @@ HeaderPane :: ~HeaderPane ()
for (guint i=0; i<ICON_QTY; ++i)
g_object_unref (G_OBJECT(_icons[i].pixbuf));
- // close iconv handler
- if (iconv_inited) iconv_close(conv);
- iconv_inited = false;
}
GtkWidget*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]