aboutsummaryrefslogtreecommitdiff
path: root/src/device.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* remove IndicatorPowerDevice's now-unused device icon string.Charles Kerr2012-05-311-126/+0
|
* Add indicator_power_device_get_icon_names().Charles Kerr2012-05-311-1/+242
| | | | | | | The main goal of this change is to make it possible to test the device's icon. A secondary goal is to clarify in the code how indicator-power's icons differ from the ones recommended by GSD.
* use g_clear_pointer() where usefulCharles Kerr2012-05-291-6/+2
|
* try adding LCOV_EXCL_{START,STOP} for unreachable conditions (glib looking ↵Charles Kerr2012-05-261-3/+17
| | | | for subclasses of IndicatorPowerDevice; unreachables in G_DEFINE_TYPE)
* nope, LCOV_EXCL_LINE doesn't work on macrosCharles Kerr2012-05-261-7/+7
|
* try adding LCOV_EXCL_LINE for unreachable conditions (glib looking for ↵Charles Kerr2012-05-261-7/+7
| | | | subclasses of IndicatorPowerDevice; unreachables in G_DEFINE_TYPE)
* remove the 'default' clause from get_property() and set_property().Charles Kerr2012-05-241-8/+0
| | | | | Coverage testing isn't reaching them... glib is weeding out these invalid property keys before the device.c functions are ever reached. Nevertheless, leaving out a 'default' clause in a switch statement feels very unnatural to me. *twitch* *twitch*
* remove some unnecessary type compatibilty tests... g_object_get_property() ↵Charles Kerr2012-05-241-6/+0
| | | | does these tests for us
* remove some unnecessary type compatibilty tests... g_object_set_property() ↵Charles Kerr2012-05-241-6/+0
| | | | does these tests for us
* remove the g_clear_pointer() calls s.t. things will build and run on ↵Charles Kerr2012-05-241-2/+6
| | | | alesage's Jenkins setup running Precise
* add private container struct IndicatorPowerDeviceCharles Kerr2012-05-241-0/+330