Commit Graph

224 Commits

Author SHA1 Message Date
Giovanni Campagna
f99b4da4ec KeyboardStatus: disambiguate duplicate short descriptions
If two layouts have the same short description (for example, english
(US) and english (dvorak)), add a subscript for disambiguating
among them.

https://bugzilla.gnome.org/show_bug.cgi?id=650128
2011-08-26 16:52:58 +02:00
Giovanni Campagna
a64e0e1f49 VolumeStatus: track PulseAudio state and hide when disconnected
Only show the menu when the associated GvcMixerControl is ready, as
the connection can fail or PulseAudio may not be installed.

https://bugzilla.gnome.org/show_bug.cgi?id=645708
2011-08-25 23:36:22 +02:00
Giovanni Campagna
6709e5e458 NetworkMenu: don't show hidden access points
It is not possible to connect to hidden access points without
knowing the SSID, and it should be done using the control center
panel and the appropriate dialog. At the same time, this should
fix some warnings from libnm-glib and dbus-glib.

https://bugzilla.gnome.org/show_bug.cgi?id=646454
2011-08-22 21:57:29 +02:00
Rui Matos
ef8772916d Revert "network: ignore APs that hide their SSID"
This reverts commit 6a3130e25f.

It would hide those APs forever, even after connecting to them, which users
can do via other means. Thanks to Giovanni Campagna for pointing this.

https://bugzilla.gnome.org/show_bug.cgi?id=654898
2011-08-16 18:39:48 +01:00
Rui Matos
60b54c0052 network: always coerce the SSID to _something_
https://bugzilla.gnome.org/show_bug.cgi?id=654898
2011-08-12 17:26:54 +01:00
Rui Matos
6a3130e25f network: ignore APs that hide their SSID
https://bugzilla.gnome.org/show_bug.cgi?id=654898
2011-08-12 17:26:53 +01:00
Colin Walters
4886275df4 ShellApp: Change activation API
Since almost all of the callers of shell_app_activate were using the
default workspace (by passing -1), remove that parameter.

Add a new shell_app_activate_full() API which takes a workspace as
well as a timestamp; previously we might have been ignoring event
timestamps from elsewhere.

https://bugzilla.gnome.org/show_bug.cgi?id=648149
2011-08-11 05:35:23 -04:00
Colin Walters
10dcc100e9 Kill off ShellAppInfo, move into ShellApp
This dramatically thins down and sanitizes the application code.

The ShellAppSystem changes in a number of ways:
* Preferences are special cased more explicitly; they aren't apps,
  they're shortcuts for an app), and we don't have many of them, so
  don't need e.g. the optimizations in ShellAppSystem for searching.
* get_app() changes to lookup_app() and returns null if an app isn't
  found.  The semantics where it tried to find the .desktop file
  if we didn't know about it were just broken; I am pretty sure no
  caller needs this, and if they do we'll fix them.
* ShellAppSystem maintains two indexes on apps (by desktop file id
  and by GMenuTreeEntry), but is no longer in the business of
  dealing with GMenuTree as far as hierarchy and categories go.  That
  is moved up into js/ui/appDisplay.js.  Actually, it flattens both
  apps and settings.

Also, ShellWindowTracker is now the sole reference-owner for
window-backed apps.  We still do the weird "window:0x1234beef" id
for these apps, but a reference is not stored in ShellAppSystem.

The js/ui/appDisplay.js code is rewritten, and sucks a lot less.
Variable names are clearer:

_apps -> _appIcons
_filterApp -> _visibleApps
_filters -> _categoryBox

Similarly for function names.  We no longer call (for every app) a
recursive lookup in GMenuTree to see if it's in a particular section
on every category switch; it's all cached.

NOTE - this intentionally reverts the incremental loading code from
commit 7813c5b93f.  It's fast enough
here without that.

https://bugzilla.gnome.org/show_bug.cgi?id=648149
2011-08-10 12:59:32 -04:00
Giovanni Campagna
e01baf2a25 Fix critical when setting a NULL label
st_label_set_text() does not accept NULL, and emits a g_critical
in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=654638
2011-08-01 16:40:25 +02:00
Jeremy Bicha
77556d181e Use "Region and Language Settings" label
Since this link in the keyboard menu points to Region and Language
Settings in System Settings, we should be consistent and use that
term instead of "Localization Settings"

Also, this removes ellipsis from "Show Keyboard Layout" since it
doesn't require further input.

https://bugzilla.gnome.org/show_bug.cgi?id=652984
2011-07-29 14:41:08 +02:00
Rui Matos
d894dedaf6 Revert "volume.js: make slider menu items activatable"
This reverts commit a50c30a4fd.
2011-07-20 00:45:29 +01:00
Rui Matos
a50c30a4fd volume.js: make slider menu items activatable
Keeping the volume menu open after setting the desired volume isn't that
useful and forces a second click (or an Esc press) to dismiss it. Allow for
the sliders to be used with a single click-hold-move-release.

