Skip to content
Commits on Source (65)
===============
Version 3.37.92
===============
- Translation updates
USB-protection:
- Relax the whitelist to all HIDs and HUBs
==============
Version 3.37.1
==============
- Translation updates
WWan:
- Translatable string improvements
Media-keys:
- Use well-known name for screencast proxy
Xsettings:
- Fix race condition in fontconfig timestamp test
Power:
- Drop lid switch inhibitor when session is inactive
==============
Version 3.37.0
==============
......
gnome-settings-daemon (3.37.92-1ubuntu1) groovy; urgency=medium
* Merge with debian, remaining changes:
+ debian/control.in:
- Build-depend on accountsservice
+ debian/patches:
- 45_suppress-printer-may-not-be-connected-notification.patch
- 53_sync_input_sources_to_accountsservice.patch
- 64_restore_terminal_keyboard_shortcut_schema.patch
- correct_logout_action.patch
display the logout action on ctrl-alt-del
- ubuntu-lid-close-suspend.patch
Reimplement support for setting lid close suspend actions
- revert-wacom-migration.patch
- revert-gsettings-removals.patch
Revert gsettings keys that were dropped since 3.8, for u-s-d
- revert-mediakeys-dbus-interface-drop.patch
- ubuntu_ibus_configs.patch
- git_binary_encoding.patch
- ubuntu_calculator_snap.patch
- ubuntu_vino_handling.patch: restore support to handle vino service
+ debian/gnome-settings-daemon.install:
- Install apport hook
-- Iain Lane <iain.lane@canonical.com> Fri, 11 Sep 2020 17:37:48 +0100
gnome-settings-daemon (3.37.92-1) experimental; urgency=medium
* Team upload
* New upstream release
- Translation updates
- USB protection: Relax the whitelist to all HIDs and hubs
- Translation updates
- WWAN: Translatable string improvements
- Media keys: Use well-known name for screencast proxy
- Xsettings: Fix race condition in fontconfig timestamp test
- Power: Drop lid switch inhibitor when session is inactive
-- Simon McVittie <smcv@debian.org> Mon, 07 Sep 2020 15:00:10 +0100
gnome-settings-daemon (3.37.0-1ubuntu2) groovy; urgency=medium
* debian/control: Bump Breaks on gnome-{shell,session} & gdm3
......
......@@ -9,7 +9,7 @@ Subject: _sync_input_sources_to_accountsservice
3 files changed, 80 insertions(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index f0aa4a8..8d0d1d0 100644
index af59200..a2fd67c 100644
--- a/meson.build
+++ b/meson.build
@@ -89,6 +89,7 @@ endif
......@@ -18,8 +18,8 @@ index f0aa4a8..8d0d1d0 100644
+accountsservice_dep = dependency('accountsservice')
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
colord_dep = dependency('colord', version: '>= 1.3.5')
geocode_glib_dep = dependency('geocode-glib-1.0', version: '>= 3.10.0')
gio_dep = dependency('gio-2.0', version: '>= 2.53.0')
diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
index 2feb87e..f5fde93 100644
--- a/plugins/keyboard/gsd-keyboard-manager.c
......
......@@ -38,7 +38,7 @@ index fb0c85c..5a05d7f 100644
<default>['']</default>
<summary>Launch web browser</summary>
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index d25f812..9830d21 100644
index ae5411e..8c38590 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1132,6 +1132,22 @@ gnome_session_shutdown_cb (GObject *source_object,
......
......@@ -13,7 +13,7 @@ Subject: correct_logout_action
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 9830d21..4edf555 100644
index 8c38590..677a31a 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -1168,6 +1168,12 @@ gnome_session_shutdown (GsdMediaKeysManager *manager)
......
......@@ -10,10 +10,10 @@ Forwarded: not-needed
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index b794652..f0aa4a8 100644
index 65ddb98..af59200 100644
--- a/meson.build
+++ b/meson.build
@@ -105,7 +105,7 @@ libgeoclue_dep = dependency('libgeoclue-2.0', version: '>= 2.3.1')
@@ -104,7 +104,7 @@ libgeoclue_dep = dependency('libgeoclue-2.0', version: '>= 2.3.1')
libnotify_dep = dependency('libnotify', version: '>= 0.7.3')
libpulse_mainloop_glib_dep = dependency('libpulse-mainloop-glib', version: '>= 2.0')
pango_dep = dependency('pango', version: '>= 1.20.0')
......
......@@ -713,7 +713,7 @@ index ce45ac6..e91be62 100644
<default>'grayscale'</default>
<summary>Antialiasing</summary>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1bd6ffc..5361119 100644
index e721f52..db345ff 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -3,11 +3,16 @@
......
......@@ -9,7 +9,7 @@ https://mail.gnome.org/archives/distributor-list/2017-April/msg00009.html
1 file changed, 11 insertions(+)
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 4edf555..b9ad715 100644
index 677a31a..5307d79 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -246,6 +246,7 @@ typedef struct
......
......@@ -7,7 +7,7 @@ Subject: teach gsd about the gnome-calculator snap .desktop name
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index b9ad715..0b22706 100644
index 5307d79..a1d1d95 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -2722,7 +2722,7 @@ do_action (GsdMediaKeysManager *manager,
......
project(
'gnome-settings-daemon', 'c',
version: '3.37.0',
version: '3.37.92',
license: [ 'GPL2+', 'LGPLv2+' ],
meson_version: '>= 0.47.0'
)
......@@ -90,7 +90,6 @@ endif
add_project_arguments(common_flags + compiler_flags, language: 'c')
glib_dep = dependency('glib-2.0', version: '>=' + glib_min_version)
colord_dep = dependency('colord', version: '>= 1.3.5')
geocode_glib_dep = dependency('geocode-glib-1.0', version: '>= 3.10.0')
gio_dep = dependency('gio-2.0', version: '>= 2.53.0')
gio_unix_dep = dependency('gio-unix-2.0')
......@@ -225,6 +224,12 @@ if enable_network_manager
endif
config_h.set10('HAVE_NETWORK_MANAGER', enable_network_manager)
# colord
enable_colord = get_option('colord')
if enable_colord
colord_dep = dependency('colord', version: '>= 1.3.5')
endif
gnome = import('gnome')
i18n = import('i18n')
pkg = import('pkgconfig')
......
......@@ -11,3 +11,4 @@ option('smartcard', type: 'boolean', value: true, description: 'build with smart
option('usb-protection', type: 'boolean', value: true, description: 'build with usb-protection support')
option('wayland', type: 'boolean', value: true, description: 'build with Wayland support')
option('wwan', type: 'boolean', value: true, description: 'build with WWAN support')
option('colord', type: 'boolean', value: true, description: 'build with colord support')
......@@ -3107,14 +3107,6 @@ shell_presence_changed (GsdMediaKeysManager *manager)
SHELL_DBUS_PATH,
priv->grab_cancellable,
on_key_grabber_ready, manager);
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
0, NULL,
name_owner,
SHELL_DBUS_PATH "/Screencast",
SHELL_DBUS_NAME ".Screencast",
priv->screencast_cancellable,
on_screencast_proxy_ready, manager);
g_free (name_owner);
}
}
......@@ -3205,6 +3197,14 @@ start_media_keys_idle_cb (GsdMediaKeysManager *manager)
G_CALLBACK (shell_presence_changed), manager);
shell_presence_changed (manager);
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
0, NULL,
SHELL_DBUS_NAME ".Screencast",
SHELL_DBUS_PATH "/Screencast",
SHELL_DBUS_NAME ".Screencast",
priv->screencast_cancellable,
on_screencast_proxy_ready, manager);
priv->rfkill_watch_id = g_bus_watch_name (G_BUS_TYPE_SESSION,
"org.gnome.SettingsDaemon.Rfkill",
G_BUS_NAME_WATCHER_FLAGS_NONE,
......
......@@ -44,6 +44,10 @@ if not enable_wwan
disabled_plugins += ['wwan']
endif
if not enable_colord
disabled_plugins += ['color']
endif
# Specify futher required units, 'before' or 'after' may be specified if ordering is needed
plugin_gate_units = {
'xsettings': [
......
......@@ -222,6 +222,7 @@ static void engine_device_warning_changed_cb (UpDevice *device, GParamSpec
static void do_power_action_type (GsdPowerManager *manager, GsdPowerActionType action_type);
static void uninhibit_lid_switch (GsdPowerManager *manager);
static void stop_inhibit_lid_switch_timer (GsdPowerManager *manager);
static void sync_lid_inhibitor (GsdPowerManager *manager);
static void main_battery_or_ups_low_changed (GsdPowerManager *manager, gboolean is_low);
static gboolean idle_is_session_inhibited (GsdPowerManager *manager, guint mask, gboolean *is_inhibited);
static void idle_triggered_idle_cb (GnomeIdleMonitor *monitor, guint watch_id, gpointer user_data);
......@@ -1268,7 +1269,7 @@ upower_kbd_toggle (GsdPowerManager *manager,
static gboolean
suspend_on_lid_close (GsdPowerManager *manager)
{
return !external_monitor_is_connected (manager->rr_screen);
return !external_monitor_is_connected (manager->rr_screen) || !manager->session_is_active;
}
static gboolean
......@@ -1277,7 +1278,7 @@ inhibit_lid_switch_timer_cb (GsdPowerManager *manager)
stop_inhibit_lid_switch_timer (manager);
if (suspend_on_lid_close (manager)) {
g_debug ("no external monitors for a while; uninhibiting lid close");
g_debug ("no external monitors or session inactive for a while; uninhibiting lid close");
uninhibit_lid_switch (manager);
}
......@@ -2264,6 +2265,7 @@ engine_session_properties_changed_cb (GDBusProxy *session,
}
g_variant_unref (v);
sync_lid_inhibitor (manager);
}
v = g_variant_lookup_value (changed, "InhibitedActions", G_VARIANT_TYPE_UINT32);
......@@ -2415,11 +2417,9 @@ uninhibit_suspend (GsdPowerManager *manager)
}
static void
on_randr_event (GnomeRRScreen *screen, gpointer user_data)
sync_lid_inhibitor (GsdPowerManager *manager)
{
GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
g_debug ("Screen configuration changed");
g_debug ("Syncing lid inhibitor and grabbing it temporarily");
/* Uninhibiting is done in inhibit_lid_switch_timer_cb,
* since we want to give users a few seconds when unplugging
......@@ -2429,6 +2429,16 @@ on_randr_event (GnomeRRScreen *screen, gpointer user_data)
restart_inhibit_lid_switch_timer (manager);
}
static void
on_randr_event (GnomeRRScreen *screen, gpointer user_data)
{
GsdPowerManager *manager = GSD_POWER_MANAGER (user_data);
g_debug ("Screen configuration changed");
sync_lid_inhibitor (manager);
}
static void
handle_suspend_actions (GsdPowerManager *manager)
{
......@@ -2486,13 +2496,6 @@ on_rr_screen_acquired (GObject *object,
return;
}
/* set up the screens */
if (manager->lid_is_present) {
g_signal_connect (manager->rr_screen, "changed", G_CALLBACK (on_randr_event), manager);
watch_external_monitor (manager->rr_screen);
on_randr_event (manager->rr_screen, manager);
}
/* Resolve screen backlight */
manager->backlight = gsd_backlight_new (manager->rr_screen, NULL);
......@@ -2515,6 +2518,13 @@ on_rr_screen_acquired (GObject *object,
manager, 0);
manager->session_is_active = is_session_active (manager);
/* set up the screens */
if (manager->lid_is_present) {
g_signal_connect (manager->rr_screen, "changed", G_CALLBACK (on_randr_event), manager);
watch_external_monitor (manager->rr_screen);
on_randr_event (manager->rr_screen, manager);
}
manager->screensaver_proxy = gnome_settings_bus_get_screen_saver_proxy ();
g_signal_connect (manager->screensaver_proxy, "g-signal",
......
......@@ -421,25 +421,36 @@ static void authorize_device (GDBusProxy *proxy,
}
static gboolean
is_only_hid (GVariant *device)
is_hid_or_hub (GVariant *device,
gboolean *has_other_classes)
{
g_autoptr(GVariantIter) iter = NULL;
g_autofree gchar *name = NULL;
g_autofree gchar *value = NULL;
guint i;
gboolean only_hid = TRUE;
gboolean is_hid_or_hub = FALSE;
if (has_other_classes != NULL) {
*has_other_classes = FALSE;
}
g_variant_get_child (device, PRESENCE_ATTRIBUTES, "a{ss}", &iter);
while (g_variant_iter_loop (iter, "{ss}", &name, &value)) {
if (g_strcmp0 (name, WITH_INTERFACE) == 0) {
g_auto(GStrv) interfaces_splitted = NULL;
interfaces_splitted = g_strsplit (value, " ", -1);
for (i = 0; i < g_strv_length (interfaces_splitted); i++)
if (!g_str_has_prefix (interfaces_splitted[i], "03:"))
only_hid = FALSE;
for (i = 0; i < g_strv_length (interfaces_splitted); i++) {
if (g_str_has_prefix (interfaces_splitted[i], "03:")
|| g_str_has_prefix (interfaces_splitted[i], "09:")) {
is_hid_or_hub = TRUE;
}
else if (has_other_classes != NULL) {
*has_other_classes = TRUE;
}
}
}
}
return only_hid;
return is_hid_or_hub;
}
static gboolean
......@@ -458,23 +469,6 @@ is_hardwired (GVariant *device)
return FALSE;
}
static gboolean
is_keyboard (GVariant *device)
{
g_autoptr(GVariantIter) iter = NULL;
g_autofree gchar *name = NULL;
g_autofree gchar *value = NULL;
g_variant_get_child (device, PRESENCE_ATTRIBUTES, "a{ss}", &iter);
while (g_variant_iter_loop (iter, "{ss}", &name, &value)) {
if (g_strcmp0 (name, WITH_INTERFACE) == 0) {
return g_strrstr (value, "03:00:01") != NULL ||
g_strrstr (value, "03:01:01") != NULL;
}
}
return FALSE;
}
static void
auth_device (GsdUsbProtectionManager *manager,
GVariant *device)
......@@ -528,6 +522,8 @@ on_usbguard_signal (GDBusProxy *proxy,
g_autoptr(GVariantIter) iter = NULL;
g_autofree gchar *name = NULL;
g_autofree gchar *device_name = NULL;
gboolean hid_or_hub = FALSE;
gboolean has_other_classes = FALSE;
g_debug ("USBGuard signal: %s", signal_name);
......@@ -578,18 +574,20 @@ on_usbguard_signal (GDBusProxy *proxy,
protection_level = g_settings_get_enum (manager->settings, USB_PROTECTION_LEVEL);
g_debug ("Screensaver active: %d", manager->screensaver_active);
hid_or_hub = is_hid_or_hub (parameters, &has_other_classes);
if (manager->screensaver_active) {
/* If the session is locked we check if the inserted device is a keyboard.
* If that is the case we authorize the newly inserted keyboard as an
/* If the session is locked we check if the inserted device is a HID,
* e.g. a keyboard or a mouse, or an HUB.
* If that is the case we authorize the newly inserted device as an
* antilockout policy.
*
* If this keyboard advertises also interfaces outside the HID class it is suspect.
* It could be a false positive because this could be a "smart" keyboard, but at
* this stage is better be safe. */
if (is_keyboard (parameters) && is_only_hid (parameters)) {
* If this device advertises also interfaces outside the HID class, or the
* HUB class, it is suspect. It could be a false positive because this could
* be a "smart" keyboard for example, but at this stage is better be safe. */
if (hid_or_hub && !has_other_classes) {
show_notification (manager,
_("New keyboard detected"),
_("Either your keyboard has been reconnected or a new one has been plugged in. "
_("New device detected"),
_("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."));
auth_device (manager, parameters);
} else {
......@@ -611,14 +609,15 @@ on_usbguard_signal (GDBusProxy *proxy,
/* If the protection level is "lockscreen" the device will be automatically
* authorized by usbguard. */
if (protection_level == G_DESKTOP_USB_PROTECTION_ALWAYS) {
/* We authorize the device if this is a keyboard.
/* We authorize the device if this is a HID,
* e.g. a keyboard or a mouse, or an HUB.
* We also lock the screen to prevent an attacker to plug malicious
* devices if the legitimate user forgot to lock his session.
*
* If this keyboard advertises also interfaces outside the HID class it is suspect.
* It could be a false positive because this could be a "smart" keyboard, but at
* this stage is better be safe. */
if (is_keyboard (parameters) && is_only_hid (parameters)) {
* If this device advertises also interfaces outside the HID class, or the
* HUB class, it is suspect. It could be a false positive because this could
* be a "smart" keyboard for example, but at this stage is better be safe. */
if (hid_or_hub && !has_other_classes) {
gsd_screen_saver_call_lock (manager->screensaver_proxy,
manager->cancellable,
(GAsyncReadyCallback) on_screen_locked,
......
......@@ -975,6 +975,13 @@ cc_wwan_device_get_string_from_mode (CcWwanDevice *self,
g_return_val_if_fail (CC_IS_WWAN_DEVICE (self), NULL);
g_return_val_if_fail (allowed != 0, NULL);
if (allowed == MM_MODEM_MODE_2G)
return g_strdup (_("2G Only"));
if (allowed == MM_MODEM_MODE_3G)
return g_strdup (_("3G Only"));
if (allowed == MM_MODEM_MODE_4G)
return g_strdup (_("4G Only"));
str = g_string_sized_new (10);
if (allowed & MM_MODEM_MODE_2G)
......@@ -984,11 +991,6 @@ cc_wwan_device_get_string_from_mode (CcWwanDevice *self,
if (allowed & MM_MODEM_MODE_4G)
APPEND_MODE_TO_STRING (str, MM_MODEM_MODE_4G, preferred, "4G");
if (allowed == MM_MODEM_MODE_2G ||
allowed == MM_MODEM_MODE_3G ||
allowed == MM_MODEM_MODE_4G)
g_string_append (str, _(" Only"));
if (str->len == 0)
return g_string_free (str, TRUE);
else
......
......@@ -39,12 +39,12 @@ typedef struct {
static ErrorTable me_errors[] = {
{ MM_MOBILE_EQUIPMENT_ERROR_PHONE_FAILURE, N_("Phone failure") },
{ MM_MOBILE_EQUIPMENT_ERROR_NO_CONNECTION, N_("No connection to phone") },
{ MM_MOBILE_EQUIPMENT_ERROR_LINK_RESERVED, N_("Phone-adaptor link reserved") },
{ MM_MOBILE_EQUIPMENT_ERROR_LINK_RESERVED, "Phone-adaptor link reserved" },
{ MM_MOBILE_EQUIPMENT_ERROR_NOT_ALLOWED, N_("Operation not allowed") },
{ MM_MOBILE_EQUIPMENT_ERROR_NOT_SUPPORTED, N_("Operation not supported") },
{ MM_MOBILE_EQUIPMENT_ERROR_PH_SIM_PIN, N_("PH-SIM PIN required") },
{ MM_MOBILE_EQUIPMENT_ERROR_PH_FSIM_PIN, N_("PH-FSIM PIN required") },
{ MM_MOBILE_EQUIPMENT_ERROR_PH_FSIM_PUK, N_("PH-FSIM PUK required") },
{ MM_MOBILE_EQUIPMENT_ERROR_PH_SIM_PIN, "PH-SIM PIN required" },
{ MM_MOBILE_EQUIPMENT_ERROR_PH_FSIM_PIN, "PH-FSIM PIN required" },
{ MM_MOBILE_EQUIPMENT_ERROR_PH_FSIM_PUK, "PH-FSIM PUK required" },
{ MM_MOBILE_EQUIPMENT_ERROR_SIM_NOT_INSERTED, N_("SIM not inserted") },
{ MM_MOBILE_EQUIPMENT_ERROR_SIM_PIN, N_("SIM PIN required") },
{ MM_MOBILE_EQUIPMENT_ERROR_SIM_PUK, N_("SIM PUK required") },
......@@ -54,34 +54,34 @@ static ErrorTable me_errors[] = {
{ MM_MOBILE_EQUIPMENT_ERROR_INCORRECT_PASSWORD, N_("Incorrect password") },
{ MM_MOBILE_EQUIPMENT_ERROR_SIM_PIN2, N_("SIM PIN2 required") },
{ MM_MOBILE_EQUIPMENT_ERROR_SIM_PUK2, N_("SIM PUK2 required") },
{ MM_MOBILE_EQUIPMENT_ERROR_MEMORY_FULL, N_("Memory full") },
{ MM_MOBILE_EQUIPMENT_ERROR_INVALID_INDEX, N_("Invalid index") },
{ MM_MOBILE_EQUIPMENT_ERROR_NOT_FOUND, N_("Not found") },
{ MM_MOBILE_EQUIPMENT_ERROR_MEMORY_FAILURE, N_("Memory failure") },
{ MM_MOBILE_EQUIPMENT_ERROR_NO_NETWORK, N_("No network service") },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT, N_("Network timeout") },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_NOT_ALLOWED, N_("Network not allowed - emergency calls only") },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_PIN, N_("Network personalization PIN required") },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_PUK, N_("Network personalization PUK required") },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_SUBSET_PIN, N_("Network subset personalization PIN required") },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_SUBSET_PUK, N_("Network subset personalization PUK required") },
{ MM_MOBILE_EQUIPMENT_ERROR_SERVICE_PIN, N_("Service provider personalization PIN required") },
{ MM_MOBILE_EQUIPMENT_ERROR_SERVICE_PUK, N_("Service provider personalization PUK required") },
{ MM_MOBILE_EQUIPMENT_ERROR_CORP_PIN, N_("Corporate personalization PIN required") },
{ MM_MOBILE_EQUIPMENT_ERROR_CORP_PUK, N_("Corporate personalization PUK required") },
{ MM_MOBILE_EQUIPMENT_ERROR_MEMORY_FULL, "Memory full" },
{ MM_MOBILE_EQUIPMENT_ERROR_INVALID_INDEX, "Invalid index" },
{ MM_MOBILE_EQUIPMENT_ERROR_NOT_FOUND, "Not found" },
{ MM_MOBILE_EQUIPMENT_ERROR_MEMORY_FAILURE, "Memory failure" },
{ MM_MOBILE_EQUIPMENT_ERROR_NO_NETWORK, "No network service" },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_TIMEOUT, "Network timeout" },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_NOT_ALLOWED, "Network not allowed - emergency calls only" },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_PIN, "Network personalization PIN required" },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_PUK, "Network personalization PUK required" },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_SUBSET_PIN, "Network subset personalization PIN required" },
{ MM_MOBILE_EQUIPMENT_ERROR_NETWORK_SUBSET_PUK, "Network subset personalization PUK required" },
{ MM_MOBILE_EQUIPMENT_ERROR_SERVICE_PIN, "Service provider personalization PIN required" },
{ MM_MOBILE_EQUIPMENT_ERROR_SERVICE_PUK, "Service provider personalization PUK required" },
{ MM_MOBILE_EQUIPMENT_ERROR_CORP_PIN, "Corporate personalization PIN required" },
{ MM_MOBILE_EQUIPMENT_ERROR_CORP_PUK, "Corporate personalization PUK required" },
{ MM_MOBILE_EQUIPMENT_ERROR_UNKNOWN, N_("Unknown error") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_ILLEGAL_MS, N_("Illegal MS") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_ILLEGAL_ME, N_("Illegal ME") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_NOT_ALLOWED, N_("GPRS services not allowed") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_PLMN_NOT_ALLOWED, N_("PLMN not allowed") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_LOCATION_NOT_ALLOWED, N_("Location area not allowed") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_ROAMING_NOT_ALLOWED, N_("Roaming not allowed in this location area") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_NOT_SUPPORTED, N_("Service option not supported") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_NOT_SUBSCRIBED, N_("Requested service option not subscribed") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_OUT_OF_ORDER, N_("Service option temporarily out of order") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_UNKNOWN, N_("Unspecified GPRS error") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_PDP_AUTH_FAILURE, N_("PDP authentication failure") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_INVALID_MOBILE_CLASS, N_("Invalid mobile class") },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_ILLEGAL_MS, "Illegal MS" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_ILLEGAL_ME, "Illegal ME" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_NOT_ALLOWED, "GPRS services not allowed" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_PLMN_NOT_ALLOWED, "PLMN not allowed" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_LOCATION_NOT_ALLOWED, "Location area not allowed" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_ROAMING_NOT_ALLOWED, "Roaming not allowed in this location area" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_NOT_SUPPORTED, "Service option not supported" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_NOT_SUBSCRIBED, "Requested service option not subscribed" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_OUT_OF_ORDER, "Service option temporarily out of order" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_UNKNOWN, "Unspecified GPRS error" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_PDP_AUTH_FAILURE, "PDP authentication failure" },
{ MM_MOBILE_EQUIPMENT_ERROR_GPRS_INVALID_MOBILE_CLASS, "Invalid mobile class" },
};
static inline const gchar *
......
......@@ -58,7 +58,7 @@ class XsettingsPluginTest(gsdtestcase.GSDTestCase):
self.start_mutter()
Gio.Settings.sync()
self.plugin_log_write = open(os.path.join(self.workdir, 'plugin_xsettings.log'), 'wb')
self.plugin_log_write = open(os.path.join(self.workdir, 'plugin_xsettings.log'), 'wb', buffering=0)
os.environ['GSD_ignore_llvmpipe'] = '1'
# Setup fontconfig config path before starting the daemon
......@@ -94,7 +94,7 @@ class XsettingsPluginTest(gsdtestcase.GSDTestCase):
env=env)
# you can use this for reading the current daemon log in tests
self.plugin_log = open(self.plugin_log_write.name)
self.plugin_log = open(self.plugin_log_write.name, 'rb', buffering=0)
# flush notification log
try:
......@@ -142,6 +142,33 @@ class XsettingsPluginTest(gsdtestcase.GSDTestCase):
self.session_log_write.close()
self.session_log.close()
def check_plugin_log(self, needle, timeout=0, failmsg=None):
'''Check that needle is found in the log within the given timeout.
Returns immediately when found.
Fail after the given timeout.
'''
if type(needle) == str:
needle = needle.encode('ascii')
# Fast path if the message was already logged
log = self.plugin_log.read()
if needle in log:
return
while timeout > 0:
time.sleep(0.5)
timeout -= 0.5
# read new data (lines) from the log
log = self.plugin_log.read()
if needle in log:
break
else:
if failmsg is not None:
self.fail(failmsg)
else:
self.fail('timed out waiting for needle "%s"' % needle)
def test_gtk_modules(self):
# Turn off event sounds
self.settings_sound['event-sounds'] = False
......@@ -161,22 +188,18 @@ class XsettingsPluginTest(gsdtestcase.GSDTestCase):
self.assertEqual(values, ['canberra-gtk-module', 'pk-gtk-module'])
def test_fontconfig_timestamp(self):
# gdbus_log_write = open(os.path.join(self.workdir, 'gdbus.log'), 'wb')
# process = subprocess.Popen(['gdbus', 'introspect', '--session', '--dest', 'org.gtk.Settings', '--object-path', '/org/gtk/Settings'],
# stdout=gdbus_log_write, stderr=subprocess.STDOUT)
# time.sleep(1)
# Initially, the value is zero
before = self.obj_xsettings_props.Get('org.gtk.Settings', 'FontconfigTimestamp')
self.assertEqual(before, 0)
# Copy the fonts.conf again
shutil.copy(os.path.join(os.path.dirname(__file__), 'fontconfig-test/fonts.conf'),
os.path.join(self.fc_dir, 'fonts.conf'))
time.sleep(1)
# gdbus_log_write = open(os.path.join(self.workdir, 'gdbus-after.log'), 'wb')
# process = subprocess.Popen(['gdbus', 'introspect', '--session', '--dest', 'org.gtk.Settings', '--object-path', '/org/gtk/Settings'],
# stdout=gdbus_log_write, stderr=subprocess.STDOUT)
# Wait for gsd-xsettings to pick up the change (and process it)
self.check_plugin_log("Fontconfig update successful", timeout=5, failmsg="Fontconfig was not updated!")
# Sleep a bit to ensure that the setting is updated
time.sleep(1)
after = self.obj_xsettings_props.Get('org.gtk.Settings', 'FontconfigTimestamp')
......
......@@ -27,5 +27,6 @@ plugins/smartcard/gsd-smartcard-service.c
plugins/usb-protection/gsd-usb-protection-manager.c
plugins/wacom/gsd-wacom-manager.c
plugins/wacom/org.gnome.settings-daemon.plugins.wacom.policy.in.in
plugins/wwan/gsd-wwan-pinentry.c
plugins/wwan/cc-wwan-errors-private.h
plugins/wwan/gsd-wwan-manager.c
plugins/xsettings/gsd-xsettings-manager.c
......@@ -6,4 +6,5 @@ plugins/usb-protection/org.gnome.SettingsDaemon.UsbProtection.desktop.in
plugins/wacom/org.gnome.settings-daemon.plugins.wacom.policy.in
plugins/dummy/org.gnome.SettingsDaemon.Dummy.desktop.in
# No user-visible translatable strings
plugins/wwan/cc-wwan-device.c
subprojects/gvc/gvc-mixer-control.c