Commit Graph

111 Commits

Author SHA1 Message Date
Giovanni Campagna
382cc52baa NetworkMenu: use async initialization for libnm-glib objects
NMClient recently got more heavyweight, with a property holding supported
connections. As fully initializing a NMObject is a recursive operation
and requires multiple DBus calls, switch to async initalization for NMClient
and NMRemoteSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=683288
2013-02-15 21:37:04 +01:00
Jeremy Bicha
2a5f8e84bb js: Use proper Unicode ellipsis (…) instead of three dots
https://bugzilla.gnome.org/show_bug.cgi?id=689542
2013-02-12 17:05:00 -05:00
Aleksander Morgado
ceb035e9b3 network: treat LTE-only modems as GSM ones
LTE-only modems need to be treated as GSM/HSPA modems, as they all are 3GPP
modems and they all need the same kind of configuration (APN, user, password,
PIN...).

https://bugzilla.gnome.org/show_bug.cgi?id=688144
2013-02-05 15:49:39 +01:00
Aleksander Morgado
e38570437e network: add support for the new 'ModemManager1' interface
ModemManager >= 0.7 comes with a new DBus interface. This patch makes the shell
work with the new interface if the modem is detected as being exposed by the new
ModemManager (based on the device.udi string reported by NM).

https://bugzilla.gnome.org/show_bug.cgi?id=687359.
2013-02-05 15:39:38 +01:00
Giovanni Campagna
9794e71a86 Add policy for builtin message sources
Some notifications, despite being emitted by shell code, should appear
to be from application or "separable" system components. Do that by
associating them with a notification-daemon policy.

Note that for this to look really good, empathy should rename itself
to Chat.

https://bugzilla.gnome.org/show_bug.cgi?id=685926
2013-01-31 13:20:08 +01:00
Giovanni Campagna
b3f29b46cf NetworkMenu: defer calling syncSectionTitle until after pushing the device
syncSectionTitle looks at device list for the section, to understand if
the section should be visible or not, so obviously it needs to see the
new device.

I wonder when this broke.

https://bugzilla.gnome.org/show_bug.cgi?id=692749
2013-01-29 15:28:02 +01:00
Dan Winship
a34d4d9124 network: more NM 0.9.6 compatibility
Virtual device support requires
NMGtk.utils_get_connection_device_name(), so don't try to support
virtual devices with older NM.
2013-01-21 16:01:08 -05:00
Dan Winship
c49bb5aa03 network: add support for virtual device types (vlan, bond, bridge)
Virtual devices may not actually exist until their corresponding
connections are brought up. So we need new code to create fake device
wrapper objects for them based on the corresponding NMConnections.

https://bugzilla.gnome.org/show_bug.cgi?id=677144
https://bugzilla.gnome.org/show_bug.cgi?id=677146
https://bugzilla.gnome.org/show_bug.cgi?id=677148
2013-01-21 16:01:08 -05:00
Giovanni Campagna
d583c48992 NetworkMenu: don't queue menu updates for destroyed devices
It will cause an exception as the work ID is now invalid, and may block
new devices from appearing for example when NM is restarted.

https://bugzilla.gnome.org/show_bug.cgi?id=684279
2013-01-19 03:07:03 +01:00
Giovanni Campagna
0e636ea67e NetworkMenu: don't clear the section when queuing an update
It's the very first thing that queueing does.

https://bugzilla.gnome.org/show_bug.cgi?id=684279
2013-01-19 03:07:03 +01:00
Dan Winship
c37b222cbf network: support NM 0.9.6 again
NM 0.9.7 is still not released even as a tarball, so fix this to work
with 0.9.6 again for now (although it doesn't do any device name
disambiguation in this case now).

https://bugzilla.gnome.org/show_bug.cgi?id=691720
2013-01-14 11:25:40 -05:00
Dan Winship
8a1b83417a network: add minimal support for InfiniBand
If present, InfiniBand devices show up with the ethernet devices (and
the presence of an InfiniBand connection will cause "Wired" to be
renamed to "Ethernet").

https://bugzilla.gnome.org/show_bug.cgi?id=677150
2012-12-17 08:11:36 -05:00
Giovanni Campagna
6b1e632621 NetworkMenu: don't notify for failed connections if cancelled by the user
If the user cancels the secret dialog, the NM will report the connection
failure, but we should not notify it as it is a user-initiated action.