https://bugzilla.gnome.org/show_bug.cgi?id=649586
2011-07-20 00:25:11 +01:00
Florian Müllner
fda4fc674d power: Remove _checkError()
On error, we tried to kill and respawn gnome-power-manager, but
as of commit c5676900 the DBus interface provided by g-s-d's power
plugin is used, so the respawning does not have any effect.

https://bugzilla.gnome.org/show_bug.cgi?id=654300
2011-07-13 19:45:29 +02:00
Giovanni Campagna
5819dd3a5a NetworkMenu: take out an item from More... when another is destroyed
When one of the networks in the main menu is removed and we have
a More... submenu, we can take the first out from the submenu and
show it in the main menu.

https://bugzilla.gnome.org/show_bug.cgi?id=647175
2011-07-13 01:33:47 +02:00
Richard Hughes
c567690004 power: Use the new gnome-settings-daemon DBus names now the power plugin has moved there 2011-07-04 17:57:25 +01:00
Giovanni Campagna
9412ac2027 BluetoothStatus: show "hardware disabled" when disabled by rfkill
Use the new PopupSwitchMenuItem functionality when bluetooth cannot
be enabled. Use it also for showing "connecting..." when activating
device items.

https://bugzilla.gnome.org/show_bug.cgi?id=648048
2011-06-27 17:21:38 +02:00
Giovanni Campagna
c8670819dc PopupMenu: enhance PopupSwitchMenuItem to show status labels
Moves and converts NMDeviceTitleMenuItem from network.js into
PopupSwitchMenuItem, so that it can show both a switch and a
greyed-out status label. This will be soon used by the Bluetooth menu.

https://bugzilla.gnome.org/show_bug.cgi?id=648048
2011-06-27 17:21:38 +02:00
Giovanni Campagna
4132ccae33 NetworkMenu: place network items in the right position
_createNetworkItem was always appending access point at the end of
the menu when their position was < 5 (NUM_VISIBLE_NETWORKS), ignoring
the presence or absence of _overflowItem, which thus ended in the
middle of the network list. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=652313
2011-06-27 17:19:33 +02:00
Colin Walters
8834a7df10 Consistently exit the overview when launching external applications
We were doing this in one or two places, but not most of them.

https://bugzilla.gnome.org/show_bug.cgi?id=653095
2011-06-22 17:49:44 -04:00
Giovanni Campagna
82648bc86c NetworkMenu: only show 5 connections per device
If we have more than 5 (which can happen with VPN connections), place
them into a More... submenu, which also becomes scrollable if needed.
To protect from race conditions and ordering issues while reading
connections, sort them in alphabetic order when the timestamp is equal.

https://bugzilla.gnome.org/show_bug.cgi?id=651602
2011-06-08 17:24:59 +02:00
Dan Winship
7f2456c00d network: fix chaining of a destroy method
https://bugzilla.gnome.org/show_bug.cgi?id=651606
2011-06-02 09:28:47 -04:00
Giovanni Campagna
dbd629d5d2 NetworkMenu: show devices that are unmanaged
Some users are confused when their devices are not shown in the
network menu, even if they configured them manually. Mark their presence
by showing them in the menu, even if they cannot be otherwise
interacted with.
Also add a status string for deactivating devices (none currently,
soon will appear in NetworkManager).

https://bugzilla.gnome.org/show_bug.cgi?id=646946
2011-05-23 19:11:35 +02:00
Dan Williams
4b3fbc4c9b network: fix modem connected state check
There is no CONNECTED state for devices, it's ACTIVATED.

https://bugzilla.gnome.org/show_bug.cgi?id=650124
2011-05-19 12:09:56 -04:00
Dan Winship
898b2b903d environment: put gettext stuff into global environment
Rather than defining _() as a local function in every module, put it
into the global environment (along with C_() and ngettext()).

https://bugzilla.gnome.org/show_bug.cgi?id=649203
2011-05-16 14:57:21 -04:00
Dan Williams
5090a4ccce network: request that nm-applet show the mobile broadband wizard
Use nm-applet 0.8.999 API to call the mobile broadband wizard and
activate the new connection.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=649318
2011-05-04 10:23:08 -05:00
Dan Williams
ae0652d13f network: fix initial connections to WPA[2] Enterprise APs
Call out to nm-applet to do the dirty work since the dialog of
doom is pretty complicated and we don't have a JS equivalent
of it for now.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=648171
2011-05-04 10:20:33 -05:00
Dan Williams
101a07a3d7 network: fix handling of AP flags and enhance for 802.1x
All WPA APs were getting set as WPA2 due to the check for privacy;
WPA/WPA2 APs *must* set the Privacy bit according to the standard,
so we'd never end up in the case for NMAccessPointSecurity.WPA.

