Commit graph

191 commits

Author SHA1 Message Date
Cosimo Cecchi
db449dc49e power: don't assume we have a Screen proxy when IIO proxy is ready
On panel construction, we trigger asynchronous creation of a GDBusProxy
for the IIO sensors daemon and one for the Screen g-s-d interface.
Since there's no guarantee we'll have the screen proxy ready by the time
the IIO proxy is constructed, guard for (priv->screen_proxy != NULL), or
we'll hit a critical.

https://bugzilla.gnome.org/show_bug.cgi?id=754735
2015-09-08 10:10:00 -07:00
Cosimo Cecchi
3af59f7c03 power: add debug output when IIO proxy creation fails
https://bugzilla.gnome.org/show_bug.cgi?id=754735
2015-09-08 10:10:00 -07:00
Bastien Nocera
6223248a16 power: Replace WiMax reference with LTE
Nobody uses WiMax anymore, but LTE is a known reference for high speed
mobile Internet access.
2015-08-03 17:38:59 +02:00
Michael Catanzaro
7333e08a9b power: Improve labels for wifi and mobile broadband toggles
Users report the previous labels were still confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=695417
2015-08-03 17:38:30 +02:00
Matthias Clasen
83a55046ca power: Make the automatic suspend row accessible
Orca was not reading this row at all - since the row is
clickable (role 'push button'), orca expects it to have
an accessible name. So, lets set one.

https://bugzilla.gnome.org/show_bug.cgi?id=746756
2015-07-10 13:06:51 +02:00
Bastien Nocera
d2c0b66275 power: Fix possible crash if up_client_get_devices() fails
up_client_get_devices() can fail if upower crashes or isn't available.
Make sure not to crash ourselves by handling NULL return values as we do
later in the loop.

See https://bugzilla.redhat.com/show_bug.cgi?id=1175421

https://bugzilla.gnome.org/show_bug.cgi?id=751095
2015-06-29 17:49:04 +02:00
Bastien Nocera
f31c3b16c7 power: Describe batteries properly when not called BAT0
When the main battery isn't called BAT0, as happens on a dual-battery,
convertible Toshiba laptop, we would tag both batteries as "Extra". Mark
the first one as being the main battery.

In the longer-term, we'll have UPower exporting the exact information
about which is in the "dock" and which is in the same package as the
processing unit, when the kernel exports it.
See https://bugzilla.kernel.org/show_bug.cgi?id=97841

https://bugzilla.gnome.org/show_bug.cgi?id=748592
2015-06-04 18:32:07 +02:00
Bastien Nocera
9134fe0239 power: Remove unused variables
Follow-up to commit 008d7c1468, a number
of variables ended up being unused, so remove them.
2015-06-01 14:47:32 +01:00
Richard Hughes
63ca2fd1b8 power: Add support for dimming using an ambient light sensor 2015-05-22 14:22:58 +01:00
Bastien Nocera
008d7c1468 power: Remove "When battery power is critical" label
With UPower 1.0, the critical action to take when the battery level
is too low isn't in the hands of the user anymore, but in the hands
of the system.

It's now handled by UPower directly, through the CriticalPowerAction
configuration option. Instead of asking logind whether the system
supports hibernation, remove the action label altogether.

https://bugzilla.gnome.org/show_bug.cgi?id=749436
2015-05-18 14:47:20 +02:00
Bastien Nocera
86374b2545 power: Hide Bluetooth power section when w/o BT
When a Bluetooth airplane mode isn't available (whether hardware or
software) it means there are no Bluetooth adapters, even turned off.
Hide the Bluetooth section in that case.\

https://bugzilla.gnome.org/show_bug.cgi?id=749140
2015-05-15 17:32:23 +02:00
Mario Sanchez Prada
9ff192ab2e power: Use g_variant_get_string() instead of g_variant_get()
Fixes a memory leak as the "(s)" format string was being used, but no
call to g_free() was happening afterwards.

https://bugzilla.gnome.org/show_bug.cgi?id=748411
2015-04-27 15:55:20 +01:00
Matthias Clasen
a14e772cad power: Make section headings accessible
The section headings are useful to understand the content
of this panel. Sadly, orca does not currently read them
at all. We can fix this by setting up accessible relations
that help orca figure this out.

