diff options
author | Hans Petter Jansson <hpj@ximian.com> | 2003-02-23 14:49:31 +0800 |
---|---|---|
committer | Hans Petter <hansp@src.gnome.org> | 2003-02-23 14:49:31 +0800 |
commit | 1f36e43b9464195715f676104bcf47edd9630ba3 (patch) | |
tree | b4358d340c03d065b170f7f0c535cd622d80be1f /calendar | |
parent | eea8bc47ec3b8fc60ac9d35a160f05f84ad96604 (diff) | |
download | gsoc2013-evolution-1f36e43b9464195715f676104bcf47edd9630ba3.tar gsoc2013-evolution-1f36e43b9464195715f676104bcf47edd9630ba3.tar.gz gsoc2013-evolution-1f36e43b9464195715f676104bcf47edd9630ba3.tar.bz2 gsoc2013-evolution-1f36e43b9464195715f676104bcf47edd9630ba3.tar.lz gsoc2013-evolution-1f36e43b9464195715f676104bcf47edd9630ba3.tar.xz gsoc2013-evolution-1f36e43b9464195715f676104bcf47edd9630ba3.tar.zst gsoc2013-evolution-1f36e43b9464195715f676104bcf47edd9630ba3.zip |
Eliminate e_utf8_to_gtk_string ().
2003-02-23 Hans Petter Jansson <hpj@ximian.com>
* gui/cal-search-bar.c (make_suboptions): Eliminate
e_utf8_to_gtk_string ().
* gui/e-timezone-entry.c (e_timezone_entry_get_display_name):
Ditto.
* gui/calendar-model.c (date_value_to_string):
e_utf8_from_locale_string () -> g_locale_to_utf8 ().
(calendar_model_value_to_string): Ditto.
* gui/e-cell-date-edit-text.c (ecd_get_text): Ditto.
* gui/e-itip-control.c (write_label_piece): Ditto.
* gui/print.c (format_date): Ditto.
(print_week_view_background): Ditto.
(print_month_summary): Ditto.
(print_date_label): Ditto.
(print_comp_item): Ditto.
* gui/alarm-notify/alarm-notify-dialog.c (write_html_heading):
Ditto.
svn path=/trunk/; revision=20008
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 25 | ||||
-rw-r--r-- | calendar/gui/cal-search-bar.c | 4 | ||||
-rw-r--r-- | calendar/gui/calendar-model.c | 10 | ||||
-rw-r--r-- | calendar/gui/e-cell-date-edit-text.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-itip-control.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-timezone-entry.c | 5 | ||||
-rw-r--r-- | calendar/gui/print.c | 10 |
7 files changed, 40 insertions, 18 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 66ac91aaa2..d18c83088a 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,28 @@ +2003-02-23 Hans Petter Jansson <hpj@ximian.com> + + * gui/cal-search-bar.c (make_suboptions): Eliminate + e_utf8_to_gtk_string (). + + * gui/e-timezone-entry.c (e_timezone_entry_get_display_name): + Ditto. + + * gui/calendar-model.c (date_value_to_string): + e_utf8_from_locale_string () -> g_locale_to_utf8 (). + (calendar_model_value_to_string): Ditto. + + * gui/e-cell-date-edit-text.c (ecd_get_text): Ditto. + + * gui/e-itip-control.c (write_label_piece): Ditto. + + * gui/print.c (format_date): Ditto. + (print_week_view_background): Ditto. + (print_month_summary): Ditto. + (print_date_label): Ditto. + (print_comp_item): Ditto. + + * gui/alarm-notify/alarm-notify-dialog.c (write_html_heading): + Ditto. + 2003-02-22 Hans Petter Jansson <hpj@ximian.com> * gui/dialogs/task-details-page.c (get_widgets): Show the custom diff --git a/calendar/gui/cal-search-bar.c b/calendar/gui/cal-search-bar.c index 4201442914..e5c64aaa72 100644 --- a/calendar/gui/cal-search-bar.c +++ b/calendar/gui/cal-search-bar.c @@ -368,9 +368,7 @@ make_suboptions (CalSearchBar *cal_search) char *str; category = priv->categories->pdata[i]; - str = e_utf8_to_gtk_string (GTK_WIDGET (cal_search), category); - if (!str) - str = g_strdup (""); + str = g_strdup (category ? category : ""); subitems[i + CATEGORIES_OFFSET].text = str; subitems[i + CATEGORIES_OFFSET].id = i + CATEGORIES_OFFSET; diff --git a/calendar/gui/calendar-model.c b/calendar/gui/calendar-model.c index ce981fb144..94cc4e6219 100644 --- a/calendar/gui/calendar-model.c +++ b/calendar/gui/calendar-model.c @@ -1672,7 +1672,7 @@ date_value_to_string (ETableModel *etm, const void *value) e_time_format_date_and_time (&tmp_tm, priv->use_24_hour_format, TRUE, FALSE, buffer, sizeof (buffer)); - return e_utf8_from_locale_string (buffer); + return g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL); } @@ -1700,17 +1700,17 @@ calendar_model_value_to_string (ETableModel *etm, int col, const void *value) case CAL_COMPONENT_FIELD_ICON: if (GPOINTER_TO_INT (value) == 0) - return e_utf8_from_locale_string (_("Normal")); + return g_locale_to_utf8 (_("Normal"), -1, NULL, NULL, NULL); else if (GPOINTER_TO_INT (value) == 1) - return e_utf8_from_locale_string (_("Recurring")); + return g_locale_to_utf8 (_("Recurring"), -1, NULL, NULL, NULL); else - return e_utf8_from_locale_string (_("Assigned")); + return g_locale_to_utf8 (_("Assigned"), -1, NULL, NULL, NULL); case CAL_COMPONENT_FIELD_HAS_ALARMS: case CAL_COMPONENT_FIELD_COMPLETE: case CAL_COMPONENT_FIELD_RECURRING: case CAL_COMPONENT_FIELD_OVERDUE: - return e_utf8_from_locale_string (value ? _("Yes") : _("No")); + return g_locale_to_utf8 (value ? _("Yes") : _("No"), -1, NULL, NULL, NULL); case CAL_COMPONENT_FIELD_COLOR: return NULL; diff --git a/calendar/gui/e-cell-date-edit-text.c b/calendar/gui/e-cell-date-edit-text.c index 94f90c1c2a..f6e6e31b60 100644 --- a/calendar/gui/e-cell-date-edit-text.c +++ b/calendar/gui/e-cell-date-edit-text.c @@ -88,7 +88,7 @@ ecd_get_text (ECellText *cell, ETableModel *model, int col, int row) e_time_format_date_and_time (&tmp_tm, ecd->use_24_hour_format, !dv->tt.is_date, FALSE, buffer, sizeof (buffer)); - return e_utf8_from_locale_string (buffer); + return g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL); } diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 9d2c894781..42dc7612df 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -535,7 +535,7 @@ write_label_piece (EItipControl *itip, CalComponentDateTime *dt, FALSE, FALSE, time_buf, sizeof (time_buf)); - time_utf8 = e_utf8_from_locale_string (time_buf); + time_utf8 = g_locale_to_utf8 (time_buf, -1, NULL, NULL, NULL); strcat (buffer, time_utf8); g_free (time_utf8); diff --git a/calendar/gui/e-timezone-entry.c b/calendar/gui/e-timezone-entry.c index 7f5c36600b..89116212f6 100644 --- a/calendar/gui/e-timezone-entry.c +++ b/calendar/gui/e-timezone-entry.c @@ -309,12 +309,11 @@ e_timezone_entry_get_display_name (ETimezoneEntry *tentry, /* We check if it is one of our builtin timezone names, in which case we call gettext to translate it. If it isn't a builtin timezone - name, we need to convert it to the GTK+ encoding. */ + name, we don't. */ if (icaltimezone_get_builtin_timezone (display_name)) { return g_strdup (_(display_name)); } else { - return e_utf8_to_gtk_string (GTK_WIDGET (tentry), - display_name); + return g_strdup (display_name); } } diff --git a/calendar/gui/print.c b/calendar/gui/print.c index 472c447b10..1b83073766 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -513,7 +513,7 @@ format_date(time_t time, int flags, char *buffer, int bufflen) strcat(fmt, "%Y"); } strftime(buffer, bufflen, fmt, &tm); - utf_str = e_utf8_from_locale_string (buffer); + utf_str = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL); strncpy (buffer, utf_str, bufflen - 1); buffer[bufflen - 1] = '\0'; g_free (utf_str); @@ -1525,7 +1525,7 @@ print_week_view_background (GnomePrintContext *pc, GnomeFont *font, } strftime (buffer, sizeof (buffer), format_string, &tm); - utf_str = e_utf8_from_locale_string (buffer); + utf_str = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL); print_text_size (pc, utf_str, ALIGN_RIGHT, x1, x2 - 4, y1 - 2, y1 - 2 - font_size); g_free (utf_str); @@ -1748,7 +1748,7 @@ print_month_summary (GnomePrintContext *pc, GnomeCalendar *gcal, time_t whence, x2 = x1 + cell_width; print_border (pc, x1, x2, y1, y2, 1.0, -1.0); - utf_str = e_utf8_from_locale_string (buffer); + utf_str = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL); print_text_size (pc, utf_str, ALIGN_CENTER, x1, x2, y1, y2); g_free (utf_str); @@ -2233,7 +2233,7 @@ print_date_label (GnomePrintContext *pc, CalComponent *comp, CalClient *client, write_label_piece (due, buffer, 1024, _("Due "), NULL); } - utf_text = e_utf8_from_locale_string (buffer); + utf_text = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL); print_text_size_bold (pc, utf_text, ALIGN_LEFT, left, right, top, top - 15); g_free (utf_text); @@ -2334,7 +2334,7 @@ print_comp_item (GnomePrintContext *pc, CalComponent *comp, CalClient *client, priority_string = cal_util_priority_to_string (*priority); cal_component_free_priority (priority); - priority_utf8 = e_utf8_from_locale_string (priority_string); + priority_utf8 = g_locale_to_utf8 (priority_string, -1, NULL, NULL, NULL); text = g_strdup_printf (_("Priority: %s"), priority_utf8); top = bound_text (pc, font, text, |