Commit Graph

780 Commits

Author SHA1 Message Date
Piotr Drąg
022376dd56 Added contexts to various Unknown strings
Fixes bug https://bugzilla.gnome.org/show_bug.cgi?id=659968
2012-06-01 14:44:40 +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
Florian Müllner
a3fcb8c284 sessionMode: Add allowSettings property
Add a sessionMode.allowSettings property, which determines whether
menus in the top bar should allow access to System Settings or not.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:28 +02:00
Florian Müllner
3d26224180 Delegate mode information to a dedicated object
Rather than accessing global.session_type / global.session_mode
all over the place, delegate mode information to a dedicated
sessionMode object. While not very useful for now, we will replace
checks for a particular mode with checks for particular properties
that sessionMode defines based on global.session_mode.

https://bugzilla.gnome.org/show_bug.cgi?id=676156
2012-05-22 19:42:27 +02:00
Florian Müllner
48d6eb168f bluetooth: Enforce a PIN length of 6 digits
Bluetooth PINs are required to have 6 digits, so enforce that
condition by making the PIN request notification's confirm
button insensitive unless the entered PIN has the correct length.

https://bugzilla.gnome.org/show_bug.cgi?id=651251
2012-05-18 17:41:19 +02:00
Florian Müllner
76616dc98c bluetooth: zero-pad PIN
Bluetooth PINs always consist of 6 digits, so make sure to add
leading zeros as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=651251
2012-05-18 17:39:50 +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
Florian Müllner
a2d4f133b7 a11y: Set a name for the keyboard status icon
https://bugzilla.gnome.org/show_bug.cgi?id=672719
2012-04-13 13:31:44 +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
Colin Guthrie
f32ab20267 bluetooth: Fix connectedMenuItem variable case.
This fixes a regression introduced in d856338f86.
2012-03-05 22:05:12 +01: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
Florian Müllner
aa2a63bd84 volume: Clarify translatable string
https://bugzilla.gnome.org/show_bug.cgi?id=642135
2012-02-08 17:50:57 +01:00
Florian Müllner
8bcbf3030f power: Fix icon updates
gnome-settings-daemon commit 07b1ed63016 removed the custom 'Changed'
DBus signal in favor of the standard 'PropertiesChanged' signal, so
use that instead to update the icon.

https://bugzilla.gnome.org/show_bug.cgi?id=667371
2012-01-29 23:21:01 +01: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
Bastien Nocera
10df80b96a status: Remove unneeded pkill call
The bluetooth-applet is only started in the fallback session,
not when running under the shell.

