aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-unicode.c17
-rw-r--r--widgets/misc/e-unicode.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index 8612048e21..e9b87ca64d 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -199,3 +199,20 @@ e_utf8_gtk_entry_set_text (GtkEntry *entry, const gchar *text)
if (s) g_free (s);
}
+GtkWidget *
+e_utf8_gtk_menu_item_new_with_label (const gchar *label)
+{
+ GtkWidget *w;
+ gchar *s;
+
+ if (!label) return NULL;
+
+ s = e_utf8_to_gtk_string (NULL, label);
+ w = gtk_menu_item_new_with_label (s);
+
+ if (s) g_free (s);
+
+ return w;
+}
+
+
diff --git a/widgets/misc/e-unicode.h b/widgets/misc/e-unicode.h
index 7bd46397e4..5df2932ac4 100644
--- a/widgets/misc/e-unicode.h
+++ b/widgets/misc/e-unicode.h
@@ -29,5 +29,7 @@ void e_utf8_gtk_entry_set_text (GtkEntry *entry, const gchar *text);
gchar *e_utf8_gtk_editable_get_chars (GtkEditable *editable, gint start, gint end);
+GtkWidget *e_utf8_gtk_menu_item_new_with_label (const gchar *label);
+
#endif