Skip to content
  1. Mar 16, 2024
  2. Mar 14, 2024
    • Philip Withnall's avatar
      rfkill: Fix use of deprecated g_memdup() · e7e4b8bd
      Philip Withnall authored
      
      
      It’s been deprecated in GLib 2.68 in favour of `g_memdup2()`, which uses
      correct argument types so as not to silently cause an overflow during an
      implicit integer size conversion.
      
      The existing code was safe and correct: this commit just fixes the
      deprecation warning.
      
      Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
      e7e4b8bd
    • Philip Withnall's avatar
      power: Fix exit status checking for the backlight helper program · 89938548
      Philip Withnall authored
      
      
      `g_spawn_check_exit_status()` operates on a *wait status* rather than an
      *exit status*. A wait status is what’s returned by `waitpid()`, and it’s
      a platform-specific combination of bits indicating whether the program
      exited gracefully, or crashed/signaled, and what value it returned
      from `main()` (if any). An exit status is the value returned from
      `main()` (so, zero for a successfully-exiting application).
      
      `g_spawn_check_exit_status()` has been deprecated since GLib 2.70
      because of its confusing naming.
      
      `g_subprocess_get_exit_status()` returns an exit status (so is named
      correctly), but we don’t actually have to use it because `GSubprocess`
      already provides an API which combines `g_subprocess_wait_async()` and
      `g_spawn_check_wait_status()`: `g_subprocess_wait_check_async()`.
      
      So just use that instead. It’s been available since GLib 2.40.
      
      Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
      89938548
    • Philip Withnall's avatar
      color/datetime: Use updated GTimeZone API from GLib · aab5fd4c
      Philip Withnall authored
      
      
      `g_time_zone_new()` was deprecated in GLib 2.68 because its error
      handling behaviour was poorly defined. `g_time_zone_new_identifier()` is
      equivalent but with better-defined error handling. Use that.
      
      Since the timezone identifier in the `datetime` plugin notification is
      coming from a system component, I assume it’s going to exist, hence the
      use of `g_warning()` for error handling rather than anything more
      involved.
      
      Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
      aab5fd4c
    • Philip Withnall's avatar
      housekeeping: Stop using deprecated non-Y2038-safe time APIs · 1c6a7e55
      Philip Withnall authored
      
      
      Use `GDateTime` instead of `GTimeVal`. This requires bumping the GLib
      dependency to 2.70 so we can use some `GFileInfo` convenience functions
      (the same changes would be possible, but more complex, without bumping
      the dependency). Debian Stable is currently shipping GLib 2.74, so 2.70
      should be widely available.
      
      This makes the housekeeping code Y2038-safe.
      
      Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
      1c6a7e55
    • Philip Withnall's avatar
      build: Bump minimum GLib dependency to 2.64 · b8c297bd
      Philip Withnall authored
      
      
      It’s needed for `g_warning_once()`, as used in the media-keys plugin
      since January 2023.
      
      Debian Stable currently ships GLib 2.74, so 2.64 should be very widely
      available by now.
      
      This fixes the following compiler warnings:
      ```
      ../../source/gnome-settings-daemon/plugins/media-keys/gsd-media-keys-manager.c: In function ‘do_config_power_button_action’:
      ../../source/gnome-settings-daemon/plugins/media-keys/gsd-media-keys-manager.c:2047:13: error: Not available before 2.64 [-Werror]
       2047 |                 g_warning_once ("Virtual machines only honor the 'nothing' power-button-action, and will shutdown otherwise");
            |             ^   ~~~~~~~~~~~~~~~~~~~~~~~
      ../../source/gnome-settings-daemon/plugins/media-keys/gsd-media-keys-manager.c:2067:13: error: Not available before 2.60 [-Werror]
       2067 |                 G_GNUC_FALLTHROUGH;
            |             ^   ~~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      ```
      
      Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
      b8c297bd
    • Philip Withnall's avatar
      build: Fix use of deprecated Meson path APIs · 84a95a17
      Philip Withnall authored
      
      
      These were deprecated in Meson 0.56 in favour of replacements which
      allow differentiating between the current project and the parent project
      when being used as a subproject.
      
      Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
      84a95a17
    • Philip Withnall's avatar
      build: Fix use of deprecated Meson pkgconfig API · 994ca299
      Philip Withnall authored
      
      
      Using `dep.get_pkgconfig_variable()` has been deprecated since Meson
      0.56, but gnome-settings-daemon depends on 0.57.
      
      Signed-off-by: default avatarPhilip Withnall <pwithnall@gnome.org>
      994ca299
  3. Mar 12, 2024
  4. Mar 04, 2024
  5. Mar 03, 2024
  6. Mar 01, 2024
  7. Feb 28, 2024
  8. Feb 25, 2024
  9. Feb 24, 2024
  10. Feb 19, 2024
  11. Feb 13, 2024
  12. Feb 10, 2024
  13. Jan 14, 2024
  14. Jan 13, 2024
  15. Jan 08, 2024
    • Ray Strode's avatar
      Release 46.alpha · 16660312
      Ray Strode authored
      46.alpha
      16660312
    • Undef's avatar
      power-manager: Show sleep warning conditional to chassis type · bca80a44
      Undef authored and Ray Strode's avatar Ray Strode committed
      Currently, GNOME settings daemon displays a notification warning
      the user before the sleeping the device. This is generally a very
      useful feature. However, with the adoption of new platforms in GNOME
      like phones and tablets, this can be a problem. In such devices,
      the desired behavior is to sleep as soon as possible and by default.
      Therefore, having a notification pop-up (which can potentially trigger
      some other haptic feedback like a LED) just because the device is
      doing what it is supposed to do (go to sleep) can be problematic.
      
      Discussion in a previous MR indicated that using the system's chassis
      type was a preferred option for deciding this behaviour. This commit
      builds upon the work by Pablo Correa Gomez in !285 to provide the same
      outcome using the chassis type value.
      
      Closes #656
      bca80a44
  16. Jan 06, 2024
  17. Dec 22, 2023
    • Ray Strode's avatar
      sharing: Give assigned services 10 seconds before killing them · 88883519
      Ray Strode authored
      It's useful to wait a bit before killing an assigned service when
      the associated system service goes away.
      
      This avoids having to tear down the user service if the system
      service is just getting restarted.
      
      This commit adds a 10 second countdown before slaying the user
      service when it's system service counterpart goes down.
      88883519
    • Ray Strode's avatar
      sharing: Start grd --handover if grd --system is running · 0bfc6081
      Ray Strode authored
      In order to provide a login screen over gnome-remote-desktop,
      their needs to be both system and session instance of
      gnome-remote-desktop. The latter should get run if the former
      is running, and not otherwise.
      
      This commit adds a mechanism for doing this by introducing the
      concept of "assigned services" (versus the already existing
      configurable services).
      
      Assigned services don't start based on GSettings configuration,
      but instead just start if an associated system service is running.
      0bfc6081
    • Ray Strode's avatar
      sharing: Rename `services` to `configurable_services` · 66359871
      Ray Strode authored
      We're going to have "assigned" services soon that are delegated from
      systemd system services. In order to avoid ambiguity, this commit
      prepares for that, by renaming the existing `services` variable to
      `configurable_services`
      66359871
    • Ray Strode's avatar
      sharing: Move initial service management to own function · 483a23a8
      Ray Strode authored
      This is just refactoring clean up in prep for future changes.
      483a23a8
    • Ray Strode's avatar
      sharing: Make systemd helpers take service name instead of ServiceInfo · 23decd3f
      Ray Strode authored
      A future commit is going to introduce a different type of service, and
      that commit will need to be able to start and stop services too.
      
      This commit prepares for that by making the APIs for managing services
      take service names instead of ServiceInfo instances.
      23decd3f
    • Ray Strode's avatar
      Release 45.1 · 1b887600
      Ray Strode authored
      45.1
      1b887600
    • Tobias Mueller's avatar
      usb protection: remove comment about a USBGuard bug · ec4cbd0a
      Tobias Mueller authored and Ray Strode's avatar Ray Strode committed
      The bug pertains to searching for rules with a label.
      When the USB protection component starts, it checks whether
      a "allow all" rule is present and in case no such rule is found,
      it adds "allow all" with a custom label.
      When searching for the rule, we could add our label but it does not
      matter for the functionality where the rule comes from.
      Especially because we neither change nor delete the rule.
      ec4cbd0a
  18. Nov 20, 2023
    • Bastien Nocera's avatar
      power: Fix uninitialised variable warning · 41d0dc1d
      Bastien Nocera authored
      In function ‘do_lid_closed_action’,
          inlined from ‘logind_proxy_changed_cb’ at plugins/power/gsd-power-manager.c:1579:17:
      plugins/power/gsd-power-manager.c:1538:20: warning: ‘is_inhibited’ may be used uninitialized [-Wmaybe-uninitialized]
       1538 |                 if (is_inhibited) {
            |                    ^
      plugins/power/gsd-power-manager.c: In function ‘logind_proxy_changed_cb’:
      plugins/power/gsd-power-manager.c:1533:26: note: ‘is_inhibited’ was declared here
       1533 |                 gboolean is_inhibited;
            |                          ^~~~~~~~~~~~
      plugins/power/gsd-power-manager.c: In function ‘idle_configure’:
      plugins/power/gsd-power-manager.c:1977:12: warning: ‘is_inhibited’ may be used uninitialized [-Wmaybe-uninitialized]
       1977 |         if (!is_action_inhibited (manager, action_type)) {
            |            ^
      plugins/power/gsd-power-manager.c:1354:18: note: ‘is_inhibited’ was declared here
       1354 |         gboolean is_inhibited;
            |                  ^~~~~~~~~~~~
      41d0dc1d
    • Bastien Nocera's avatar
      power: Fix enum mismatch warning · a059909d
      Bastien Nocera authored
      [1/2] Compiling C object plugins/power/gsd-power.p/gsd-power-manager.c.o
      plugins/power/gsd-power-manager.c:1872:1: warning: conflicting types for ‘idle_is_session_inhibited’ due to enum/integer mismatch; have ‘gboolean(GsdPowerManager *, GsmInhibitorFlag,  gboolean *)’ {aka ‘int(struct _GsdPowerManager *, GsmInhibitorFlag,  int *)’} [-Wenum-int-mismatch]
       1872 | idle_is_session_inhibited (GsdPowerManager  *manager,
            | ^~~~~~~~~~~~~~~~~~~~~~~~~
      plugins/power/gsd-power-manager.c:237:18: note: previous declaration of ‘idle_is_session_inhibited’ with type ‘gboolean(GsdPowerManager *, guint,  gboolean *)’ {aka ‘int(struct _GsdPowerManager *, unsigned int,  int *)’}
        237 | static gboolean  idle_is_session_inhibited (GsdPowerManager *manager, guint mask, gboolean *is_inhibited);
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      a059909d
  19. Nov 12, 2023