https://bugzilla.gnome.org/show_bug.cgi?id=684823
2012-12-03 19:02:16 +01:00
Giovanni Campagna
490206b5b2 NetworkMenu: rework multiple NIC support
Remove section titles for ethernet and mobile broadband, and replace
them with device status items that recognize if multiple devices are
installed in the same section, and if so automatically disambiguate.

https://bugzilla.gnome.org/show_bug.cgi?id=677142
2012-11-16 13:52:52 -05:00
Giovanni Campagna
9d78208b76 NetworkMenu: don't use a global switch for all VPN connections
Stop pretending that VPN is a NMDevice, and split the useful bits into
a NMConnectionBased interface.
Make each connection have its own switch menu item and handle its own
status, and remove the VPN section title, which is no longer needed.

https://bugzilla.gnome.org/show_bug.cgi?id=682929
2012-10-30 16:08:33 +01:00
Jasper St. Pierre
928ea3bb01 messageTray: Use a GIcon for a notification's icon/secondary icon
Using a GIcon instead of an actor means that we can always create
a new icon with the right size from an old icon.

https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-10-16 12:14:16 -04:00
Giovanni Campagna
7499b04638 Fix insensitive styling for popup menu items
The selector for insensitive popup menu items was wrong (a PopupMenuItem is
a ShellGenericContainer, not a StButton). Fixing it showed that previous
:insensitive tracking was manual for a reason: we have many items that are
not reactive, but don't want the insensitive styling (for example those in
the battery menu).
Fix it by adding a new style-class, popup-inactive-menu-item, that is added
to all new PopupMenuItems that are not activatable.

https://bugzilla.gnome.org/show_bug.cgi?id=683988
2012-09-13 23:48:17 +02:00
Florian Müllner
9627864ca8 status/network: Fix another StIconType regression 2012-09-13 20:32:11 +02:00
Jasper St. Pierre
ca2e09fe8b sessionMode: Allow changing the session mode at runtime
Since we eventually want to add a system for changing the top panel
contents depending on the current state of the shell, let's use the
"session mode" feature for this, and add a mechanism for updating the
session mode at runtime. Add support for every key besides the two
functional keys, and make all the components update automatically when the
session mode is changed. Add a new lock-screen mode, and make the lock
screen change to this when locked.

https://bugzilla.gnome.org/show_bug.cgi?id=683156
2012-09-04 18:42:44 -03:00
Giovanni Campagna
a3d8b5e526 Fix some more icon names
Message tray sources should never have symbolic icons.
The VPN secondary icon in the panel instead should.
2012-08-31 23:31:25 +02:00
Giovanni Campagna
dc10e61a20 Fix some more symbolic icon names
Reviewed by Jasper St. Pierre in IRC.
2012-08-31 22:46:53 +02:00
Giovanni Campagna
82c8aad157 NetworkMenu: remove broken device activation policy
Previously, when toggling a switch on we tried to replicate NM policy and
find a good connection to activate. This is broken in many situations.
Instead, only activate something when we can be sure it's what the user
wants (i.e. when there is only one connection, or when there is none,
and thus connecting will trigger the config dialog)

https://bugzilla.gnome.org/show_bug.cgi?id=683136
2012-08-31 22:35:44 +02:00
Rui Matos
2f3df71cc1 status/network: Fix VPN symbolic icon 2012-08-30 21:38:39 +02:00
Jasper St. Pierre
c21b1e5fe0 st: Remove StIconType
GTK+ works by explicitly specifying a -symbolic suffix for all icons.
Do the same here.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 16:41:09 -03:00
Giovanni Campagna
c1de2788b1 Add a new lock screen menu to combine volume network and power
The design has a combined volume-network-power indicator in the lock
screen, which when opened shows a volume slider. Implement it by abstracting
the volume menu into a PopupMenuSection, and by creating three StIcons
bound to the real ones.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 01:13:23 +02:00
Giovanni Campagna
41dc9e0894 PanelMenu: Allow multiple icons in one SystemStatusButton
This generalizes the code previously used by NetworkMenu, so that all
SystemStatusButton now can add multiple icons.

https://bugzilla.gnome.org/show_bug.cgi?id=682540
2012-08-29 01:13:23 +02:00
Jasper St. Pierre
712623946f network: Fix icon_size parameter
We forgot to update this to NOTIFICATION_ICON_SIZE