Fix that, and also add flags for WPA[2] Enterprise which we'll
use a bit later for the first-time connect case for 802.1x enabled
access points.
2011-05-04 10:20:21 -05:00
Dan Williams
c31109800b network: simplify connection sorting by using libnm-glib functions
Instead of rolling our own code, use new libnm-glib functions to do
the same thing.  Requires libnm-glib as of
779215c742bbe29a2c66202ec7e2e6d43edeb8ff (which will be part of 0.9).

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=648648
2011-05-04 00:33:51 -05:00
Dan Williams
8ec62ce46b bluetooth: fix mis-spelling of "Set up"
"setup" is not a verb.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=648410
2011-04-28 16:22:04 -05:00
Dan Winship
42a5531f15 network: fix a variable name 2011-04-27 09:05:39 -04:00
Giovanni Campagna
76fce94b66 BluetoothStatus: always update devices
Previously, we skipped rebuilding device items in case the device
had already been seen, but this caused the connected switch not to
be updated. Now it has been refactored to update in case the device
changes, and to create only when the device is completely new.

https://bugzilla.gnome.org/show_bug.cgi?id=647565
2011-04-26 18:05:39 +02:00
Giovanni Campagna
d0780d1622 NetworkMenu: keep wirelesss networks in predictable order
Adds a function that compares wireless networks and keeps them sorted
at all times. Order is: first already configured connections, then
first secure networks, then alphabtic. Also, the appearance of a new access
point no longer causes the whole menu to be rebuilt (but it still linear
searches for the position, I guess that could be skipped), which caused
the addition of more code for tracking the active access point.

https://bugzilla.gnome.org/show_bug.cgi?id=646580
2011-04-26 14:46:43 +02:00
Dan Winship
7e857dede3 network: add a few more states to getStatusLabel()
The IP_CHECK and SECONDARIES states should be considered part of the
"connecting..." phase.

DEACTIVATING should be its own stage, but that would break string
freeze, so we just treat it like DISCONNECTED for now.

UNMANAGED needs to be treated differently in 3.2, but it is too late
to fix it for 3.0.1.

https://bugzilla.gnome.org/show_bug.cgi?id=646946
2011-04-25 09:13:48 -04:00
Giovanni Campagna
6a27d5ed80 NetworkMenu: don't pass NULL to nm_utils_ssid_to_utf8
It expects an Array or a ByteArray, and gjs throws in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=647040
2011-04-11 10:43:12 -04:00
Dan Winship
8232684672 network: show ad-hoc icon for ad-hoc networks
https://bugzilla.gnome.org/show_bug.cgi?id=646141
2011-04-11 10:42:22 -04:00
Giovanni Campagna
2d855ce5cf NetworkMenu: fix some bugs for status items
When more than one device exists, we need to reset the section title's
device to null, and in that case we must show nothing (neither the switch
nor the label, but an empty label is OK anyway). Also, we need to
update the device statusItem immediately when constructing it, as we
may not get any state-changed.

https://bugzilla.gnome.org/show_bug.cgi?id=646074
2011-04-11 10:38:00 -04:00
Dan Winship
ef552846d1 network: fix typo in bluetooth code
https://bugzilla.gnome.org/show_bug.cgi?id=646968
2011-04-11 10:38:00 -04:00
Giovanni Campagna
c7dfd0894e NetworkMenu: fix handling WWAN devices
NMDeviceModem._createSection was not checking whether it should have
shown the connection list, resulting in status item shown even if
the device was in an invalid state.
Also, fix a logic error when creating the operatorItem and fix overriding
_clearSection protected method.

https://bugzilla.gnome.org/show_bug.cgi?id=646395
2011-04-11 10:38:00 -04:00
Dan Winship
5b1a76aeff network: fix two warnings when removing a network device
NMApplet connects to each NMDevice's state-changed signal and stores
the signal handler id on the NMDevice itself. However, it was using
the same name as NMDevice itself was using to store the handler ID for
the underlying GObject's state-changed signal, thus overwriting it,
and resulting in *neither* signal handler getting removed if the
device went away. (This probably isn't a problem, since the device is
going away, but it causes a warning.)

Also, at least for WWAN devices, the device state changes to UNMANAGED
immediately before disappearing, but getStatusLabel() wasn't handling
that case and printed a warning instead. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=646708
2011-04-11 10:38:00 -04:00
Owen W. Taylor
529b6ca935 network: deal with recycling of closed active connections
If you restart NetworkManager, then the list of active connections
is emptied, then comes back with the same GObjects in it. If the
_primaryDevice field isn't cleared on the object, then we won't
know we need to set it back on the device, resulting in the active
device not showing up in the menu.

https://bugzilla.gnome.org/show_bug.cgi?id=646558
2011-04-11 10:38:00 -04:00
Giovanni Campagna
625a4c0766 NetworkMenu: destroy More... submenu when empty
Add a .length property to PopupMenuBase, and use it from the network
menu to destroy the menu when removing a network without rebuilding.

https://bugzilla.gnome.org/show_bug.cgi?id=645981
2011-04-11 10:38:00 -04:00
Giovanni Campagna
3c3ea2f575 NetworkMenu: fix updating the access point strength
A notify signal does not include the new value of the property in
its signature, so the handler was trying to compare a GParamSpec with
a number when updating. Fix it to always retrieve the value from the
object.

