[wesnoth-commits] [wesnoth/wesnoth] 3cb3db: Add initial battery_info and apple_battery_info

GitHub noreply at github.com
Tue Oct 30 05:50:19 UTC 2018


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 3cb3dbeaf089c4c1edfb3cf1dfb4c7955fa6a9a2
      https://github.com/wesnoth/wesnoth/commit/3cb3dbeaf089c4c1edfb3cf1dfb4c7955fa6a9a2
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M projectfiles/Xcode/Wesnoth.xcodeproj/project.pbxproj
    A src/desktop/apple_battery_info.hpp
    A src/desktop/apple_battery_info.mm
    A src/desktop/battery_info.cpp
    A src/desktop/battery_info.hpp

  Log Message:
  -----------
  Add initial battery_info and apple_battery_info


  Commit: 0dfa4421eafc4651c8b47419c257fb893c300f6f
      https://github.com/wesnoth/wesnoth/commit/0dfa4421eafc4651c8b47419c257fb893c300f6f
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/desktop/apple_battery_info.mm

  Log Message:
  -----------
  Include verification if target is iOS or macOS


  Commit: de183eeb2d91232f178e2442c293cf04bd638127
      https://github.com/wesnoth/wesnoth/commit/de183eeb2d91232f178e2442c293cf04bd638127
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    A data/core/images/themes/battery-bw-lighting-bolt.png
    A data/core/images/themes/battery-bw.png
    A data/core/images/themes/battery-lighting-bolt.png
    A data/core/images/themes/battery.png
    M data/themes/_initial.cfg
    M data/themes/classic.cfg
    M data/themes/default.cfg
    M src/game_display.cpp
    M src/reports.cpp

  Log Message:
  -----------
  Include battery percentage into GUI and add 2 versions of battery icon


  Commit: 0116e7c10c65277af5c0c705e0d5a6275b3247e6
      https://github.com/wesnoth/wesnoth/commit/0116e7c10c65277af5c0c705e0d5a6275b3247e6
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/reports.cpp

  Log Message:
  -----------
  Show battery percentage as integer


  Commit: ac4dbfdb77b8992862eb866c4c1acd411ab18e34
      https://github.com/wesnoth/wesnoth/commit/ac4dbfdb77b8992862eb866c4c1acd411ab18e34
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/reports.cpp

  Log Message:
  -----------
  Remove unused battery variable


  Commit: ca7f7a2e93010b0f06e9b1338c3e49d243a4b572
      https://github.com/wesnoth/wesnoth/commit/ca7f7a2e93010b0f06e9b1338c3e49d243a4b572
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M SConstruct
    M source_lists/wesnoth
    M src/CMakeLists.txt
    M src/SConscript
    M src/desktop/apple_battery_info.mm

  Log Message:
  -----------
  Fix C-Make and Scons builds


  Commit: 547e91755e1c6e6dc4cd7636082c5c55c8ba8552
      https://github.com/wesnoth/wesnoth/commit/547e91755e1c6e6dc4cd7636082c5c55c8ba8552
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M projectfiles/VC14/wesnoth.vcxproj
    M projectfiles/VC14/wesnoth.vcxproj.filters
    M src/CMakeLists.txt
    M src/SConscript
    M src/desktop/battery_info.cpp
    M src/desktop/battery_info.hpp
    A src/desktop/windows_battery_info.cpp
    A src/desktop/windows_battery_info.hpp

  Log Message:
  -----------
  Implement getting battery status on Windows


  Commit: d17fd7e72a66624143ab3bf9ccb800cb33b4aa45
      https://github.com/wesnoth/wesnoth/commit/d17fd7e72a66624143ab3bf9ccb800cb33b4aa45
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/reports.cpp

  Log Message:
  -----------
  fix use of old-style cast error


  Commit: f8f4c9809b9626970aa6613d027ff375c739ee60
      https://github.com/wesnoth/wesnoth/commit/f8f4c9809b9626970aa6613d027ff375c739ee60
  Author: Martin Hrubý <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/desktop/apple_battery_info.hpp

  Log Message:
  -----------
  Correct comment


  Commit: 8d5dfeaa4a32149d244f03d25c237bdcdb9e67b7
      https://github.com/wesnoth/wesnoth/commit/8d5dfeaa4a32149d244f03d25c237bdcdb9e67b7
  Author: Martin Hrubý (hrubymar10) <hrubymar10 at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/desktop/apple_battery_info.hpp
    M src/desktop/apple_battery_info.mm
    M src/desktop/battery_info.cpp
    M src/desktop/battery_info.hpp

  Log Message:
  -----------
  Fix indentation and namespace names


  Commit: 34d93d44cac28f0b165e842f464423dc304f7323
      https://github.com/wesnoth/wesnoth/commit/34d93d44cac28f0b165e842f464423dc304f7323
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M data/game_config.cfg
    M data/themes/_initial.cfg
    M data/themes/default.cfg
    M src/game_config.cpp
    M src/game_config.hpp
    M src/reports.cpp
    M src/theme.cpp
    M src/theme.hpp

  Log Message:
  -----------
  Hide battery status if the device doesn't have a battery

The strategy is two-fold. We move the rendering of the icon into the
battery status report where it can be disabled at runtime, and allow the
countdown/clock to move to the position of the battery status if the device
doesn't have a battery. I also moved rendering of the clock icon to the
time report to allow the icon to move together with the text.

I needed to change theme::status_ to store pointers to status items because
otherwise the countdown object loses its type when inserted to the map. And
to be able to use std::unique_ptr inside the theme class, I had to make the
class non-copyable and movable.


  Commit: 291a02fd26022482e9ac9741c830721fc4d925bf
      https://github.com/wesnoth/wesnoth/commit/291a02fd26022482e9ac9741c830721fc4d925bf
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/CMakeLists.txt
    M src/SConscript
    M src/desktop/battery_info.cpp
    A src/desktop/dbus_features.cpp
    A src/desktop/dbus_features.hpp
    R src/desktop/dbus_notification.cpp
    R src/desktop/dbus_notification.hpp
    M src/desktop/notifications.cpp

  Log Message:
  -----------
  WIP: implement battery status querying on GNU/Linux

This code is supposed to work in theory, but in practice (at least on my
PC) it fails with this error message:

The name org.freedesktop.UPower was not provided by any .service files

I'll need to investigate later on why it's happening.


  Commit: d517a5883d11a36819af3e38da4e402b8fff643b
      https://github.com/wesnoth/wesnoth/commit/d517a5883d11a36819af3e38da4e402b8fff643b
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/desktop/dbus_features.cpp

  Log Message:
  -----------
  Fix battery status querying on GNU/Linux

The code was looking at the wrong bus (why on Earth does D-Bus have two
distinct buses, anyway?), and failed to unpack the return value from a
variant.

It seems to now work correctly, although UPower seems to categorize my
desktop PC's power source as "unknown" rather than the more accurate
"line power". No harm done because our code only shows the battery
indicator if the device is detected to have a battery.


  Commit: 3dc60f7a0fe04f1956ed1a735567826f3c866dc7
      https://github.com/wesnoth/wesnoth/commit/3dc60f7a0fe04f1956ed1a735567826f3c866dc7
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2018-10-30 (Tue, 30 Oct 2018)

  Changed paths:
    M src/theme.cpp

  Log Message:
  -----------
  Fix #3599: crash with custom themes on desktop PCs


Compare: https://github.com/wesnoth/wesnoth/compare/9513e43ae4af...3dc60f7a0fe0
      **NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/

      Functionality will be removed from GitHub.com on January 31st, 2019.


More information about the Commits mailing list