aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodney <6557070+dobey@users.noreply.github.com>2018-10-28 13:54:40 -0400
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-28 10:17:14 +0200
commit948a5107c479a72a2940316674fae6a3b55534ff (patch)
treecd67de6aa39e19f27386058b9499e3e295b46bf7
parentecb73d5a817e47598635523bfb04a8ac9c7ac5a9 (diff)
downloadayatana-indicator-power-948a5107c479a72a2940316674fae6a3b55534ff.tar.gz
ayatana-indicator-power-948a5107c479a72a2940316674fae6a3b55534ff.tar.bz2
ayatana-indicator-power-948a5107c479a72a2940316674fae6a3b55534ff.zip
Pull in many fixes from the bionic branch. (#7)
* Pay attention to $SNAP prefix * Releasing 12.10.6+17.04.20161201-0ubuntu1 * give sorting priority to devices with power supplies * Releasing 12.10.6+17.04.20170116-0ubuntu1 * Remove old autostart files. * Use gmock module from cmake-extras. * Use coverage support from cmake-extras. * Add gcovr and lcov dependencies. * Use intltool support from cmake-extras. * Remove usage of extra GCOV variables. * Remove hard-coded -g compiler flag. * Releasing 12.10.6+17.04.20170210-0ubuntu1 * no change rebuild * Releasing 12.10.6+17.04.20170322-0ubuntu1 * Start indicator in systemd when indicators.target is started * Build for bionic * This is still xenial. * Update translations from launchpad too.
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/service.c14
-rw-r--r--tests/CMakeLists.txt2
4 files changed, 10 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 956c724..72f4bde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,7 +125,7 @@ if (ENABLE_TESTS)
if (ENABLE_COVERAGE)
find_package(CoverageReport)
ENABLE_COVERAGE_REPORT(
- TARGETS ayatanaindicatorpowerservice ayatana-indicator-power-service
+ TARGETS ${SERVICE_LIB} ${SERVICE_EXEC}
TESTS ${COVERAGE_TEST_TARGETS}
FILTER /usr/include ${CMAKE_BINARY_DIR}/*
)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bf85b77..b253d0a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -48,7 +48,7 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-bad-function-cast") # g_clear_object()
set(C_WARNING_ARGS "${C_WARNING_ARGS} -Wno-switch-enum")
set_source_files_properties(${SERVICE_MANUAL_SOURCES}
- PROPERTIES COMPILE_FLAGS "${C_WARNING_ARGS} -g -std=c99")
+ PROPERTIES COMPILE_FLAGS "${C_WARNING_ARGS} -std=c99")
# the service library for tests to link against (basically, everything except main())
add_library(${SERVICE_LIB} STATIC ${SERVICE_MANUAL_SOURCES} ${SERVICE_GENERATED_SOURCES})
diff --git a/src/service.c b/src/service.c
index c04122f..9b99a05 100644
--- a/src/service.c
+++ b/src/service.c
@@ -163,12 +163,12 @@ get_device_kind_weight (const IndicatorPowerDevice * device)
}
/* sort devices from most interesting to least interesting on this criteria:
- 1. discharging items from least time remaining until most time remaining
- 2. charging items from most time left to charge to least time left to charge
- 3. charging items with an unknown time remaining
- 4. discharging items with an unknown time remaining, but 10% or below
- 5. batteries, then non-line power, then line-power
- 6. discharging items with an unknown time remaining, but above 10% */
+ 1. device that supplied the power to the system
+ 2. discharging items from least time remaining until most time remaining
+ 3. charging items from most time left to charge to least time left to charge
+ 4. charging items with an unknown time remaining
+ 5. discharging items with an unknown time remaining
+ 6. batteries, then non-line power, then line-power */
static gint
device_compare_func (gconstpointer ga, gconstpointer gb)
{
@@ -600,7 +600,7 @@ create_brightness_menu_item(void)
GMenuItem * item;
item = g_menu_item_new(NULL, "indicator.brightness");
- g_menu_item_set_attribute(item, "x-ayatana-type", "s", "org.ayatana.unity.slider");
+ g_menu_item_set_attribute(item, "x-ayatana-type", "s", "org.ayatana.indicator.slider");
g_menu_item_set_attribute(item, "min-value", "d", 0.0);
g_menu_item_set_attribute(item, "max-value", "d", 1.0);
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index d7be386..9c0d222 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -51,7 +51,7 @@ function(add_test_by_name name)
target_link_options(${TEST_NAME} PRIVATE -no-pie)
add_test (${TEST_NAME} ${TEST_NAME})
add_dependencies (${TEST_NAME} ${SERVICE_LIB} gschemas-compiled)
- target_link_libraries (${TEST_NAME} ${SERVICE_LIB} gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES})
+ target_link_libraries (${TEST_NAME} ${SERVICE_LIB} ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES})
endfunction()
add_test_by_name(test-notify)
add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true)