diff options
-rw-r--r-- | common/configuration.c | 17 | ||||
-rw-r--r-- | debian/patches/04_language_handling.patch | 2 | ||||
-rw-r--r-- | debian/patches/autologin-session-workaround.patch | 2 | ||||
-rw-r--r-- | debian/patches/series | 1 | ||||
-rw-r--r-- | debian/patches/xorg-1.17.patch | 26 | ||||
-rw-r--r-- | src/log-file.h | 2 | ||||
-rw-r--r-- | src/seat.c | 14 |
7 files changed, 32 insertions, 32 deletions
diff --git a/common/configuration.c b/common/configuration.c index dc7831a8..e7bee309 100644 --- a/common/configuration.c +++ b/common/configuration.c @@ -317,7 +317,22 @@ config_set_boolean (Configuration *config, const gchar *section, const gchar *ke gboolean config_get_boolean (Configuration *config, const gchar *section, const gchar *key) { - return g_key_file_get_boolean (config->priv->key_file, section, key, NULL); + /* We don't use the standard function because it doesn't work with trailing whitespace: + * https://bugzilla.gnome.org/show_bug.cgi?id=664740 + */ + /*return g_key_file_get_boolean (config->priv->key_file, section, key, NULL);*/ + + gchar *value; + gboolean v; + + value = g_key_file_get_value (config->priv->key_file, section, key, NULL); + if (!value) + return FALSE; + g_strchomp (value); + v = strcmp (value, "true") == 0; + g_free (value); + + return v; } static void diff --git a/debian/patches/04_language_handling.patch b/debian/patches/04_language_handling.patch index 09d56244..f25923ef 100644 --- a/debian/patches/04_language_handling.patch +++ b/debian/patches/04_language_handling.patch @@ -75,7 +75,7 @@ Index: trunk/src/seat.c =================================================================== --- trunk.orig/src/seat.c +++ trunk/src/seat.c -@@ -1003,7 +1003,7 @@ configure_session (Session *session, Ses +@@ -1018,7 +1018,7 @@ configure_session (Session *session, Ses } if (language && language[0] != '\0') { diff --git a/debian/patches/autologin-session-workaround.patch b/debian/patches/autologin-session-workaround.patch index 1d977d7b..fb46d817 100644 --- a/debian/patches/autologin-session-workaround.patch +++ b/debian/patches/autologin-session-workaround.patch @@ -6,7 +6,7 @@ Index: trunk/src/seat.c =================================================================== --- trunk.orig/src/seat.c +++ trunk/src/seat.c -@@ -1033,7 +1033,12 @@ create_user_session (Seat *seat, const g +@@ -1048,7 +1048,12 @@ create_user_session (Seat *seat, const g if (autostart) { const gchar *autologin_session_name = seat_get_string_property (seat, "autologin-session"); diff --git a/debian/patches/series b/debian/patches/series index 7f14c0ad..d3ba2550 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,3 @@ 04_language_handling.patch 05_translate_debian_files.patch autologin-session-workaround.patch -xorg-1.17.patch diff --git a/debian/patches/xorg-1.17.patch b/debian/patches/xorg-1.17.patch deleted file mode 100644 index 9f7ecfd2..00000000 --- a/debian/patches/xorg-1.17.patch +++ /dev/null @@ -1,26 +0,0 @@ -Description: The X.org X server 1.17 doesn't listen on TCP by default, we need to pass -listen to enable it -Author: Robert Ancell <robert.ancell@canonical.com> -Bug: https://bugs.launchpad.net/bugs/1449282 - -=== modified file 'src/x-server-local.c' -Index: 1.16/src/x-server-local.c -=================================================================== ---- 1.16.orig/src/x-server-local.c -+++ 1.16/src/x-server-local.c -@@ -477,6 +477,7 @@ x_server_local_start (DisplayServer *dis - /* Connect to a remote server using XDMCP */ - if (server->priv->xdmcp_server != NULL) - { -+ g_string_append (command, " -listen tcp"); - if (server->priv->xdmcp_port != 0) - g_string_append_printf (command, " -port %d", server->priv->xdmcp_port); - g_string_append_printf (command, " -query %s", server->priv->xdmcp_server); -@@ -485,6 +486,8 @@ x_server_local_start (DisplayServer *dis - } - else if (!server->priv->allow_tcp) - g_string_append (command, " -nolisten tcp"); -+ else -+ g_string_append (command, " -listen tcp"); - - if (server->priv->vt >= 0) - g_string_append_printf (command, " vt%d -novtswitch", server->priv->vt); diff --git a/src/log-file.h b/src/log-file.h index 11d1151b..bfaee29f 100644 --- a/src/log-file.h +++ b/src/log-file.h @@ -18,4 +18,4 @@ int log_file_open (const gchar *log_filename, LogMode log_mode); -#endif /* !LOG_FILE_H */ +#endif /* LOG_FILE_H_ */ @@ -147,7 +147,19 @@ seat_get_string_list_property (Seat *seat, const gchar *name) gboolean seat_get_boolean_property (Seat *seat, const gchar *name) { - return g_strcmp0 (seat_get_string_property (seat, name), "true") == 0; + const gchar *value; + gint i, length = 0; + + value = seat_get_string_property (seat, name); + if (!value) + return FALSE; + + /* Count the number of non-whitespace characters */ + for (i = 0; value[i]; i++) + if (!g_ascii_isspace (value[i])) + length = i + 1; + + return strncmp (value, "true", MAX (length, 4)) == 0; } gint |