https://bugzilla.gnome.org/show_bug.cgi?id=646443
2011-04-11 10:38:00 -04:00
Dan Winship
7932585656 network: fix alignment of secure vs insecure wireless icons
Since the icon area is end-aligned, the signal strength icon for
insecure networks was ending up aligned with the lock icon for secure
networks. Fix that by always including a _secureIcon, but having it be
blank for the insecure networks.

https://bugzilla.gnome.org/show_bug.cgi?id=646121
2011-04-04 09:30:53 -04:00
Giovanni Campagna
20f1457d15 NetworkStatus: ignore invalid and unsupported connection types
Some connection types (like wimax) are not supported by the menu, and
should be ignored instead of throwing exceptions. Also, NetworkManager
had a bug that sent connections with invalid settings. This should not
happen, but in case it does, we will not blow up, but just log a warning
and continue silently.

https://bugzilla.gnome.org/show_bug.cgi?id=646355
2011-04-03 14:24:58 +02:00
Giovanni Campagna
38bcd52065 NetworkMenu: keep the connection list visible when connecting...
When a device is connecting, we can continue showing available
connections and access points, as well as the active one with the dot.
(Hiding was a remnant of when the device status was on a different
menu item than the title)

https://bugzilla.gnome.org/show_bug.cgi?id=646381
2011-04-03 14:22:27 +02:00
Owen W. Taylor
6c3300bc2f network: fix logic bug in checking whether to activate or deactive
A cosmetic change recommended in review of the patch to fix the
VPN Connections switch ended up introducing a logic error that
made the switch not work properly. Fix.

https://bugzilla.gnome.org/show_bug.cgi?id=646380
2011-04-02 21:58:45 -04:00
Giovanni Campagna
d1a110d4ca NetworkMenu: fix VPN connection state
It was always reporting true, even if disconnected. At the same time,
add a signal that is emitted when state changes and update the UI
accordingly.
In the future (with another libnm-glib API break) we should use the
NMVPNConnection object to track the connection state, so that we can
show if we're connecting or we need authentication.

https://bugzilla.gnome.org/show_bug.cgi?id=646380
2011-04-02 20:40:12 +02:00
Giovanni Campagna
5b61485143 NetworkMenu: fix parameters to _findConnection
NMDevice._findConnection expects an uuid as parameter, but
checkConnection was passing a NMConnection object. This caused
exists to be always false, thus the connection was added again every
time the 'updated' signal was emitted.

https://bugzilla.gnome.org/show_bug.cgi?id=645702
2011-04-02 20:35:46 +02:00
Ray Strode
63078fba5b NetworkStatus: Adapt to nm_client_activate_connection api change
It now takes a connection directly instead of the object path associated
with a connection.
2011-03-25 20:38:55 -04:00
Ray Strode
b0176546c2 NetworkStatus: fix vpn indicator
It looks like a part of the code wasn't updated to reflect
a variable name change.
2011-03-25 20:37:29 -04:00
Dan Winship
526d11809f network: add security icons to WEP/WPA wireless networks
https://bugzilla.gnome.org/show_bug.cgi?id=645647
2011-03-25 18:55:40 -04:00
Giovanni Campagna
4ebf07c725 NetworkStatus: hide the only connection for wired devices
For wired devices (actually, ethernet devices), hide the connection
list when there is only one connection (either automatic or stored).
The device can be operated with the associated switch.
2011-03-25 20:58:37 +01:00
Giovanni Campagna
da852a94bd NetworkStatus: show "firmware missing" when firmware is not available
Since device state Unavailable is generic and has substates, instead
of using an hack for carrier, introduce some code that checks both
for carrier and firmware-missing when in that device state, and updates
the UI accordingly.
2011-03-25 20:58:37 +01:00
Wouter Bolsterlee
8ab25de6c6 Fix user visible typo: s/estabilished/established/
The affected translations are also modified to not cause any
inconvenience for translators.
2011-03-19 01:16:16 +01:00
Diego Escalante Urrelo
0d963df7b3 status: use Shell.AppSystem to launch settings panels
Different methos are being used to launch the control-center panels of each
status icon. Standarize on Shell.AppSystem.
This also fixes the network icon using a non-existant Util.spawnDesktop()
method.

Bug #645091
2011-03-17 23:26:14 -05:00
Colin Walters
fea8b6da2f Remove broken ShellAppSystem API and all consumers
In commit 9bd22dc0, I introduced an API to load an arbitrary
.desktop file, not necessarily from the menu path.  It turns
out this function was broken because it created ShellApp instances
that were *different* from ones that were cached normally.

As far as I can tell, we didn't initially use it.  Then later
Util.spawnDesktop was created which used this function.

Remove this broken function and all callers; if we're loading
.desktop files from *outside* the menu path, we can look at
readding.

This patch also kills off Util.spawnDesktop in favor of callers
talking to ShellAppSystem directly, now that the latter reports
errors.

https://bugzilla.gnome.org/show_bug.cgi?id=644402
2011-03-16 15:07:22 -04:00
Giovanni Campagna
c8ac3fd4f5 Status area: add NetworkManager indicator
Adds an implementation of nm-applet in javascript. Uses the new
introspection from NetworkManager, and temporarily requires
nm-applet to be running for the secret service.
Features a renewed interface, with each device controllable through
a switch, which if toggled off disconnects, and if toggled on
connects to the most recently used valid connection. More esoteric
features like creation of ad-hoc networks have been moved to the
control center panel.

