nm-applet: prototype with priorities, feedback welcome



Hello again,

I just wanted to show everyone the prototype I've made for a new
nm-applet interface that supports priorities. It's obviously a work in
progress but it is fully functional:

http://elfery.net/files/nm-priority-settings.png

The backend has a "priority" field (guint16) added to it. It doesn't
actually use this to determine auto-connect priority but I know where
that part of the code is, so it will be easy to add. The patch is
straightforward but I won't attach it yet because I can only test
against the Debian source right now (as per my previous email); the git
HEAD has libnm-core/, which Debian does not, and which also needs
changing.

As for the interface, the auto-connect toggle uses the existing
autoconnect property. It commits the new value to configs right away
(I'm ignoring key/secret stuff at the moment, it just doesn't work if
nm-applet doesn't have cached credentials). Same with the
prioritize/deprioritize buttons.

For a better future interface design, here are my thoughts. The
connection settings dialog should sort by auto-connection order, so the
user can tell exactly what NetworkManager will do in the background.
Right now it's sorted by last-used time. I think prioritizing a
connection should move it to the top of the list and replace (?) the
last-used field; i.e. the last-used only matters if the priority is 0. I
don't think users should enter priorities, the applet would determine
numbers automatically and allow the user to "move up" or "move down".

On the backend, the connection with the highest priority would be used
for auto-connection, breaking ties amongst the same priority by the
last-used time. This would work if two connections had non-zero
priorities, time would be the tiebreaker within that priority group. The
GUI wouldn't make use of this though, except for priority=0.

Other thoughts:
- I was going to add a "auto-connect to this network" checkbox when you
  connect to a network for the first time. And, maybe show networks
  differently in the pull-down menu if they're configured to
  automatically connect.
- I already added a "Scan for WiFi networks..." menu item, since I
  actually find myself manually running iwlist to get the applet to
  update. Maybe I'm just more impatient than the average user. This can
  be done without backend modifications (there is already a RequestScan
  dbus call), but to be done properly there should be a GetScanStatus
  call so that the applet can show "Scan in progress".
- Many users would expect to see the networks with the strongest signal
  sorted first, instead of alphabetical by name. The latter is easier
  when you're trying to find a particular name, of course, but once
  you've already connected to a network it should appear at the top of
  the list (as a configured connection) and you wouldn't care about
  looking for it by name. So doesn't sorting by strength make more
  sense? Because of the current pull-down menu design, we could have
  two submenus, one sorting each way, but that might be cluttered.

Hope thaller and/or dcbw have a chance to review this. Thanks guys. :)

For related reading, lots of people have expressed a desire for
priorities in NM:
https://bugzilla.gnome.org/show_bug.cgi?id=580018
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/366780
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/929948
https://mail.gnome.org/archives/networkmanager-list/2011-March/msg00126.html

David Williams-King


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]