libgimpwidgets: fill ABBREV column in GimpEnumStore

Use gimp_enum_value_get_abbrev() to fill the ABBREV column of
GimpEnumStore.
This commit is contained in:
Ell 2017-11-29 16:34:30 -05:00
parent 684c850196
commit 658d07dffe
1 changed files with 6 additions and 3 deletions

View File

@ -154,9 +154,11 @@ gimp_enum_store_add_value (GtkListStore *store,
{
GtkTreeIter iter = { 0, };
const gchar *desc;
const gchar *abbrev;
gchar *stripped;
desc = gimp_enum_value_get_desc (GIMP_ENUM_STORE (store)->enum_class, value);
abbrev = gimp_enum_value_get_abbrev (GIMP_ENUM_STORE (store)->enum_class, value);
/* no mnemonics in combo boxes */
stripped = gimp_strip_uline (desc);
@ -165,6 +167,7 @@ gimp_enum_store_add_value (GtkListStore *store,
gtk_list_store_set (store, &iter,
GIMP_INT_STORE_VALUE, value->value,
GIMP_INT_STORE_LABEL, stripped,
GIMP_INT_STORE_ABBREV, abbrev,
-1);
g_free (stripped);