Airport module rewrite#63
Conversation
…il/Envelop Index'.
…e MIME-messages from .emlx files
…ist) is displayed
…uring move message action).
* The proxy object no longer runs AppleScript unconditionally (causing OmniWeb to launch if it wasn't running) * The proxy has been renamed to "Current Web Page" to match Safari's also set an icon for the plug-in itself
Added a new object type QSSearchURLType. Also fixed for strange characters in URLs for Search for... actions
…s into web-search
I've: Made the encoding of URLs default to NSUTF8Encoding Speeded up the validActionsForObject method by just checking the primaryType Fixed another bug I came across: Search for terms with % in e.g. 'I got 100%'
Here's what now happens:
If the strength is going from - something to 0, then the scale is probably To convert decimal to dB you use: y = 20*log(x) Who would've thought engineering would come in handy eh?!
Those icons look good Henning :)
For some reason this won't show up, so I don't know if it's right: http://www.fileformat.info/info/unicode/char/9501/index.htm or http://www.fileformat.info/info/unicode/char/1f512/index.htm On 21 June 2011 03:10, skurfer <
|
|
Btw. you can just open .icns files with Preview.app, drag out the individual image files for each size, modify them and build a new .icns file with /Developer/Applications/Utilities/Icon Composer.app @pjrobertson: those characters show up as empty rectangles for me. That's because that server doesn't have a font installed that supports that characters. And I guess most Mac OS users wont either. |
Does it fail silently or is it that you can detect the failure, but can't really do anything about it?
I would go with this. But also somehow make that known in the network's QSObject's label or name. |
|
The icons look great. I’ve incorporated them.
I figured it was easy, I just never had time to look into it. Thanks for the tip.
They say it’s a measure of how much is lost between source and destination. So 0 is perfect and it goes down from there. Here at work, I’m showing four “bars” with an RSSI of -66. I can get more data at home where there are over a dozen networks. I’ll add some NSLogs and compare the numbers to the “bars” in the menu item’s UI and see if I can come up with a better scale.
I suppose it’s currently only silent because I haven’t written any code to check for failure. There’s an |
Aaah OK fair enough :)
Have you considered removing the 'Select Network' action for these wireless On 21 June 2011 23:48, skurfer <
|
Two things:
|
|
I think Patrick’s on to something. When creating the network objects, I can check to see if it’s secure, but not preferred and store a boolean in the metadata. Then the action validator can check this value (rather than repeating tests that were done when the object was created) and decide which action to display. As far as I know, there’s never a username and the credentials you enter are not associated with you. You typically need the SSID (which is usually broadcast) and the “key”, which is the passphrase you type. The key is usually written on a whiteboard in a class, or printed on your receipt in a café, etc. I don’t think shoulder-surfing is a big deal for this, but we can leave that up to the user, right? The only remaining downside I see here is that you wouldn’t get an opportunity to store the network/passphrase for future connections. Note that this is about the “physical” connection to the network. There are some networks where you log in with a personal account, but that is usually done in a web interface after the connection is established. |
|
Well, right now I'm surfing on my university's wifi network, which uses a WPA2 / 802.1X / TTLS authentication (whatever all those acronyms mean ;-)), which needs username and password to connect to the network. But I guess that's a special case, which needs to configured manually anyway. So I guess it would be ok to do what patrick suggested. BUT...
That'd be annoying. If this is that case, I'd prefer to be notified that I need to log in manually ONE TIME, so my credentials can be stored in the keychain. |
|
We’d need to store the network on the preferred list in addition to the keychain stuff. I’ve found that you can get the passphrase out of the keychain very easily by using |
|
It's a readwrite property, so it should just work with And why does it need to be stored as preferred network? Just because I connected to a network once doesn't I prefer it. |
Yes, so we can set the profile up just how we want it, but like I said, how would I store it on the preferred list?
If you check the “Remember this network” box when connecting, it goes on the preferred list. It just means you won’t be prompted to connect the next time that network is in range. Now that I think about it, people might want to do this for unsecured networks as well, but we shouldn’t make the assumption for them in either case. Maybe we should allow the connect action only for preferred networks. I wonder if we could somehow use AppleScript to activate the menubar item’s connect UI for the others. Let’s back up a minute. There are many issues with connecting that would be difficult to address with Quicksilver’s standard 2 or 3 pane UI. I’d almost forgotten at this point, but now I remember: I never saw much value in this plug-in[^1] and I don’t imagine that many others will either. I just wondered if it would be easy to update to prevent crashing and I ended up figuring it out. Instead of comparing this to a perfect AirPort module that could be, can we compare it to the AirPort module that actually exists? It makes Quicksilver crash. :) [1]: Actually, I use it to turn power on and off all the time now that the UI for doing so is improved, but I’ll likely never use it to browse and connect to networks. |
Yeah. That's why I said just throw up a notification if there is any trouble and let the user handle that himself manually. :-) |
|
I’ll spend some time investigating the AppleScript option I mentioned, but if not, I’ll resort to notifications. |
… menubar item (via AppleScript)
|
Alright, give this a whirl. |
|
Not bad. Not perfect, but pretty close. :-) One more thing I would like: make the AirPort QSObject the parent of the networks. So you can right-arrow out of the networks again. Just feels more consistent. :-) |
Hmmm. I didn’t run into this. I must have clicked the menu item at some point before testing. Should we introduce a delay? (We’d just be guessing as to how long.) Or should we scrap all the network objects and just use this plug-in to turn power on and off? :)
Line 88: |
|
hmm...I noticed in the Mail.app plugin the first level of child objects works without setting the parentID. But here it doesn't work either way. Strange. ok...from a quick look at So, not a problem of your plugin, but rather QS itself. Another part of QS that needs a major overhaul. ;-)
Can you try immediately, and if it didn't work try again after a delay. We wouldn't want a delay if it would have worked right away. |
|
Oh, jeez. I just checked and the menu item, from AppleScript’s point of view, is now called “Wi-Fi, four of four bars, with [network name].” Slightly more difficult to match than “AirPort”. I’m about ready to declare that Quicksilver’s not the best way to connect to an unknown network. |
|
There haven't been any updated APIs? I'd like to hope Apple have done On 26 July 2011 18:38, skurfer <
|
|
How about we release it as it is right now (because it works pretty well for SL). And then, once we figured out the best way to handle anything that's changed in Lion, we release a Lion version (which should be easy once we have a plugin system...:-)). |
|
Sounds good. If you merge it, I’ll publish it. (We should also take this opportunity to put it in its own repo before further work continues.) |
|
Yay, merged it. I'll also put it in it's own repo. |
|
I'll chime in late... all sounds good to me :) On 27 July 2011 14:11, HenningJ <
|
|
Good to have your approval. :-) |
Who else is tired of this plug-in’s bad reputation? :)
I thought I just needed to update the function that listed networks, but it ended up being a complete rewrite. (I wouldn’t even bother trying to look at diffs. Might as well just read over the code.)
Changes from the old behavior
Catalog
This doesn’t add any networks (available or preferred) to the catalog. Available networks don’t really belong there because they come and go and most of them probably mean nothing to you. Also, the catalog updates every 10 minutes at best. Do you really want to open your laptop and wait 10 minutes before attempting to connect to a network? And how would you know what to search for anyway? As for preferred networks, what could you do with them other than connect? So what good would it do to have access to a preferred network if it wasn’t also an available network?
With all that in mind, only one item called “AirPort” is added to the catalog. Its children are the available networks (scanned in real-time). The only thing I wish it did was indicate the network you’re connected to on the list somehow, but I didn’t see an obvious way to do that.
Actions
There were actions to turn AirPort on and off. Only one of the two could possibly work at any given time, so why make the user pick one? There are still on and off actions because it looks nicer than “toggle”, but you don’t have to pick one. The appropriate one will be selected by default.