Review of "Pulse Audio Shortcuts" version 9

Details Page Preview

Adds a PulseAudio shortcuts menu to the Volume Menu. GS >= 3.4 can manage the displayed shortcuts via the prefs tool. The shortcuts are displayed above Sound Settings, and also get added above various 'SoundMenu' extensions which force themselves to load at a desired position, we do no such forcing here. The 'PulseAudio' menu text can also be modified via the prefs tool. (Credit: lmedinas, Xes) This depends on the following, of which is your choice to use and install. To verify they are installed open a terminal and try to run any of the following: pavucontrol paprefs pavumeter pulseaudio-equalizer paman qpaeq gstreamer-properties

Extension Homepage
https://github.com/l300lvl/Pulse-Audio-Shortcuts

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

All Versions

Version Status
15 Active
14 Active
13 Active
12 Active
11 Rejected
10 Active
9 Rejected
8 Rejected
7 Rejected
6 Rejected
5 Active
4 Active
3 Active
2 Active
1 Active

Previous Reviews on this Version

l300lvl posted a review
>First, you seem to be mixing tabs and spaces or something because your indentation is all out of whack. I can't figure out what you mean here, perhaps because I use gedit, but I went through every line and dont see any tabs? >Second, you seem to be doing things like 'if (foo == true)'. 'if (foo)' should be enough. In the case of 'if (foo == false)', use 'if (!foo)' instead. Is it ok to do: if (!foo && foo) in some cases? >Your localization strategy is bad. You can't assume you can concatenate user-provided strings like that and have localized things. You also try to use the Shell's localization, which won't work. Removed all of the 'localization' I was doing, and left only a couple areas to customize, if it makes sense. By using the shells did you mean because it calls const Lang = imports.lang; ? >I don't see why you assign variables to constants, and then not modify them. Just the constants should be fine. Understood. I wasn't aware it would work that way. I am very new to js still. >Why are you checking the constants instead of the objects when you try to disable them? Have you considered using "else" more? In disable it needs only to disable foo if fi isn't enabled, i.e if (!foo && foo) but hopefully that is ok. >You're also assigning to "this._appMenu". Because this is a global function, you're assigning to the global object. Yay. Not sure why that was a problem but I fixed it I think.
Jasper St. Pierre posted a review
> I can't figure out what you mean here, perhaps because I use gedit, but I went through every line and dont see any tabs? You have code that looks like: if (foo) { bar(); } I figured that was due to naive tab/space conversion. Stop doing that. > Is it ok to do: if (!foo && foo) in some cases? That always turns out to be false. > In disable it needs only to disable foo if fi isn't enabled, i.e if (!foo && foo) but hopefully that is ok. I mean: if (POPUP_MENU) { pulseMenu.destroy(); } else { if (paCustom) paCustom.destroy(); if (paVolume) paVolume.destroy(); // ... } Now that you don't have variables without the 2s, you can lose the 2s.
Jasper St. Pierre posted a review
l300lvl posted a review
>I figured that was due to naive tab/space conversion. Stop doing that. I have nothing that looks like you described, but I only use spaces. Perhaps there were tabs present already and I somehow broke them. Can you confirm this behavior using another ide and perhaps suggest what I should do my testing in. Have you used leafpad at all? >That always turns out to be false. I'm not sure how that if else statement works. I did try something like that 'if else if' before and it wasn't working in disable, disable seems to be a huge hang up for me with this. About the variables with the 2s, arent those what I create in enable? Hence, they are being destroyed in disabled. Everything when being enabled and disabled seems to work as it is now, but I will try to make the correct changes. The ones I took away are the ones without the 2s.
Jasper St. Pierre posted a review
> I have nothing that looks like you described, but I only use spaces. Perhaps there were tabs present already and I somehow broke them. Can you confirm this behavior using another ide and perhaps suggest what I should do my testing in. Have you used leafpad at all? I am simply looking at the indentation under the "Files" pane on the website. > I did try something like that 'if else if' before and it wasn't working in disable, disable seems to be a huge hang up for me with this. I don't know what to tell you. You'll figure it out eventually, I bet. > The ones I took away are the ones without the 2s. Yes, and now you no longer need the '2' suffix.
l300lvl posted a review
Is it this you see with different indents> 31 function _onCustomApp() { 32 let app = Util.spawn([CUSTOM_COMMAND]); 33 app.activate(); 34 } As that is the only thing I see differently. That is different because I copied it and never changed the formatting. Could it be browser related even? I understand about the suffixes now, thanks.
Jasper St. Pierre posted a review
No, I'm talking about the code in enable/disable. The if statements are indented more than their bodies. I downloaded the zipfile, and I still see it, and it's not related to tabs/spaces.
l300lvl posted a review
Got it. I will try and look over some of your code to properly indent everything. I used spaces, and had no idea the actually indentations made a difference. Sorry for the confusion. Would you suggest tabs over spaces in most blank spaces?
Jasper St. Pierre posted a review
Use four spaces to indent consistently. It doesn't make a difference to JavaScript or the shell. It makes a difference to me, who has to review this code.