# Path: kano_profile_gui/image_helper_functions.py
# def create_translucent_layer(width, height):
#     translucent_layer = Gtk.EventBox()
#     translucent_layer.get_style_context().add_class('locked_translucent')
#     translucent_layer.set_size_request(width, height)
#     return translucent_layer
# 
# def get_image_path_at_size(category, name, width, height, locked):
# 
#     size_dir = str(width) + 'x' + str(height)
# 
#     if locked:
#         name = name + "_locked"
# 
#     path = os.path.join(
#         media_dir,
#         "images/badges",
#         size_dir,
#         category,
#         name + '.png'
#     )
#     return path


from gi.repository import Gtk, GdkPixbuf
from kano_profile_gui.image_helper_functions import (
    create_translucent_layer, get_image_path_at_size
)
import kano_profile_gui.components.icons as icons
import kano.gtk3.cursor as cursor
import unicodedata
        return self.title.upper()

    def pack_image(self, badge_info):
        '''
        Get the file path for the badge, pack it and optionally add
        an overlay.
        '''

        locked = not badge_info['achieved']
        force_locked = False

        img = Gtk.Image()

        # New system
        if 'image' in badge_info:
            path = badge_info['image']

            if locked:
                force_locked = True

            width = 130
            height = 130
            self.fixed.put(img, 60, 30)

        # Old system
        else:
            category = badge_info['category']
            name = badge_info['name']
            width = self.img_width
            height = self.img_height

# Path: kano_profile_gui/image_helper_functions.py
# def create_translucent_layer(width, height):
#     translucent_layer = Gtk.EventBox()
#     translucent_layer.get_style_context().add_class('locked_translucent')
#     translucent_layer.set_size_request(width, height)
#     return translucent_layer
# 
# def get_image_path_at_size(category, name, width, height, locked):
# 
#     size_dir = str(width) + 'x' + str(height)
# 
#     if locked:
#         name = name + "_locked"
# 
#     path = os.path.join(
#         media_dir,
#         "images/badges",
#         size_dir,
#         category,
#         name + '.png'
#     )
#     return path


# Path: kano_profile_gui/BadgeItem.py
from gi.repository import Gtk, GdkPixbuf
from kano_profile_gui.image_helper_functions import (
    create_translucent_layer, get_image_path_at_size
)
import kano_profile_gui.components.icons as icons
import kano.gtk3.cursor as cursor
import unicodedata

        return self.title.upper()

    def pack_image(self, badge_info):
        '''
        Get the file path for the badge, pack it and optionally add
        an overlay.
        '''

        locked = not badge_info['achieved']
        force_locked = False

        img = Gtk.Image()

        # New system
        if 'image' in badge_info:
            path = badge_info['image']

            if locked:
                force_locked = True

            width = 130
            height = 130
            self.fixed.put(img, 60, 30)

        # Old system
        else:
            category = badge_info['category']
            name = badge_info['name']
            width = self.img_width
            height = self.img_height

            path = get_image_path_at_size(