@@ -1,5 +1,5 @@
2− * Copyright 2013,2015 Canonical Ltd.
2+ * Copyright 2013-2016 Canonical Ltd.
4 * This program is free software; you can redistribute it and/or modify
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
5 * it under the terms of the GNU Lesser General Public License as published by
@@ -93,6 +93,10 @@ Item {
93 var map = _userMap || _typeToComponent
93 var map = _userMap || _typeToComponent
94 var indicatorComponents = map[indicator];
94 var indicatorComponents = map[indicator];
96+ if (type === undefined || type === "") {
96 if (indicatorComponents !== undefined) {
100 if (indicatorComponents !== undefined) {
97 component = indicatorComponents[type];
101 component = indicatorComponents[type];
@@ -101,6 +105,10 @@ Item {
101 component = map["default"][type];
105 component = map["default"][type];
108+ if (component === undefined) {
109+ console.debug("Don't know how to make " + modelData.type + " for " + indicator);
104 return component
112 return component
@@ -108,6 +116,10 @@ Item {
108 var component = undefined;
116 var component = undefined;
109 var indicatorFilter = _action_filter_map[indicator]
117 var indicatorFilter = _action_filter_map[indicator]
119+ if (action === undefined || action === "") {
111 if (indicatorFilter !== undefined) {
123 if (indicatorFilter !== undefined) {
112 component = indicatorFilter[action];
124 component = indicatorFilter[action];
@@ -1000,20 +1012,16 @@ Item {
1000 if (context && context.indexOf("fake-") == 0)
1012 if (context && context.indexOf("fake-") == 0)
1001 context = context.substring("fake-".length)
1013 context = context.substring("fake-".length)
1003− if (modelData.action !== undefined && modelData.action !== "") {
1004− var component = getComponentForIndicatorEntryAction(context, modelData.action)
1015+ var component = getComponentForIndicatorEntryAction(context, modelData.action)
1005− if (component !== undefined) {
1016+ if (component !== undefined) {
1006− return component
1017+ return component
1010− if (modelData.type !== undefined && modelData.type !== "") {
1011− var component = getComponentForIndicatorEntryType(context, modelData.type)
1020+ component = getComponentForIndicatorEntryType(context, modelData.type)
1012− if (component !== undefined) {
1021+ if (component !== undefined) {
1013− return component;
1022+ return component;
1015− console.debug("Don't know how to make " + modelData.type + " for " + context);
1017 if (modelData.isCheck || modelData.isRadio) {
1025 if (modelData.isCheck || modelData.isRadio) {
1018 return checkableMenu;
1026 return checkableMenu;