aboutsummaryrefslogtreecommitdiff
path: root/src/device.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Fix percentage for mice and keyboards"Mike Gabriel2021-05-041-17/+1
| | | | | | | This reverts commit f94ffac7f36831dd8a79f30d5b94de9758fcd3a6. The original commit entirely broke unit tests. Next revision should adjust unit tests (or not break them).
* Add us to the copyright headersRobert Tari2021-05-031-0/+2
|
* Fix percentage for mice and keyboardsRobert Tari2021-05-031-1/+17
|
* Fix deprecations and build warnings.Robert Tari2020-09-041-5/+3
| | | | Fixes AyatanaIndicators/ayatana-indicator-power#9.
* Whitespace fixRobert Tari2020-09-031-4/+4
|
* Make device with power supply has higher sorting priority. (LP: #1100546)Charles Kerr2017-05-151-5/+37
|
* Fix bug that chose the wrong header icon if a connected device has a charge ↵Charles Kerr2017-05-151-1/+2
| | | | but its charging/discharging state is unknown. (LP: #1470080).
* Fix the fallback power icon so the battery icon doesn't show red above 20% ↵Charles Kerr2017-05-151-1/+1
| | | | even when the Suru icon theme isn't present. Fixes: LP:#1559731.
* fix fencepost error s.t. 20% actually uses battery-020Charles Kerr2015-01-121-1/+1
|
* round power level to the nearest 10% to take advantage of higher-resolution ↵Charles Kerr2015-01-121-3/+32
| | | | power level icons
* show the icon that most closely matches the battery charge percentage.Charles Kerr2014-07-291-14/+0
|
* fix some compiler warnings generated by clang static analyzerCharles Kerr2014-07-131-10/+8
|
* prefer the 'battery-020-charging' icon to the 'battery-low-charging' one ↵Charles Kerr2014-05-051-1/+2
| | | | because the former is more precise so its icon is more likely to be close to the actual actual battery level.
* sync to lp:indicator-powerCharles Kerr2014-03-251-101/+68
|\
| * in the new indicator_power_device_get_*() functions, use ↵Charles Kerr2014-03-131-3/+5
| | | | | | | | g_return_val_if_fail(foo, NULL) rather than g_return_if_fail(foo)
| * copyediting: add const, fix misaligned whitespaceCharles Kerr2014-03-131-2/+2
| |
| * remove INDICATOR_IS_POWER_DEVICE(device) tests from private functionsCharles Kerr2014-03-131-10/+2
| |
| * in the new indicator_power_device_get_*() functions, use heap-allocated ↵Charles Kerr2014-03-131-87/+60
| | | | | | | | strings rather than relying on g_snprintf().
* | add translator comments to the new translatable strings.Charles Kerr2014-03-251-13/+40
|/
* slightly better commentsCharles Kerr2014-03-041-13/+12
|
* update the header / menuitem text / accessible text to reflect the changes ↵Charles Kerr2014-03-041-162/+312
| | | | in https://wiki.ubuntu.com/Power?action=diff&rev2=44&rev1=43#Title
* device.c: pending_charge means not chargingRicardo Salveti de Araujo2014-01-241-1/+1
|
* use the correct battery icon when charging/dischargingCharles Kerr2013-10-011-8/+1
|
* as per the changes in ↵Charles Kerr2013-08-231-2/+2
| | | | https://wiki.ubuntu.com/Power?action=diff&rev2=39&rev1=38, hide the discharge time remaining if it's > 24 hours
* copyediting: more descriptive comments when building label/header/a11y textCharles Kerr2013-08-231-11/+16
|
* copyediting: remove trailing spaces in source codeCharles Kerr2013-08-221-1/+1
|
* add show-percentage feature, basing off Haw Loeung's patch.Charles Kerr2013-08-221-57/+116
|
* explicitly use gio; remove unused glib-upower.h callsCharles Kerr2013-06-161-2/+23
|
* change indicator_power_device_get_time_details() s.t. the 'short details' ↵Charles Kerr2012-11-071-1/+1
| | | | for an AC Adapter is an empty string.
* fix copy-paste comment errorCharles Kerr2012-10-261-1/+1
|
* Fix unhandled enum 'unknown device' that was smoked out by the unit tests.Charles Kerr2012-10-261-0/+4
|
* the device kind string wasn't being used in some icon names.Charles Kerr2012-10-251-14/+14
|
* when discharging the battery, prefer the percent-charged icons over the ↵Charles Kerr2012-10-031-1/+2
| | | | full,good,low icons because the former show a more accurate view of the charge.
* device.c: include gi18n-lib.h instead of gi18n.hLars Uebernickel2012-09-201-1/+1
| | | | | | The former calls the 'd' variants of the gettext functions and passes the libraries domain in each call.
* improve the variant sanity tests in indicator_power_device_new_from_variant()Charles Kerr2012-06-071-3/+1
|
* reimplement indicator_power_device_get_icon_names() since our CA is ↵Charles Kerr2012-06-061-76/+77
| | | | incompatible with reusing code from GSD.
* For GTK-Doc, reference functions with function_name() instead of #function_nameCharles Kerr2012-06-061-1/+1
|
* In indicator_power_device_new_from_variant(), check whether the input ↵Charles Kerr2012-06-061-0/+4
| | | | variant has the correct type before using it.
* add G_OBJECT_WARN_INVALID_PROPERTY_ID for the 'default' switch case in ↵Charles Kerr2012-06-061-0/+8
| | | | Device's get/set property methods
* IndicatorObjectDevice's finalize() function needs to chain up to the parent ↵Charles Kerr2012-06-061-0/+2
| | | | class.
* in IndicatorPowerDevice's class init function, use ↵Charles Kerr2012-06-061-26/+39
| | | | g_object_class_install_properties() instead of installing each property separately.
* copyediting: fix tab damage in device.[ch]Charles Kerr2012-06-011-174/+176
|
* In indicator_power_device_get_time_details(), add a test for non-devices ↵Charles Kerr2012-06-011-0/+9
| | | | being passed in.
* Fix edge case in indicator_power_device_get_icon_names() that returned a bad ↵Charles Kerr2012-06-011-1/+1
| | | | value if the caller passed in a NULL pointer as a device. Added regression test.
* In indicator_power_device_get_time_details(), use g_strdup(foo) instead of ↵Charles Kerr2012-06-011-2/+2
| | | | g_strdup_printf("%s",foo)
* capitalize the second word in 'AC Adapter'Charles Kerr2012-06-011-1/+1
|
* in indicator_power_device_get_time_details(), don't list 'not present' for ↵Charles Kerr2012-06-011-1/+8
| | | | AC Adapters that have no % and no time estimate
* In indicator_power_device_get_time_details(), remove an unlikely branch that ↵Charles Kerr2012-06-011-42/+30
| | | | could result in time/detail strings not being set.
* in indicator_power_device_get_time_details(), limit the scope of variables ↵Charles Kerr2012-05-311-3/+3
| | | | short_timestring and detailed_timestring
* Move private indicator-power function build_device_time_details() to ↵Charles Kerr2012-05-311-0/+195
| | | | device.c to public function indicator_power_device_get_time_details() so that we can unit test the user-visible strings.