summaryrefslogtreecommitdiffstats
path: root/source/dialogs/combi.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/dialogs/combi.c')
-rw-r--r--source/dialogs/combi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/dialogs/combi.c b/source/dialogs/combi.c
index 8fa4a438..5631c519 100644
--- a/source/dialogs/combi.c
+++ b/source/dialogs/combi.c
@@ -247,6 +247,18 @@ static char * combi_get_completion ( const Mode *sw, unsigned int index )
return NULL;
}
+static cairo_surface_t * combi_get_icon ( const Mode *sw, unsigned int index, int height )
+{
+ CombiModePrivateData *pd = mode_get_private_data ( sw );
+ for ( unsigned i = 0; i < pd->num_switchers; i++ ) {
+ if ( index >= pd->starts[i] && index < ( pd->starts[i] + pd->lengths[i] ) ) {
+ cairo_surface_t *icon = mode_get_icon ( pd->switchers[i].mode, index - pd->starts[i], height );
+ return icon;
+ }
+ }
+ return NULL;
+}
+
static char * combi_preprocess_input ( Mode *sw, const char *input )
{
CombiModePrivateData *pd = mode_get_private_data ( sw );
@@ -285,6 +297,7 @@ Mode combi_mode =
._token_match = combi_mode_match,
._get_completion = combi_get_completion,
._get_display_value = combi_mgrv,
+ ._get_icon = combi_get_icon,
._preprocess_input = combi_preprocess_input,
.private_data = NULL,
.free = NULL