From e5ad7a715d8ae2ef540804d39cd3e9fe4478b075 Mon Sep 17 00:00:00 2001 From: "Dennis T. Flaherty" Date: Mon, 10 Feb 2020 22:08:30 -0700 Subject: [PATCH] Replaced _actionsItem.actor with buttonGroup --- css_adjust.js | 6 +++--- extension.js | 4 ++-- metadata.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/css_adjust.js b/css_adjust.js index c6024da..7fddd15 100644 --- a/css_adjust.js +++ b/css_adjust.js @@ -40,12 +40,12 @@ function handle_aggregate_menu(mode, width) { // monitor changes in the system area - menuChangedAdd = aggregateMenu._system._actionsItem.actor.connect('actor_added', function() { + menuChangedAdd = aggregateMenu._system.buttonGroup.connect('actor_added', function() { checkAggregatemenuwidth(); }); - menuChangedRem = aggregateMenu._system._actionsItem.actor.connect('actor_removed', function() { + menuChangedRem = aggregateMenu._system.buttonGroup.connect('actor_removed', function() { checkAggregatemenuwidth(); }); @@ -80,7 +80,7 @@ function checkAggregatemenuwidth() { // run menu width adjustment if necessary - let actionChildren = aggregateMenu._system._actionsItem.actor.get_children(); + let actionChildren = aggregateMenu._system.buttonGroup.get_children(); let allButtonWidth = actionChildren[1].get_width()*2; //calculate new width diff --git a/extension.js b/extension.js index 62ab366..d23364d 100644 --- a/extension.js +++ b/extension.js @@ -196,7 +196,7 @@ function _MenuEntry(set) { button.connect('clicked', _DisplayOff); // add the menuentry to the menu //systemMenu._actionsItem.actor.insert_child_at_index(button, 4); - systemMenu._actionsItem.actor.add(button, { expand: true, x_fill: false }); + systemMenu.buttonGroup.add(button, { expand: true, x_fill: false }); } } @@ -213,7 +213,7 @@ function _MenuEntry(set) { else { // remove the button - systemMenu._actionsItem.actor.remove_child(button); + systemMenu.buttonGroup.remove_child(button); } // reset menuitem/button variable diff --git a/metadata.json b/metadata.json index ff69594..3407a36 100644 --- a/metadata.json +++ b/metadata.json @@ -18,5 +18,5 @@ "url": "https://github.com/simonthechipmunk/turnoffdisplay", "uuid": "turnoffdisplay@simonthechipmunk.noreply.com", "gettext-domain": "turnoffdisplay", - "version": 15 + "version": 16 }