aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header-utils.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-05-03 04:32:19 +0800
committerChris Lahey <clahey@src.gnome.org>2002-05-03 04:32:19 +0800
commit874390a8376202f138266bdd641e810db93a3136 (patch)
tree1e19721ead0b36bade4cc011313b0c70b5c71a5d /widgets/table/e-table-header-utils.c
parentcad5e25f863f3bf643a2c7a7b4a77be0bc9db130 (diff)
downloadgsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar.gz
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.tar.zst
gsoc2013-evolution-874390a8376202f138266bdd641e810db93a3136.zip
Added this function that lets you specify the translation domain.
2002-05-02 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-popup-menu.c, gal/widgets/e-popup-menu.h (e_popup_menu_create_with_domain): Added this function that lets you specify the translation domain. From gal/e-table/ChangeLog: 2002-05-02 Christopher James Lahey <clahey@ximian.com> * e-table-click-to-add.c (finish_editing): Add horizontal dividers here too. * e-table-config.c (create_global_store): Translate column headers here. * e-table-header-item.c (ethi_header_context_menu): Use e_popup_menu_create_with_domain here. * e-table-header-utils.c (e_table_header_draw_button): Translate from utf8 here before drawing. * e-table-memory-store.c, e-table-memory-store.h (e_table_memory_store_insert_adopt_array): Changed the name of this function from e_table_memory_store_insert_adopt. (e_table_memory_store_insert_adopt): Added this function which takes a ... list. * e-table-utils.c (et_col_spec_to_col): Translate column titles to utf8 here. svn path=/trunk/; revision=16668
Diffstat (limited to 'widgets/table/e-table-header-utils.c')
-rw-r--r--widgets/table/e-table-header-utils.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/widgets/table/e-table-header-utils.c b/widgets/table/e-table-header-utils.c
index d5000a9800..9668250961 100644
--- a/widgets/table/e-table-header-utils.c
+++ b/widgets/table/e-table-header-utils.c
@@ -27,10 +27,12 @@
#include <config.h>
#endif
+#include "e-table-header-utils.h"
+
#include <string.h> /* strlen() */
#include <glib.h>
#include "e-table-defines.h"
-#include "e-table-header-utils.h"
+#include <gal/widgets/e-unicode.h>
@@ -225,6 +227,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
int inner_x, inner_y;
int inner_width, inner_height;
GdkGC *gc;
+ char *text;
g_return_if_fail (drawable != NULL);
g_return_if_fail (ecol != NULL);
@@ -302,6 +305,8 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
/* Pixbuf or label */
+ text = e_utf8_to_gtk_string (widget, ecol->text);
+
if (ecol->is_pixbuf) {
int pwidth, pheight;
int clip_width, clip_height;
@@ -323,7 +328,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
int width;
int ypos;
- gdk_string_extents (font, ecol->text, NULL, &rbearing, &width, NULL, NULL);
+ gdk_string_extents (font, text, NULL, &rbearing, &width, NULL, NULL);
if (rbearing < inner_width - (pwidth + 1)) {
xpos = inner_x + (inner_width - width - (pwidth + 1)) / 2;
}
@@ -332,7 +337,7 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
e_table_draw_elided_string (drawable, font, gc,
xpos + pwidth + 1, ypos,
- ecol->text, inner_width - (xpos - inner_x), FALSE);
+ text, inner_width - (xpos - inner_x), FALSE);
}
pixmap = make_composite_pixmap (drawable, gc,
@@ -355,8 +360,9 @@ e_table_header_draw_button (GdkDrawable *drawable, ETableCol *ecol,
e_table_draw_elided_string (drawable, font, gc,
inner_x, ypos,
- ecol->text, inner_width, TRUE);
+ text, inner_width, TRUE);
}
+ g_free (text);
}
/* Computes the length of a string that needs to be trimmed for elision */