https://bugzilla.gnome.org/show_bug.cgi?id=682412
2012-08-22 00:34:12 -03:00
Dan Winship
1c927868d8 network: ignore unrecognized/irrelevant devices/connections
Don't log a warning if an unrecognized device type is seen.

Don't show slave connections in the menu. (Eg, don't show the
individual wired connections making up a bond, since they can't be
used individually.)

Make the icon only reflect the status of connections that are visible
in the menu. (ie, don't show the "connecting" icon when an
unrecognized connection type is connecting, and don't show a
"connected" status if the only active connections are of unrecognized
types.)

https://bugzilla.gnome.org/show_bug.cgi?id=682364
2012-08-21 13:37:54 -04:00
Jasper St. Pierre
e875b9cdca status: Clean up imports
https://bugzilla.gnome.org/show_bug.cgi?id=680426
2012-08-03 14:25:35 -03:00
Giovanni Campagna
c3afe1a83a Show the panel above the screenshield when locked
Track locked status and use it to provide a reduced version of
the panel in the locked screen. Accessibility, input sources and
volume menus are preserved, without the link to the control center.
Network, battery and user menu are reduced to pure indicators,
with no menu.
This is similar to the design but not exactly, because designers
in IRC said that network needs more analysis before exposing, and
because the design didn't account for a11y and IM (so the one menu
metaphor is not really appropriate).

https://bugzilla.gnome.org/show_bug.cgi?id=619955
2012-07-21 15:40:28 +02:00
Cosimo Cecchi
61de3de909 NetworkMenu: prefer wifi/3g over vpn in the panel
Wifi and mobile broadband have signal indicators and are thus
more useful than vpn icons in the panel. Therefore, in the case
we have both wifi/3g and VPN we prefer the former as the "primary
icon" and add a lock next to it.
Behavior when VPN is added to wired or other connections is still
preserved: the wired icon is replaced by vpn.

https://bugzilla.gnome.org/show_bug.cgi?id=672591
2012-06-20 17:23:53 -04:00
Giovanni Campagna
36888a34d6 NetworkMenu: sort wifi networks by strength
Sorting by strength is what the other OSes do by default, and it
provides a better UX (by offering your hotspot and router before
the one from your neighbor).

https://bugzilla.gnome.org/show_bug.cgi?id=658946
2012-06-20 23:05:57 +02:00
Jasper St. Pierre
6382eeb8fd network: Remove old API
The underscored properties were removed a while ago.

https://bugzilla.gnome.org/show_bug.cgi?id=677515
2012-06-05 18:10:25 -04:00
Giovanni Campagna
7911154bad NetworkMenu: show notifications for failed VPN connections
Refactor NMDeviceVPN to be more like the other NMDevices, including
having a valid getSectionTitle() and emitting signals when the
underlying connection changes state.
Use the existing notification infrastructure to hook these signals
to actual notifications (including some code consolidation).

https://bugzilla.gnome.org/show_bug.cgi?id=676330
2012-06-01 22:39:43 +02:00
Giovanni Campagna
35b142f23f NetworkMenu: fix updating connection lists
Ensure that the UI is updated when a connection changes name or id,
even if it was already known by a device.
Also, use less private properties on NMConnection objects, as they
can become stale and cause problems.

https://bugzilla.gnome.org/show_bug.cgi?id=677097
2012-05-31 20:50:02 +02:00
Jasper St. Pierre
9e1a2cfeac Start using MessageTray.Source directly instead of having to subclass it
For most subclasses, this is a direct swap -- a lot of the time, the
constructor was a blank class that override createNotificationIcon,
and called _setSummaryIcon in _init.

https://bugzilla.gnome.org/show_bug.cgi?id=661236
2012-05-17 08:32:22 -04:00
Jasper St. Pierre
a5ac183d86 network: Fix an accidental copy-paste error
Logic swap accidentally introduced in commit 723a1c843.

https://bugzilla.gnome.org/show_bug.cgi?id=672272
2012-05-02 16:31:29 -04:00
Jasper St. Pierre
723a1c843a Refactor show()/hide() sequences
We seem to have a lot of code that does something along the lines of:

    if (condition)
        actor.show();
    else
        actor.hide();