https://bugzilla.gnome.org/show_bug.cgi?id=647587
2011-12-01 10:51:19 +01:00
Giovanni Campagna
17c46c2452 Port everything to class framework
The last patch in the sequence. Every place that was previously
setting prototype has been ported to Lang.Class, to make code more
concise and allow for better toString().

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Giovanni Campagna
0996174b3d Port GDM and Caribou to GDBus
During the mass port to GDBus, this classes were left out (probably
because they didn't exist at the time). Now it's time to update
them.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +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
Giovanni Campagna
2b57603271 Port PopupMenu to new Lang.Class framework
The Lang module in gjs has recently gained a small yet powerful
Class framework, that should help improve the readability of code
when using complex inheritance.
This commit starts porting shell code, by rewriting all classes in
popupMenu.js (and all derived classes) to Lang.Class.

https://bugzilla.gnome.org/show_bug.cgi?id=664436
2011-11-24 09:50:04 +01:00
Florian Müllner
8678b87120 a11y: Adapt to re-addition of 'visual-bell'
The option was merge with 'visual-bell-type' with the GSettings
port, but the change turned out too disruptive for the universal
access menu / settings panel, so gsettings-desktop-schemas commit
a5819b2a4e9 re-added the separate option.
2011-11-14 15:45:51 +01:00
Jasper St. Pierre
d856338f86 bluetooth: Fix undefined variable issue
https://bugzilla.gnome.org/show_bug.cgi?id=663891
2011-11-13 15:23:38 -05:00
Florian Müllner
a9ab8784c4 Adapt to mutter moving to GSettings
https://bugzilla.gnome.org/show_bug.cgi?id=663429
2011-11-11 20:32:43 +01:00
Giovanni Campagna
6547f75b12 Port client side code to GDBus
This continues the series of patches for GDBus porting, affecting
all code that accesses remote DBus objects. This includes modemManager,
automount, autorun (for the hotplug sniffer), calendar, network (for
nm-applet only), power, scripting (for perf monitor interface)

https://bugzilla.gnome.org/show_bug.cgi?id=648651
2011-11-11 11:15:38 -05:00
Jasper St. Pierre
463e0919d4 Remove all stray imports to imports.dbus
Some modules were importing DBus without actually using it.

https://bugzilla.gnome.org/show_bug.cgi?id=648651
2011-11-09 13:56:42 -05:00
Giovanni Campagna
43f53a708f NetworkMenu: fix regression in access-point-removed
When changing _findNetwork with _findExistingNetwork, I changed
the return value to avoid searching twice for the access point,
and changed some names. I forgot to update all points where those
names were used.

https://bugzilla.gnome.org/show_bug.cgi?id=663278
2011-11-06 16:55:30 -05:00
Giovanni Campagna
d7d5da0301 NetworkMenu: fix logic for updating wifi icon
Previously, we connected to notify::strength only if there was
already a signal connected, and the AP changed (thus, by induction,
we never connected). As a result, the icon became stale and different
from that shown inside the menu (which is correctly updated).

https://bugzilla.gnome.org/show_bug.cgi?id=650007
2011-11-04 10:19:20 +01:00
Giovanni Campagna
70fc13500d Network Menu: fix pulling out the first element from the More... submenu.
PopupMenu.firstMenuItem returns a PopupMenuItem, not an apObj. We
need to retrive the latter using the _apObj property.

Also, somehow the property from the number of elements in a menu
was changed from .length to .numMenuItems, and this broke the
destruction of the menu upon emptying it.

https://bugzilla.gnome.org/show_bug.cgi?id=659277
2011-11-03 13:12:03 +01:00
Giovanni Campagna
3d3c9546a2 NetworkMenu: don't query DBus properties of removed objects
Calling nm_access_point_get_ssid() in the handler of the
access-point-removed signal can result in DBus request, which will
then fail because the object was already removed at the server side.
Instead, use a difference function to retrieve the access point
object (the network), that compares directly by object identity.

https://bugzilla.gnome.org/show_bug.cgi?id=651378
2011-10-28 22:18:21 +02:00
Dan Winship
75b824d032 *.js: Make emacs modelines consistent
js2-mode is no longer developed and we recommend js-mode these days,
so switch the modelines to specify that, and make them consistent
across all files.

https://bugzilla.gnome.org/show_bug.cgi?id=660358
2011-10-11 08:05:12 -04:00
Jasper St. Pierre
786cfbd397 shell-util: Remove shell_util_icon_from_string
GJS doesn't need to be able to represent interfaces for you to be able to
access an interface method, so Gio.icon_new_for_string works fine.

https://bugzilla.gnome.org/show_bug.cgi?id=661231
2011-10-11 00:07:31 -04:00
Florian Müllner
9067689839 power-status: Use correct DBus signatures
Devices are represented as susdut, not susbut (i.e. the percentage
is a double rather than a boolean) - apparently the wrong signature
works, but correct it anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=660122
2011-09-28 19:56:23 +02:00
Giovanni Campagna
82fc66305d Clear the active network when removing the active access point
When the active AP disappears, it is possible to receive the
"access-point-removed" signal before the "notify::active-ap" (as
dbus-glib + libnm-glib property notifications are not reliable).
In that case, we would remove the AP from the network object, thus
an attempt to update the UI would create an item for an empty
network.

https://bugzilla.gnome.org/show_bug.cgi?id=658150
2011-09-20 19:01:23 +02:00
Giovanni Campagna
05e0d5066f Don't create AP items for empty networks
Current code is sometime attempting to create menu items for wifi
networks that have no visible AP. I have no idea why this is
happening, but it should fix the symptoms and avoid exceptions.

https://bugzilla.gnome.org/show_bug.cgi?id=658150
2011-09-20 19:01:01 +02:00
Dan Winship
ae00f86887 panel: allow padding around panel buttons to shrink
for narrow screens (eg, portrait orientation)

https://bugzilla.gnome.org/show_bug.cgi?id=651299
2011-09-19 17:43:54 -04:00
Dan Winship
f23239a923 status/keyboard: use correct style class name to fix menu highlight
The keyboard status item doesn't derive from SystemStatusButton, since
it doesn't use an icon. But this meant it wasn't getting the right
class name, and so was using the full-width menu title highlight
rather than the small one. Fix that.
2011-09-19 17:36:13 -04:00
Dan Winship
d949920e68 status/keyboard: fix function naming style 2011-09-19 17:36:13 -04:00
Dan Winship
554ad4ef05 keyboard: switch to using the correct gsettings key for enable/disable
https://bugzilla.gnome.org/show_bug.cgi?id=612662
2011-09-19 07:34:02 -04:00
Colin Walters
f65826b3ba network: Don't notify on connection lost
The design is for applications to do this, basically.  Web browsers,
Evolution, Empathy already display something on network status change.

Note though we need an application API in GIO to monitor network state;
see https://bugzilla.gnome.org/show_bug.cgi?id=620932

https://bugzilla.gnome.org/show_bug.cgi?id=658954
2011-09-16 13:57:14 -04:00
Matthias Clasen
b5fa48f485 status: don't show 'Show Keyboard Layout' on the login screen
It does not make a great amount of sense to have this function
on the login screen. And worse, it does not work, since the greeter
is currently a modal dialog, so interaction with the opening
window is impossible.

https://bugzilla.gnome.org/show_bug.cgi?id=659164
2011-09-16 09:45:11 -04:00
Florian Müllner
e81cee3949 network-status: Remove colloquialism in string
s/You're/You are/

https://bugzilla.gnome.org/show_bug.cgi?id=645037
2011-09-14 15:43:22 +02:00
Florian Müllner
e943dcafa4 power-status: Mark number with percentage for translation
Some locales expect the percentage sign before the number while
others use a different character, so mark it for translation.

https://bugzilla.gnome.org/show_bug.cgi?id=644097
2011-09-14 15:43:21 +02:00
Giovanni Campagna
7b1deba590 Network: destroy notifications when the connection completes
When you finish reconnecting, we should remove any Connection Lost
or Connection Failed notification.

https://bugzilla.gnome.org/show_bug.cgi?id=658049
2011-09-11 12:36:16 +02:00
Bastien Nocera
d99a2f19a5 Revert "volume: Increase maximum by 50% for outputs with decibel support"
This reverts commit bdd805a3ee.

Conflicts:

	js/ui/status/volume.js

https://bugzilla.gnome.org/show_bug.cgi?id=657607
2011-09-05 11:48:37 +01:00
Ray Strode
13bf64a53d popupMenu: Use new convenience method for settings
All the system status menus in the panel offer a
menu item to jump to a relevant part of the
control-center.

This means each status icon has the same, or nearly the
same bit of code to:

- Add a new "action" menu item and listen for its activation.
- Hide the overview if it's showing when the menu item is activated
- Find the relevant control-center panel from its desktop file
- Launch the control-center to the relevant panel

This commit consolidates all those details in a new method,
addSettingsAction.  This refactoring reduces code duplication and
slight inconsistencies in the code resulting from that duplication.
It will also make it easier in subsequent commits to hide settings menu
items when the shell is used in the login screen.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-28 12:16:04 -04:00
Ray Strode
f96b2ee858 popupMenu: Hide separators when they aren't separating
A separator only makes sense if there are items on both
sides of it. There is quite a lot of code written
throughout the shell that manages the process of showing
and hiding separators as the items around those separators
change.

This commit drops all that code in favor of changes to the menu
implementation to dynamically hide or show separators as
appropriate, so the callers don't have to deal with it.

https://bugzilla.gnome.org/show_bug.cgi?id=657082
2011-08-28 12:15:17 -04:00
Giovanni Campagna
d896248ff8 Complete transitioning away from nm-applet
Wireless and 3g dialog code has moved to gnome-control-center, so
we can stop calling out to nm-applet. Also, we can now enable the
notifications provided by the shell and kill a bit of code about
auth that is not actually needed.

https://bugzilla.gnome.org/show_bug.cgi?id=650244
2011-08-29 18:11:50 +02:00
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