Skip to content
Commits on Source (20)
  • Jing Wang's avatar
    Fix crashing when atime is not present · 647c0af7
    Jing Wang authored
    Recent changes to gio omit the atime instead of setting it to an out of range value.
    
    Fixes #556, but note this doesn't fix the fact that gio omitted atime on a system where atime should have been available.
    647c0af7
  • Benjamin Berg's avatar
    power: Avoid automatic logout in GDM/greeter · 10aa1714
    Benjamin Berg authored
    In GDM sessions (greeter, initial-setup), it does not make sense to
    automatically logout. This can happen if the system wide default is
    changed to default to the "logout" action.
    
    Note that we already use the RUNNING_UNDER_GDM environment variable in
    the keyboard plugin currently. So doing this is likely sane, even if we
    probably want a more elegant strategy to detect whether we are in a
    "login" session.
    10aa1714
  • Fabio Tomat's avatar
    Update Friulian translation · e48ac6f5
    Fabio Tomat authored
    e48ac6f5
  • Benjamin Berg's avatar
    power: Never register sleep timeout for logout in GDM · c1f14103
    Benjamin Berg authored
    We already suppress logout actions in GDM (10aa1714, power: Avoid
    automatic logout in GDM/greeter). However, while this prevents the
    action, we may still warn.
    
    Change it so that the corresponding timeouts will never be registered.
    Leave the guard in gnome_session_logout but add a warning as we should
    never be hitting that code path.
    c1f14103
  • Tim Sabsch's avatar
    Update German translation · 23763dfe
    Tim Sabsch authored
    23763dfe
  • Benjamin Berg's avatar
    usb-protection: Do not warn about ServiceUnknown errors for USBGuard · affebf89
    Benjamin Berg authored
    It is expected for USBGuard to not be installed on many systems. We
    should not warn about that DBus error, as it does not indicate an issue.
    
    Closes: #567
    affebf89
  • Daniel Șerbănescu's avatar
    Update Romanian translation · d81b738e
    Daniel Șerbănescu authored
    d81b738e
  • Kjartan Maraas's avatar
    Update Norwegian Bokmål translation · 3bd47c0c
    Kjartan Maraas authored
    3bd47c0c
  • Benjamin Berg's avatar
    ci: Update CI template and runner tags · 1dbadb93
    Benjamin Berg authored
    The new FDO templates do not need privileged runners anymore. Also,
    those do not exist and the asan should be run on the asan runner
    instead.
    1dbadb93
  • Bastien Nocera's avatar
    power: Don't warn more than once per warning level for devices · 60621b90
    Bastien Nocera authored
    A lot of wireless input devices, such as Logitech mice and touchpads, or
    Bluetooth LE input devices, will disconnect and reconnect frequently
    from the computer when unused.
    
    This causes a problem when the battery on the device is low because
    a new notification will be generated each time the device reconnects, as
    if it was the first time it connected.
    
    Saving the last warning-level for every external peripheral ensures that
    we only emit one low battery notification for each warning-level, when
    the threshold is crossed, rather than at every reconnect.
    
    The last warning-level is not stored, so a new session, or a reboot will
    cause devices to warn again once.
    
    Helps: #108
    60621b90
  • Jordi Mas's avatar
    Update Catalan translation · 01a0602d
    Jordi Mas authored
    01a0602d
  • Benjamin Berg's avatar
    datetime: Query GWeather DB on the fly instead of caching · df6c69f0
    Benjamin Berg authored
    We need the database only quite irregularly (i.e. when the location
    change). Just grab the required information from GWeather on the fly and
    destroy it immediately after. Also, use the API to only grab the cities
    of one country instead of filtering them later.
    
    See also: !168
    df6c69f0
  • Benjamin Berg's avatar
    datetime: Load Olson DB on the fly instead of caching it · 70cadb75
    Benjamin Berg authored
    We need the database only quite irregularly (i.e. when the location
    change). Just load the database on the fly when we need it, and discard
    it afterwards to free up the memory again.
    
    See also: !168
    70cadb75
  • Benjamin Berg's avatar
    tests: Unset display environment variables · cdd42298
    Benjamin Berg authored
    The environment variables were not correctly cleared. Fix this and also
    make sure that we don't have the GNOME_SETUP_DISPLAY environment
    variable leaking in from the outside.
    cdd42298
  • Kjartan Maraas's avatar
    Update Norwegian Bokmål translation · 6018dd49
    Kjartan Maraas authored
    6018dd49
  • Мирослав Николић's avatar
    f73d50f3
  • Мирослав Николић's avatar
    1ee94e5f
  • Hans de Goede's avatar
    rfkill: set the g_io_channel to unbuffered mode · d2200632
    Hans de Goede authored
    Access to a /dev/foo device should never use buffered mode.
    
    While debugging a gsd-rfkill issue I noticed in the g_debug output
    that the rfkill-glib.c code now seems to be receiving bogus events.
    
    Doing a strace I noticed some read(dev_rfkill_fd, buf, 8) calls,
    even though we call:
      g_io_channel_read_chars(..., sizeof(struct rfkill_event, ...)
    
    Which requests 9 bytes. The problem is the kernel expects us to
    read 1 event per read() system-call and it will throw away
    excess data. The idea is here that the rfkill_event struct can
    be extended by adding new fields at the end and then userspace code
    compiled against older kernel headers will still work since it
    will only read the fields it knows in a single call and the
    extra fields are thrown away.
    
    Since the rfkill-glib.c code was using buffered-io and asking
    g_io_channel_read_chars for 9 bytes when compiled against recent
    kernel headers, what would happen is that 2 events would be consumed
    in 2 read(fd, buf, 8) syscalls and then the first byte of the
    second event read would be appended to the previous event and
    the remaining 7 bytes would be used as the first 7 bytes for the
    next event (and eventually completed with the first 2 bytes of
    the next event, etc.). Leading to completely bogus events.
    
    Enabling unbuffered mode fixes this.
    
    Note this is a relatively new problem, caused by the kernel
    recently extending the rfkill_event struct with an extra byte-field:
    "rfkill: add a reason to the HW rfkill state"
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=14486c82612a177cb910980c70ba900827ca0894
    
    Before that kernel change the rfkill_event struct was 8 bytes large
    which allowed us to get away with using buffered io here.
    d2200632
  • Benjamin Berg's avatar
    Release 3.38.2 · e9c50573
    Benjamin Berg authored
    e9c50573
  • Simon McVittie's avatar
    New upstream version 3.38.2 · 987e0247
    Simon McVittie authored
    987e0247
==============
Version 3.38.2
==============
rfkill:
- Fix reading /dev/rfkill on newer kernels
housekeeping:
- Fix crash when atime is not present #556
power:
- Avoid automatic logout when inappropriate (greeter session)
- Only one warn once when the battery of external devices runs low #108
usb-protection:
- Do not warn if usbguard is not installed #567
datetime:
- Optimizations of the required DB lookups
==============
Version 3.38.1
==============
......
project(
'gnome-settings-daemon', 'c',
version: '3.38.1',
version: '3.38.2',
license: [ 'GPL2+', 'LGPLv2+' ],
meson_version: '>= 0.47.0'
)
......
......@@ -49,8 +49,6 @@ typedef struct
GClueSimple *geoclue_simple;
GCancellable *geoclue_cancellable;
TzDB *tzdb;
WeatherTzDB *weather_tzdb;
gchar *current_timezone;
GSettings *location_settings;
......@@ -171,23 +169,28 @@ find_by_country (GList *locations,
return found;
}
static const gchar *
static gchar *
find_timezone (GsdTimezoneMonitor *self,
GeocodeLocation *location,
const gchar *country_code)
{
TzDB *tzdb;
gchar *res;
GList *filtered;
GList *weather_locations;
GList *locations;
GsdTimezoneMonitorPrivate *priv = gsd_timezone_monitor_get_instance_private (self);
TzLocation *closest_tz_location;
tzdb = tz_load_db ();
/* First load locations from Olson DB */
locations = ptr_array_to_list (tz_get_locations (priv->tzdb));
locations = ptr_array_to_list (tz_get_locations (tzdb));
g_return_val_if_fail (locations != NULL, NULL);
/* ... and then add libgweather's locations as well */
weather_locations = weather_tz_db_get_locations (country_code);
locations = g_list_concat (locations,
weather_tz_db_get_locations (priv->weather_tzdb));
g_list_copy (weather_locations));
/* Filter tz locations by country */
filtered = find_by_country (locations, country_code);
......@@ -202,9 +205,13 @@ find_timezone (GsdTimezoneMonitor *self,
locations = sort_by_closest_to (locations, location);
closest_tz_location = (TzLocation *) locations->data;
res = g_strdup (closest_tz_location->zone);
g_list_free (locations);
g_list_free_full (weather_locations, (GDestroyNotify) tz_location_free);
tz_db_free (tzdb);
return closest_tz_location->zone;
return res;
}
static void
......@@ -214,7 +221,7 @@ process_location (GsdTimezoneMonitor *self,
GeocodeLocation *location;
GsdTimezoneMonitorPrivate *priv = gsd_timezone_monitor_get_instance_private (self);
const gchar *country_code;
const gchar *new_timezone;
g_autofree gchar *new_timezone = NULL;
country_code = geocode_place_get_country_code (place);
location = geocode_place_get_location (place);
......@@ -386,8 +393,6 @@ gsd_timezone_monitor_finalize (GObject *obj)
g_clear_object (&priv->dtm);
g_clear_object (&priv->permission);
g_clear_pointer (&priv->current_timezone, g_free);
g_clear_pointer (&priv->tzdb, tz_db_free);
g_clear_pointer (&priv->weather_tzdb, weather_tz_db_free);
g_clear_object (&priv->location_settings);
......@@ -459,8 +464,6 @@ gsd_timezone_monitor_init (GsdTimezoneMonitor *self)
}
priv->current_timezone = timedate1_dup_timezone (priv->dtm);
priv->tzdb = tz_load_db ();
priv->weather_tzdb = weather_tz_db_new ();
priv->location_settings = g_settings_new ("org.gnome.system.location");
g_signal_connect_swapped (priv->location_settings, "changed::enabled",
......
......@@ -25,11 +25,6 @@
#define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
#include <libgweather/gweather.h>
struct _WeatherTzDB
{
GList *tz_locations;
};
static GList *
location_get_cities (GWeatherLocation *parent_location)
{
......@@ -104,33 +99,24 @@ load_timezones (GList *cities)
}
GList *
weather_tz_db_get_locations (WeatherTzDB *tzdb)
{
return g_list_copy (tzdb->tz_locations);
}
WeatherTzDB *
weather_tz_db_new (void)
weather_tz_db_get_locations (const gchar *country_code)
{
GList *cities;
GList *tz_locations;
GWeatherLocation *world;
WeatherTzDB *tzdb;
GWeatherLocation *country;
world = gweather_location_get_world ();
cities = location_get_cities (world);
tzdb = g_new0 (WeatherTzDB, 1);
tzdb->tz_locations = load_timezones (cities);
country = gweather_location_find_by_country_code (world, country_code);
g_list_free (cities);
if (!country)
return NULL;
return tzdb;
}
cities = location_get_cities (country);
tz_locations = load_timezones (cities);
void
weather_tz_db_free (WeatherTzDB *tzdb)
{
g_list_free_full (tzdb->tz_locations, (GDestroyNotify) tz_location_free);
g_list_free (cities);
g_free (tzdb);
return tz_locations;
}
......@@ -22,10 +22,6 @@
#include <glib.h>
typedef struct _WeatherTzDB WeatherTzDB;
WeatherTzDB *weather_tz_db_new (void);
GList *weather_tz_db_get_locations (WeatherTzDB *db);
void weather_tz_db_free (WeatherTzDB *db);
GList *weather_tz_db_get_locations (const char *country);
#endif /* __WEATHER_TZ_H */
......@@ -78,7 +78,7 @@ typedef struct {
typedef struct {
gint64 atime;
gint64 time;
char *path;
glong size;
} ThumbData;
......@@ -100,11 +100,13 @@ read_dir_for_purge (const char *path, GList *files)
{
GFile *read_path;
GFileEnumerator *enum_dir;
int cannot_get_time = 0;
read_path = g_file_new_for_path (path);
enum_dir = g_file_enumerate_children (read_path,
G_FILE_ATTRIBUTE_STANDARD_NAME ","
G_FILE_ATTRIBUTE_TIME_ACCESS ","
G_FILE_ATTRIBUTE_TIME_MODIFIED ","
G_FILE_ATTRIBUTE_STANDARD_SIZE,
G_FILE_QUERY_INFO_NONE,
NULL,
......@@ -120,28 +122,31 @@ read_dir_for_purge (const char *path, GList *files)
ThumbData *td;
GFile *entry;
char *entry_path;
gint64 atime;
gint64 time;
entry = g_file_get_child (read_path, name);
entry_path = g_file_get_path (entry);
g_object_unref (entry);
// Note that using atime here is no worse than using mtime.
// If atime is available, it should be no worse than mtime.
// - Even if the file system is mounted with noatime, the atime and
// mtime will be set to the same value on file creation.
// - Since the thumbnailer never edits thumbnails, and instead swaps
// in newly created temp files, atime will always be >= mtime.
// - atime should never be absent, which would cause
// g_file_info_get_attribute_int64 to return 0. The presence of
// atime is determined by the filters we pass to
// g_file_enumerate_children, not the file system atime settings.
g_assert (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_ACCESS));
atime = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_ACCESS);
if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_ACCESS)) {
time = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_ACCESS);
} else if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_TIME_MODIFIED)) {
time = g_file_info_get_attribute_uint64 (info, G_FILE_ATTRIBUTE_TIME_MODIFIED);
} else {
// Unlikely to get here, but be defensive
cannot_get_time += 1;
time = G_MAXINT64;
}
td = g_new0 (ThumbData, 1);
td->path = entry_path;
td->atime = atime;
td->time = time;
td->size = g_file_info_get_size (info);
files = g_list_prepend (files, td);
......@@ -149,6 +154,10 @@ read_dir_for_purge (const char *path, GList *files)
g_object_unref (info);
}
g_object_unref (enum_dir);
if (cannot_get_time > 0) {
g_warning ("Could not read atime or mtime on %d files in %s", cannot_get_time, path);
}
}
g_object_unref (read_path);
......@@ -158,7 +167,7 @@ read_dir_for_purge (const char *path, GList *files)
static void
purge_old_thumbnails (ThumbData *info, PurgeData *purge_data)
{
if ((purge_data->now - info->atime) > purge_data->max_age) {
if ((purge_data->now - info->time) > purge_data->max_age) {
g_unlink (info->path);
info->size = 0;
} else {
......@@ -167,9 +176,9 @@ purge_old_thumbnails (ThumbData *info, PurgeData *purge_data)
}
static int
sort_file_atime (ThumbData *file1, ThumbData *file2)
sort_file_time (ThumbData *file1, ThumbData *file2)
{
return file1->atime - file2->atime;
return file1->time - file2->time;
}
static char **
......@@ -260,7 +269,7 @@ purge_thumbnail_cache (GsdHousekeepingManager *manager)
if ((purge_data.total_size > purge_data.max_size) && (purge_data.max_size >= 0)) {
GList *scan;
files = g_list_sort (files, (GCompareFunc) sort_file_atime);
files = g_list_sort (files, (GCompareFunc) sort_file_time);
for (scan = files; scan && (purge_data.total_size > purge_data.max_size); scan = scan->next) {
ThumbData *info = scan->data;
g_unlink (info->path);
......
......@@ -161,6 +161,7 @@ struct _GsdPowerManager
NotifyNotification *notification_low;
NotifyNotification *notification_sleep_warning;
GsdPowerActionType sleep_action_type;
GHashTable *devices_notified_ht; /* key = serial str, value = UpDeviceLevel */
gboolean battery_is_low; /* laptop battery low, or UPS discharging */
/* Brightness */
......@@ -449,6 +450,39 @@ manager_critical_action_stop_sound_cb (GsdPowerManager *manager)
return FALSE;
}
static gboolean
engine_device_debounce_warn (GsdPowerManager *manager,
UpDeviceKind kind,
UpDeviceLevel warning,
const char *serial)
{
gpointer last_warning_ptr;
UpDeviceLevel last_warning;
gboolean ret = TRUE;
if (!serial)
return TRUE;
if (kind == UP_DEVICE_KIND_BATTERY ||
kind == UP_DEVICE_KIND_UPS)
return TRUE;
if (g_hash_table_lookup_extended (manager->devices_notified_ht, serial,
NULL, &last_warning_ptr)) {
last_warning = GPOINTER_TO_INT (last_warning_ptr);
if (last_warning >= warning)
ret = FALSE;
}
if (warning != UP_DEVICE_LEVEL_UNKNOWN)
g_hash_table_insert (manager->devices_notified_ht,
g_strdup (serial),
GINT_TO_POINTER (warning));
return ret;
}
static void
engine_charge_low (GsdPowerManager *manager, UpDevice *device)
{
......@@ -894,14 +928,19 @@ engine_charge_action (GsdPowerManager *manager, UpDevice *device)
static void
engine_device_warning_changed_cb (UpDevice *device, GParamSpec *pspec, GsdPowerManager *manager)
{
g_autofree char *serial = NULL;
UpDeviceLevel warning;
UpDeviceKind kind;
g_object_get (device,
"serial", &serial,
"warning-level", &warning,
"kind", &kind,
NULL);
if (!engine_device_debounce_warn (manager, kind, warning, serial))
return;
if (warning == UP_DEVICE_LEVEL_DISCHARGING) {
g_debug ("** EMIT: discharging");
engine_ups_discharging (manager, device);
......@@ -985,6 +1024,11 @@ static void
gnome_session_logout (GsdPowerManager *manager,
guint logout_mode)
{
if (g_getenv ("RUNNING_UNDER_GDM")) {
g_warning ("Prevented logout from GDM session! This indicates an issue in gsd-power.");
return;
}
g_dbus_proxy_call (G_DBUS_PROXY (manager->session),
"Logout",
g_variant_new ("(u)", logout_mode),
......@@ -1805,6 +1849,13 @@ idle_configure (GsdPowerManager *manager)
timeout_sleep = 0;
}
/* don't do any automatic logout if we are in GDM */
if (g_getenv ("RUNNING_UNDER_GDM") &&
(action_type == GSD_POWER_ACTION_LOGOUT)) {
g_debug ("Ignoring sleep timeout with logout action inside GDM");
timeout_sleep = 0;
}
if (timeout_sleep != 0) {
g_debug ("setting up sleep callback %is", timeout_sleep);
......@@ -2559,6 +2610,8 @@ on_rr_screen_acquired (GObject *object,
manager);
manager->devices_array = g_ptr_array_new_with_free_func (g_object_unref);
manager->devices_notified_ht = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
/* create a fake virtual composite battery */
manager->device_composite = up_client_get_display_device (manager->up_client);
......@@ -2803,6 +2856,7 @@ gsd_power_manager_stop (GsdPowerManager *manager)
g_clear_pointer (&manager->devices_array, g_ptr_array_unref);
g_clear_object (&manager->device_composite);
g_clear_pointer (&manager->devices_notified_ht, g_hash_table_destroy);
g_clear_object (&manager->screensaver_proxy);
......
......@@ -942,6 +942,101 @@ class PowerPluginTest6(PowerPluginBase):
# verify notification
self.assertRegex(notify_log, b'[0-9.]+ Notify "Power" .* ".*" ".*Wireless mouse .*low.* power.*\([0-9.]+%\).*"')
def test_notify_device_spam(self):
'''no repeat notifications for device batteries'''
# Set internal battery to discharging
self.set_composite_battery_discharging()
# Add a device battery
bat2_path = '/org/freedesktop/UPower/devices/' + 'mock_MOUSE_BAT1'
self.obj_upower.AddObject(bat2_path,
'org.freedesktop.UPower.Device',
{
'PowerSupply': dbus.Boolean(False, variant_level=1),
'IsPresent': dbus.Boolean(True, variant_level=1),
'Model': dbus.String('Bat1', variant_level=1),
'Serial': dbus.String('12345678', variant_level=1),
'Percentage': dbus.Double(10.0, variant_level=1),
'State': dbus.UInt32(UPowerGlib.DeviceState.DISCHARGING, variant_level=1),
'Type': dbus.UInt32(UPowerGlib.DeviceKind.MOUSE, variant_level=1),
'WarningLevel': dbus.UInt32(UPowerGlib.DeviceLevel.LOW, variant_level=1),
}, dbus.Array([], signature='(ssss)'))
obj_bat2 = self.system_bus_con.get_object('org.freedesktop.UPower', bat2_path)
self.obj_upower.EmitSignal('', 'DeviceAdded', 'o', [bat2_path],
dbus_interface='org.freedesktop.DBus.Mock')
time.sleep(1)
self.check_plugin_log('EMIT: charge-low', 2)
time.sleep(0.5)
# we should have gotten a notification by now
notify_log = self.p_notify.stdout.read()
# verify notification
self.assertRegex(notify_log, b'[0-9.]+ Notify "Power" .* ".*" ".*Wireless mouse .*low.* power.*\([0-9.]+%\).*"')
# Disconnect mouse
self.obj_upower.RemoveObject(bat2_path)
time.sleep(0.5)
# Reconnect mouse
self.obj_upower.AddObject(bat2_path,
'org.freedesktop.UPower.Device',
{
'PowerSupply': dbus.Boolean(False, variant_level=1),
'IsPresent': dbus.Boolean(True, variant_level=1),
'Model': dbus.String('Bat1', variant_level=1),
'Serial': dbus.String('12345678', variant_level=1),
'Percentage': dbus.Double(10.0, variant_level=1),
'State': dbus.UInt32(UPowerGlib.DeviceState.DISCHARGING, variant_level=1),
'Type': dbus.UInt32(UPowerGlib.DeviceKind.MOUSE, variant_level=1),
'WarningLevel': dbus.UInt32(UPowerGlib.DeviceLevel.LOW, variant_level=1),
}, dbus.Array([], signature='(ssss)'))
obj_bat2 = self.system_bus_con.get_object('org.freedesktop.UPower', bat2_path)
self.obj_upower.EmitSignal('', 'DeviceAdded', 'o', [bat2_path],
dbus_interface='org.freedesktop.DBus.Mock')
time.sleep(1)
# we shouldn't have gotten a notification by now
notify_log = self.p_notify.stdout.read()
self.assertIsNone(notify_log)
# Disconnect mouse
self.obj_upower.RemoveObject(bat2_path)
time.sleep(0.5)
# Reconnect mouse with critical battery level
self.obj_upower.AddObject(bat2_path,
'org.freedesktop.UPower.Device',
{
'PowerSupply': dbus.Boolean(False, variant_level=1),
'IsPresent': dbus.Boolean(True, variant_level=1),
'Model': dbus.String('Bat1', variant_level=1),
'Serial': dbus.String('12345678', variant_level=1),
'Percentage': dbus.Double(5.0, variant_level=1),
'State': dbus.UInt32(UPowerGlib.DeviceState.DISCHARGING, variant_level=1),
'Type': dbus.UInt32(UPowerGlib.DeviceKind.MOUSE, variant_level=1),
'WarningLevel': dbus.UInt32(UPowerGlib.DeviceLevel.CRITICAL, variant_level=1),
}, dbus.Array([], signature='(ssss)'))
obj_bat2 = self.system_bus_con.get_object('org.freedesktop.UPower', bat2_path)
self.obj_upower.EmitSignal('', 'DeviceAdded', 'o', [bat2_path],
dbus_interface='org.freedesktop.DBus.Mock')
time.sleep(1)
# Verify new warning
self.check_plugin_log('EMIT: charge-critical', 2)
time.sleep(0.5)
# we should have gotten a notification by now
notify_log = self.p_notify.stdout.read()
# verify notification
self.assertRegex(notify_log, b'[0-9.]+ Notify "Power" .* ".*" ".*Wireless mouse .*very low.* power.*\([0-9.]+%\).*"')
def test_notify_device_battery_coarse_level(self):
'''critical power level notification for device batteries with coarse level'''
......
......@@ -445,6 +445,7 @@ _cc_rfkill_glib_open (CcRfkillGlib *rfkill,
/* Setup monitoring */
rfkill->channel = g_io_channel_unix_new (fd);
g_io_channel_set_encoding (rfkill->channel, NULL, NULL);
g_io_channel_set_buffered (rfkill->channel, FALSE);
rfkill->watch_id = g_io_add_watch (rfkill->channel,
G_IO_IN | G_IO_HUP | G_IO_ERR,
(GIOFunc) event_cb,
......
......@@ -154,7 +154,8 @@ dbus_call_log_error (GObject *source_object,
result = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object),
res,
&error);
if (result == NULL)
if (result == NULL &&
!g_error_matches (error, G_DBUS_ERROR, G_DBUS_ERROR_SERVICE_UNKNOWN))
g_warning ("%s: %s", msg, error->message);
}
......
This diff is collapsed.
......@@ -30,9 +30,9 @@
msgid ""
msgstr ""
"Project-Id-Version: gnome-settings-daemon master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/iss"
"ues\n"
"POT-Creation-Date: 2020-09-03 20:47+0000\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/"
"issues\n"
"POT-Creation-Date: 2020-10-28 13:36+0000\n"
"PO-Revision-Date: 2020-09-05 22:06+0200\n"
"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
"Language-Team: Deutsch <gnome-de@gnome.org>\n"
......@@ -1450,7 +1450,7 @@ msgid ""
"before it goes to sleep. A value of 0 means never."
msgstr ""
"Zeit in Sekunden, die der Rechner bei Netzanschluss inaktiv sein muss, bevor "
"er in den Energiesparmodus versetzt wird. Ein Wert von O bedeutet nie."
"er in den Energiesparmodus versetzt wird. Ein Wert von 0 bedeutet nie."
#: data/org.gnome.settings-daemon.plugins.power.gschema.xml.in:21
#: data/org.gnome.settings-daemon.plugins.power.gschema.xml.in:31
......@@ -1475,7 +1475,7 @@ msgid ""
"inactive before it goes to sleep. A value of 0 means never."
msgstr ""
"Zeit in Sekunden, die der Rechner im Akkubetrieb inaktiv sein muss, bevor er "
"in den Energiesparmodus versetzt wird. Ein Wert von O bedeutet nie."
"in den Energiesparmodus versetzt wird. Ein Wert von 0 bedeutet nie."
#: data/org.gnome.settings-daemon.plugins.power.gschema.xml.in:36
msgid "Enable the ALS sensor"
......@@ -1725,30 +1725,30 @@ msgstr ""
msgid "This computer has only %s disk space remaining."
msgstr "Auf diesem Rechner ist nur noch %s Speicherplatz verfügbar."
#: plugins/media-keys/gsd-media-keys-manager.c:2468
#: plugins/media-keys/gsd-media-keys-manager.c:2476
msgid "Bluetooth disabled"
msgstr "Bluetooth ist deaktiviert"
#: plugins/media-keys/gsd-media-keys-manager.c:2471
#: plugins/media-keys/gsd-media-keys-manager.c:2479
msgid "Bluetooth enabled"
msgstr "Bluetooth ist aktiviert"
#: plugins/media-keys/gsd-media-keys-manager.c:2475
#: plugins/media-keys/gsd-media-keys-manager.c:2483
msgid "Airplane mode enabled"
msgstr "Flugzeugmodus ist aktiviert"
#: plugins/media-keys/gsd-media-keys-manager.c:2478
#: plugins/media-keys/gsd-media-keys-manager.c:2486
msgid "Airplane mode disabled"
msgstr "Flugzeugmodus ist deaktiviert"
#: plugins/media-keys/gsd-media-keys-manager.c:2507
#: plugins/media-keys/gsd-media-keys-manager.c:2515
msgid "Hardware Airplane Mode"
msgstr "Hardware-Flugzeugmodus"
#. Translators: this is a filename used for screencast
#. * recording, where "%d" and "%t" date and time, e.g.
#. * "Screencast from 07-17-2013 10:00:46 PM.webm"
#: plugins/media-keys/gsd-media-keys-manager.c:2570
#: plugins/media-keys/gsd-media-keys-manager.c:2578
#, no-c-format
msgid "Screencast from %d %t.webm"
msgstr "Bildschirmvideo von %d %t.webm"
......@@ -2178,46 +2178,46 @@ msgstr ""
"Rechner wird deshalb nun heruntergefahren."
#. TRANSLATORS: this is the sound description
#: plugins/power/gsd-power-manager.c:1333
#: plugins/power/gsd-power-manager.c:1338
msgid "Lid has been opened"
msgstr "Klappe wurde geöffnet"
#. TRANSLATORS: this is the sound description
#: plugins/power/gsd-power-manager.c:1367
#: plugins/power/gsd-power-manager.c:1372
msgid "Lid has been closed"
msgstr "Klappe wurde geschlossen"
#. TRANSLATORS: this is the sound description
#: plugins/power/gsd-power-manager.c:1934
#: plugins/power/gsd-power-manager.c:1946
msgid "On battery power"
msgstr "Batteriebetrieb"
#. TRANSLATORS: this is the sound description
#: plugins/power/gsd-power-manager.c:1939
#: plugins/power/gsd-power-manager.c:1951
msgid "On AC power"
msgstr "Netzbetrieb"
#: plugins/power/gsd-power-manager.c:2127
#: plugins/power/gsd-power-manager.c:2139
msgid "Automatic logout"
msgstr "Automatisch abmelden"
#: plugins/power/gsd-power-manager.c:2127
#: plugins/power/gsd-power-manager.c:2139
msgid "You will soon log out because of inactivity."
msgstr "Aufgrund von Inaktivität werden Sie bald abgemeldet."
# oder Automatischer Bereitschaftsmodus
#: plugins/power/gsd-power-manager.c:2132
#: plugins/power/gsd-power-manager.c:2144
msgid "Automatic suspend"
msgstr "Automatisch in den Bereitschaftsmodus wechseln"
#: plugins/power/gsd-power-manager.c:2132
#: plugins/power/gsd-power-manager.c:2137
#: plugins/power/gsd-power-manager.c:2144
#: plugins/power/gsd-power-manager.c:2149
msgid "Computer will suspend very soon because of inactivity."
msgstr ""
"Aufgrund von Inaktivität wird der Rechner bald in Bereitschaft versetzt."
# oder Automatischer Ruhezustand
#: plugins/power/gsd-power-manager.c:2137
#: plugins/power/gsd-power-manager.c:2149
msgid "Automatic hibernation"
msgstr "Automatisch in den Ruhezustand wechseln"
......@@ -2509,23 +2509,18 @@ msgstr ""
"Geräte prüfen."
#: plugins/usb-protection/gsd-usb-protection-manager.c:589
#| msgid "New keyboard detected"
msgid "New device detected"
msgstr "Neues Gerät erkannt"
#: plugins/usb-protection/gsd-usb-protection-manager.c:590
#| msgid ""
#| "Either your keyboard has been reconnected or a new one has been plugged "
#| "in. If you did not do it, check your system for any suspicious device."
msgid ""
"Either one of your existing devices has been reconnected or a new one has "
"been plugged in. If you did not do it, check your system for any suspicious "
"device."
msgstr ""
"Entweder wurde eines Ihrer vorhandenen Geräte neu verbunden oder ein neues"
" Gerät wurde "
"angeschlossen. Falls Sie nichts dergleichen getan haben, sollten Sie Ihr "
"System auf verdächtige Geräte prüfen."
"Entweder wurde eines Ihrer vorhandenen Geräte neu verbunden oder ein neues "
"Gerät wurde angeschlossen. Falls Sie nichts dergleichen getan haben, sollten "
"Sie Ihr System auf verdächtige Geräte prüfen."
#: plugins/usb-protection/gsd-usb-protection-manager.c:596
msgid "Reconnect USB device"
......
......@@ -8,8 +8,8 @@ msgstr ""
"Project-Id-Version: gnome-settings-daemon master\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/"
"issues\n"
"POT-Creation-Date: 2020-09-03 20:47+0000\n"
"PO-Revision-Date: 2020-10-08 19:26+0200\n"
"POT-Creation-Date: 2020-10-08 17:28+0000\n"
"PO-Revision-Date: 2020-10-18 16:41+0200\n"
"Last-Translator: Fabio Tomat <f.t.public@gmail.com>\n"
"Language-Team: Friulian <fur@li.org>\n"
"Language: fur\n"
......@@ -366,7 +366,7 @@ msgstr "Etichete boton pal visôr OLED."
#: data/org.gnome.settings-daemon.peripherals.wacom.gschema.xml.in:89
msgid "Label will be rendered to OLED display belonging to the button"
msgstr "La etichete che e vegnarà mostrade sul schermi OLED dal boton"
msgstr "La etichete che e vignarà mostrade sul schermi OLED dal boton"
#: data/org.gnome.settings-daemon.plugins.color.gschema.xml.in:6
msgid "The duration a display profile is valid"
......@@ -1666,30 +1666,30 @@ msgstr ""
msgid "This computer has only %s disk space remaining."
msgstr "Su chest computer a restin nome %s di spazi disc."
#: plugins/media-keys/gsd-media-keys-manager.c:2468
#: plugins/media-keys/gsd-media-keys-manager.c:2476
msgid "Bluetooth disabled"
msgstr "Bluetooth disabilitât"
#: plugins/media-keys/gsd-media-keys-manager.c:2471
#: plugins/media-keys/gsd-media-keys-manager.c:2479
msgid "Bluetooth enabled"
msgstr "Bluetooth abilitât"
#: plugins/media-keys/gsd-media-keys-manager.c:2475
#: plugins/media-keys/gsd-media-keys-manager.c:2483
msgid "Airplane mode enabled"
msgstr "Modalitât avion abilitade"
#: plugins/media-keys/gsd-media-keys-manager.c:2478
#: plugins/media-keys/gsd-media-keys-manager.c:2486
msgid "Airplane mode disabled"
msgstr "Modalitât avion disabilitade"
#: plugins/media-keys/gsd-media-keys-manager.c:2507
#: plugins/media-keys/gsd-media-keys-manager.c:2515
msgid "Hardware Airplane Mode"
msgstr "Modalitât avion vie hardware abilitade"
#. Translators: this is a filename used for screencast
#. * recording, where "%d" and "%t" date and time, e.g.
#. * "Screencast from 07-17-2013 10:00:46 PM.webm"
#: plugins/media-keys/gsd-media-keys-manager.c:2570
#: plugins/media-keys/gsd-media-keys-manager.c:2578
#, no-c-format
msgid "Screencast from %d %t.webm"
msgstr "Cature dal scritori di %d %t.webm"
......@@ -1934,7 +1934,7 @@ msgstr "Cjarie batarie dal portatil cuasi esauride"
#, c-format
msgid "Computer will hibernate very soon unless it is plugged in."
msgstr ""
"Se nol ven tacât subite ae prese di alimentazion, il computer al vegnarà "
"Se nol ven tacât subite ae prese di alimentazion, il computer al vignarà "
"metût in ibernazion."
#. TRANSLATORS: give the user a ultimatum
......@@ -1942,7 +1942,7 @@ msgstr ""
#, c-format
msgid "Computer will shutdown very soon unless it is plugged in."
msgstr ""
"Se nol ven tacât subite ae prese di alimentazion, il computer al vegnarà "
"Se nol ven tacât subite ae prese di alimentazion, il computer al vignarà "
"studât."
#. TRANSLATORS: the UPS is very low
......@@ -2147,7 +2147,7 @@ msgstr "Tiermin session automatic"
#: plugins/power/gsd-power-manager.c:2127
msgid "You will soon log out because of inactivity."
msgstr "Chi di pôc la session e vegnarà terminade par vie de inativitât."
msgstr "Chi di pôc la session e vignarà terminade par vie de inativitât."
#: plugins/power/gsd-power-manager.c:2132
msgid "Automatic suspend"
......@@ -2156,7 +2156,7 @@ msgstr "Sospension automatiche"
#: plugins/power/gsd-power-manager.c:2132
#: plugins/power/gsd-power-manager.c:2137
msgid "Computer will suspend very soon because of inactivity."
msgstr "Chi di pôc il computer al vegnarà sospindût par vie de inativitât."
msgstr "Chi di pôc il computer al vignarà sospindût par vie de inativitât."
#: plugins/power/gsd-power-manager.c:2137
msgid "Automatic hibernation"
......@@ -2448,23 +2448,18 @@ msgstr ""
"suspiet."
#: plugins/usb-protection/gsd-usb-protection-manager.c:589
#, fuzzy
#| msgid "New keyboard detected"
msgid "New device detected"
msgstr "Gnove tastiere rilevade"
msgstr "Gnûf dispositîf rilevât"
#: plugins/usb-protection/gsd-usb-protection-manager.c:590
#, fuzzy
#| msgid ""
#| "Either your keyboard has been reconnected or a new one has been plugged "
#| "in. If you did not do it, check your system for any suspicious device."
msgid ""
"Either one of your existing devices has been reconnected or a new one has "
"been plugged in. If you did not do it, check your system for any suspicious "
"device."
msgstr ""
"O si à tornât a coneti la tastiere opûr e je stade tacade une gnove. Se nol "
"è stât fat, controle che il sisteme nol vedi nissun dispositîf suspiet."
"O si à tornât a coneti un dai tiei dispositîfs esistents opûr al è stât "
"tacât un gnûf. Se nol è stât fat, controle che il sisteme nol vedi nissun "
"dispositîf suspiet."
#: plugins/usb-protection/gsd-usb-protection-manager.c:596
msgid "Reconnect USB device"
......@@ -2525,88 +2520,79 @@ msgstr ""
#: plugins/wwan/cc-wwan-errors-private.h:40
msgid "Phone failure"
msgstr ""
msgstr "Erôr dal telefon"
#: plugins/wwan/cc-wwan-errors-private.h:41
#, fuzzy
#| msgid "Not connected?"
msgid "No connection to phone"
msgstr "No conetude?"
msgstr "Nissune conession al telefon"
#: plugins/wwan/cc-wwan-errors-private.h:43
msgid "Operation not allowed"
msgstr ""
msgstr "Operazion no permetude"
#: plugins/wwan/cc-wwan-errors-private.h:44
msgid "Operation not supported"
msgstr ""
msgstr "Operazion no supuartade"
#: plugins/wwan/cc-wwan-errors-private.h:48
msgid "SIM not inserted"
msgstr ""
msgstr "Schede SIM no inseride"
#: plugins/wwan/cc-wwan-errors-private.h:49
msgid "SIM PIN required"
msgstr ""
msgstr "Necessari codiç PIN de SIM"
#: plugins/wwan/cc-wwan-errors-private.h:50
msgid "SIM PUK required"
msgstr ""
msgstr "Necessari codiç PUK de SIM"
#: plugins/wwan/cc-wwan-errors-private.h:51
msgid "SIM failure"
msgstr ""
msgstr "Erôr de schede SIM"
#: plugins/wwan/cc-wwan-errors-private.h:52
msgid "SIM busy"
msgstr ""
msgstr "Schede SIM ocupade"
#: plugins/wwan/cc-wwan-errors-private.h:53
msgid "SIM wrong"
msgstr ""
msgstr "Schede SIM sbaliade"
#: plugins/wwan/cc-wwan-errors-private.h:54
msgid "Incorrect password"
msgstr ""
msgstr "Password sbaliade"
#: plugins/wwan/cc-wwan-errors-private.h:55
msgid "SIM PIN2 required"
msgstr ""
msgstr "Necessari codiç PIN2 de SIM"
#: plugins/wwan/cc-wwan-errors-private.h:56
msgid "SIM PUK2 required"
msgstr ""
msgstr "Necessari codiç PUK2 de SIM"
#: plugins/wwan/cc-wwan-errors-private.h:72
#, fuzzy
#| msgid "Unknown time"
msgid "Unknown error"
msgstr "Timp no cognossût"
msgstr "Erôr no cognossût"
#: plugins/wwan/cc-wwan-errors-private.h:91
#, fuzzy
#| msgctxt "print job state"
#| msgid "Printing canceled"
msgid "Action Cancelled"
msgstr "Stampe anulade"
msgstr "Azion anulade"
#: plugins/wwan/cc-wwan-errors-private.h:94
msgid "Access denied"
msgstr ""
msgstr "Acès dineât"
#: plugins/wwan/cc-wwan-errors-private.h:103
#, fuzzy
#| msgid "Unknown time"
msgid "Unknown Error"
msgstr "Timp no cognossût"
msgstr "Erôr no cognossût"
#: plugins/wwan/gsd-wwan-manager.c:117
msgid "New PIN for SIM"
msgstr ""
msgstr "Gnûf codiç PIN pe SIM"
#: plugins/wwan/gsd-wwan-manager.c:118
msgid "Set"
msgstr ""
msgstr "Stabilìs"
#: plugins/wwan/gsd-wwan-manager.c:120
msgid "Unlock SIM card"
......@@ -2621,16 +2607,13 @@ msgid "Cancel"
msgstr "Anule"
#: plugins/wwan/gsd-wwan-manager.c:129
#, fuzzy, c-format
#| msgid "Please provide the PIN for SIM card %s"
#, c-format
msgid "Please provide a new PIN for SIM card %s"
msgstr "Par plasê furnìs il PIN pe schede SIM %s"
msgstr "Par plasê furnìs un gnûf codiç PIN pe schede SIM %s"
#: plugins/wwan/gsd-wwan-manager.c:131
#, fuzzy
#| msgid "Enter PIN to unlock your SIM card"
msgid "Enter a New PIN to unlock your SIM card"
msgstr "Inserìs il PIN par sblocâ la tô schede SIM"
msgstr "Inserìs un gnûf codiç PIN par sblocâ la tô schede SIM"
#: plugins/wwan/gsd-wwan-manager.c:133
#, c-format
......@@ -2642,26 +2625,21 @@ msgid "Enter PIN to unlock your SIM card"
msgstr "Inserìs il PIN par sblocâ la tô schede SIM"
#: plugins/wwan/gsd-wwan-manager.c:138
#, fuzzy, c-format
#| msgid "Please provide the PIN for SIM card %s"
#, c-format
msgid "Please provide the PUK for SIM card %s"
msgstr "Par plasê furnìs il PIN pe schede SIM %s"
msgstr "Par plasê furnìs il codiç PUK pe schede SIM %s"
#: plugins/wwan/gsd-wwan-manager.c:140
#, fuzzy
#| msgid "Enter PIN to unlock your SIM card"
msgid "Enter PUK to unlock your SIM card"
msgstr "Inserìs il PIN par sblocâ la tô schede SIM"
msgstr "Inserìs il codiç PUK par sblocâ la tô schede SIM"
#. msg is already localised
#: plugins/wwan/gsd-wwan-manager.c:156
#, fuzzy, c-format
#| msgid "%2$s You have %1$u try left"
#| msgid_plural "%2$s You have %1$u tries left"
#, c-format
msgid "%2$s. You have %1$u try left"
msgid_plural "%2$s. You have %1$u tries left"
msgstr[0] "%2$s Tu âs ancjemò %1$u tentatîf"
msgstr[1] "%2$s Tu âs ancjemò %1$u tentatîfs"
msgstr[0] "%2$s. Tu âs ancjemò %1$u tentatîf"
msgstr[1] "%2$s. Tu âs ancjemò %1$u tentatîfs"
#: plugins/wwan/gsd-wwan-manager.c:160
#, c-format
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -94,7 +94,10 @@ class X11SessionTestCase(DBusTestCase):
klass.X_display = display
# Export information into our environment for tests to use
os.environ['DISPLAY'] = ":%d" % klass.X_display
os.environ['WAYLAND'] = ''
if 'GNOME_SETUP_DISPLAY' in os.environ:
del os.environ['GNOME_SETUP_DISPLAY']
if 'WAYLAND_DISPLAY' in os.environ:
del os.environ['WAYLAND_DISPLAY']
# Server should still be up and running at this point
assert klass.xorg.poll() is None
......