https://bugzilla.gnome.org/show_bug.cgi?id=621707
2011-03-16 15:59:34 +01:00
Giovanni Campagna
7f67c34b39 Bluetooth: fix updating the device list
Inside the inner loop, use the inner iterator, not that of the outer
loop. At the same time, refactor the code to rely less on private
properties appended to foreign objects.

https://bugzilla.gnome.org/show_bug.cgi?id=644858
2011-03-16 15:29:37 +01:00
Dan Winship
0a3d80b86e accessibility: remove Screen Reader and Screen Keyboard entries
These are not 100% ready for 3.0 (though they are still available from
the control panel).

https://bugzilla.gnome.org/show_bug.cgi?id=639762
2011-03-15 15:36:09 -04:00
Giovanni Campagna
25015c9c3a BluetoothStatus: don't pass NaNs to native functions
GJS complains when a NaN is passed in place of an integer, and
parseInt returns that from non numeric string. Pass a sentinel
that cancels the operation in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=642978
2011-03-13 17:05:33 +01:00
Bastien Nocera
bdd1f82777 volume: Use constants from GVC
Instead of defining our own.

https://bugzilla.gnome.org/show_bug.cgi?id=644511
2011-03-11 16:29:59 +00:00
William Jon McCann
440b222664 Do not launch power statistics app from battery items
https://bugzilla.gnome.org/show_bug.cgi?id=640768
2011-03-03 15:44:38 -05:00
Florian Müllner
602fa1c657 universal-access: Use "text-scaling-factor" instead of "dpi"
The latter has been removed from the schema, so adjust to that change.
2011-03-03 18:49:40 +01:00
Giovanni Campagna
89dcd9027d PowerStatus: report 0 minutes as "Estimating..."
When UPower has not yet collected enough data to calculate a time
to discharge, it will report 0 minutes. Show "Estimating..." in
that case instead.

https://bugzilla.gnome.org/show_bug.cgi?id=642753
2011-03-01 20:18:29 +01:00
Giovanni Campagna
0d2eb76cee Ensure that all signatures are defined in DBus interfaces
The DBus JS binding will complain if the signature of a method
or of a signal is undefined, so we need to define it even if it
is an empty string, and we need to use the correct property name
for signals.

https://bugzilla.gnome.org/show_bug.cgi?id=643374
2011-02-28 18:40:57 +01:00
Giovanni Campagna
06198702c2 KeyboardStatus: fix showing current layout
Util.spawn accepts an array of strings as the arguments, and will
not implicitly convert other types.

https://bugzilla.gnome.org/show_bug.cgi?id=643104
2011-02-23 20:13:31 +01:00
Giovanni Campagna
12d991f336 A11yStatus: ignore an user default of O dpi
The default for the DPI setting is 0, but 0 * any scaling factor
is 0, so we need to deal with that, by falling back to X default.

https://bugzilla.gnome.org/show_bug.cgi?id=639762
2011-02-23 20:10:44 +01:00
Giovanni Campagna
a4d3a57a1c A11yStatus: fix resetting the GTK and icon themes
If the Shell is started with HighContrast enabled, it will never
see another value for the GSettings keys. In that case, we just
reset to the default.

https://bugzilla.gnome.org/show_bug.cgi?id=642641
2011-02-21 18:50:35 +01:00
Giovanni Campagna
0064ca3582 KeyboardStatus: add "Show layout" item
Add a menu item that opens a dialog showing the current keyboard
layout. Uses the new utility in libgnomekbd.

https://bugzilla.gnome.org/show_bug.cgi?id=641415
2011-02-21 18:49:19 +01:00
Florian Müllner
1bc1a0dbf0 a11y: Adjust schemas for screen keyboard
The setting in org.gnome.desktop.default-applications.at
has been removed, use the corresponding setting in
org.gnome.desktop.a11y.applications instead.
2011-02-17 20:46:16 +01:00
Florian Müllner
537ce60599 a11y: Adjust schema for screen reader
The setting in org.gnome.desktop.default-applications.at
has been removed, use the corresponding setting in
org.gnome.desktop.a11y.applications instead.
2011-02-17 18:51:27 +01:00
Adel Gadllah
bdd805a3ee volume: Increase maximum by 50% for outputs with decibel support
Volume should go up to 150% if the sound card used as output has
decibel volume support.

