Skip to content

Commit b11b9df

Browse files
thbemmeThomas Bemme
and
Thomas Bemme
authoredMay 22, 2022
Fix tooltip display for keybinds (#4344)
Co-authored-by: Thomas Bemme <[email protected]>
1 parent 778e4db commit b11b9df

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎ptt@thbemme/files/ptt@thbemme/applet.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ MyApplet.prototype = {
5353
this.preserve_state = this.is_muted;
5454
this.set_icon_mode();
5555
this.set_applet_icon_name(this.icon_mic_on);
56-
this.set_applet_tooltip(_('Click or press ' + this.keybinding_ptt_toggle + ' to activate PTT'));
56+
this.set_applet_tooltip(_('Click or press ' + this.keybinding_ptt_toggle.replace(/[^\w]/g, "") + ' to activate PTT'));
5757
this.keybindset_ptt_toggle();
5858
global.log("PTT Applet: Initializing ptt loop");
5959
this.refresh_loop();
@@ -229,7 +229,7 @@ MyApplet.prototype = {
229229
if (this.active) {
230230
this.active = false;
231231
this.keybindremove_ptt_activate();
232-
this.set_applet_tooltip(_('Click or press ' + this.keybinding_ptt_toggle + ' to activate PTT'));
232+
this.set_applet_tooltip(_('Click or press ' + this.keybinding_ptt_toggle.replace(/[^\w]/g, "") + ' to activate PTT'));
233233
global.log("PTT Applet: Disable ptt and remove keybind");
234234
if (this.preserve_state) {
235235
this.set_nocap();
@@ -241,7 +241,7 @@ MyApplet.prototype = {
241241
this.preserve_state = this.is_muted;
242242
this.active = true;
243243
this.keybindset_ptt_activate();
244-
this.set_applet_tooltip(_('PTT is active, ' + this.keybinding_ptt_key + ' to talk'));
244+
this.set_applet_tooltip(_('PTT is active, ' + this.keybinding_ptt_key.replace(/[^\w]/g, "") + ' to talk'));
245245
this.set_nocap();
246246
global.log("PTT Applet: Enable ptt and add keybind");
247247
}
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"uuid": "ptt@thbemme",
33
"name": "PTT Applet",
4+
"version": "0.2",
45
"description": "Push-to-talk applet and microphone indicator"
5-
}
6+
}

0 commit comments

Comments
 (0)
Please sign in to comment.