https://bugzilla.gnome.org/show_bug.cgi?id=746755
2015-04-10 15:57:48 +02:00
Bastien Nocera
78c22d24f8 power: Fix alignment of "Screen brightness" label 2015-03-09 18:10:55 +01:00
Michael Catanzaro
643a7a6849 power: ambiguous wifi and mobile broadband labels
Currently these switches function the opposite of their descriptions.
E.g. the wi-fi switch says "turns off wireless devices" which means that
if the switch is on, wi-fi would go off, but actually the behavior is
the opposite. Reword the labels to be less confusing.

https://bugzilla.gnome.org/show_bug.cgi?id=695417
2015-02-04 13:22:48 -06:00
Bastien Nocera
c3f9546952 power: Hide device battery when !is_present
iDevice batteries might show up before they're actually available
to read from, so check "is-present" before showing the device in the UI.
2015-02-03 23:10:45 +01:00
Bastien Nocera
15e8a9542f power: Fix initial state of Bluetooth switch
The initial state of the switch was never set, so if it happened to be
on, the switch didn't match reality.

https://bugzilla.gnome.org/show_bug.cgi?id=725654
2015-01-28 17:20:29 +01:00
Rui Matos
7e7dbd175a power: Fix deprecated API usage
https://bugzilla.gnome.org/show_bug.cgi?id=740986
2014-12-05 16:13:29 +01:00
Bastien Nocera
f325d6cc36 power: Disable hover on non-clickable rows
https://bugzilla.gnome.org/show_bug.cgi?id=733264
2014-10-17 12:19:41 +02:00
Antoine Jacoutot
fda606c4f8 power: conditionally display the bluetooth button
We do not want to display the bluetooth power option if we were built
without bluetooth support; same way we do with NetworkManager.
2014-10-14 10:38:09 +02:00
Cosimo Cecchi
84a9c519ec power: always connect to power settings changes
We were failing to connect to the signal when CanHibernate returned
FALSE; in that case, we would never update the automatic suspend label
when a setting in the dialog was changed.

https://bugzilla.gnome.org/show_bug.cgi?id=733412
2014-07-23 14:37:17 +02:00
Christophe Fergeau
229ab01a12 power: Use AM_CPPFLAGS rather than INCLUDES
This is deprecated in newer automake versions, and this causes warnings
with automake 1.14:
panels/printers/Makefile.am:3: warning: 'INCLUDES' is the old name for
AM_CPPFLAGS' (or '*_CPPFLAGS')

https://bugzilla.gnome.org/show_bug.cgi?id=732189
2014-06-25 12:32:29 +02:00
Bastien Nocera
33a12d968c power: Use new listbox helpers
https://bugzilla.gnome.org/show_bug.cgi?id=732106
2014-06-24 11:35:31 +02:00
Yosef Or Boczko
2f18d2c282 power: Use header bar in the automatic suspend dialog
https://bugzilla.gnome.org/show_bug.cgi?id=724299
2014-04-28 17:29:17 +03:00
Debarshi Ray
b1ff989638 Revert "Revert "power: Use the new display device""
This was never meant to be pushed.

This reverts commit d413fcc82e.
2014-02-17 19:58:32 +01:00
Debarshi Ray
d413fcc82e Revert "power: Use the new display device"
This reverts commit 93997f5ee8.
2014-02-17 19:53:29 +01:00
Daniel Mustieles
2c5951819d Updated FSF's address 2014-01-29 11:27:38 +01:00
Jonh Wendell
f6d5e84d7f power: if battery is fully charged but 99%, just round it up
https://bugzilla.gnome.org/show_bug.cgi?id=701993
2014-01-21 09:41:33 -02:00
Bastien Nocera
f020b73fb1 power: Use g-s-d's rfkill for Bluetooth
https://bugzilla.gnome.org/show_bug.cgi?id=691151
2013-12-06 11:59:03 +01:00
Yosef Or Boczko
e7efdbc7ff power: Use margin-start/end instead of margin-left/right
https://bugzilla.gnome.org/show_bug.cgi?id=712661
2013-11-19 22:28:13 +02:00
Matthias Clasen
fc60c1ae0d Fix automatic suspend popup sizing issues
There was a stray resize-mode setting which broke things,
and the combo boxes had unnecessary extra margins.

https://bugzilla.gnome.org/show_bug.cgi?id=711856
2013-11-16 17:10:47 -05:00
Jasper St. Pierre
dd52ac9417 Add NoDisplay to all gnome-control-center panel .desktop files
These aren't apps -- they're simply launchers for gnome-control-center.
They should not be shown as apps in the UI at all.

https://bugzilla.gnome.org/show_bug.cgi?id=712246
2013-11-15 08:44:53 -05:00
Bastien Nocera
93997f5ee8 power: Use the new display device
From UPower 0.99. Removes all the code creating the composite device.

https://bugzilla.gnome.org/show_bug.cgi?id=710393
2013-10-21 22:56:39 +02:00
Bastien Nocera
a8ee1931f5 power: Add better metadata for fake devices
So that libupower-glib doesn't complain about unset but read
properties, we show the correct icons, and have proper names
for the fake keyboard and mouse.
2013-10-21 22:56:39 +02:00
Bastien Nocera
71b5643d91 power: Prevent UpDevice being kept alive
If a UpDevice was removed while the panel was opened, it was
removed from the list of devices, and never unref'ed, still receiving
signals.
2013-10-18 00:42:01 +02:00
Bastien Nocera
6f78b2ab0f power: Fix run-time for DeviceChanged signal removal
The DeviceChanged signal was removed, instead, each interesting
device should be monitored individually. This means we need to keep
our own device list locally.

https://bugzilla.gnome.org/show_bug.cgi?id=710393
2013-10-17 17:44:03 +02:00
Bastien Nocera
ceafe6f4c5 power: Fix build
up_client_enumerate_devices_sync() was removed.

https://bugzilla.gnome.org/show_bug.cgi?id=710393
2013-10-17 17:44:03 +02:00
Bastien Nocera
63bf77196e power: Use icons from UPower
https://bugzilla.gnome.org/show_bug.cgi?id=710393
2013-10-17 17:44:03 +02:00
Bastien Nocera
76e342ea9d power: Use device models as names
And only fallback to the generic "Wireless Mouse" (eg.) when
there's no valid name for it.

https://bugzilla.gnome.org/show_bug.cgi?id=709654
2013-10-09 14:57:23 +02:00
Rui Matos
7c58167899 power: Remove unused toplevel window from .ui file
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:03 +02:00
Rui Matos
4494045c6d power: Don't leak a dialog
https://bugzilla.gnome.org/show_bug.cgi?id=708286
2013-10-01 10:05:03 +02:00
Rui Matos
4b16aad36c power: Fix getting the keyboard brightness value
https://bugzilla.gnome.org/show_bug.cgi?id=706040
2013-09-17 21:18:03 +02:00
Rui Matos
c804369526 power: Don't show the estimated battery capacity
Since we don't currently have the data to present a good estimation.

https://bugzilla.gnome.org/show_bug.cgi?id=691187
2013-09-17 18:27:27 +02:00
Bastien Nocera
eb4ee20920 power: Avoid warning with no screen backlight
Similar patch to f7c5225288
but for the screen backlight.
2013-08-20 04:34:46 +02:00
Bastien Nocera
f7c5225288 power: Avoid warning with no keyboard backlight
If there's no keyboard backlight interface in gnome-settings-daemon,
hide the slider as well, rather than throw a warning.

https://bugzilla.gnome.org/show_bug.cgi?id=706040
2013-08-20 04:34:32 +02:00
Jan Alexander Steffens (heftig)
364eee3909 power: Use logind to discover CanHibernate
The upower functionality is deprecated and will return an
error unless upower is built with --enable-deprecated.

The function is also not defined unless the application defines
UPOWER_ENABLE_DEPRECATED, which g-c-c does not do, and the build
system currently does not enable the warning (or error) about this.

https://bugzilla.gnome.org/show_bug.cgi?id=705275
2013-08-02 18:11:14 +02:00
Cosimo Cecchi
6be06c4119 power: Add keyboard brightness support
Add a slider to the Power panel to control keyboard brightness.

https://bugzilla.gnome.org/show_bug.cgi?id=705272
2013-08-02 10:58:18 +02:00
Yosef Or Boczko
56aa021341 power: Adding more padding to top of panel
adding 12px of padding

https://bugzilla.gnome.org/show_bug.cgi?id=698202
2013-07-30 21:17:18 +03:00
Bastien Nocera
2e53456bc6 power: Fix crash with no batteries
https://bugzilla.gnome.org/show_bug.cgi?id=704486
2013-07-19 09:40:02 +02:00
Alexander Larsson
7a07b22dc4 power: Convert to GtkListBox
https://bugzilla.gnome.org/show_bug.cgi?id=702164
2013-07-02 16:19:09 +01:00