https://bugzilla.gnome.org/show_bug.cgi?id=641886
2011-02-17 18:09:58 +01:00
Florian Müllner
804b51fa95 Revert "a11y: Adjust schemas for screen reader and keyboard"
This reverts commit 4f23f32fc1.
2011-02-17 16:52:34 +01:00
Florian Müllner
4f23f32fc1 a11y: Adjust schemas for screen reader and keyboard
The settings in org.gnome.desktop.default-applications.at
have been removed, use the corresponding settings in
org.gnome.desktop.a11y.applications instead.
2011-02-17 16:18:32 +01:00
Florian Müllner
3631983de5 magnifier: Adjust for removal of 'show-magnifier' key
gsettings-desktop-schemas had two conflicting settings for showing
the magnifier: 'show-magnifier' in org.gnome.desktop.a11y.magnifier
and 'screen-magnifier-enabled' in org.gnome.desktop.a11y.applications.
The former has been removed in favor of the latter, so adjust to this
change.
2011-02-17 16:09:07 +01:00
Giovanni Campagna
a1e019b41a VolumeStatus: play notification on scroll
Add the machinery to cancel the notification when a new playing a
new one (wrapping ca_context_cancel), then use it when scrolling
the status icon.
Not doing it for the slider because it causes noise, either with the
keyboard, with mouse drag or with mouse wheel.

https://bugzilla.gnome.org/show_bug.cgi?id=633667
2011-02-17 15:35:17 +01:00
Thomas Wood
cd56de85d0 Move magnifier schemas to gsettings-desktop-schemas
Move the magnifier schemas to gsettings-desktop-schemas to allow them to be
shared between gnome-shell and other applications.

https://bugzilla.gnome.org/show_bug.cgi?id=642034
2011-02-11 16:52:45 +00:00
Luca Ferretti
940f06fb32 bluetooth: remove weird "Agent" word from notification (close #637687)
Agents are an implementation detail of Bluetooth on Linux (it's actually
a D-Bus "agent", not a Bluetooth one anyway). Only "Bluetooth" is fine.
2011-02-09 23:08:02 +01:00
Florian Müllner
11064c0e35 kbd-status: Remove support for disabling the indicator
The status icon should always be visible if more than two layouts
are configured. The settings key which was used to enforce hiding
the icon in this case as well has already been removed from the
g-s-d schema, causing an error on startup.
2011-02-09 02:34:53 +01:00
Giovanni Campagna
ad27b9eda5 VolumeStatus: change the definition of high/medium/low
Do it the same way as gnome-settings-daemon, so that OSD does not
look "out-of-sync" with the status icon.

https://bugzilla.gnome.org/show_bug.cgi?id=641538
2011-02-06 12:03:12 +01:00
Florian Müllner
0244c6d5b8 Revert "KeyboardStatus: handle modifier key indicators"
The 'show-keyboard-leds-indicator' key has been removed from
the schema.

This reverts commit 20f49e8c89.
2011-01-29 19:34:12 +01:00
Giovanni Campagna
20f49e8c89 KeyboardStatus: handle modifier key indicators
Introduce a generic framework for on/off indicators that are shown
in the panel, next to the system status area, and use it for
showing the status of modifier keys.

https://bugzilla.gnome.org/show_bug.cgi?id=600771
2011-01-21 19:38:30 +01:00
Luca Ferretti
05f9be046f BluetoothStatus: add a separator above Settings menu entry
Close bug #639704
2011-01-17 21:02:03 +01:00
Luca Ferretti
5b3f40102f kbd-status: s/Preferences/Settings in menu entry
In order to match similar menu entries from other menus.
2011-01-15 01:04:06 +01:00
Florian Müllner
d21f04b8b4 kbd-status: Close the menu when switching layouts
Layout items in the menu overwrite PopupBaseMenuItem.activate(),
so the menu stays open when selecting a layout from the menu.
Chain up to the parent class' method to make the items behave properly.

https://bugzilla.gnome.org/show_bug.cgi?id=639474
2011-01-14 07:18:39 +01:00
Florian Müllner
ed76e52918 Revert "kbd-status: Close the menu when switching layouts"
This reverts commit e0f58c615b.

Pushed accidentally.
2011-01-14 01:06:49 +01:00
Florian Müllner
e0f58c615b kbd-status: Close the menu when switching layouts
Layout items in the menu overwrite PopupBaseMenuItem.activate(),
so the menu stays open when selecting a layout from the menu.
Chain up to the parent class' method to make the items behave properly.

https://bugzilla.gnome.org/show_bug.cgi?id=639474
2011-01-14 01:01:30 +01:00
Dan Winship
23353fb77a Util.killall: add utility for killing unwanted processes
Since we have to use pkill, kludgily, for the right combination of
portability and featurefulness, put the code in one place rather than
duplicating it everywhere.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Dan Winship
8bdfb8df68 util: add Util.spawn and friends
Add Util.spawn, Util.spawnCommandLine, and Util.spawnDesktop for
spawning a command/argv/.desktop file in the background, automatically
handling errors via MessageTray.SystemNotificationSource(), and
Util.trySpawn, Util.trySpawnCommandLine, and Utils.trySpawnDesktop
that don't do automatic error handling (but do at least clean up the
error message in the exception a bit).

Update various other bits of code around the shell to use the new
methods.

https://bugzilla.gnome.org/show_bug.cgi?id=635089
2011-01-13 12:14:40 -05:00
Giovanni Campagna
4207536377 Status Area: add keyboard layout selector
Add an indicator for the current keyboard layout, based on
libgnomekbd. The indicator is shown when more than one group
is loaded in X and it is not disabled in GSettings.

