From b7950517a055b6aee4d0806e32dbd466a6ae59d0 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Fri, 8 Dec 2017 13:41:39 +0100 Subject: README.md: Add some manual line breaks. --- CMakeLists.txt | 2 +- README.md | 54 ++++++++++++------------- cmake/FindIntltool.cmake | 2 +- cmake/GCov.cmake | 4 +- data/org.ayatana.indicator.datetime.gschema.xml | 2 +- debian/changelog | 36 ++++++++--------- debian/control | 2 +- debian/copyright | 8 ++-- include/datetime/alarm-queue-simple.h | 2 +- include/datetime/appointment.h | 2 +- include/datetime/engine-eds.h | 2 +- include/datetime/engine-mock.h | 2 +- include/datetime/engine.h | 2 +- include/datetime/exporter.h | 8 ++-- include/datetime/settings.h | 2 +- include/datetime/state.h | 2 +- include/datetime/utils.h | 2 +- include/datetime/wakeup-timer-mainloop.h | 2 +- include/datetime/wakeup-timer-powerd.h | 2 +- include/notifications/notifications.h | 4 +- m4/gcov.m4 | 4 +- src/alarm-queue-simple.cpp | 2 +- src/awake.cpp | 6 +-- src/clock-live.cpp | 2 +- src/com.ubuntu.touch.AccountsService.Sound.xml | 4 +- src/engine-eds.cpp | 4 +- src/formatter-desktop.cpp | 2 +- src/haptic.cpp | 2 +- src/menu.cpp | 6 +-- src/notifications.cpp | 6 +-- src/planner.cpp | 2 +- src/sound.cpp | 4 +- src/timezone-geoclue.cpp | 2 +- src/utils.c | 6 +-- tests/CMakeLists.txt | 6 +-- tests/geoclue-fixture.h | 2 +- tests/planner-mock.h | 2 +- tests/run-eds-ics-test.sh | 2 +- tests/test-actions.cpp | 4 +- tests/test-clock.cpp | 2 +- tests/test-datetime.cpp | 2 +- tests/test-eds-ics-all-day-events.cpp | 2 +- tests/test-eds-ics-nonrepeating-events.cpp | 2 +- tests/test-eds-ics-repeating-events.cpp | 2 +- tests/test-formatter.cpp | 4 +- tests/test-menus.cpp | 2 +- tests/test-settings.cpp | 2 +- tests/test-snap.cpp | 18 ++++----- tests/test-utils.cpp | 2 +- 49 files changed, 124 insertions(+), 124 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 33cd797..f13a57a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ option (enable_lcov "Generate lcov code coverage reports." ON) ## ## GNU standard installation directories -## +## include (GNUInstallDirs) if (EXISTS "/etc/debian_version") # Workaround for libexecdir on debian diff --git a/README.md b/README.md index a28eb39..3e25742 100644 --- a/README.md +++ b/README.md @@ -3,50 +3,50 @@ ## ACTIONS * "desktop.open-settings-app" - * "phone.open-settings-app" + * "phone.open-settings-app"
Description: open the settings application. State: None Parameter: None * "desktop.open-alarm-app" - * "phone.open-alarm-app" + * "phone.open-alarm-app"
Description: open the application for creating new alarms. State: None Parameter: None * "desktop.open-calendar-app" - * "phone.open-calendar-app" + * "phone.open-calendar-app"
State: None Parameter: int64, a time_t hinting which day/time to show in the planner, or 0 for the current day * "desktop.open-appointment" - * "phone.open-appointment" + * "phone.open-appointment"
Description: opens an appointment editor to the specified appointment. State: None Parameter: string, an opaque uid to specify which appointment to use. This uid comes from the menuitems' target values. - * "set-location" + * "set-location"
Description: Set the current location. This will try to set the current - timezone to the new location's timezone. - State: None + timezone to the new location's timezone.
+ State: None
Parameter: a timezone id string followed by a space and location name. Example: "America/Chicago Oklahoma City" - * "calendar" + * "calendar"
Description: set which month/day should be given focus in the indicator's calendar. The planner will look for appointments from this day to the end of the same month. Client code implementing the calendar view should call this - when the user clicks on a new day, month, or year. + when the user clicks on a new day, month, or year.
State: a dictionary containing these key value/pairs: "appointment-days": an array of day-of-month ints. Used by the calendar menuitem to mark appointment days. "calendar-day": int64, a time_t. Used by the calendar menuitem to know which year/month should be visible and which day should have the cursor. - "show-week-numbers": if true, show week numbers in the calendar. + "show-week-numbers": if true, show week numbers in the calendar.
Parameter: int64, a time_t specifying which year/month should be visible and which day should have the cursor. @@ -79,7 +79,7 @@ ## CODE -Model +### Model The app's model is represented by the "State" class, and "Menu" objects are the corresponding views. "State" is a simple container for various @@ -96,21 +96,21 @@ Model components for unit tests. The entire backend can be mix-and-matched by adding the desired test-or-production components. - Start with: - include/datetime/state.h - include/datetime/clock.h - include/datetime/locations.h - include/datetime/planner.h - include/datetime/settings.h - include/datetime/timezones.h + Start with:
+ include/datetime/state.h
+ include/datetime/clock.h
+ include/datetime/locations.h
+ include/datetime/planner.h
+ include/datetime/settings.h
+ include/datetime/timezones.h
- Implementations: - include/datetime/settings-live.h - include/datetime/locations-settings.h - include/datetime/planner-eds.h - include/datetime/timezones-live.h + Implementations:
+ include/datetime/settings-live.h
+ include/datetime/locations-settings.h
+ include/datetime/planner-eds.h
+ include/datetime/timezones-live.h
-## View +### View Menu is a mostly-opaque class to wrap GMenu code. Its subclasses contain the per-profile logic of which sections/menuitems to show and which to hide. @@ -124,7 +124,7 @@ Model signal if/when the busname is lost so indicator-datetime-service knows when to exit. - include/datetime/menu.h - include/datetime/actions.h - include/datetime/exporter.h + include/datetime/menu.h
+ include/datetime/actions.h
+ include/datetime/exporter.h
diff --git a/cmake/FindIntltool.cmake b/cmake/FindIntltool.cmake index 45318c4..69ffab9 100644 --- a/cmake/FindIntltool.cmake +++ b/cmake/FindIntltool.cmake @@ -17,7 +17,7 @@ if (INTLTOOL_MERGE_FOUND) ${INTLTOOL_MERGE_EXECUTABLE} --desktop-style ${CMAKE_SOURCE_DIR}/${po_dir} ${CMAKE_CURRENT_SOURCE_DIR}/${desktop_id}.desktop.in ${desktop_id}.desktop ) - install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary.desktop DESTINATION /usr/share/applications) + install (FILES ${CMAKE_CURRENT_BINARY_DIR}/geary.desktop DESTINATION /usr/share/applications) endmacro (INTLTOOL_MERGE_DESKTOP desktop_id po_dir) endif (INTLTOOL_MERGE_FOUND) diff --git a/cmake/GCov.cmake b/cmake/GCov.cmake index 81c0c40..9a5086e 100644 --- a/cmake/GCov.cmake +++ b/cmake/GCov.cmake @@ -12,7 +12,7 @@ if (CMAKE_BUILD_TYPE MATCHES coverage) message(STATUS "Gcovr found, can generate XML coverage info.") add_custom_target (coverage-xml WORKING_DIRECTORY ${CMAKE_BINARY_DIR} - COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" -x -r "${CMAKE_SOURCE_DIR}" + COMMAND "${GCOVR_EXECUTABLE}" --exclude="test.*" -x -r "${CMAKE_SOURCE_DIR}" --object-directory=${CMAKE_BINARY_DIR} -o coverage.xml) endif() @@ -36,7 +36,7 @@ if (CMAKE_BUILD_TYPE MATCHES coverage) COMMAND ${CMAKE_COMMAND} -E echo "") #COMMAND "${LCOV_EXECUTABLE}" --directory ${CMAKE_BINARY_DIR} --capture --output-file coverage.info --no-checksum #COMMAND "${GENHTML_EXECUTABLE}" --prefix ${CMAKE_BINARY_DIR} --output-directory coveragereport --title "Code Coverage" --legend --show-details coverage.info - #COMMAND ${CMAKE_COMMAND} -E echo "\\#define foo \\\"bar\\\"" + #COMMAND ${CMAKE_COMMAND} -E echo "\\#define foo \\\"bar\\\"" #) endif() endif() diff --git a/data/org.ayatana.indicator.datetime.gschema.xml b/data/org.ayatana.indicator.datetime.gschema.xml index fee8133..86facab 100644 --- a/data/org.ayatana.indicator.datetime.gschema.xml +++ b/data/org.ayatana.indicator.datetime.gschema.xml @@ -112,7 +112,7 @@ ['UTC'] A List of locations - Adds the list of locations the user has configured to display in the + Adds the list of locations the user has configured to display in the indicator-datetime menu. diff --git a/debian/changelog b/debian/changelog index 5f072c6..f22c443 100644 --- a/debian/changelog +++ b/debian/changelog @@ -41,7 +41,7 @@ indicator-datetime (13.10.0+15.10.20150909-0ubuntu1) wily; urgency=medium indicator-datetime (13.10.0+15.10.20150728-0ubuntu1) wily; urgency=medium - * + * -- CI Train Bot Tue, 28 Jul 2015 08:42:27 +0000 @@ -811,7 +811,7 @@ indicator-datetime (12.10.3daily13.06.07-0ubuntu2) saucy; urgency=low indicator-datetime (12.10.3daily13.06.07-0ubuntu1) saucy; urgency=low [ Jeremy Bicha ] - * Rename .desktop file for compatibility with gnome-control-center 3.8 + * Rename .desktop file for compatibility with gnome-control-center 3.8 [ Ubuntu daily release ] * Automatic snapshot from revision 220 @@ -922,7 +922,7 @@ indicator-datetime (12.10.3daily12.11.23-0ubuntu1) raring; urgency=low - Update to follow style like other indicator packages: use trailing commas at the end of lists. - Reorganize Build-Depends for clarity. - - Drop Build-Depends on cdbs, bump debhelper to (>= 9). + - Drop Build-Depends on cdbs, bump debhelper to (>= 9). - Update Vcs-Bzr and Vcs-Browser, add a notice for uploaders. - Add gnome-common to Build-Depends. - Add libxorg-gtest-dev, libgtest-dev to Build-Depends. @@ -992,7 +992,7 @@ indicator-datetime (12.10.1-0ubuntu1) quantal; urgency=low indicator-datetime (12.10.0-0ubuntu2) quantal; urgency=low * data/indicator-datetime-preferences.desktop.in - - Removed stray lines from the desktop file, it's causing duplicate + - Removed stray lines from the desktop file, it's causing duplicate X-Ubuntu-Gettext-Domain to get added. (LP: #1048834) -- Ken VanDine Tue, 11 Sep 2012 15:38:10 -0400 @@ -1002,7 +1002,7 @@ indicator-datetime (12.10.0-0ubuntu1) quantal; urgency=low * New upstream release: - Support EDS 3.6's API - Apply an 'en space' between the date and time strings. (LP #749847) - - Sort locations as spec'ed by https://wiki.ubuntu.com/TimeAndDate + - Sort locations as spec'ed by https://wiki.ubuntu.com/TimeAndDate - Fix a bug that caused location settings to be re-saved each 2 seconds * debian/control, debian/indicator-datetime.install, debian/rules: - drop GTK2 build it's deprecated @@ -1026,9 +1026,9 @@ indicator-datetime (0.3.94-0ubuntu3) quantal; urgency=low indicator-datetime (0.3.94-0ubuntu2) precise; urgency=low * src/datetime-prefs-locations.c, src/datetime-prefs.c - - Switch the parsing of the lat and long to be non-locale based as it's - returned from the webservice in C, we want to parse it using the decimal - instead of a comma. This fixes incorrect timezone selection for users + - Switch the parsing of the lat and long to be non-locale based as it's + returned from the webservice in C, we want to parse it using the decimal + instead of a comma. This fixes incorrect timezone selection for users with a locale that uses a comma as a decimal separator (LP: #773987) -- Ken VanDine Wed, 18 Apr 2012 23:20:30 -0400 @@ -1061,7 +1061,7 @@ indicator-datetime (0.3.92-0ubuntu1) precise; urgency=low indicator-datetime (0.3.91-0ubuntu1) precise; urgency=low * New upstream release. - * Make GSettings readonly to fix DConf service starting on boot + * Make GSettings readonly to fix DConf service starting on boot * Explicitly give types to GVariant Builder * Confirm scanf usage for Coverity (LP: #943747) * Remove unused code (LP: #943746) @@ -1258,8 +1258,8 @@ indicator-datetime (0.2.90-0ubuntu1) oneiric; urgency=low [ Ted Gould ] * New upstream release. - - Set minimum width for appointments to prevent continuous resizing - when the calendar is hiden and ensure there is enough of the + - Set minimum width for appointments to prevent continuous resizing + when the calendar is hiden and ensure there is enough of the event description visible (LP: #762976) - ellipsize long appointment descriptions (LP: #750671) - GTK3 build @@ -1270,8 +1270,8 @@ indicator-datetime (0.2.90-0ubuntu1) oneiric; urgency=low [ Ken VanDine ] * debian/control - Bumped standards version to 3.9.2 - - Add new binary for indicator-datetime-gtk2 - - Make indicator-datetime recommend indicator-datetime-gtk2 (until unity + - Add new binary for indicator-datetime-gtk2 + - Make indicator-datetime recommend indicator-datetime-gtk2 (until unity can load gtk3 indicators) - indicator-datetime-gtk2 replaces indicator-datetime << 0.2.90 - Added build depends for libdbusmenu-gtk3-dev and libindicator3-dev @@ -1283,8 +1283,8 @@ indicator-datetime (0.2.90-0ubuntu1) oneiric; urgency=low indicator-datetime (0.2.3-0ubuntu3) natty; urgency=low * debian/patches/lp_762976.patch - - Set minimum width for appointments to prevent continuous resizing - when the calendar is hiden and ensure there is enough of the + - Set minimum width for appointments to prevent continuous resizing + when the calendar is hiden and ensure there is enough of the event description visible (LP: #762976) -- Ken VanDine Mon, 18 Apr 2011 10:05:41 -0400 @@ -1437,7 +1437,7 @@ indicator-datetime (0.1.94-0ubuntu1) natty; urgency=low [ Ken VanDine ] * debian/control - - Added build depends for libedataserverui1.2-dev + - Added build depends for libedataserverui1.2-dev -- Ken VanDine Thu, 17 Feb 2011 14:48:41 -0500 @@ -1445,11 +1445,11 @@ indicator-datetime (0.1.93-0ubuntu1) natty; urgency=low * New upstream release. * Merging in first EDS branch - * debian/rules: Adding in autoreconf + * debian/rules: Adding in autoreconf [ Ken VanDine ] * debian/control - - New build deps for eds integration, libecal1.2-dev, libical-dev, + - New build deps for eds integration, libecal1.2-dev, libical-dev, libgtk2.0-dev, libcairo2-dev, libedataserver1.2-dev -- Ted Gould Wed, 09 Feb 2011 13:25:57 -0600 diff --git a/debian/control b/debian/control index 0d7cbaf..ddbdc5f 100644 --- a/debian/control +++ b/debian/control @@ -32,7 +32,7 @@ Vcs-Browser: https://cgit.arctica-project.org/ayatana/ayatana-indicator-datetime Package: ayatana-indicator-datetime Architecture: any -Depends: ${shlibs:Depends}, +Depends: ${shlibs:Depends}, ${misc:Depends}, systemd-services, systemd-shim, diff --git a/debian/copyright b/debian/copyright index 6b5baa9..92af979 100644 --- a/debian/copyright +++ b/debian/copyright @@ -13,14 +13,14 @@ Copyright: License: - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License version 3, as published + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License version 3, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -The Debian packaging is (C) 2010, Canonical Ltd. and is licensed under the + +The Debian packaging is (C) 2010, Canonical Ltd. and is licensed under the GPLv3, see /usr/share/common-licenses/GPL-3. diff --git a/include/datetime/alarm-queue-simple.h b/include/datetime/alarm-queue-simple.h index 12d8206..1dd6163 100644 --- a/include/datetime/alarm-queue-simple.h +++ b/include/datetime/alarm-queue-simple.h @@ -32,7 +32,7 @@ namespace indicator { namespace datetime { /** - * \brief A #AlarmQueue implementation + * \brief A #AlarmQueue implementation */ class SimpleAlarmQueue: public AlarmQueue { diff --git a/include/datetime/appointment.h b/include/datetime/appointment.h index 2cd1807..700bb2e 100644 --- a/include/datetime/appointment.h +++ b/include/datetime/appointment.h @@ -54,7 +54,7 @@ public: bool is_ubuntu_alarm() const { return type == UBUNTU_ALARM; } std::string uid; - std::string color; + std::string color; std::string summary; std::string activation_url; DateTime begin; diff --git a/include/datetime/engine-eds.h b/include/datetime/engine-eds.h index 20b1f84..d25a825 100644 --- a/include/datetime/engine-eds.h +++ b/include/datetime/engine-eds.h @@ -39,7 +39,7 @@ namespace datetime { /** * Class wrapper around EDS so multiple #EdsPlanners can share resources - * + * * @see EdsPlanner */ class EdsEngine: public Engine diff --git a/include/datetime/engine-mock.h b/include/datetime/engine-mock.h index 9cffdcc..0bee29c 100644 --- a/include/datetime/engine-mock.h +++ b/include/datetime/engine-mock.h @@ -32,7 +32,7 @@ namespace datetime { /** * A no-op #Engine - * + * * @see Engine */ class MockEngine: public Engine diff --git a/include/datetime/engine.h b/include/datetime/engine.h index 4d07290..91145fa 100644 --- a/include/datetime/engine.h +++ b/include/datetime/engine.h @@ -37,7 +37,7 @@ namespace datetime { /** * Class wrapper around the backend that generates appointments - * + * * @see EdsEngine * @see EdsPlanner */ diff --git a/include/datetime/exporter.h b/include/datetime/exporter.h index fb21db2..abc32ff 100644 --- a/include/datetime/exporter.h +++ b/include/datetime/exporter.h @@ -34,7 +34,7 @@ namespace indicator { namespace datetime { /** - * \brief Exports actions and menus to DBus. + * \brief Exports actions and menus to DBus. */ class Exporter { @@ -51,9 +51,9 @@ private: class Impl; std::unique_ptr p; - // disable copying - Exporter(const Exporter&) =delete; - Exporter& operator=(const Exporter&) =delete; + // disable copying + Exporter(const Exporter&) =delete; + Exporter& operator=(const Exporter&) =delete; }; } // namespace datetime diff --git a/include/datetime/settings.h b/include/datetime/settings.h index 631c547..343cd81 100644 --- a/include/datetime/settings.h +++ b/include/datetime/settings.h @@ -36,7 +36,7 @@ namespace datetime { * See the descriptions in data/org.ayatana.indicator.datetime.gschema.xml * for more information on specific properties. */ -class Settings +class Settings { public: Settings() =default; diff --git a/include/datetime/state.h b/include/datetime/state.h index 235c023..9a35905 100644 --- a/include/datetime/state.h +++ b/include/datetime/state.h @@ -26,7 +26,7 @@ #include #include #include - + #include #include // std::shared_ptr diff --git a/include/datetime/utils.h b/include/datetime/utils.h index 7cac9fd..dbef8ac 100644 --- a/include/datetime/utils.h +++ b/include/datetime/utils.h @@ -48,7 +48,7 @@ gchar * generate_full_format_string_at_time (GDateTime * now, their other locale settings when generating time format string */ const char* T_ (const char * msg); - + G_END_DECLS #endif /* INDICATOR_DATETIME_UTILS_H */ diff --git a/include/datetime/wakeup-timer-mainloop.h b/include/datetime/wakeup-timer-mainloop.h index 1bcd675..533de9e 100644 --- a/include/datetime/wakeup-timer-mainloop.h +++ b/include/datetime/wakeup-timer-mainloop.h @@ -34,7 +34,7 @@ namespace datetime { ***/ /** - * \brief a WakeupTimer implemented with g_timeout_add() + * \brief a WakeupTimer implemented with g_timeout_add() */ class MainloopWakeupTimer: public WakeupTimer { diff --git a/include/datetime/wakeup-timer-powerd.h b/include/datetime/wakeup-timer-powerd.h index a855aa6..f8d3af9 100644 --- a/include/datetime/wakeup-timer-powerd.h +++ b/include/datetime/wakeup-timer-powerd.h @@ -34,7 +34,7 @@ namespace datetime { ***/ /** - * \brief a WakeupTimer implemented with g_timeout_add() + * \brief a WakeupTimer implemented with g_timeout_add() */ class PowerdWakeupTimer: public WakeupTimer { diff --git a/include/notifications/notifications.h b/include/notifications/notifications.h index fbc2109..0de1e23 100644 --- a/include/notifications/notifications.h +++ b/include/notifications/notifications.h @@ -35,7 +35,7 @@ class Engine; * Helper class for showing notifications. * * Populate the builder, then pass it to Engine::show(). - * + * * @see Engine::show(Builder) */ class Builder @@ -104,7 +104,7 @@ public: void close_all(); const std::string& app_name() const; - + private: class Impl; std::unique_ptr impl; diff --git a/m4/gcov.m4 b/m4/gcov.m4 index 3163584..d243eeb 100644 --- a/m4/gcov.m4 +++ b/m4/gcov.m4 @@ -3,7 +3,7 @@ # * lcov # * genhtml # * gcovr -# +# # Sets ac_cv_check_gcov to yes if tooling is present # and reports the executables to the variables LCOV, GCOVR and GENHTML. AC_DEFUN([AC_TDD_GCOV], @@ -71,7 +71,7 @@ AC_DEFUN([AC_TDD_GCOV], # Add the special gcc flags COVERAGE_CFLAGS="-O0 -fprofile-arcs -ftest-coverage" - COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" + COVERAGE_CXXFLAGS="-O0 -fprofile-arcs -ftest-coverage" COVERAGE_LDFLAGS="-lgcov" # Check availability of gcovr diff --git a/src/alarm-queue-simple.cpp b/src/alarm-queue-simple.cpp index 652d744..b535603 100644 --- a/src/alarm-queue-simple.cpp +++ b/src/alarm-queue-simple.cpp @@ -95,7 +95,7 @@ private: // idle until the next alarm if ((alarm = find_next_alarm(appointments))) { - g_debug ("setting timer to wake up for next appointment '%s' at %s", + g_debug ("setting timer to wake up for next appointment '%s' at %s", alarm->text.c_str(), alarm->time.format("%F %T").c_str()); diff --git a/src/awake.cpp b/src/awake.cpp index 5f7e2e0..da69c44 100644 --- a/src/awake.cpp +++ b/src/awake.cpp @@ -59,7 +59,7 @@ public: unforce_awake (); remove_display_on_request (); g_object_unref (m_system_bus); - } + } } private: @@ -147,7 +147,7 @@ private: g_clear_pointer (&self->m_awake_cookie, g_free); g_variant_get (args, "(s)", &self->m_awake_cookie); g_debug ("m_awake_cookie is now '%s'", self->m_awake_cookie); - + g_variant_unref (args); } } @@ -184,7 +184,7 @@ private: self->m_display_on_timer = g_timeout_add_seconds (self->m_display_on_seconds, on_display_on_timer, gself); - + g_variant_unref (args); } } diff --git a/src/clock-live.cpp b/src/clock-live.cpp index 0ff60a8..0e6ddc3 100644 --- a/src/clock-live.cpp +++ b/src/clock-live.cpp @@ -150,7 +150,7 @@ private: // reset the timer in case someone changed the system clock self->reset_timer(); } - + self->refresh(); return G_SOURCE_CONTINUE; } diff --git a/src/com.ubuntu.touch.AccountsService.Sound.xml b/src/com.ubuntu.touch.AccountsService.Sound.xml index 6e2ca5f..781a52f 100644 --- a/src/com.ubuntu.touch.AccountsService.Sound.xml +++ b/src/com.ubuntu.touch.AccountsService.Sound.xml @@ -9,12 +9,12 @@ - - diff --git a/src/engine-eds.cpp b/src/engine-eds.cpp index 0c833c6..30aad1a 100644 --- a/src/engine-eds.cpp +++ b/src/engine-eds.cpp @@ -110,7 +110,7 @@ public: auto gtz = default_timezone != nullptr ? g_time_zone_new(icaltimezone_get_location(default_timezone)) - : g_time_zone_new_local(); + : g_time_zone_new_local(); auto main_task = std::make_shared(this, func, default_timezone, gtz, begin, end); for (auto& kv : m_clients) @@ -1026,7 +1026,7 @@ private: /*** **** ***/ - + core::Signal<> m_changed; std::set m_sources; std::map m_clients; diff --git a/src/formatter-desktop.cpp b/src/formatter-desktop.cpp index dd4ff5b..fcf9cdb 100644 --- a/src/formatter-desktop.cpp +++ b/src/formatter-desktop.cpp @@ -165,7 +165,7 @@ const gchar* DesktopFormatter::getDateFormat(bool show_day, bool show_date, bool else if (show_date) /* Translators, please edit/rearrange these strftime(3) tokens to suit your locale! That will fix bug #1001595 for your locale and make the date/time in the upper-right corner of your screen look beautiful :) - This format string shows the abbreviated month and day. + This format string shows the abbreviated month and day. en_US example: "%b %e" --> "Mar 27" en_GB example: "%e %b" --> "27 Mar" zh_CN example(?): "%m月%d日" --> "03月27日" */ diff --git a/src/haptic.cpp b/src/haptic.cpp index cc8ea0b..7430c04 100644 --- a/src/haptic.cpp +++ b/src/haptic.cpp @@ -121,7 +121,7 @@ private: a running loop -- we could keep vibrating even after "this" was destructed */ auto repeat_count = g_variant_new_uint32 (1u); - + g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE); g_variant_builder_add_value (&builder, pattern_array); g_variant_builder_add_value (&builder, repeat_count); diff --git a/src/menu.cpp b/src/menu.cpp index 9d229c6..c778963 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -160,7 +160,7 @@ protected: for(const auto& a : m_state->calendar_upcoming->appointments().get()) if (begin <= a.begin) upcoming.push_back(a); - + if (m_upcoming != upcoming) { m_upcoming.swap(upcoming); @@ -324,7 +324,7 @@ private: if (appt.is_ubuntu_alarm()) { - g_menu_item_set_attribute (menu_item, "x-canonical-type", "s", "com.canonical.indicator.alarm"); + g_menu_item_set_attribute (menu_item, "x-canonical-type", "s", "org.ayatana.indicator.alarm"); g_menu_item_set_attribute_value(menu_item, G_MENU_ATTRIBUTE_ICON, get_serialized_alarm_icon()); } else @@ -605,7 +605,7 @@ MenuFactory::buildMenu(Menu::Profile profile) g_warn_if_reached(); break; } - + return menu; } diff --git a/src/notifications.cpp b/src/notifications.cpp index 4856546..051653d 100644 --- a/src/notifications.cpp +++ b/src/notifications.cpp @@ -58,7 +58,7 @@ Builder::Builder(): Builder::~Builder() { } - + void Builder::set_title (const std::string& title) { @@ -163,7 +163,7 @@ public: g_warning ("Unable to close notification %d: %s", key, error->message); g_error_free (error); } - + // call the user callback and remove it from our bookkeeping remove_closed_notification (key); } @@ -220,7 +220,7 @@ public: m_notifications[key] = { nn, info.m_closed_callback }; g_signal_connect (nn.get(), "closed", G_CALLBACK(on_notification_closed), this); - + GError * error = nullptr; if (notify_notification_show(nn.get(), &error)) { diff --git a/src/planner.cpp b/src/planner.cpp index 91bfe10..d4ef3f2 100644 --- a/src/planner.cpp +++ b/src/planner.cpp @@ -19,7 +19,7 @@ #include -#include +#include namespace ayatana { namespace indicator { diff --git a/src/sound.cpp b/src/sound.cpp index 51b410a..4bc3ab2 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -92,8 +92,8 @@ private: const double in = CLAMP(m_volume, in_range_lo, in_range_hi); const double pct = (in - in_range_lo) / (in_range_hi - in_range_lo); - constexpr double out_range_lo = 0.0; - constexpr double out_range_hi = 1.0; + constexpr double out_range_lo = 0.0; + constexpr double out_range_hi = 1.0; return out_range_lo + (pct * (out_range_hi - out_range_lo)); } diff --git a/src/timezone-geoclue.cpp b/src/timezone-geoclue.cpp index 9f8b4c4..50ebbcd 100644 --- a/src/timezone-geoclue.cpp +++ b/src/timezone-geoclue.cpp @@ -173,7 +173,7 @@ private: self->m_cancellable, on_address_started, self); - + g_variant_unref(result); } } diff --git a/src/utils.c b/src/utils.c index 23c7f7c..69ca7a2 100644 --- a/src/utils.c +++ b/src/utils.c @@ -95,7 +95,7 @@ split_settings_location(const gchar* location, gchar** zone, gchar** name) * "America/Chicago Oklahoma City"), this function tries to make a * more human-readable name by using the user-provided name if the guessed * timezone matches the last one the user manually clicked on. - * + * * In the example above, this allows the menuitem for the system-guessed * timezone ("America/Chicago") to read "Oklahoma City" after the user clicks * on the "Oklahoma City" menuitem. @@ -250,10 +250,10 @@ T_(const char *msg) * _ a time after this week should be shown as the short version of the day, * date, and time (e.g. “Wed 21 Apr 3:55 PM”) * _ a full-day event after this week should be shown as the short version of - * the day and date (e.g. “Wed 21 Apr”). + * the day and date (e.g. “Wed 21 Apr”). * _ in addition, when presenting the times of upcoming events, the time should * be followed by the timezone if it is different from the one the computer - * is currently set to. For example, “Wed 3:55 PM UTC−5”. + * is currently set to. For example, “Wed 3:55 PM UTC−5”. */ char* generate_full_format_string_at_time (GDateTime* now, GDateTime* then, diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 010a426..71d9c43 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,6 @@ # build libgtest -add_library (gtest STATIC - ${GTEST_SOURCE_DIR}/gtest-all.cc +add_library (gtest STATIC + ${GTEST_SOURCE_DIR}/gtest-all.cc ${GTEST_SOURCE_DIR}/gtest_main.cc) set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR}) set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w) @@ -72,7 +72,7 @@ if (URLDISPATCHER_FOUND) ## ## EDS Tests -## +## find_program(DBUS_RUNNER dbus-test-runner) diff --git a/tests/geoclue-fixture.h b/tests/geoclue-fixture.h index d028ec9..a6641d6 100644 --- a/tests/geoclue-fixture.h +++ b/tests/geoclue-fixture.h @@ -72,7 +72,7 @@ class GeoclueFixture : public GlibFixture interface = "org.freedesktop.Geoclue.Address"; obj_geo_addr = dbus_test_dbus_mock_get_object (mock, client_path, interface, nullptr); dbus_test_dbus_mock_object_add_method (mock, obj_geo_addr, "GetAddress", nullptr, G_VARIANT_TYPE("(ia{ss}(idd))"), gstr->str, &error); - + dbus_test_service_add_task(service, DBUS_TEST_TASK(mock)); dbus_test_service_start_tasks(service); diff --git a/tests/planner-mock.h b/tests/planner-mock.h index a324bd4..50307ae 100644 --- a/tests/planner-mock.h +++ b/tests/planner-mock.h @@ -47,7 +47,7 @@ private: core::Property> m_appointments; core::Property> m_range; }; - + } // namespace datetime } // namespace indicator diff --git a/tests/run-eds-ics-test.sh b/tests/run-eds-ics-test.sh index 81a4757..13c1617 100755 --- a/tests/run-eds-ics-test.sh +++ b/tests/run-eds-ics-test.sh @@ -56,7 +56,7 @@ if [ -e ${ICS_FILE} ]; then fi # run the test -${TEST_RUNNER} --keep-env --max-wait=90 --task ${TEST_EXEC} --task-name ${TEST_NAME} --wait-until-complete +${TEST_RUNNER} --keep-env --max-wait=90 --task ${TEST_EXEC} --task-name ${TEST_NAME} --wait-until-complete rv=$? # if the test passed, blow away the tmpdir diff --git a/tests/test-actions.cpp b/tests/test-actions.cpp index 0586bcc..1352ddb 100644 --- a/tests/test-actions.cpp +++ b/tests/test-actions.cpp @@ -268,13 +268,13 @@ TEST_F(ActionsFixture, SetCalendarDate) EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get())); // DST change in US - now = DateTime::Local(2015, 3, 8, 9, 0, 0); + now = DateTime::Local(2015, 3, 8, 9, 0, 0); v = g_variant_new_int64(now.to_unix()); g_action_group_activate_action (action_group, action_name, v); EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get())); // DST change in Europe - now = DateTime::Local(2015, 3, 29, 9, 0, 0); + now = DateTime::Local(2015, 3, 29, 9, 0, 0); v = g_variant_new_int64(now.to_unix()); g_action_group_activate_action (action_group, action_name, v); EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get())); diff --git a/tests/test-clock.cpp b/tests/test-clock.cpp index c1d91da..44f9be0 100644 --- a/tests/test-clock.cpp +++ b/tests/test-clock.cpp @@ -179,7 +179,7 @@ TEST_F(ClockFixture, SysPowerStateChange) clock->minute_changed.connect([&minute_changed]() { minute_changed = true; }); - + // control test -- minute_changed shouldn't get triggered // when the clock is silently changed gboolean is_owned = false; diff --git a/tests/test-datetime.cpp b/tests/test-datetime.cpp index 8e75e73..078255c 100644 --- a/tests/test-datetime.cpp +++ b/tests/test-datetime.cpp @@ -76,7 +76,7 @@ TEST_F(DateTimeFixture, StartAndEnd) const int n_iterations{10000}; for (int i{0}; i(test_case.now); DesktopFormatter f(clock, m_settings); - + const auto fmt = f.relative_format(test_case.then.get()); ASSERT_EQ(test_case.expected_format_string, fmt); } @@ -239,7 +239,7 @@ TEST_F(FormatterFixture, TestEventTimes) { auto clock = std::make_shared(test_case.now); DesktopFormatter f(clock, m_settings); - + const auto fmt = f.relative_format(test_case.then.get(), test_case.then_end.get()); ASSERT_STREQ(test_case.expected_format_string, fmt.c_str()); } diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp index ba223f2..e6d222a 100644 --- a/tests/test-menus.cpp +++ b/tests/test-menus.cpp @@ -120,7 +120,7 @@ protected: g_menu_model_get_item_attribute(section, 0, G_MENU_ATTRIBUTE_LABEL, "s", &str); const auto now = m_state->clock->localtime(); EXPECT_EQ(now.format("%A, %e %B %Y"), str); - + g_clear_pointer(&str, g_free); g_menu_model_get_item_attribute(section, 0, G_MENU_ATTRIBUTE_ACTION, "s", &str); diff --git a/tests/test-settings.cpp b/tests/test-settings.cpp index 26acaa4..fabb6f7 100644 --- a/tests/test-settings.cpp +++ b/tests/test-settings.cpp @@ -203,7 +203,7 @@ TEST_F(SettingsFixture, Locations) const gchar* bstrv[] = {"America/Denver", "Europe/London London", "Europe/Berlin Berlin", nullptr}; const std::vector av = strv_to_vector(astrv); const std::vector bv = strv_to_vector(bstrv); - + g_settings_set_strv(m_gsettings, key, astrv); EXPECT_EQ(av, m_settings->locations.get()); g_settings_set_strv(m_gsettings, key, bstrv); diff --git a/tests/test-snap.cpp b/tests/test-snap.cpp index 7559802..ae4c4e1 100644 --- a/tests/test-snap.cpp +++ b/tests/test-snap.cpp @@ -62,7 +62,7 @@ protected: static constexpr char const * HAPTIC_METHOD_VIBRATE_PATTERN {"VibratePattern"}; static constexpr int SCREEN_COOKIE {8675309}; - static constexpr char const * SCREEN_METHOD_KEEP_DISPLAY_ON {"keepDisplayOn"}; + static constexpr char const * SCREEN_METHOD_KEEP_DISPLAY_ON {"keepDisplayOn"}; static constexpr char const * SCREEN_METHOD_REMOVE_DISPLAY_ON_REQUEST {"removeDisplayOnRequest"}; static constexpr int POWERD_SYS_STATE_ACTIVE = 1; @@ -167,8 +167,8 @@ protected: NOTIFY_INTERFACE, &error); g_assert_no_error(error); - - // METHOD_GET_INFO + + // METHOD_GET_INFO str = g_strdup("ret = ('mock-notify', 'test vendor', '1.0', '1.1')"); dbus_test_dbus_mock_object_add_method(notify_mock, notify_obj, @@ -198,7 +198,7 @@ protected: g_assert_no_error (error); g_free (str); - // METHOD_CLOSE + // METHOD_CLOSE str = g_strdup_printf("self.EmitSignal('%s', '%s', 'uu', [ args[0], %d ])", NOTIFY_INTERFACE, SIGNAL_CLOSED, @@ -225,8 +225,8 @@ protected: BUS_POWERD_INTERFACE, &error); g_assert_no_error(error); - - str = g_strdup_printf ("ret = '%s'", POWERD_COOKIE); + + str = g_strdup_printf ("ret = '%s'", POWERD_COOKIE); dbus_test_dbus_mock_object_add_method(powerd_mock, powerd_obj, POWERD_METHOD_REQUEST_SYS_STATE, @@ -258,8 +258,8 @@ protected: BUS_SCREEN_INTERFACE, &error); g_assert_no_error(error); - - str = g_strdup_printf ("ret = %d", SCREEN_COOKIE); + + str = g_strdup_printf ("ret = %d", SCREEN_COOKIE); dbus_test_dbus_mock_object_add_method(screen_mock, screen_obj, SCREEN_METHOD_KEEP_DISPLAY_ON, @@ -289,7 +289,7 @@ protected: BUS_HAPTIC_PATH, BUS_HAPTIC_INTERFACE, &error); - + dbus_test_dbus_mock_object_add_method(haptic_mock, haptic_obj, HAPTIC_METHOD_VIBRATE_PATTERN, diff --git a/tests/test-utils.cpp b/tests/test-utils.cpp index f5c14d4..963417a 100644 --- a/tests/test-utils.cpp +++ b/tests/test-utils.cpp @@ -66,7 +66,7 @@ namespace { "America/Chicago", "Europe/London London", "Chicago" } }; } - + TEST(UtilsTest, BeautifulTimezoneName) { for(const auto& test_case : beautify_timezone_test_cases) -- cgit v1.2.3