ClutterActor already has such a thing for exactly this purpose: the 'visible'
property. Use it instead of the mess above.

https://bugzilla.gnome.org/show_bug.cgi?id=672272
2012-05-02 12:43:58 -04:00
Giovanni Campagna
6122f65e7a NetworkMenu: use network-offline while loading
network-error is partially red and thus can be distracting at
login. Use network-offline instead.

https://bugzilla.gnome.org/show_bug.cgi?id=674426
2012-04-29 18:40:03 +02:00
Giovanni Campagna
b6aab53d10 NetworkMenu: fix crash when NetworkManger restarts
nm_active_connection_get_devices() has a (questionable) special case
for the no devices case (which happens if the DBus object is
destroyed because NM went down): it returns null instead of an empty
array. Handle that instead of crashing.

https://bugzilla.gnome.org/show_bug.cgi?id=673043
2012-04-09 20:33:50 +02:00
Jasper St. Pierre
d81958a074 st: Remove st-tooltip
StTooltip has been plagued by lots of issues, and we recently ditched
it in the dash. Remove it for good.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
2012-02-15 20:12:49 -05:00
Alejandro Piñeiro
74dd298891 a11y: Setting a name/label_actor for several items on the panel
https://bugzilla.gnome.org/show_bug.cgi?id=667376
2012-01-27 12:29:52 +01:00
Giovanni Campagna
11637bae43 Network Menu: prefer VPN connections when showing the icon
When VPN is active, and it's not the default routing, we should
show the vpn icon, rather than the physical connection.

https://bugzilla.gnome.org/show_bug.cgi?id=665115
2012-01-17 18:24:44 +01:00
Giovanni Campagna
77afd6782f NetworkMenu: actually add new access point to the network list
Previously the code in _accessPointAdded was iterating over the
the network list to find a good place, and at that time, added both
the network to the list and the item to the menu. When I refactored
to call queueCreateSection, I forgot to add code to insert the
network in the list.
Add it now, using the new Util.insertSorted function.

https://bugzilla.gnome.org/show_bug.cgi?id=666429
2011-12-19 16:54:46 +01:00
Giovanni Campagna
f3cb9d0443 Network Menu: update the UI only when really needed
By using Main.queueDeferredWork, we can ensure that most of the
menu contents (in particular, the heaviest parts like the list of
wifi networks) are not updated immediately as we receive signals
from NetworkManager. Instead, the menu is rebuilt some time later,
or as soon as the user opens the menu.
This means that it is no longer needed to optimize for the
access-point-added case, replacing a lot of buggy code with a safer
call to _queueCreateSection, which in turn should ensure that the
more menu, if existing, is always at the end and that at most 5 networks
are visible outside it.

https://bugzilla.gnome.org/show_bug.cgi?id=664124
2011-12-16 08:58:11 +01:00
Giovanni Campagna
7fa7d04ed0 NetworkMenu: show hardware disabled when rfkill is active
When wifi or wwan are blocked by hardware killswitch, we should not
allow changing the switch (it won't work anyway), and show
"hardware disabled" instead, similar to what we already do in the
bluetooth menu.

https://bugzilla.gnome.org/show_bug.cgi?id=665194
2011-12-07 15:36:18 +01:00
Giovanni Campagna
aad9179373 NetworkMenu: fix number of visible networks
When placing networks in _createSection, we were taking in
consideration that _activeNetwork is always first, by adding 1,
but then kept this offset also for networks following it (normally,
all of them, since _activeNetwork is also the most recently used),
that instead should not be affected by the movement.
This resulted in the menu showing 4 networks + More... instead of
5.

https://bugzilla.gnome.org/show_bug.cgi?id=664124
2011-12-07 15:35:19 +01:00
Giovanni Campagna
d6b6f814d3 Port all classes with inheritance to class framework
All classes that have at least one other derived class (and thus
benefit from the framework) have been now ported. These includes
NMDevice, SearchProvider, AltTab.SwitcherList, and some other
stuff around.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
b356aa8e3b Port message tray sources and notifications to class framework
Third step in the class framework port, now it's the turn of
MessageTray.Source and MessageTray.Notification, as well as
the various implementations around the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
566bdb50c2 Port PanelMenu to new class framework
Second patch in the class framework, now it's the turn of
PanelMenu (buttons, menus and status indicators).

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00