https://bugzilla.gnome.org/show_bug.cgi?id=600771
2011-01-12 20:27:25 +01:00
Giovanni Campagna
1a884535ad BluetoothStatus: fix typo
The function to hide a menu item is .actor.hide(), not just .hide()
2011-01-06 20:35:21 +01:00
Giovanni Campagna
b2bb0bf10f BluetoothStatus: hide the icon when no adapter is present
There is no point in showing the bluetooth status, when the required
hardware is missing. Just hide in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=638306
2011-01-06 19:54:28 +01:00
Giovanni Campagna
cedcbc5fcf BluetoothStatus: hide the device separator if no devices are shown
When BluetoothApplet::show-full-menu property is notified (when you
switch from a disabled adapter / no adapter to an active one), we
would show all the menu, including the device separator, without
checking if any devices actually existed.

https://bugzilla.gnome.org/show_bug.cgi?id=637690
2011-01-06 19:48:28 +01:00
Giovanni Campagna
5f212b1ae2 BluetoothStatus: update only devices that actually changed
When receiving a "devices-changed" signal from BluetoothApplet,
check if some device item corresponds to an existing one, destroy
the remaining and add the new ones.
With this patch, signal emission when no device actually changed
(which happen due to bluetoothd creating temporary devices) result
in a no-op.

https://bugzilla.gnome.org/show_bug.cgi?id=637690
2010-12-23 18:29:58 +01:00
Giovanni Campagna
23432e616d BluetoothStatus: move the sendto item to the bottom
Kill one separator by merging all global actions items at the end
of the menu, which ends up divided in three sections: status,
devices and actions.

https://bugzilla.gnome.org/show_bug.cgi?id=637690
2010-12-23 18:29:58 +01:00
Luca Ferretti
db457db060 BluetoothStatus: s/Ok/OK in user visible button 2010-12-20 22:07:28 +01:00
Giovanni Campagna
054f498201 BluetoothStatus: hide the additional separator if no devices are shown
Sometimes devices are reported by BluetoothApplet, but are not shown,
so we should not count them to decide whether to show the device
separator.
2010-12-20 17:58:12 +01:00
Giovanni Campagna
9e99a8c25a Bluetooth status indicator
Introduce the new Bluetooth indicator in the System Status area. It
is written in JS with St and uses the new GnomeBluetoothApplet library.

https://bugzilla.gnome.org/show_bug.cgi?id=618312
2010-12-18 19:10:15 +01:00
Bill Nottingham
2d55eab62e Remove 'What's using power...' menu option
The dialog brought up by the "what's using power.." option is currently
more confusing than useful to the user. n

https://bugzilla.gnome.org/show_bug.cgi?id=636982
2010-12-17 14:18:28 -05:00
Dan Winship
7eec8a899a popupMenu: Improve menu item layout
Mixing submenu menuitems and toggle menuitems results in poor layout.
The fix is to right-align the submenu arrows. Since we already need to
right-align the battery percentages as well, add alignment support to
PopupBaseMenuItem.addActor(), and update stuff for that.

Also remove the "column" param from addActor() since it hadn't
actually been implemented correctly before.

https://bugzilla.gnome.org/show_bug.cgi?id=633476
2010-12-16 09:01:24 -05:00
Florian Müllner
d7cc82909a a11y-status: Use single quotes for non-translatable strings
Fix the usage of single vs double quotes according to our coding
conventions.
2010-12-03 00:20:16 +01:00
Matt Novenstern
7b73df78c6 Fix display of remaining time
When there is less than an hour remaining, there was a format() call missing
which made the power status menu display "%d minutes remaining".

https://bugzilla.gnome.org/show_bug.cgi?id=635728
2010-12-01 18:50:16 -05:00
Giovanni Campagna
aef005f451 PowerStatus: show separate hour and minutes for primary device
Show "%d hours %d minutes" instead of "%d minutes", for better
readability.

https://bugzilla.gnome.org/show_bug.cgi?id=635728
2010-12-01 19:12:11 +01:00
Florian Müllner
24669e3ba7 a11y-status: Use GSettings to access the magnifier
The magnifier should be enabled/disabled via the appropriate
GSettings key - otherwise the setting gets out of sync with the
actual state of the magnifier.

https://bugzilla.gnome.org/show_bug.cgi?id=636151
2010-12-01 14:26:16 +01:00
Giovanni Campagna
991a0c642b PowerStatus: make the primary device activatable
If the primary device is not virtual, make it open
gnome-power-statistics on activate.

https://bugzilla.gnome.org/show_bug.cgi?id=635880
2010-11-30 15:49:09 +01:00
Giovanni Campagna
59ba112959 Complete porting to new gnome-power-manager API
We updated the normal devices part, but we forgot the part about
the primary device (possibly because it is not reported as such
in case it is fully charged). Update that as well, to avoid showing
weird GIcon serializations.

