aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-23 06:15:25 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2011-06-23 06:15:25 +0000
commitc36140823bb2b5a3c7013970748a8cef832e2ce3 (patch)
tree619a5b2d104fb7b7393776ac800ef967947c0294 /src
parentafa9a51b3aaabe150ebebc67bd63fdaf5f558d67 (diff)
libsylph/utils.[ch]: to_human_readable_buf(): new.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2909 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/inc.c9
-rw-r--r--src/mimeview.c5
2 files changed, 5 insertions, 9 deletions
diff --git a/src/inc.c b/src/inc.c
index 5ac069a5..661aa394 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -1029,7 +1029,6 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
{
gchar buf[BUFFSIZE];
Pop3Session *pop3_session = POP3_SESSION(inc_session->session);
- gchar *total_size_str;
gint64 cur_total;
gint64 total;
gint cur_num;
@@ -1050,7 +1049,10 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
if ((pop3_session->state == POP3_RETR ||
pop3_session->state == POP3_RETR_RECV ||
pop3_session->state == POP3_DELETE) && total_num_to_recv > 0) {
- Xstrdup_a(total_size_str, to_human_readable(total), return);
+ gchar total_size_str[16];
+
+ to_human_readable_buf(total_size_str, sizeof(total_size_str),
+ total);
g_snprintf(buf, sizeof(buf),
_("Retrieving message (%d / %d) (%s / %s)"),
cur_num, total_num_to_recv,
@@ -1079,8 +1081,7 @@ static void inc_progress_dialog_set_progress(IncProgressDialog *inc_dialog,
g_snprintf(buf, sizeof(buf),
_("%d message(s) (%s) received"),
pop3_session->cur_total_num,
- to_human_readable
- (pop3_session->cur_total_recv_bytes));
+ to_human_readable(pop3_session->cur_total_recv_bytes));
progress_dialog_set_row_progress(inc_dialog->dialog,
inc_dialog->cur_row, buf);
}
diff --git a/src/mimeview.c b/src/mimeview.c
index fffd508a..1fa10517 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -1061,8 +1061,6 @@ static void mimeview_display_as_text(MimeView *mimeview)
void mimeview_save_as(MimeView *mimeview)
{
- gchar *filename;
- gchar *defname = NULL;
MimeInfo *partinfo;
if (!mimeview->opened) return;
@@ -1212,7 +1210,6 @@ void mimeview_save_part_as(MimeView *mimeview, MimeInfo *partinfo)
static void mimeview_launch(MimeView *mimeview)
{
MimeInfo *partinfo;
- gchar *filename;
if (!mimeview->opened) return;
if (!mimeview->file) return;
@@ -1226,8 +1223,6 @@ static void mimeview_launch(MimeView *mimeview)
static void mimeview_open_with(MimeView *mimeview)
{
MimeInfo *partinfo;
- gchar *filename;
- gchar *cmd;
if (!mimeview->opened) return;
if (!mimeview->file) return;