aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog7
-rw-r--r--calendar/gui/e-itip-control.c23
2 files changed, 25 insertions, 5 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index d90a355ae0..9a30b2c285 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,10 @@
+2004-06-06 Vardhman Jain <vardhman@students.iiit.net>
+
+ * Bug #36247
+ * gui/e-itip-control.c (write_html, set_date_label):
+ Changes to improve the performance of _(str) function call on strings
+ str of the type <tar>str</tag> to avoid translation of tag.
+
2004-06-04 <jpr@novell.com>
* gui/gnome-cal.c: define G_MAXINT32 if it isn't already
diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c
index ad0503001a..6bbe1dfb4d 100644
--- a/calendar/gui/e-itip-control.c
+++ b/calendar/gui/e-itip-control.c
@@ -672,6 +672,7 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
EItipControlPrivate *priv;
ECalComponentDateTime datetime;
static char buffer[1024];
+ gchar *str;
gboolean wrote = FALSE, task_completed = FALSE;
ECalComponentVType type;
@@ -682,20 +683,24 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
buffer[0] = '\0';
e_cal_component_get_dtstart (comp, &datetime);
if (datetime.value) {
+ str = g_strdup_printf ("<b>%s:</b>", _("Starts"));
write_label_piece (itip, &datetime, buffer, 1024,
- _("<b>Starts:</b> "),
+ str,
"<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen(buffer));
wrote = TRUE;
+ g_free (str);
}
e_cal_component_free_datetime (&datetime);
buffer[0] = '\0';
e_cal_component_get_dtend (comp, &datetime);
if (datetime.value){
- write_label_piece (itip, &datetime, buffer, 1024, _("<b>Ends:</b> "), "<br>", FALSE);
+ str = g_strdup_printf ("<b>%s:</b>", _("Ends"));
+ write_label_piece (itip, &datetime, buffer, 1024, str, "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
+ g_free (str);
}
e_cal_component_free_datetime (&datetime);
@@ -712,20 +717,24 @@ set_date_label (EItipControl *itip, GtkHTML *html, GtkHTMLStream *html_stream,
if (type == E_CAL_COMPONENT_TODO && datetime.value) {
/* Pass TRUE as is_utc, so it gets converted to the current
timezone. */
+ str = g_strdup_printf ("<b>%s:</b>", _("Completed"));
datetime.value->is_utc = TRUE;
- write_label_piece (itip, &datetime, buffer, 1024, _("<b>Completed:</b> "), "<br>", FALSE);
+ write_label_piece (itip, &datetime, buffer, 1024, str, "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
task_completed = TRUE;
+ g_free (str);
}
e_cal_component_free_datetime (&datetime);
buffer[0] = '\0';
e_cal_component_get_due (comp, &datetime);
if (type == E_CAL_COMPONENT_TODO && !task_completed && datetime.value) {
- write_label_piece (itip, &datetime, buffer, 1024, _("<b>Due:</b> "), "<br>", FALSE);
+ str = g_strdup_printf ("<b>%s:</b>", _("Due"));
+ write_label_piece (itip, &datetime, buffer, 1024, str, "<br>", FALSE);
gtk_html_write (html, html_stream, buffer, strlen (buffer));
wrote = TRUE;
+ g_free (str);
}
e_cal_component_free_datetime (&datetime);
@@ -807,6 +816,7 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
gchar *html;
const gchar *const_html;
gchar *filename;
+ gchar *str;
priv = itip->priv;
@@ -915,9 +925,12 @@ write_html (EItipControl *itip, const gchar *itip_desc, const gchar *itip_title,
/* Summary */
e_cal_component_get_summary (priv->comp, &text);
- html = text.value ? camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0) : _("<i>None</i>");
+ str = g_strdup_printf ("<i>%s:</i>", _("None"));
+
+ html = text.value ? camel_text_to_html (text.value, CAMEL_MIME_FILTER_TOHTML_CONVERT_NL, 0) : str;
gtk_html_stream_printf (html_stream, "<b>%s</b><br>%s<br><br>",
_("Summary:"), html);
+ g_free (str);
if (text.value)
g_free (html);