on xenial help sign in
MenuItemFactory: remove the unused keymapMenu

A checkableMenuItem can be used instead, while the radio item is in the works

commit848d7f647c931971aa82a9b0ef2509e05d564727 authorMarco Trevisan (Treviño) <mail@3v1n0.net> dateThu 22 Sep 2016, 18:03 (10 years ago) parent1de2290
1 file changed−56
qml/Panel/Indicators/MenuItemFactory.qml−56
qml/Panel/Indicators/MenuItemFactory.qml−56
@@ -969,62 +969,6 @@ Item {
969969 }
970970 }
971971
972− Component {
973− id: keymapMenu;
974−
975− // FIXME this should use a "radio button" menu, once we have it in the SDK
976− ListItems.Empty {
977− id: checkItem
978− objectName: "keymapMenu"
979− property QtObject menuData: null
980− property int menuIndex: -1
981− readonly property bool serverChecked: menuData && menuData.isToggled || false
982−
983− enabled: menuData && menuData.sensitive || false
984− highlightWhenPressed: false
985− __acceptEvents: !serverChecked
986−
987− CheckBox {
988− id: checkbox
989− __acceptEvents: !checkItem.serverChecked
990− anchors {
991− left: parent.left
992− leftMargin: checkItem.__contentsMargins
993− verticalCenter: parent.verticalCenter
994− }
995− }
996−
997− ServerPropertySynchroniser {
998− objectName: "sync"
999− syncTimeout: Utils.Constants.indicatorValueTimeout
1000−
1001− serverTarget: checkItem
1002− serverProperty: "serverChecked"
1003− userTarget: checkbox
1004− userProperty: "checked"
1005−
1006− onSyncTriggered: {
1007− menuModel.activate(checkItem.menuIndex);
1008− }
1009− }
1010−
1011− Label {
1012− id: label
1013− anchors {
1014− left: checkbox.right
1015− leftMargin: checkItem.__contentsMargins
1016− right: parent.right
1017− rightMargin: checkItem.__contentsMargins
1018− verticalCenter: parent.verticalCenter
1019− }
1020− elide: Text.ElideRight
1021− text: checkItem.menuData && checkItem.menuData.label || ""
1022− }
1023−
1024− onClicked: menuModel.activate(menuIndex);
1025− }
1026− }
1027−
1028972 function load(modelData, context) {
1029973 if (context && context.indexOf("fake-") == 0)
1030974 context = context.substring("fake-".length)