aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-08-03 11:22:23 +0200
committerRobert Tari <robert@tari.in>2022-08-03 11:22:23 +0200
commite873ed9c6c5dcbf9e4ee5510037e7b993fb69fee (patch)
treec430007e5b4ea73082c50c318c74bfbc1f75fb12
parentefc7cc733bec7d68bbfa4d693f175579781258cc (diff)
parentc1fba3da3051b0dfb6776b27bb41991914db43fb (diff)
downloadayatana-indicator-sound-e873ed9c6c5dcbf9e4ee5510037e7b993fb69fee.tar.gz
ayatana-indicator-sound-e873ed9c6c5dcbf9e4ee5510037e7b993fb69fee.tar.bz2
ayatana-indicator-sound-e873ed9c6c5dcbf9e4ee5510037e7b993fb69fee.zip
Merge branch 'sunweaver-pr/make-switch-item-qmenumodel-compatible'
Attributes GH PR #82: https://github.com/AyatanaIndicators/ayatana-indicator-sound/pull/82
-rw-r--r--src/service.vala4
-rw-r--r--src/sound-menu.vala2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/service.vala b/src/service.vala
index 31b6204..528cbf4 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -335,7 +335,7 @@ public class IndicatorSound.Service: Object {
silentNow = this.accounts_service.silentMode;
}
- silent_action = new SimpleAction.stateful ("silent-mode", null, new Variant.boolean (silentNow));
+ silent_action = new SimpleAction.stateful ("silent-mode", VariantType.BOOLEAN, new Variant.boolean (silentNow));
/* If we're not dealing with accounts service, we'll just always be out
of silent mode and that's cool. */
@@ -349,7 +349,7 @@ public class IndicatorSound.Service: Object {
});
silent_action.activate.connect ((action, param) => {
- action.change_state (new Variant.boolean (!action.get_state().get_boolean()));
+ action.change_state (param);
});
silent_action.change_state.connect ((action, val) => {
diff --git a/src/sound-menu.vala b/src/sound-menu.vala
index fc68f91..fe2b7ff 100644
--- a/src/sound-menu.vala
+++ b/src/sound-menu.vala
@@ -51,7 +51,7 @@ public class SoundMenu: Object
if ((flags & DisplayFlags.SHOW_MUTE) != 0)
volume_section.append (_("Mute"), "indicator.mute");
if ((flags & DisplayFlags.SHOW_SILENT_MODE) != 0) {
- var item = new MenuItem(_("Silent Mode"), "indicator.silent-mode");
+ var item = new MenuItem(_("Silent Mode"), "indicator.silent-mode(true)");
item.set_attribute("x-ayatana-type", "s", "org.ayatana.indicator.switch");
volume_section.append_item(item);
}