mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
libgimpwidgets: support enums with mnemonics in GimpEnumStrore
Strip the '_' away, combo boxes don't have mnemonics.
This commit is contained in:
parent
0652cd016b
commit
87f14fbdbc
1 changed files with 7 additions and 1 deletions
|
@ -153,14 +153,20 @@ gimp_enum_store_add_value (GtkListStore *store,
|
|||
{
|
||||
GtkTreeIter iter = { 0, };
|
||||
const gchar *desc;
|
||||
gchar *stripped;
|
||||
|
||||
desc = gimp_enum_value_get_desc (GIMP_ENUM_STORE (store)->enum_class, value);
|
||||
|
||||
/* no mnemonics in combo boxes */
|
||||
stripped = gimp_strip_uline (desc);
|
||||
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
GIMP_INT_STORE_VALUE, value->value,
|
||||
GIMP_INT_STORE_LABEL, desc,
|
||||
GIMP_INT_STORE_LABEL, stripped,
|
||||
-1);
|
||||
|
||||
g_free (stripped);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue