Commit graph

165 commits

Author SHA1 Message Date
Iñigo Martínez
a2b20a65cb build: Make bluetooth, network and wacom mandatory on linux
The bluetooh, network and wacom panels should not be optional
on linux, except on s390 systems which lack USB support. It
should also not be built at all on other systems.

This patch makes these panels mandatory on linux.

https://bugzilla.gnome.org/show_bug.cgi?id=792641
2018-01-22 23:06:45 -02:00
Michael Catanzaro
8e2305c0fc power: Add sublabel for Bluetooth switch
We already have this label for Wi-Fi and Mobile Broadband, so it looks
silly that it's missing from the Bluetooth row.

https://bugzilla.gnome.org/show_bug.cgi?id=771200
2018-01-18 11:47:08 -02:00
Iñigo Martínez
dc0988d47c build: Remove autotools
To avoid the burden of maintaining multiple build systems, this
patch removes autotools support.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-18 12:20:08 +01:00
Bastien Nocera
ca3779467e power: Add gaming input devices label
See https://bugs.freedesktop.org/show_bug.cgi?id=102493

https://bugzilla.gnome.org/show_bug.cgi?id=787087
2018-01-18 12:15:29 +01:00
Piotr Drąg
b65e31323a panels: Remove soft hyphens from .desktop files
With the old shell gone, there is no need to work around cut off panel
names (bug #647087). As it stands now, it only confuses translators
(invisible characters are hard to, well, see).

https://bugzilla.gnome.org/show_bug.cgi?id=792629
2018-01-18 00:12:04 -02:00
Iñigo Martínez
32edd6789e build: Port to meson build system
Meson is a build system focused on speed an ease of use, which
helps speeding up the software development. This patch adds meson
support along autotools.

https://bugzilla.gnome.org/show_bug.cgi?id=785414
2018-01-17 20:09:35 -02:00
Allan Day
8a8e53ab8a Standardize vertical spacing of panels
Ensure that the vertical spacing inside each panel is similar.
This makes the transition between each panel smoother and makes
the control center feel more cohesive.

Settings panels are given 32px above and below their content
and 32px vertical space between major sections. 12px space is
placed below headings.

Bluetooth, displays and printers are not addressed.

https://bugzilla.gnome.org/show_bug.cgi?id=786384
2017-08-20 18:38:42 +02:00
Allan Day
e29e97a9a4 power: harmonize header positioning
Some of the headings have horizontal margins and others don't,
creating an inconsistent layout. Remove the horizontal margins
from all headings.

https://bugzilla.gnome.org/show_bug.cgi?id=786327
2017-08-16 15:43:04 -03:00
Georges Basile Stavracas Neto
f7bdd3c969 panels: Minor adjustments for the new shell 2017-08-09 19:31:41 +02:00
Jeremy Bicha
62c86c7712 power: Restore Power Off option for Power Button
https://bugzilla.gnome.org/show_bug.cgi?id=781108
2017-08-07 13:24:11 -04:00
Michael Catanzaro
f4232a2e68 power: Fix wifi device state when opening power panel
This toggle is always set to off when the panel is opened. We should
check whether it's on or not when opening the panel. Currently we are
only subscribed to changes, so we don't check the wifi state until it's
toggled on or off after the panel has been opened the first time.

https://bugzilla.gnome.org/show_bug.cgi?id=771564
2016-09-20 10:49:25 +02:00
Bastien Nocera
4033a3dbca power: Fix "automatic suspend" label not taking batteries into account
Whether or not we have batteries was computed after we updated the
label.

https://bugzilla.gnome.org/show_bug.cgi?id=771532
2016-09-20 10:30:27 +02:00
Bastien Nocera
1abacd2970 power: Warn if automatic suspend timeouts are negative
They should probably have been unsigned integers, but they're not, so
warn if they are. The rest of the code handles negative values as if
they were 0.

https://bugzilla.gnome.org/show_bug.cgi?id=771542
2016-09-20 10:30:27 +02:00
Bastien Nocera
cc4e1349e9 power: Simplify update_automatic_suspend_label()
By replacing the magic 0 by its meaning ("never") as explained in the
gnome-settings-daemon GSettings schemas.

https://bugzilla.gnome.org/show_bug.cgi?id=771542
2016-09-20 10:30:27 +02:00
Bastien Nocera
8400d3ed81 power: Port to libnm 1.2
And make the NMClient instantiation async now that the API permits it.

https://bugzilla.gnome.org/show_bug.cgi?id=765910
2016-05-27 18:23:33 +02:00
Bastien Nocera
5c10ce45b8 panels: Fix translators comments being truncated
Commit b3be076 added soft hyphens along with a comment for translators
to use those soft hyphens. Except that gettext would only grab the one
line out of the four we wrote for translators to read. Put them all on
the same line so that gettext actually extracts those.

https://bugzilla.gnome.org/show_bug.cgi?id=765778
2016-04-28 23:38:00 +02:00
Bastien Nocera
b3be07609a panels: Fix truncated panel names for larger fonts
Note that this fix will not automatically fix translations, which will
need to add soft-hyphens (U+00AD) to their translations themselves, and
will not fix larger fonts for which the split up syllables end up
being bigger than the maximum text width.

It's the best we can do without redesigning the Settings shell, which is
already something planned.

https://bugzilla.gnome.org/show_bug.cgi?id=647087#c13
2016-04-07 16:06:35 +02:00
Cosimo Cecchi
b1e2bc6f04 power: show "Suspend & Power Off" section only when relevant
We now ask logind whether the system can suspend or hibernate, and
change the visibility of the items in the panel based on that.

Based on a patch by Mario Sanchez Prada <mario@endlessm.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=764508
2016-04-05 20:33:13 -07:00
Cosimo Cecchi
0e54ee82c8 power: move function call into section method
This function logically belongs into the section constructor. Move it
there.

https://bugzilla.gnome.org/show_bug.cgi?id=764508
2016-04-05 20:29:13 -07:00
Cosimo Cecchi
eb94d06c90 power: remove unneeded call
This function is already called from add_suspend_and_power_off_section()
a few lines above.

https://bugzilla.gnome.org/show_bug.cgi?id=764508
2016-04-05 20:29:12 -07:00
Bastien Nocera
afc0a1b142 power: Translate the "When the Power Button is pressed" drop-down
https://bugzilla.gnome.org/show_bug.cgi?id=764115
2016-03-24 14:10:05 +01:00
Bastien Nocera
dc49fb6bb9 power: Don't throw errors when D-Bus calls are cancelled
https://bugzilla.gnome.org/show_bug.cgi?id=757880
2015-11-13 16:21:36 +01:00
Bastien Nocera
3a3408040f power: Add configuration for Power Button
When running on something other than a VM or a tablet, which have
hard-coded actions when the power button is pressed, offer to configure
the power button to either suspend (default), hibernate, or do nothing.

https://bugzilla.gnome.org/show_bug.cgi?id=757880
2015-11-13 16:21:36 +01:00
Cosimo Cecchi
40988d3677 power: refresh ALS state when a Screen proxy is created
The ALS state depends on both the Screen and IIO dbus proxies; refresh
it when the screen proxy is created.

https://bugzilla.gnome.org/show_bug.cgi?id=754735
2015-09-08 10:10:00 -07:00
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