https://bugzilla.gnome.org/show_bug.cgi?id=635288
2010-11-22 18:05:11 +01:00
Giovanni Campagna
d5bfc503fe Sound Menu: only show the slider
Reimplement UI without any indication of percentage or mutedness,
and whitout switches. The only interaction point is slider, but
it still supports mute changing for applications that track it,
and will react appropriately to external changes.

https://bugzilla.gnome.org/show_bug.cgi?id=634329
2010-11-19 23:13:32 +01:00
Giovanni Campagna
de50cf80a8 PowerStatus: Update for gnome-power-manager API changes
g-p-m no longer exports a summary, and instead exports a GIcon to
show. Update for that.

https://bugzilla.gnome.org/show_bug.cgi?id=635288
2010-11-19 22:31:37 +01:00
Adel Gadllah
fa44289dd0 [PowerIcon] Fix percent label to be in sync with the description 2010-11-17 22:58:00 +01:00
Florian Müllner
deb7e7317e power-status: Remove tooltip
Status icons should not have tooltips according to the design.
2010-11-17 20:38:02 +01:00
Giovanni Campagna
8b3f05b6e3 Status area: introduce battery & power indicator
Add an indicator for battery charge and power indication in the
system status area, using the newly exported DBus API from
gnome-power-manager.

https://bugzilla.gnome.org/show_bug.cgi?id=622451
2010-11-17 14:52:39 +01:00
William Jon McCann
63e89482fe Use Settings and not Preferences for sound menu
To match the tool that it launches.
2010-11-13 08:43:45 -05:00
Florian Müllner
b2495a0e25 a11y-status: Fix left over GConf usage
Commit f0c6e96e82 updated the "Large Text" action to use a GSettings
key, but left some code accessing the setting via GConf.

https://bugzilla.gnome.org/show_bug.cgi?id=634693
2010-11-12 19:43:52 +01:00
Giovanni Campagna
f0c6e96e82 Status area: update accessibility menu
gnome-settings-daemon has moved to GSettings for most settings, we
should adapt as well. The only remaining GConf key is for metacity
(visual bell).

https://bugzilla.gnome.org/show_bug.cgi?id=634693
2010-11-12 18:44:52 +01:00
Giovanni Campagna
614bcd8016 Update volume indicator labels
It turns out 'Output' and 'Input' are too technical for the novice
user. Use 'Volume' and 'Microphone' instead.

https://bugzilla.gnome.org/show_bug.cgi?id=634329
2010-11-12 17:47:19 +01:00
Giovanni Campagna
6b47b78d4d Fix audio volume icon
_volumeChanged should not update the icon if the sink is muted.
Fixes the case when shell is started with a muted sink (_mutedChanged
is called before _volumeChanged).

https://bugzilla.gnome.org/show_bug.cgi?id=632868
2010-10-22 15:52:59 +02:00
Adel Gadllah
10e59c0840 volumeIndicator: Add mousewheel support
Allow changing the volume by moving the mousewheel over the volume indicato
to restore the old gnome-volume-control-applet behaviour.

https://bugzilla.gnome.org/show_bug.cgi?id=632733
2010-10-20 22:05:14 +02:00
Giovanni Campagna
fe1a9c2b4b Fix showing input volume
Fix two typos in code that decided whether to show input volume and
mute switch.
2010-10-20 21:30:26 +02:00
Giovanni Campagna
ac470b44ef Fix control center panel for audio.
It is "sound", not "volume".
2010-10-20 21:24:15 +02:00
Giovanni Campagna
0547a582d1 Add volume indicator
Add volume control indicator which uses API from gnome-volume-control
to interact with PulseAudio and shows both input and output volumes.
Also adds a small wrapper around libcanberra in ShellGlobal, used by the
volume indicator to provide auditive feedback.

https://bugzilla.gnome.org/show_bug.cgi?id=629455
2010-10-20 16:59:12 +02:00
Florian Müllner
702b8e78e4 accessibility-status: Remove left-over debug message 2010-09-24 10:49:12 +02:00
William Jon McCann
7298831f54 Fix the universal access menu text to match mockups
This makes the menu label text more closely match the mockups
http://live.gnome.org/GnomeShell/Design/Guidelines/SystemStatus/UniversalAccess

https://bugzilla.gnome.org/show_bug.cgi?id=629954
2010-09-20 13:00:04 -04:00
Owen W. Taylor
0cb8953232 accessibility.js: Fix use of non-existent gconf_client_get_value()
gconf_client_get_value() doesn't exist; apparently
gconf_client_get_float() was meant instead.
2010-09-16 15:35:13 -04:00
Giovanni Campagna
6ea18136ac Add Universal Access status indicator
Introduce the Universal Access status indicator as designed, modeled
after the similar UI provided by g-s-d. This indicator allows the user
to change rapidly the keyboard and mouse behaviour (sticky keys, slow
keys, bounce keys, mouse keys), as well as the enabled ATs (magnifier,
screen reader, screen keyboard) and the HighContrast Gtk theme.

https://bugzilla.gnome.org/show_bug.cgi?id=624916
2010-09-16 15:03:26 -04:00