diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-01-14 08:08:32 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-01-14 08:08:32 +0000 |
commit | 13cda7cefaab6b0eef7b4718629f8ce31cd9eff0 (patch) | |
tree | 26a6f3ec89fcaf68b0420db33cf2f3b350eeefc3 /src/statusbar.c | |
parent | 01109639c07dc4babec7912a8febfe1f989b1b0d (diff) |
fix code conversions, add conv_iconv_strdup_with_cd(), and use EUC-JP-MS for JIS to UTF-8 conversion if available.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@7 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/statusbar.c')
-rw-r--r-- | src/statusbar.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/src/statusbar.c b/src/statusbar.c index 38d1377f..8ddc9508 100644 --- a/src/statusbar.c +++ b/src/statusbar.c @@ -49,26 +49,12 @@ void statusbar_puts(GtkStatusbar *statusbar, const gchar *str) { gint cid; gchar *buf; + gchar *tmp; - buf = g_strdup(str); - strretchomp(buf); - if (strlen(buf) > 76) { - wchar_t *wbuf; - - wbuf = strdup_mbstowcs(buf); - - if (wcslen(wbuf) > 60) { - gchar *tmp; - - g_free(buf); - wbuf[60] = (wchar_t)0; - tmp = strdup_wcstombs(wbuf); - buf = g_strconcat(tmp, "...", NULL); - g_free(tmp); - } - - g_free(wbuf); - } + tmp = g_strdup(str); + strretchomp(tmp); + buf = trim_string(tmp, 76); + g_free(tmp); cid = gtk_statusbar_get_context_id(statusbar, "Standard Output"); gtk_statusbar_pop(statusbar, cid); |