Commit dc5c292a authored by Darin Adler's avatar Darin Adler

Format time using eel_strdup_strftime so we don't have a fixed maximum

	* components/news/nautilus-news.c: (draw_rss_logo_image):
	Format time using eel_strdup_strftime so we don't have
	a fixed maximum buffer size and marked the time format
	for localization.
parent f1c87462
2001-09-27 Darin Adler <darin@bentspoon.com>
* components/news/nautilus-news.c: (draw_rss_logo_image):
Format time using eel_strdup_strftime so we don't have
a fixed maximum buffer size and marked the time format
for localization.
2001-09-26 Alex Larsson <alexl@redhat.com>
* components/mozilla/nautilus-mozilla-content-view.c:
......
......@@ -442,7 +442,7 @@ draw_rss_logo_image (RSSChannelData *channel_data,
int offset,
gboolean measure_only)
{
char time_str[16];
char *time_str;
int logo_width, logo_height;
int v_offset, pixbuf_width;
int time_x_pos, time_y_pos;
......@@ -471,7 +471,7 @@ draw_rss_logo_image (RSSChannelData *channel_data,
/* also, draw the update time in the upper right corner if it fits*/
if (channel_data->last_update != 0 && !measure_only) {
strftime (&time_str[0], 16, "%I:%M %p", localtime (&channel_data->last_update));
time_str = eel_strdup_strftime (_("%I:%M %p"), localtime (&channel_data->last_update));
time_dimensions = eel_scalable_font_measure_text (channel_data->owner->font, 9, time_str, strlen (time_str));
......@@ -485,6 +485,7 @@ draw_rss_logo_image (RSSChannelData *channel_data,
TIME_FONT_SIZE, time_str, strlen (time_str),
EEL_RGB_COLOR_BLACK, EEL_OPACITY_FULLY_OPAQUE);
}
g_free (time_str);
}
}
return v_offset;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment