]> rtime.felk.cvut.cz Git - sojka/lightdm.git/commitdiff
Remove trailing whitespace
authorRobert Ancell <robert.ancell@canonical.com>
Fri, 19 Sep 2014 03:16:14 +0000 (15:16 +1200)
committerRobert Ancell <robert.ancell@canonical.com>
Fri, 19 Sep 2014 03:16:14 +0000 (15:16 +1200)
88 files changed:
liblightdm-gobject/greeter.c
liblightdm-gobject/language.c
liblightdm-gobject/layout.c
liblightdm-gobject/power.c
liblightdm-gobject/session.c
liblightdm-gobject/user.c
liblightdm-qt/QLightDM/greeter.h
liblightdm-qt/QLightDM/sessionsmodel.h
liblightdm-qt/greeter.cpp
liblightdm-qt/power.cpp
src/accounts.c
src/accounts.h
src/console-kit.h
src/display-manager.c
src/display-manager.h
src/display-server.c
src/display-server.h
src/dm-tool.c
src/greeter.c
src/greeter.h
src/guest-account.c
src/guest-account.h
src/lightdm-guest-session.c
src/lightdm.c
src/login1.c
src/login1.h
src/mir-server.c
src/mir-server.h
src/plymouth.c
src/plymouth.h
src/process.c
src/process.h
src/seat-unity.c
src/seat-xdmcp-session.c
src/seat-xdmcp-session.h
src/seat-xlocal.c
src/seat-xlocal.h
src/seat-xremote.c
src/seat-xremote.h
src/seat-xvnc.c
src/seat-xvnc.h
src/seat.c
src/seat.h
src/session-child.c
src/session-child.h
src/session-config.h
src/session.c
src/session.h
src/shared-data-manager.c
src/shared-data-manager.h
src/unity-system-compositor.c
src/unity-system-compositor.h
src/vnc-server.c
src/vnc-server.h
src/vt.c
src/vt.h
src/x-authority.c
src/x-authority.h
src/x-server-local.c
src/x-server-local.h
src/x-server-remote.c
src/x-server-remote.h
src/x-server-xvnc.c
src/x-server-xvnc.h
src/x-server.c
src/x-server.h
src/xdmcp-protocol.c
src/xdmcp-protocol.h
src/xdmcp-server.c
src/xdmcp-server.h
src/xdmcp-session-private.h
src/xdmcp-session.c
src/xdmcp-session.h
tests/src/X.c
tests/src/Xvnc.c
tests/src/dbus-env.c
tests/src/libsystem.c
tests/src/plymouth.c
tests/src/status.c
tests/src/status.h
tests/src/test-runner.c
tests/src/test-script-hook.c
tests/src/test-session.c
tests/src/unity-system-compositor.c
tests/src/vnc-client.c
tests/src/x-authority.c
tests/src/x-server.c
tests/src/xdmcp-client.c

index e444dbf87006d1893e5591660ea98872b078d0b8..8214490c5a5dcd621e89208a540074a58007a73d 100644 (file)
@@ -374,7 +374,7 @@ handle_connected (LightDMGreeter *greeter, guint8 *message, gsize message_length
     while (*offset < message_length)
     {
         gchar *name, *value;
-      
+
         name = read_string (message, message_length, offset);
         value = read_string (message, message_length, offset);
         g_hash_table_insert (priv->hints, name, value);
@@ -876,7 +876,7 @@ lightdm_greeter_get_default_session_hint (LightDMGreeter *greeter)
  * accounts should be taken from #LightDMUserList and displayed in the greeter
  * for the user to choose from.  Note that this list can be empty and it is
  * recommended you show a method for the user to enter a username manually.
- * 
+ *
  * If this option is shown the greeter should only allow these users to be
  * chosen for login unless the manual login hint is set.
  *
@@ -969,7 +969,7 @@ lightdm_greeter_get_has_guest_account_hint (LightDMGreeter *greeter)
 
     g_return_val_if_fail (LIGHTDM_IS_GREETER (greeter), FALSE);
     value = lightdm_greeter_get_hint (greeter, "has-guest-account");
-  
+
     return g_strcmp0 (value, "true") == 0;
 }
 
@@ -1003,7 +1003,7 @@ lightdm_greeter_get_select_guest_hint (LightDMGreeter *greeter)
 
     g_return_val_if_fail (LIGHTDM_IS_GREETER (greeter), FALSE);
     value = lightdm_greeter_get_hint (greeter, "select-guest");
-  
+
     return g_strcmp0 (value, "true") == 0;
 }
 
@@ -1037,7 +1037,7 @@ lightdm_greeter_get_autologin_guest_hint (LightDMGreeter *greeter)
 
     g_return_val_if_fail (LIGHTDM_IS_GREETER (greeter), FALSE);
     value = lightdm_greeter_get_hint (greeter, "autologin-guest");
-  
+
     return g_strcmp0 (value, "true") == 0;
 }
 
@@ -1107,7 +1107,7 @@ lightdm_greeter_authenticate (LightDMGreeter *greeter, const gchar *username)
 
     priv->cancelling_authentication = FALSE;
     priv->authenticate_sequence_number++;
-    priv->in_authentication = TRUE;  
+    priv->in_authentication = TRUE;
     priv->is_authenticated = FALSE;
     if (username != priv->authentication_user)
     {
index 4dce374a7fb26442e6ccb86542808ef97d8731e1..91a464298e6f80ef5ca2a365c524f147bac5860c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This library is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the Free
  * Software Foundation; either version 2 or version 3 of the License.
@@ -193,9 +193,9 @@ lightdm_get_languages (void)
 /**
  * lightdm_language_get_code:
  * @language: A #LightDMLanguage
- * 
+ *
  * Get the code of a language (e.g. "de_DE.UTF-8")
- * 
+ *
  * Return value: The code of the language
  **/
 const gchar *
@@ -208,7 +208,7 @@ lightdm_language_get_code (LightDMLanguage *language)
 /**
  * lightdm_language_get_name:
  * @language: A #LightDMLanguage
- * 
+ *
  * Get the name of a language.
  *
  * Return value: The name of the language
@@ -251,9 +251,9 @@ lightdm_language_get_name (LightDMLanguage *language)
 /**
  * lightdm_language_get_territory:
  * @language: A #LightDMLanguage
- * 
+ *
  * Get the territory the language is used in.
- * 
+ *
  * Return value: The territory the language is used in.
  **/
 const gchar *
@@ -295,9 +295,9 @@ lightdm_language_get_territory (LightDMLanguage *language)
  * lightdm_language_matches:
  * @language: A #LightDMLanguage
  * @code: A language code
- * 
+ *
  * Check if a language code matches this language.
- * 
+ *
  * Return value: #TRUE if the code matches this language.
  **/
 gboolean
@@ -377,7 +377,7 @@ static void
 lightdm_language_class_init (LightDMLanguageClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
-  
+
     g_type_class_add_private (klass, sizeof (LightDMLanguagePrivate));
 
     object_class->set_property = lightdm_language_set_property;
index c0426e35995036f1285b9c08dc025b5f7fd32db8..ccb582f57659970cf2cd7b124a7c47dd71dc09bc 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This library is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the Free
  * Software Foundation; either version 2 or version 3 of the License.
@@ -117,7 +117,7 @@ lightdm_get_layouts (void)
     display = XOpenDisplay (NULL);
     if (display == NULL)
         return NULL;
-    
+
     xkl_engine = xkl_engine_get_instance (display);
     xkl_config = xkl_config_rec_new ();
     if (!xkl_config_rec_get_from_server (xkl_config, xkl_engine))
@@ -203,9 +203,9 @@ lightdm_get_layout (void)
 /**
  * lightdm_layout_get_name:
  * @layout: A #LightDMLayout
- * 
+ *
  * Get the name of a layout.
- * 
+ *
  * Return value: The name of the layout
  **/
 const gchar *
@@ -218,7 +218,7 @@ lightdm_layout_get_name (LightDMLayout *layout)
 /**
  * lightdm_layout_get_short_description:
  * @layout: A #LightDMLayout
- * 
+ *
  * Get the short description of a layout.
  *
  * Return value: A short description of the layout
@@ -233,9 +233,9 @@ lightdm_layout_get_short_description (LightDMLayout *layout)
 /**
  * lightdm_layout_get_description:
  * @layout: A #LightDMLayout
- * 
+ *
  * Get the long description of a layout.
- * 
+ *
  * Return value: A long description of the layout
  **/
 const gchar *
@@ -308,7 +308,7 @@ static void
 lightdm_layout_class_init (LightDMLayoutClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
-  
+
     g_type_class_add_private (klass, sizeof (LightDMLayoutPrivate));
 
     object_class->set_property = lightdm_layout_set_property;
index b46af0f85f01f54ff2d1b17c3d13d78a7787e817..9b2dc1728614c0eff85027166345b6430337b74c 100644 (file)
@@ -337,7 +337,7 @@ lightdm_get_can_shutdown (void)
  * @error: return location for a #GError, or %NULL
  *
  * Triggers a system shutdown.
- * 
+ *
  * Return value: #TRUE if shutdown initiated.
  **/
 gboolean
index 2a0be54496908c9b1ea5edb6184752c05a56f009..d635f330964e1d360d8771f5e073cbdbed3502c0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This library is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the Free
  * Software Foundation; either version 2 or version 3 of the License.
@@ -37,7 +37,7 @@ static gboolean have_sessions = FALSE;
 static GList *local_sessions = NULL;
 static GList *remote_sessions = NULL;
 
-static gint 
+static gint
 compare_session (gconstpointer a, gconstpointer b)
 {
     LightDMSessionPrivate *priv_a = GET_PRIVATE (a);
@@ -52,7 +52,7 @@ load_session (GKeyFile *key_file, const gchar *key)
     LightDMSession *session;
     LightDMSessionPrivate *priv;
     gchar *try_exec;
-  
+
     if (g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, NULL) ||
         g_key_file_get_boolean (key_file, G_KEY_FILE_DESKTOP_GROUP, G_KEY_FILE_DESKTOP_KEY_HIDDEN, NULL))
         return NULL;
@@ -170,7 +170,7 @@ load_sessions_dir (GList *sessions, const gchar *sessions_dir)
     }
 
     g_dir_close (directory);
-  
+
     return sessions;
 }
 
@@ -185,7 +185,7 @@ load_sessions (const gchar *sessions_dir)
     for (i = 0; dirs[i]; i++)
         sessions = load_sessions_dir (sessions, dirs[i]);
     g_strfreev (dirs);
-  
+
     return sessions;
 }
 
@@ -204,7 +204,7 @@ update_sessions (void)
 
     /* Use session directory from configuration */
     config_load_from_standard_locations (config_get_instance (), NULL, NULL);
-      
+
     value = config_get_string (config_get_instance (), "LightDM", "sessions-directory");
     if (value)
     {
@@ -259,9 +259,9 @@ lightdm_get_remote_sessions (void)
 /**
  * lightdm_session_get_key:
  * @session: A #LightDMSession
- * 
+ *
  * Get the key for a session
- * 
+ *
  * Return value: The session key
  **/
 const gchar *
@@ -274,9 +274,9 @@ lightdm_session_get_key (LightDMSession *session)
 /**
  * lightdm_session_get_session_type:
  * @session: A #LightDMSession
- * 
+ *
  * Get the type a session
- * 
+ *
  * Return value: The session type, e.g. x or mir
  **/
 const gchar *
@@ -289,9 +289,9 @@ lightdm_session_get_session_type (LightDMSession *session)
 /**
  * lightdm_session_get_name:
  * @session: A #LightDMSession
- * 
+ *
  * Get the name for a session
- * 
+ *
  * Return value: The session name
  **/
 const gchar *
@@ -304,9 +304,9 @@ lightdm_session_get_name (LightDMSession *session)
 /**
  * lightdm_session_get_comment:
  * @session: A #LightDMSession
- * 
+ *
  * Get the comment for a session
- * 
+ *
  * Return value: The session comment
  **/
 const gchar *
@@ -372,7 +372,7 @@ static void
 lightdm_session_class_init (LightDMSessionClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
-  
+
     g_type_class_add_private (klass, sizeof (LightDMSessionPrivate));
 
     object_class->set_property = lightdm_session_set_property;
index 50f766b0e42bfff4d2bf2cbd433edff4c2198752..c4e5661ef176ac6465bcb014bd9d62d6bda9d9b4 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2014 Canonical, Ltd.
  * Authors: Robert Ancell <robert.ancell@canonical.com>
  *          Michael Terry <michael.terry@canonical.com>
- * 
+ *
  * This library is free software; you can redistribute it and/or modify it under
  * the terms of the GNU Lesser General Public License as published by the Free
  * Software Foundation; either version 2 or version 3 of the License.
@@ -350,9 +350,9 @@ lightdm_user_list_class_init (LightDMUserListClass *klass)
 /**
  * lightdm_user_get_name:
  * @user: A #LightDMUser
- * 
+ *
  * Get the name of a user.
- * 
+ *
  * Return value: The name of the given user
  **/
 const gchar *
@@ -365,7 +365,7 @@ lightdm_user_get_name (LightDMUser *user)
 /**
  * lightdm_user_get_real_name:
  * @user: A #LightDMUser
- * 
+ *
  * Get the real name of a user.
  *
  * Return value: The real name of the given user
@@ -380,9 +380,9 @@ lightdm_user_get_real_name (LightDMUser *user)
 /**
  * lightdm_user_get_display_name:
  * @user: A #LightDMUser
- * 
+ *
  * Get the display name of a user.
- * 
+ *
  * Return value: The display name of the given user
  **/
 const gchar *
@@ -395,9 +395,9 @@ lightdm_user_get_display_name (LightDMUser *user)
 /**
  * lightdm_user_get_home_directory:
  * @user: A #LightDMUser
- * 
+ *
  * Get the home directory for a user.
- * 
+ *
  * Return value: The users home directory
  */
 const gchar *
@@ -410,9 +410,9 @@ lightdm_user_get_home_directory (LightDMUser *user)
 /**
  * lightdm_user_get_image:
  * @user: A #LightDMUser
- * 
+ *
  * Get the image URI for a user.
- * 
+ *
  * Return value: The image URI for the given user or #NULL if no URI
  **/
 const gchar *
@@ -425,9 +425,9 @@ lightdm_user_get_image (LightDMUser *user)
 /**
  * lightdm_user_get_background:
  * @user: A #LightDMUser
- * 
+ *
  * Get the background file path for a user.
- * 
+ *
  * Return value: The background file path for the given user or #NULL if no path
  **/
 const gchar *
@@ -440,9 +440,9 @@ lightdm_user_get_background (LightDMUser *user)
 /**
  * lightdm_user_get_language:
  * @user: A #LightDMUser
- * 
+ *
  * Get the language for a user.
- * 
+ *
  * Return value: The language in the form of a local specification (e.g. "de_DE.UTF-8") for the given user or #NULL if using the system default locale.
  **/
 const gchar *
@@ -455,9 +455,9 @@ lightdm_user_get_language (LightDMUser *user)
 /**
  * lightdm_user_get_layout:
  * @user: A #LightDMUser
- * 
+ *
  * Get the keyboard layout for a user.
- * 
+ *
  * Return value: The keyboard layout for the given user or #NULL if using system defaults.  Copy the value if you want to use it long term.
  **/
 const gchar *
@@ -470,9 +470,9 @@ lightdm_user_get_layout (LightDMUser *user)
 /**
  * lightdm_user_get_layouts:
  * @user: A #LightDMUser
- * 
+ *
  * Get the configured keyboard layouts for a user.
- * 
+ *
  * Return value: (transfer none): A NULL-terminated array of keyboard layouts for the given user.  Copy the values if you want to use them long term.
  **/
 const gchar * const *
@@ -485,9 +485,9 @@ lightdm_user_get_layouts (LightDMUser *user)
 /**
  * lightdm_user_get_session:
  * @user: A #LightDMUser
- * 
+ *
  * Get the session for a user.
- * 
+ *
  * Return value: The session for the given user or #NULL if using system defaults.
  **/
 const gchar *
@@ -500,9 +500,9 @@ lightdm_user_get_session (LightDMUser *user)
 /**
  * lightdm_user_get_logged_in:
  * @user: A #LightDMUser
- * 
+ *
  * Check if a user is logged in.
- * 
+ *
  * Return value: #TRUE if the user is currently logged in.
  **/
 gboolean
@@ -515,9 +515,9 @@ lightdm_user_get_logged_in (LightDMUser *user)
 /**
  * lightdm_user_get_has_messages:
  * @user: A #LightDMUser
- * 
+ *
  * Check if a user has waiting messages.
- * 
+ *
  * Return value: #TRUE if the user has waiting messages.
  **/
 gboolean
@@ -530,9 +530,9 @@ lightdm_user_get_has_messages (LightDMUser *user)
 /**
  * lightdm_user_get_uid:
  * @user: A #LightDMUser
- * 
+ *
  * Get the uid of a user.
- * 
+ *
  * Return value: The uid of the given user
  **/
 uid_t
index 91a2a0598e9a436e67c55cef9d1527123103ee1a..5413db786d52f4b0e834ccb325a944b7b0c9fb20 100644 (file)
@@ -23,7 +23,7 @@ namespace QLightDM
 class Q_DECL_EXPORT Greeter : public QObject
 {
     Q_OBJECT
-    
+
     Q_PROPERTY(bool authenticated READ isAuthenticated ) //NOTFIY authenticationComplete
     Q_PROPERTY(QString authenticationUser READ authenticationUser )
     Q_PROPERTY(QString defaultSession READ defaultSessionHint CONSTANT)
@@ -33,7 +33,7 @@ class Q_DECL_EXPORT Greeter : public QObject
     Q_PROPERTY(QString hostname READ hostname CONSTANT)
     Q_PROPERTY(bool hasGuestAccount READ hasGuestAccountHint CONSTANT)
     Q_PROPERTY(bool locked READ lockHint CONSTANT)
-    
+
     Q_PROPERTY(QString hostname READ hostname CONSTANT)
 
     Q_ENUMS(PromptType MessageType)
@@ -52,7 +52,7 @@ public:
     explicit Greeter(QObject* parent=0);
     virtual ~Greeter();
 
-    QString getHint(const QString &name) const;   
+    QString getHint(const QString &name) const;
     QString defaultSessionHint() const;
     bool hideUsersHint() const;
     bool showManualLoginHint() const;
index dd200990c88c305d8cd936b5535552c4a335350e..45eae846fe996e7fdabbe414eb940b7dfd0cd476 100644 (file)
@@ -45,7 +45,7 @@ namespace QLightDM {
 
     protected:
         SessionsModelPrivate *d_ptr;
-        
+
     private:
         Q_DECLARE_PRIVATE(SessionsModel)
     };
index 5a52618e71b45c9dd01e121e8b2da5a9820a333a..3ef6996b734ec78cce85e0ec5aeecafca39dc873 100644 (file)
@@ -28,14 +28,14 @@ public:
     LightDMGreeter *ldmGreeter;
 protected:
     Greeter* q_ptr;
-    
+
     static void cb_showPrompt(LightDMGreeter *greeter, const gchar *text, LightDMPromptType type, gpointer data);
     static void cb_showMessage(LightDMGreeter *greeter, const gchar *text, LightDMMessageType type, gpointer data);
     static void cb_authenticationComplete(LightDMGreeter *greeter, gpointer data);
     static void cb_autoLoginExpired(LightDMGreeter *greeter, gpointer data);
     static void cb_idle(LightDMGreeter *greeter, gpointer data);
     static void cb_reset(LightDMGreeter *greeter, gpointer data);
-    
+
 private:
     Q_DECLARE_PUBLIC(Greeter)
 };
@@ -59,10 +59,10 @@ GreeterPrivate::GreeterPrivate(Greeter *parent) :
 void GreeterPrivate::cb_showPrompt(LightDMGreeter *greeter, const gchar *text, LightDMPromptType type, gpointer data)
 {
     Q_UNUSED(greeter);
-    
+
     GreeterPrivate *that = static_cast<GreeterPrivate*>(data);
     QString message = QString::fromUtf8(text);
-    
+
     Q_EMIT that->q_func()->showPrompt(message, type == LIGHTDM_PROMPT_TYPE_QUESTION ?
                                                Greeter::PromptTypeQuestion : Greeter::PromptTypeSecret);
 }
index eb0c82cd2d207bae9fafc8e54618b76b4a393e0e..a8cb4fae834973bde1c690d5b3f30aa37d70ba9e 100644 (file)
@@ -152,7 +152,7 @@ bool PowerInterface::canRestart()
         }
     }
     qWarning() << d->login1Interface->lastError();
-  
+
     QDBusReply<bool> reply = d->consoleKitInterface->call("CanRestart");
     if (reply.isValid()) {
         return reply.value();
index 797b6d9df9e714b838221e81c116daa9c83a0477..d4d54a2eb5ade799ee1f6191c3005fd451858723 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index a64685705ac3cc4876d9355287ecc0f27519b0ea..ba77c0ff8623024c6b2f7a52f8be3d0d29dc4482 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 372524477ef8a0de150db603b1c90c5e2f4d9e5a..1080338ed6530aeb1d3f0ea9a3cb6e7842a1cff6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 05c46bb075930300d7135afcdaa05f22366a4a63..bf8d24aea99cf55f41e286341a1b3353dbcfa09a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -125,7 +125,7 @@ display_manager_start (DisplayManager *manager)
     /* Disable Plymouth if no X servers are replacing it */
     if (plymouth_get_is_active ())
     {
-        g_debug ("Stopping Plymouth, no displays replace it");      
+        g_debug ("Stopping Plymouth, no displays replace it");
         plymouth_quit (FALSE);
     }
 }
@@ -155,7 +155,7 @@ display_manager_stop (DisplayManager *manager)
 
     check_stopped (manager);
 }
-  
+
 static void
 display_manager_init (DisplayManager *manager)
 {
index 48ba01f2c0e7af2669c15cd2342cc89bd2693eda..c4b7d9393dec7e5217fba6a5c10375adcba18ea5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index ddc476e21f4b274cbd0adb59f7306a6b9b329476..19098d2cd45e5b242843efbf95be42749da32b43 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 971151b397704af80cf47bcc3371610817847ef8..c31d096e791bbfc329e5bde1b03f9bc96ae4e9f9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index c0d257c555e0a1c5f6dd1d20ed51629055e62e02..fd9d57ea57b6a92489456c1f8037bc5288cd65bb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -76,7 +76,7 @@ get_seat_proxy (void)
 
     if (seat_proxy)
         return seat_proxy;
-  
+
     if (!g_getenv ("XDG_SEAT_PATH"))
     {
         g_printerr ("Not running inside a display manager, XDG_SEAT_PATH not defined\n");
@@ -97,7 +97,7 @@ get_seat_proxy (void)
         exit (EXIT_FAILURE);
     }
     g_clear_error (&error);
-  
+
     return seat_proxy;
 }
 
@@ -120,7 +120,7 @@ main (int argc, char **argv)
 
         if (!g_str_has_prefix (arg, "-"))
             break;
-      
+
         if (strcmp (arg, "-h") == 0 || strcmp (arg, "--help") == 0)
         {
             g_printerr ("Usage:\n"
@@ -179,7 +179,7 @@ main (int argc, char **argv)
         return EXIT_FAILURE;
     }
     g_clear_error (&error);
-  
+
     command = argv[arg_index];
     arg_index++;
     n_options = argc - arg_index;
@@ -429,7 +429,7 @@ main (int argc, char **argv)
             lock_name = g_strdup_printf ("/tmp/.X%d-lock", xephyr_display_number);
             has_lock = g_file_test (lock_name, G_FILE_TEST_EXISTS);
             g_free (lock_name);
-          
+
             if (has_lock)
                 xephyr_display_number++;
             else
@@ -445,11 +445,11 @@ main (int argc, char **argv)
         }
         else if (strcmp (dimensions, "fullscreen") == 0)
         {
-            xephyr_command = g_strdup_printf ("Xephyr :%d -fullscreen", xephyr_display_number);   
+            xephyr_command = g_strdup_printf ("Xephyr :%d -fullscreen", xephyr_display_number);
         }
         else
         {
-            xephyr_command = g_strdup_printf ("Xephyr :%d -screen %s", xephyr_display_number, dimensions); 
+            xephyr_command = g_strdup_printf ("Xephyr :%d -screen %s", xephyr_display_number, dimensions);
         }
         if (!g_shell_parse_argv (xephyr_command, NULL, &xephyr_argv, &error) ||
             !g_spawn_async (NULL, xephyr_argv, NULL,
@@ -503,7 +503,7 @@ main (int argc, char **argv)
         g_variant_get (result, "(&o)", &path);
         g_print ("%s\n", path);
 
-        return EXIT_SUCCESS; 
+        return EXIT_SUCCESS;
     }
     else if (strcmp (command, "add-seat") == 0)
     {
@@ -521,7 +521,7 @@ main (int argc, char **argv)
 
         type = options[0];
         properties = g_variant_builder_new (G_VARIANT_TYPE ("a(ss)"));
-      
+
         for (i = 1; i < n_options; i++)
         {
             gchar *property, *name, *value;
@@ -540,7 +540,7 @@ main (int argc, char **argv)
             g_variant_builder_add_value (properties, g_variant_new ("(ss)", name, value));
             g_free (property);
         }
-      
+
         result = g_dbus_proxy_call_sync (dm_proxy,
                                          "AddSeat",
                                          g_variant_new ("(sa(ss))", type, properties),
index ba69febea10c524e66f7eeb7deab059e1fa496ba..980fa8eb99db14052cba0ecdc9cdca1c2a21be89 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -44,11 +44,11 @@ struct GreeterPrivate
     guint8 *read_buffer;
     gsize n_read;
     gboolean use_secure_memory;
-  
+
     /* Hints for the greeter */
     GHashTable *hints;
 
-    /* Default session to use */   
+    /* Default session to use */
     gchar *default_session;
 
     /* Sequence number of current PAM session */
@@ -226,7 +226,7 @@ static void
 write_string (guint8 *buffer, gint buffer_length, const gchar *value, gsize *offset)
 {
     gint length;
-  
+
     if (value)
         length = strlen (value);
     else
@@ -307,7 +307,7 @@ pam_messages_cb (Session *session, Greeter *greeter)
     size = int_length () + string_length (session_get_username (session)) + int_length ();
     for (i = 0; i < messages_length; i++)
         size += int_length () + string_length (messages[i].msg);
-  
+
     write_header (message, MAX_MESSAGE_LENGTH, SERVER_MESSAGE_PROMPT_AUTHENTICATION, size, &offset);
     write_int (message, MAX_MESSAGE_LENGTH, greeter->priv->authentication_sequence_number, &offset);
     write_string (message, MAX_MESSAGE_LENGTH, session_get_username (session), &offset);
@@ -343,7 +343,7 @@ send_end_authentication (Greeter *greeter, guint32 sequence_number, const gchar
     write_int (message, MAX_MESSAGE_LENGTH, sequence_number, &offset);
     write_string (message, MAX_MESSAGE_LENGTH, username, &offset);
     write_int (message, MAX_MESSAGE_LENGTH, result, &offset);
-    write_message (greeter, message, offset); 
+    write_message (greeter, message, offset);
 }
 
 void
@@ -484,7 +484,7 @@ handle_login_as_guest (Greeter *greeter, guint32 sequence_number)
         return;
     }
 
-    greeter->priv->guest_account_authenticated = TRUE;  
+    greeter->priv->guest_account_authenticated = TRUE;
     send_end_authentication (greeter, sequence_number, "", PAM_SUCCESS);
 }
 
@@ -801,7 +801,7 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data)
         greeter->priv->from_greeter_watch = 0;
         return FALSE;
     }
-  
+
     n_to_read = HEADER_SIZE;
     if (greeter->priv->n_read >= HEADER_SIZE)
     {
@@ -837,9 +837,9 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data)
             greeter->priv->read_buffer = secure_realloc (greeter, greeter->priv->read_buffer, n_to_read);
             read_cb (source, condition, greeter);
             return TRUE;
-        }      
+        }
     }
-  
+
     offset = 0;
     id = read_int (greeter, &offset);
     length = HEADER_SIZE + read_int (greeter, &offset);
index 3aa126d63cf3910eb764d4379f2e725c3e62e5ce..47929ac19e606151b298c5b942c1c6f5f04ab352 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 14cd87c55d9f2cbed7816b871a964d4db4daed83..77c4594b4c076bb17f5052ddac86f45d4bf1cc42 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -20,7 +20,7 @@ get_setup_script (void)
 {
     gchar *script;
     static gchar *setup_script = NULL;
-  
+
     if (setup_script)
         return setup_script;
 
@@ -30,7 +30,7 @@ get_setup_script (void)
 
     setup_script = g_find_program_in_path (script);
     g_free (script);
-  
+
     return setup_script;
 }
 
@@ -55,7 +55,7 @@ run_script (const gchar *script, gchar **stdout_text, gint *exit_status, GError
                            NULL, NULL,
                            stdout_text, NULL, exit_status, error);
     g_strfreev (argv);
-  
+
     return result;
 }
 
@@ -98,7 +98,7 @@ guest_account_setup (void)
         g_debug ("Guest account setup script didn't return a username");
         return NULL;
     }
-  
+
     g_debug ("Guest account %s setup", username);
 
     return username;
index 70f900da829391c0d2de1c74fa9b12b6f7bb8c26..9de60fdc11bf596a65336d74305a7b9785a93b7b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 6897a65a3d27fa13f37ff2622ea1f5979d9e4acf..8f2552e23b2a428660bd0572f483ea18c162157c 100644 (file)
@@ -2,7 +2,7 @@
  *
  * Copyright (C) 2011 Canonical Ltd.
  * Author: Martin Pitt <martin.pitt@ubuntu.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index a5c1e017cd6f4ca83d41d13f4614da107ad63ae3..f48af8bb5c02a1420949ae7a4c1e134c38ea46be 100644 (file)
@@ -569,7 +569,7 @@ emit_object_value_changed (GDBusConnection *bus, const gchar *path, const gchar
                                         g_variant_new ("(sa{sv}as)", interface_name, &builder, NULL),
                                         &error))
         g_warning ("Failed to emit PropertiesChanged signal: %s", error->message);
-    g_clear_error (&error); 
+    g_clear_error (&error);
 }
 
 static void
@@ -585,7 +585,7 @@ emit_object_signal (GDBusConnection *bus, const gchar *path, const gchar *signal
                                         g_variant_new ("(o)", object_path),
                                         &error))
         g_warning ("Failed to emit %s signal on %s: %s", signal_name, path, error->message);
-    g_clear_error (&error); 
+    g_clear_error (&error);
 }
 
 static void
@@ -1001,7 +1001,7 @@ add_login1_seat (Login1Seat *login1_seat)
 
     g_free (config_section);
     g_object_unref (seat);
-  
+
     return started;
 }
 
index ad922a5a6a892be826f52d04f0cf15a752c15cdf..f799e3ede3c9aa0497061c3bcc8a24689bc1cdd5 100644 (file)
@@ -227,11 +227,11 @@ signal_cb (GDBusConnection *connection,
         seat = login1_service_get_seat (service, id);
         if (seat)
         {
-            service->priv->seats = g_list_remove (service->priv->seats, seat);            
+            service->priv->seats = g_list_remove (service->priv->seats, seat);
             g_signal_emit (service, service_signals[SEAT_REMOVED], 0, seat);
             g_object_unref (seat);
-        }                        
-    } 
+        }
+    }
 }
 
 gboolean
index 416632f7a840302be68dfb0e046124dab438dae3..af9f2a96409a38d51dbcd786442cb574acdd3d5e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 69a492d60a26b0c6bcb19d8cf28f812d43e71fd9..36e0e770de3c01815c1f88852288b4606daf26bb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -28,7 +28,7 @@ G_DEFINE_TYPE (MirServer, mir_server, DISPLAY_SERVER_TYPE);
 
 MirServer *mir_server_new (void)
 {
-    return g_object_new (MIR_SERVER_TYPE, NULL);  
+    return g_object_new (MIR_SERVER_TYPE, NULL);
 }
 
 void
index 3e7bc0bba935d7950a5e8710ecde6abbd5494fbc..4f59623f235464ccabd297b9070381588a3cc6f2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index aefb81a9498176a53b2d19fcf6d010cb9ec15601..03b31127d619c483b8865a0d61c413bc40fe5b3a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index f8f90f6fced7ed7e80d1ad597222816e54ee7999..e8277b20a574489efc0533c3af1aad3c14cfafc7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 4328dcd067df19b4a9b6364f6f649c5aebe87c03..adb06f78e2309729cb79f6d7da98f2b5991d7459 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -24,7 +24,7 @@
 
 enum {
     GOT_DATA,
-    GOT_SIGNAL,  
+    GOT_SIGNAL,
     STOPPED,
     LAST_SIGNAL
 };
@@ -51,7 +51,7 @@ struct ProcessPrivate
 
     /* Process ID */
     GPid pid;
-  
+
     /* Exit status of process */
     int exit_status;
 
@@ -121,7 +121,7 @@ process_set_env (Process *process, const gchar *name, const gchar *value)
 {
     g_return_if_fail (process != NULL);
     g_return_if_fail (name != NULL);
-    g_hash_table_insert (process->priv->env, g_strdup (name), g_strdup (value));  
+    g_hash_table_insert (process->priv->env, g_strdup (name), g_strdup (value));
 }
 
 const gchar *
@@ -163,7 +163,7 @@ process_watch_cb (GPid pid, gint status, gpointer data)
 
     if (process->priv->quit_timeout)
         g_source_remove (process->priv->quit_timeout);
-    process->priv->quit_timeout = 0;  
+    process->priv->quit_timeout = 0;
     process->priv->pid = 0;
     g_hash_table_remove (processes, GINT_TO_POINTER (pid));
 
@@ -183,7 +183,7 @@ process_start (Process *process, gboolean block)
     GError *error = NULL;
 
     g_return_val_if_fail (process != NULL, FALSE);
-    g_return_val_if_fail (process->priv->command != NULL, FALSE);  
+    g_return_val_if_fail (process->priv->command != NULL, FALSE);
     g_return_val_if_fail (process->priv->pid == 0, FALSE);
 
     if (!g_shell_parse_argv (process->priv->command, &argc, &argv, &error))
@@ -244,11 +244,11 @@ process_start (Process *process, gboolean block)
 #endif
         for (i = 0; i < env_length; i++)
             setenv (env_keys[i], env_values[i], TRUE);
-  
+
         execvp (argv[0], argv);
         _exit (EXIT_FAILURE);
     }
-  
+
     close (log_fd);
     g_strfreev (argv);
     g_free (env_keys);
@@ -269,7 +269,7 @@ process_start (Process *process, gboolean block)
         int exit_status;
         waitpid (process->priv->pid, &exit_status, 0);
         process_watch_cb (process->priv->pid, exit_status, process);
-    }  
+    }
     else
     {
         g_hash_table_insert (processes, GINT_TO_POINTER (process->priv->pid), g_object_ref (process));
@@ -402,7 +402,7 @@ handle_signal (GIOChannel *source, GIOCondition condition, gpointer data)
     Process *process;
 
     errno = 0;
-    if (read (signal_pipe[0], &signo, sizeof (int)) != sizeof (int) || 
+    if (read (signal_pipe[0], &signo, sizeof (int)) != sizeof (int) ||
         read (signal_pipe[0], &pid, sizeof (pid_t)) != sizeof (pid_t))
     {
         g_warning ("Error reading from signal pipe: %s", strerror (errno));
@@ -427,7 +427,7 @@ process_class_init (ProcessClass *klass)
     struct sigaction action;
 
     klass->stopped = process_stopped;
-    object_class->finalize = process_finalize;  
+    object_class->finalize = process_finalize;
 
     g_type_class_add_private (klass, sizeof (ProcessPrivate));
 
@@ -438,7 +438,7 @@ process_class_init (ProcessClass *klass)
                       G_STRUCT_OFFSET (ProcessClass, got_data),
                       NULL, NULL,
                       NULL,
-                      G_TYPE_NONE, 0); 
+                      G_TYPE_NONE, 0);
     signals[GOT_SIGNAL] =
         g_signal_new ("got-signal",
                       G_TYPE_FROM_CLASS (klass),
index 1fcde7a807705e14ed052a75d2382d26cf934452..d15477b1dfd62417c1b559d45ae94dbb61716e0d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index d08c2b239cc9aa24e3ee2f1b43b1f6515bf49295..bc08437d81dc17b8b70f980ad26b35ce68b71207 100644 (file)
@@ -107,7 +107,7 @@ compositor_ready_cb (UnitySystemCompositor *compositor, SeatUnity *seat)
             result = g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error);
             if (error)
                 l_debug (seat, "Error getting key %s", error->message);
-            g_clear_error (&error);      
+            g_clear_error (&error);
 
             if (result)
             {
@@ -216,7 +216,7 @@ create_x_server (Seat *seat)
     layout = seat_get_string_property (seat, "xserver-layout");
     if (layout)
         x_server_local_set_layout (x_server, layout);
-    
+
     x_server_local_set_xdg_seat (x_server, seat_get_name (seat));
 
     config_file = seat_get_string_property (seat, "xserver-config");
@@ -242,9 +242,9 @@ create_mir_server (Seat *seat)
 
 static DisplayServer *
 seat_unity_create_display_server (Seat *seat, Session *session)
-{  
+{
     const gchar *session_type;
-  
+
     session_type = session_get_session_type (session);
     if (strcmp (session_type, "x") == 0)
         return DISPLAY_SERVER (create_x_server (seat));
index 5aebef9a2871edebff79209622c86e27a173fa71..7621a97b8a54466b81f4e3e45732e397d34c45fc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index a72a09ce0cd4d6a800b7a4bc44dcb0117cbfd397..5f244205d27038909ec88ff4867f7b5278da91d4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index acc39e1cb254531cd234d4dcd1ce5b961fe01d9f..04a76982d569d5121937215486a1ecd4c5cc0604 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -51,7 +51,7 @@ xdmcp_x_server_stopped_cb (DisplayServer *display_server, Seat *seat)
     g_signal_handlers_disconnect_matched (SEAT_XLOCAL (seat)->priv->xdmcp_x_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat);
     SEAT_XLOCAL (seat)->priv->xdmcp_x_server = NULL;
     g_object_unref (display_server);
-    
+
     if (seat_get_is_stopping (seat))
         check_stopped (SEAT_XLOCAL (seat));
     else
@@ -90,7 +90,7 @@ seat_xlocal_start (Seat *seat)
             result = g_key_file_load_from_file (keys, path, G_KEY_FILE_NONE, &error);
             if (error)
                 l_debug (seat, "Error getting key %s", error->message);
-            g_clear_error (&error);      
+            g_clear_error (&error);
 
             if (result)
             {
@@ -203,9 +203,9 @@ create_x_server (Seat *seat)
     config_file = seat_get_string_property (seat, "xserver-config");
     if (config_file)
         x_server_local_set_config (x_server, config_file);
-  
+
     allow_tcp = seat_get_boolean_property (seat, "xserver-allow-tcp");
-    x_server_local_set_allow_tcp (x_server, allow_tcp);    
+    x_server_local_set_allow_tcp (x_server, allow_tcp);
 
     return x_server;
 }
@@ -232,7 +232,7 @@ create_unity_system_compositor (Seat *seat)
     vt = get_vt (seat, DISPLAY_SERVER (compositor));
     if (vt >= 0)
         unity_system_compositor_set_vt (compositor, vt);
-  
+
     for (i = 0; ; i++)
     {
         socket_name = g_strdup_printf ("/run/lightdm-mir-%d", i);
@@ -266,7 +266,7 @@ seat_xlocal_create_display_server (Seat *seat, Session *session)
         compositor_command = session_config_get_compositor_command (session_get_config (session));
         if (compositor_command)
             unity_system_compositor_set_command (UNITY_SYSTEM_COMPOSITOR (compositor), compositor_command);
-      
+
         return compositor;
     }
     else
index 41fdb74f48a828ed0f7d37c55bda62a24e440fe7..c60ecdf4df6930eee10bc2a91cda5a35c089560d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index d7af16aaa021cb846ca93a47c60edbb3b85c8844..1a46f4010b7cbd6bfb808bda999287a0ee430428 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -79,7 +79,7 @@ seat_xremote_run_script (Seat *seat, DisplayServer *display_server, Process *scr
     XServerRemote *x_server;
 
     x_server = X_SERVER_REMOTE (display_server);
-    process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));  
+    process_set_env (script, "DISPLAY", x_server_get_address (X_SERVER (x_server)));
     process_set_env (script, "REMOTE_HOST", x_server_get_hostname (X_SERVER (x_server)));
 
     SEAT_CLASS (seat_xremote_parent_class)->run_script (seat, display_server, script);
index dd96462d308842dd49091421110c93ec76b30345..2e14d36c191d8bec9ae5c451844c0a47a4d9af66 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index fa7737ecd53dd377e08814bb922fc34de4764190..00f5f6934a9a56fb845677aaf3e3c437c4c077b6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -41,7 +41,7 @@ seat_xvnc_create_display_server (Seat *seat, Session *session)
 
     if (strcmp (session_get_session_type (session), "x") != 0)
         return NULL;
-  
+
     x_server = x_server_xvnc_new ();
     x_server_xvnc_set_socket (x_server, g_socket_get_fd (SEAT_XVNC (seat)->priv->connection));
 
index 2e4c529133337c10d3e694134673eb2bb641be7d..f96e590a104b62f4d1ec700b4aacf70d6d35a525 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index c115aa18a597eb8f9bf086e53f2ac5b50dd636fb..529774e9dcbf206415460a255207427feb6560e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -56,7 +56,7 @@ struct SeatPrivate
 
     /* The session to set active when it starts */
     Session *session_to_activate;
-  
+
     /* TRUE once we have started */
     gboolean started;
 
@@ -106,7 +106,7 @@ seat_new (const gchar *module_name, const gchar *name)
 {
     Seat *seat;
     SeatModule *m = NULL;
-  
+
     g_return_val_if_fail (module_name != NULL, NULL);
 
     if (seat_modules)
@@ -288,7 +288,7 @@ run_script (Seat *seat, DisplayServer *display_server, const gchar *script_name,
 {
     Process *script;
     gboolean result = FALSE;
-  
+
     script = process_new (NULL, NULL);
 
     process_set_command (script, script_name);
@@ -338,7 +338,7 @@ run_script (Seat *seat, DisplayServer *display_server, const gchar *script_name,
 
 static void
 seat_real_run_script (Seat *seat, DisplayServer *display_server, Process *process)
-{  
+{
 }
 
 static void
@@ -476,7 +476,7 @@ find_resettable_greeter (Seat *seat)
 static void
 set_greeter_hints (Seat *seat, Greeter *greeter_session)
 {
-    greeter_clear_hints (greeter_session);    
+    greeter_clear_hints (greeter_session);
     greeter_set_hint (greeter_session, "default-session", seat_get_string_property (seat, "user-session"));
     greeter_set_hint (greeter_session, "hide-users", seat_get_boolean_property (seat, "greeter-hide-users") ? "true" : "false");
     greeter_set_hint (greeter_session, "show-manual-login", seat_get_boolean_property (seat, "greeter-show-manual-login") ? "true" : "false");
@@ -893,7 +893,7 @@ get_session_argv (Seat *seat, SessionConfig *session_config, const gchar *sessio
         g_free (argv[0]);
         argv[0] = path;
     }
-  
+
     return argv;
 }
 
@@ -1051,7 +1051,7 @@ create_guest_session (Seat *seat, const gchar *session_name)
     session_set_argv (session, argv);
     g_strfreev (argv);
     g_object_unref (session_config);
-  
+
     return session;
 }
 
@@ -1091,7 +1091,7 @@ greeter_start_session_cb (Greeter *greeter, SessionType type, const gchar *sessi
         gchar **argv;
 
         session = greeter_get_authentication_session (greeter);
-  
+
         /* Get session command to run */
         switch (type)
         {
@@ -1215,14 +1215,14 @@ create_greeter_session (Seat *seat)
     g_signal_connect (greeter_session, "notify::active-username", G_CALLBACK (greeter_active_username_changed_cb), seat);
     g_signal_connect (greeter_session, "authentication-complete", G_CALLBACK (session_authentication_complete_cb), seat);
     g_signal_connect (greeter_session, "stopped", G_CALLBACK (session_stopped_cb), seat);
-  
+
     set_session_env (SESSION (greeter_session));
     session_set_env (SESSION (greeter_session), "XDG_SESSION_CLASS", "greeter");
 
     session_set_pam_service (SESSION (greeter_session), seat_get_string_property (seat, "pam-greeter-service"));
     if (getuid () == 0)
     {
-        gchar *greeter_user;      
+        gchar *greeter_user;
         greeter_user = config_get_string (config_get_instance (), "LightDM", "greeter-user");
         session_set_username (SESSION (greeter_session), greeter_user);
         g_free (greeter_user);
@@ -1634,7 +1634,7 @@ seat_real_start (Seat *seat)
             background_session = session;
             session = NULL;
         }
-      
+
         if (session)
         {
             DisplayServer *display_server;
@@ -1796,7 +1796,7 @@ seat_finalize (GObject *object)
     {
         DisplayServer *display_server = link->data;
         g_signal_handlers_disconnect_matched (display_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self);
-    }  
+    }
     g_list_free_full (self->priv->display_servers, g_object_unref);
     for (link = self->priv->sessions; link; link = link->next)
     {
index ef9c8cb0a111e43f435e10e7b19feb01c5063076..50de1eb43c09155e655391f8b182398694592cc7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 98a973c080197f6ef27d84ee514d27d91f82ab96..c6f8a7ce350344b0d974379e38cb9ee532757230 100644 (file)
@@ -67,7 +67,7 @@ read_data (void *buf, size_t count)
     n_read = read (from_daemon_output, buf, count);
     if (n_read < 0)
         g_printerr ("Error reading from daemon: %s\n", strerror (errno));
-  
+
     return n_read;
 }
 
@@ -86,10 +86,10 @@ read_string_full (void* (*alloc_fn)(size_t n))
         g_printerr ("Invalid string length %d from daemon\n", length);
         return NULL;
     }
-  
+
     value = (*alloc_fn) (sizeof (char) * (length + 1));
     read_data (value, length);
-    value[length] = '\0';      
+    value[length] = '\0';
 
     return value;
 }
@@ -216,7 +216,7 @@ updwtmpx (const gchar *wtmp_file, struct utmpx *ut)
         strncpy (u.ut_host, ut->ut_host, sizeof (u.ut_host));
     u.ut_tv.tv_sec = ut->ut_tv.tv_sec;
     u.ut_tv.tv_usec = ut->ut_tv.tv_usec;
-  
+
     updwtmp (wtmp_file, &u);
 }
 
@@ -329,7 +329,7 @@ session_child_run (int argc, char **argv)
         pam_set_item (pam_handle, PAM_TTY, xdisplay);
     }
     else if (tty)
-        pam_set_item (pam_handle, PAM_TTY, tty);    
+        pam_set_item (pam_handle, PAM_TTY, tty);
 
 #ifdef PAM_XAUTHDATA
     if (x_authority)
@@ -457,7 +457,7 @@ session_child_run (int argc, char **argv)
     if (version >= 1)
     {
         g_free (tty);
-        tty = read_string ();      
+        tty = read_string ();
     }
     x_authority_filename = read_string ();
     if (version >= 1)
@@ -501,7 +501,7 @@ session_child_run (int argc, char **argv)
     }
     else
     {
-        fd = open ("/dev/null", O_WRONLY);   
+        fd = open ("/dev/null", O_WRONLY);
         dup2 (fd, STDERR_FILENO);
         close (fd);
     }
@@ -524,7 +524,7 @@ session_child_run (int argc, char **argv)
         pam_end (pam_handle, 0);
         return EXIT_FAILURE;
     }
-     
+
     /* Open the session */
     result = pam_open_session (pam_handle, 0);
     if (result != PAM_SUCCESS)
index 49d7051ea5ba91f163366fd73a0ba26b9622ab58..cf56394167e90cc9501d25f168b9708f8b3ac02b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 25e8002b2a87bc2805afe1aa9e1fcc26a9b1f37e..a86dc56d95d1d26e8b89f1f61d00d785bb45f7d1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2013 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 5169bbdaa759ad1aa64979750085483fc6f1d48a..a1e88937746df7a36c4fc5472735c13a575ecda8 100644 (file)
@@ -310,7 +310,7 @@ session_get_env (Session *session, const gchar *name)
     link = find_env_entry (session, name);
     if (!link)
         return NULL;
-  
+
     entry = link->data;
 
     return entry + strlen (name) + 1;
@@ -322,7 +322,7 @@ session_unset_env (Session *session, const gchar *name)
     GList *link;
 
     g_return_if_fail (session != NULL);
-  
+
     link = find_env_entry (session, name);
     if (!link)
         return;
index e820e137e07d051d35431aa3260c3cb49563c54d..b79a53d8dd8a625805035612057652a474f459b1 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index c2892212d29278f41fc0ebb7ee7442b0d8fe6264..5b6676470ebda2e2f3b962c4184e9c2ad76aea72 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2014 Canonical, Ltd
  * Author: Michael Terry <michael.terry@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -93,7 +93,7 @@ shared_data_manager_ensure_user_dir (SharedDataManager *manager, const gchar *us
     entry = getpwnam (user);
     if (!entry)
         return NULL;
-  
+
     path = g_build_filename (USERS_DIR, user, NULL);
     file = g_file_new_for_path (path);
 
@@ -107,7 +107,7 @@ shared_data_manager_ensure_user_dir (SharedDataManager *manager, const gchar *us
         else
             g_warning ("Could not create user data directory %s: %s", path, error->message);
     }
-    g_clear_error (&error);  
+    g_clear_error (&error);
     if (!result)
     {
         g_object_unref (file);
index 763330c83cc9adff2c426740e3b91b3a996ff78c..7b60e8f05ccef560bfbf70167824901143427a86 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2014 Canonical, Ltd
  * Author: Michael Terry <michael.terry@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 70c5d17abb6c46d432445b790bd01ba4167c3535..405025570ee4cd4e70b64508194e3346fb906606 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2013 Canonical Ltd.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -238,7 +238,7 @@ read_cb (GIOChannel *source, GIOCondition condition, gpointer data)
     gsize n_to_read = 0;
     guint16 id, payload_length;
     /*guint8 *payload;*/
-  
+
     if (condition == G_IO_HUP)
     {
         l_debug (compositor, "Compositor closed communication channel");
@@ -459,7 +459,7 @@ unity_system_compositor_start (DisplayServer *server)
 
     return TRUE;
 }
+
 static void
 unity_system_compositor_stop (DisplayServer *server)
 {
@@ -481,7 +481,7 @@ unity_system_compositor_finalize (GObject *object)
 {
     UnitySystemCompositor *self;
 
-    self = UNITY_SYSTEM_COMPOSITOR (object);  
+    self = UNITY_SYSTEM_COMPOSITOR (object);
 
     if (self->priv->process)
     {
@@ -497,7 +497,7 @@ unity_system_compositor_finalize (GObject *object)
     close (self->priv->from_compositor_pipe[0]);
     close (self->priv->from_compositor_pipe[1]);
     g_io_channel_unref (self->priv->from_compositor_channel);
-    if (self->priv->from_compositor_watch)      
+    if (self->priv->from_compositor_watch)
         g_source_remove (self->priv->from_compositor_watch);
     g_free (self->priv->read_buffer);
     if (self->priv->timeout_source)
index 5354429d3f457b65704cdf25bcdfa30145597ba7..cfd0d4d28bb916234fa769584be6f00988572b0c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2013 Canonical Ltd.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index b265e287372f78be40dbc95fdca287ed70fd8005..1755ffdbfc0e7c920bcc3de1b23bf543f164ed8d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -82,7 +82,7 @@ open_tcp_socket (GSocketFamily family, guint port, GError **error)
 {
     GSocket *socket;
     GSocketAddress *address;
-  
+
     socket = g_socket_new (family, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_TCP, error);
     if (!socket)
         return NULL;
@@ -105,19 +105,19 @@ vnc_server_start (VNCServer *server)
     GError *error = NULL;
 
     g_return_val_if_fail (server != NULL, FALSE);
-  
+
     server->priv->socket = open_tcp_socket (G_SOCKET_FAMILY_IPV4, server->priv->port, &error);
     if (error)
         g_warning ("Failed to create IPv4 VNC socket: %s", error->message);
     g_clear_error (&error);
-  
+
     if (server->priv->socket)
     {
         source = g_socket_create_source (server->priv->socket, G_IO_IN, NULL);
         g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL);
         g_source_attach (source, NULL);
     }
-    
+
     server->priv->socket6 = open_tcp_socket (G_SOCKET_FAMILY_IPV6, server->priv->port, &error);
     if (error)
         g_warning ("Failed to create IPv6 VNC socket: %s", error->message);
@@ -149,13 +149,13 @@ vnc_server_finalize (GObject *object)
     VNCServer *self;
 
     self = VNC_SERVER (object);
-  
+
     if (self->priv->socket)
         g_object_unref (self->priv->socket);
     if (self->priv->socket6)
         g_object_unref (self->priv->socket6);
-  
-    G_OBJECT_CLASS (vnc_server_parent_class)->finalize (object);  
+
+    G_OBJECT_CLASS (vnc_server_parent_class)->finalize (object);
 }
 
 static void
@@ -163,7 +163,7 @@ vnc_server_class_init (VNCServerClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-    object_class->finalize = vnc_server_finalize;  
+    object_class->finalize = vnc_server_finalize;
 
     g_type_class_add_private (klass, sizeof (VNCServerPrivate));
 
index 83f01cbbe008dd79750d9d1f92029b27ed3970fd..109dc9044a8cad5d8d6a5db72ebc244c2e03a6e7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index fa0a0448c3f88cd8c6e56086188d0ca63c88d849..921589023349888d326991b818d27b144f952633 100644 (file)
--- a/src/vt.c
+++ b/src/vt.c
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -88,7 +88,7 @@ vt_set_active (gint number)
 
     /* Pretend always active */
     if (getuid () != 0)
-        return;   
+        return;
 
     console_fd = open_console ();
     if (console_fd >= 0)
@@ -147,7 +147,7 @@ vt_get_unused (void)
     number = vt_get_min ();
     while (vt_is_used (number))
         number++;
+
     return number;
 }
 
@@ -155,7 +155,7 @@ void
 vt_ref (gint number)
 {
     g_debug ("Using VT %d", number);
-    used_vts = g_list_append (used_vts, GINT_TO_POINTER (number)); 
+    used_vts = g_list_append (used_vts, GINT_TO_POINTER (number));
 }
 
 void
index f57ebb4d8b7ebfad7c6218faf672906533e0df70..a731becadb4592e80fb139106843c71a335b470f 100644 (file)
--- a/src/vt.h
+++ b/src/vt.h
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 1b18ab0e4c8ec9d886f07dd806c0c5aa1c09d0d3..25f66438e6431bc33b1b1d22b236f171507e98fb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -27,7 +27,7 @@ struct XAuthorityPrivate
     /* Address of the X server (format dependent on family) */
     guint8 *address;
     gsize address_length;
-  
+
     /* Display number of X server */
     gchar *number;
 
@@ -46,7 +46,7 @@ x_authority_new (guint16 family, const guint8 *address, gsize address_length, co
 {
     XAuthority *auth = g_object_new (X_AUTHORITY_TYPE, NULL);
 
-    x_authority_set_family (auth, family);  
+    x_authority_set_family (auth, family);
     x_authority_set_address (auth, address, address_length);
     x_authority_set_number (auth, number);
     x_authority_set_authorization_name (auth, name);
@@ -60,7 +60,7 @@ x_authority_new_cookie (guint16 family, const guint8 *address, gsize address_len
 {
     guint8 cookie[16];
     gint i;
-  
+
     for (i = 0; i < 16; i++)
         cookie[i] = g_random_int () & 0xFF;
 
@@ -193,7 +193,7 @@ read_data (gchar *data, gsize data_length, gsize *offset, guint16 length, guint8
 
     if (data_length - *offset < length)
         return FALSE;
-  
+
     *value = g_malloc0 (length + 1);
     for (i = 0; i < length; i++)
         (*value)[i] = data[*offset + i];
@@ -360,7 +360,7 @@ x_authority_write (XAuthority *auth, XAuthWriteMode mode, const gchar *filename,
     }
 
     return TRUE;
-}    
+}
 
 static void
 x_authority_init (XAuthority *auth)
@@ -381,7 +381,7 @@ x_authority_finalize (GObject *object)
     g_free (self->priv->authorization_name);
     g_free (self->priv->authorization_data);
 
-    G_OBJECT_CLASS (x_authority_parent_class)->finalize (object);  
+    G_OBJECT_CLASS (x_authority_parent_class)->finalize (object);
 }
 
 static void
index d7dacb624a0f0aba6b622dd3f3f430d7e51c1d71..101cb1cac323008c656b110c4f1e6d1504989158 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -47,7 +47,7 @@ typedef enum
 {
    XAUTH_WRITE_MODE_REPLACE,
    XAUTH_WRITE_MODE_REMOVE,
-   XAUTH_WRITE_MODE_SET  
+   XAUTH_WRITE_MODE_SET
 } XAuthWriteMode;
 
 GType x_authority_get_type (void);
index d908f2adb611f4abc3995404d2a3d7952380a18c..3f58e0b7fc78df906ad813c80bd211c82e2cf852 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -36,7 +36,7 @@ struct XServerLocalPrivate
 
     /* Server layout to use */
     gchar *layout;
-    
+
     /* Value for -seat argument */
     gchar *xdg_seat;
 
@@ -113,7 +113,7 @@ display_number_in_use (guint display_number)
     }
 
     g_free (path);
-  
+
     return in_use;
 }
 
@@ -289,7 +289,7 @@ x_server_local_set_mir_id (XServerLocal *server, const gchar *id)
 const gchar *x_server_local_get_mir_id (XServerLocal *server)
 {
     g_return_val_if_fail (server != NULL, NULL);
-    return server->priv->mir_id; 
+    return server->priv->mir_id;
 }
 
 void
@@ -376,7 +376,7 @@ stopped_cb (Process *process, XServerLocal *server)
         server->priv->have_vt_ref = FALSE;
     }
     x_server_local_release_display_number (x_server_get_display_number (X_SERVER (server)));
-  
+
     if (x_server_get_authority (X_SERVER (server)) && server->priv->authority_file)
     {
         l_debug (server, "Removing X server authority %s", server->priv->authority_file);
@@ -404,7 +404,7 @@ write_authority_file (XServerLocal *server)
     if (!server->priv->authority_file)
     {
         gchar *run_dir, *dir;
-      
+
         run_dir = config_get_string (config_get_instance (), "LightDM", "run-directory");
         dir = g_build_filename (run_dir, "root", NULL);
         g_free (run_dir);
@@ -469,7 +469,7 @@ x_server_local_start (DisplayServer *display_server)
 
     if (server->priv->layout)
         g_string_append_printf (command, " -layout %s", server->priv->layout);
-        
+
     if (server->priv->xdg_seat)
         g_string_append_printf (command, " -seat %s", server->priv->xdg_seat);
 
@@ -543,7 +543,7 @@ x_server_local_start (DisplayServer *display_server)
 
     return result;
 }
+
 static void
 x_server_local_stop (DisplayServer *server)
 {
@@ -563,9 +563,9 @@ x_server_local_finalize (GObject *object)
 {
     XServerLocal *self;
 
-    self = X_SERVER_LOCAL (object);  
+    self = X_SERVER_LOCAL (object);
 
-    if (self->priv->x_server_process) 
+    if (self->priv->x_server_process)
     {
         g_signal_handlers_disconnect_matched (self->priv->x_server_process, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, self);
         g_object_unref (self->priv->x_server_process);
index 1dca023580e1c6254d8a4dca53de1208695310d8..23c1d9a96bce588dab8903d213d448ec57585b6d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 5fc7ae95988bbf11a23777c6f5cfebe8998341f0..1d1bc2a5070c1e44ef5be916810528d4eb5dcf25 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 70f8baadf542e1d3831379983fa579aefc8b4862..024b8c3b991dc0c966b08405d07b47d7b7b13062 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 884489dd66a19fdde2fb4bc1382faabdff23a555..cea1782a9d1b3db2a023888658875f338b0dbc7d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -35,7 +35,7 @@ struct XServerXVNCPrivate
 
     /* File descriptor to use for standard input */
     gint socket_fd;
-  
+
     /* Geometry and colour depth */
     gint width, height, depth;
 
@@ -237,10 +237,10 @@ x_server_xvnc_start (DisplayServer *display_server)
     if (error)
         l_warning (display_server, "Failed to write authority: %s", error->message);
     g_clear_error (&error);
-  
+
     command = g_string_new (absolute_command);
     g_free (absolute_command);
-  
+
     g_string_append_printf (command, " :%d", x_server_get_display_number (X_SERVER (server)));
     g_string_append_printf (command, " -auth %s", server->priv->authority_file);
     g_string_append (command, " -inetd -nolisten tcp");
@@ -271,7 +271,7 @@ x_server_xvnc_start (DisplayServer *display_server)
 
     return result;
 }
+
 static void
 x_server_xvnc_stop (DisplayServer *server)
 {
index d99ffe70a1d022c7c4958eb37e84a6d7f640d502..4a7bc54ce591958ec1f976562302827936f8149b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index c23fe1f93ed0f40377fe428023730d028ef292ca..10ba903a3b2e2f3140e32bc3b931b428bfde1d35 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -17,7 +17,7 @@
 #include "configuration.h"
 
 struct XServerPrivate
-{  
+{
     /* Host running the server */
     gchar *hostname;
 
@@ -80,7 +80,7 @@ x_server_get_address (XServer *server)
             server->priv->address = g_strdup_printf("%s:%d", server->priv->hostname, server->priv->number);
         else
             server->priv->address = g_strdup_printf(":%d", server->priv->number);
-    }  
+    }
 
     return server->priv->address;
 }
@@ -132,7 +132,7 @@ x_server_start (DisplayServer *display_server)
         auth = &a;
     }
 
-    /* Open connection */  
+    /* Open connection */
     l_debug (server, "Connecting to XServer %s", x_server_get_address (server));
     server->priv->connection = xcb_connect_to_display_with_auth_info (x_server_get_address (server), auth, NULL);
     if (xcb_connection_has_error (server->priv->connection))
@@ -224,7 +224,7 @@ x_server_class_init (XServerClass *klass)
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
     DisplayServerClass *display_server_class = DISPLAY_SERVER_CLASS (klass);
 
-    display_server_class->get_session_type = x_server_get_session_type;    
+    display_server_class->get_session_type = x_server_get_session_type;
     display_server_class->get_can_share = x_server_get_can_share;
     display_server_class->start = x_server_start;
     display_server_class->connect_session = x_server_connect_session;
index ef8ce627029c7ea7ff927fc1fa0726533b814e33..2760b8a2c23500bc446001eb6efccc43cd3caa33 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 698edba95a4f57bbafd2b6f22f3abc7e4a559844..eb5517fb7e8d7350ce1089fb9f87245a65293c3b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -187,7 +187,7 @@ xdmcp_packet_decode (const guint8 *data, gsize data_length)
     length = read_card16 (&reader);
 
     if (reader.overflow)
-    {      
+    {
         g_warning ("Ignoring short packet"); // FIXME: Use GError
         return NULL;
     }
@@ -351,7 +351,7 @@ xdmcp_packet_encode (XDMCPPacket *packet, guint8 *data, gsize max_length)
         write_string (&writer, packet->Request.manufacturer_display_id);
         break;
     case XDMCP_Accept:
-        write_card32 (&writer, packet->Accept.session_id);      
+        write_card32 (&writer, packet->Accept.session_id);
         write_string (&writer, packet->Accept.authentication_name);
         write_data (&writer, &packet->Accept.authentication_data);
         write_string (&writer, packet->Accept.authorization_name);
@@ -399,7 +399,7 @@ xdmcp_packet_encode (XDMCPPacket *packet, guint8 *data, gsize max_length)
         g_warning ("Overflow writing response");
         return -1;
     }
-  
+
     return length + 6;
 }
 
@@ -425,8 +425,8 @@ string_list_tostring (gchar **strings)
     GString *s;
     gchar *string;
     gchar **i;
-  
-    s = g_string_new ("");  
+
+    s = g_string_new ("");
     for (i = strings; *i; i++)
     {
         if (i != strings)
@@ -474,7 +474,7 @@ xdmcp_packet_tostring (XDMCPPacket *packet)
                                 packet->Willing.authentication_name, packet->Willing.hostname, packet->Willing.status);
     case XDMCP_Unwilling:
         return g_strdup_printf ("Unwilling(hostname='%s' status='%s')",
-                                packet->Unwilling.hostname, packet->Unwilling.status);      
+                                packet->Unwilling.hostname, packet->Unwilling.status);
     case XDMCP_Request:
         t = string_list_tostring (packet->Request.authorization_names);
         t2 = data_tostring (&packet->Request.authentication_data);
index b8eeda09f44656eb334a842dde64dfc7398241d9..1c7a639b2102a3c913195edcc982376bfca0acf5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -49,7 +49,7 @@ typedef struct
 typedef struct
 {
     XDMCPOpcode opcode;
-  
+
     union
     {
         struct
index a2d456377186acf8ebce262e9f9d89a790588808..4d45fb40a05cd62d2ce8b26bcff79145441baf85 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -155,7 +155,7 @@ send_packet (GSocket *socket, GSocketAddress *address, XDMCPPacket *packet)
     gssize n_written;
 
     g_debug ("Send %s", xdmcp_packet_tostring (packet));
-              
+
     n_written = xdmcp_packet_encode (packet, data, 1024);
     if (n_written < 0)
       g_critical ("Failed to encode XDMCP packet");
@@ -215,7 +215,7 @@ handle_query (XDMCPServer *server, GSocket *socket, GSocketAddress *address, XDM
         else
             response->Unwilling.status = g_strdup ("Server does not support authentication");
     }
-  
+
     send_packet (socket, address, response);
 
     xdmcp_packet_free (response);
@@ -325,7 +325,7 @@ handle_request (XDMCPServer *server, GSocket *socket, GSocketAddress *address, X
         xdmcp_packet_free (response);
         return;
     }
-  
+
     /* Must be using our authentication scheme */
     if (strcmp (packet->Request.authentication_name, get_authentication_name (server)) != 0)
     {
@@ -572,7 +572,7 @@ read_cb (GSocket *socket, GIOCondition condition, XDMCPServer *server)
 
         packet = xdmcp_packet_decode ((guint8 *)data, n_read);
         if (packet)
-        {        
+        {
             g_debug ("Got %s", xdmcp_packet_tostring (packet));
 
             switch (packet->opcode)
@@ -586,7 +586,7 @@ read_cb (GSocket *socket, GIOCondition condition, XDMCPServer *server)
                 handle_request (server, socket, address, packet);
                 break;
             case XDMCP_Manage:
-                handle_manage (server, socket, address, packet);              
+                handle_manage (server, socket, address, packet);
                 break;
             case XDMCP_KeepAlive:
                 handle_keep_alive (server, socket, address, packet);
@@ -609,7 +609,7 @@ open_udp_socket (GSocketFamily family, guint port, GError **error)
     GSocket *socket;
     GSocketAddress *address;
     gboolean result;
-  
+
     socket = g_socket_new (family, G_SOCKET_TYPE_DATAGRAM, G_SOCKET_PROTOCOL_UDP, error);
     if (!socket)
         return NULL;
@@ -632,19 +632,19 @@ xdmcp_server_start (XDMCPServer *server)
     GError *error = NULL;
 
     g_return_val_if_fail (server != NULL, FALSE);
-  
+
     server->priv->socket = open_udp_socket (G_SOCKET_FAMILY_IPV4, server->priv->port, &error);
     if (error)
         g_warning ("Failed to create IPv4 XDMCP socket: %s", error->message);
     g_clear_error (&error);
-  
+
     if (server->priv->socket)
     {
         source = g_socket_create_source (server->priv->socket, G_IO_IN, NULL);
         g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL);
         g_source_attach (source, NULL);
     }
-    
+
     server->priv->socket6 = open_udp_socket (G_SOCKET_FAMILY_IPV6, server->priv->port, &error);
     if (error)
         g_warning ("Failed to create IPv6 XDMCP socket: %s", error->message);
@@ -680,7 +680,7 @@ xdmcp_server_finalize (GObject *object)
     XDMCPServer *self;
 
     self = XDMCP_SERVER (object);
-  
+
     if (self->priv->socket)
         g_object_unref (self->priv->socket);
     if (self->priv->socket6)
@@ -689,8 +689,8 @@ xdmcp_server_finalize (GObject *object)
     g_free (self->priv->status);
     g_free (self->priv->key);
     g_hash_table_unref (self->priv->sessions);
-  
-    G_OBJECT_CLASS (xdmcp_server_parent_class)->finalize (object);  
+
+    G_OBJECT_CLASS (xdmcp_server_parent_class)->finalize (object);
 }
 
 static void
@@ -698,7 +698,7 @@ xdmcp_server_class_init (XDMCPServerClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-    object_class->finalize = xdmcp_server_finalize;  
+    object_class->finalize = xdmcp_server_finalize;
 
     g_type_class_add_private (klass, sizeof (XDMCPServerPrivate));
 
index 5c12a365985ae78e9c3a26436b4f34c053819e6a..31cd0fb6c4b93992f4764592df511451e0ddad2e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index adb133f2048587d942d5e4d598c9c1d75d844c4a..a40568a19495e44a8603aa3287032fa7434f35e0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -28,7 +28,7 @@ struct XDMCPSessionPrivate
     guint inactive_timeout;
 
     XAuthority *authority;
-  
+
     gboolean started;
 
     guint16 display_number;
index da2a70811580f657699ac06cb28416e4211fc13e..71c5704da52602a09ad4b9f5b85f57ce473ad508 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
@@ -80,7 +80,7 @@ xdmcp_session_finalize (GObject *object)
     XDMCPSession *self;
 
     self = XDMCP_SESSION (object);
-  
+
     g_free (self->priv->manufacturer_display_id);
     if (self->priv->address)
         g_object_unref (self->priv->address);
@@ -96,7 +96,7 @@ xdmcp_session_class_init (XDMCPSessionClass *klass)
 {
     GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-    object_class->finalize = xdmcp_session_finalize;  
+    object_class->finalize = xdmcp_session_finalize;
 
     g_type_class_add_private (klass, sizeof (XDMCPSessionPrivate));
 }
index 2205fe145826f68e54bc1085727fc00d6c5e2240..63b3f36717202a67654c7e28e720495038add3e2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
index 606fb12d82ad82d4c6ef3912b9ae34a125dd5d53..2fd722dabefef9f5c9d3134ef690916d84032ebe 100644 (file)
@@ -137,7 +137,7 @@ xdmcp_accept_cb (XDMCPClient *client, XDMCPAccept *message)
 static void
 xdmcp_decline_cb (XDMCPClient *client, XDMCPDecline *message)
 {
-    status_notify ("%s GOT-DECLINE STATUS=\"%s\" AUTHENTICATION-NAME=\"%s\"", id, message->status, message->authentication_name);  
+    status_notify ("%s GOT-DECLINE STATUS=\"%s\" AUTHENTICATION-NAME=\"%s\"", id, message->status, message->authentication_name);
 }
 
 static void
@@ -155,8 +155,8 @@ client_connected_cb (XServer *server, XClient *client)
 
 static void
 client_disconnected_cb (XServer *server, XClient *client)
-{  
-    g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL);  
+{
+    g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL);
 }
 
 static void
@@ -367,7 +367,7 @@ main (int argc, char **argv)
                 gchar *socket_path;
 
                 socket_dir = g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "tmp", ".X11-unix", NULL);
-                g_mkdir_with_parents (socket_dir, 0755);                
+                g_mkdir_with_parents (socket_dir, 0755);
 
                 socket_filename = g_strdup_printf ("X%d", display_number);
                 socket_path = g_build_filename (socket_dir, socket_filename, NULL);
@@ -415,7 +415,7 @@ main (int argc, char **argv)
             xdmcp_client_set_hostname (xdmcp_client, xdmcp_host);
         if (xdmcp_port > 0)
             xdmcp_client_set_port (xdmcp_client, xdmcp_port);
-        g_signal_connect (xdmcp_client, "query", G_CALLBACK (xdmcp_query_cb), NULL);      
+        g_signal_connect (xdmcp_client, "query", G_CALLBACK (xdmcp_query_cb), NULL);
         g_signal_connect (xdmcp_client, "willing", G_CALLBACK (xdmcp_willing_cb), NULL);
         g_signal_connect (xdmcp_client, "accept", G_CALLBACK (xdmcp_accept_cb), NULL);
         g_signal_connect (xdmcp_client, "decline", G_CALLBACK (xdmcp_decline_cb), NULL);
index b7e3498e56e885463b8cb86c305188eb97ce3d0c..79f9193e9c00a4b250cbca69628274a7ea25352d 100644 (file)
@@ -86,8 +86,8 @@ client_connected_cb (XServer *server, XClient *client)
 
 static void
 client_disconnected_cb (XServer *server, XClient *client)
-{  
-    g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL);  
+{
+    g_signal_handlers_disconnect_matched (client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, NULL);
 }
 
 static gboolean
@@ -110,7 +110,7 @@ vnc_data_cb (GIOChannel *channel, GIOCondition condition, gpointer data)
             buffer[n_read-1] = '\0';
         status_notify ("%s VNC-CLIENT-CONNECT VERSION=\"%s\"", id, buffer);
     }
-  
+
     return TRUE;
 }
 
@@ -191,7 +191,7 @@ main (int argc, char **argv)
         {
             g_free (geometry);
             geometry = g_strdup (argv[i+1]);
-            i++;         
+            i++;
         }
         else if (strcmp (arg, "-depth") == 0)
         {
@@ -232,7 +232,7 @@ main (int argc, char **argv)
 
     config = g_key_file_new ();
     g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
-  
+
     if (use_inetd)
     {
         if (!g_io_add_watch (g_io_channel_unix_new (STDIN_FILENO), G_IO_IN, vnc_data_cb, NULL))
index c1c0075ccb1b12850a7fb4ff46ab04c4de04fd97..d99d73ae7eeff192991db938c530e53b7f06b9aa 100644 (file)
@@ -43,7 +43,7 @@ create_bus (const gchar *config_file, GPid *pid)
 
     if (n_read > 0 && address[n_read - 1] == '\n')
         address[n_read - 1] = '\0';
-  
+
     return g_strdup (address);
 }
 
index 0f1da6ac60e6c3865b636efd435da0da2fd10048..d83a954d35c6276b70b5b16a71c4171a4c13dbe5 100644 (file)
@@ -346,7 +346,7 @@ stat (const char *path, struct stat *buf)
     int (*_stat) (const char *path, struct stat *buf);
     gchar *new_path = NULL;
     int ret;
-  
+
     _stat = (int (*)(const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "stat");
 
     new_path = redirect_path (path);
@@ -378,7 +378,7 @@ __xstat (int version, const char *path, struct stat *buf)
     int (*___xstat) (int version, const char *path, struct stat *buf);
     gchar *new_path = NULL;
     int ret;
-  
+
     ___xstat = (int (*)(int version, const char *path, struct stat *buf)) dlsym (RTLD_NEXT, "__xstat");
 
     new_path = redirect_path (path);
@@ -394,7 +394,7 @@ __xstat64 (int version, const char *path, struct stat64 *buf)
     int (*___xstat64) (int version, const char *path, struct stat64 *buf);
     gchar *new_path = NULL;
     int ret;
-  
+
     ___xstat64 = (int (*)(int version, const char *path, struct stat64 *buf)) dlsym (RTLD_NEXT, "__xstat64");
 
     new_path = redirect_path (path);
@@ -410,7 +410,7 @@ __fxstatat(int ver, int dirfd, const char *pathname, struct stat *buf, int flags
     int (*___fxstatat) (int ver, int dirfd, const char *pathname, struct stat *buf, int flags);
     gchar *new_path = NULL;
     int ret;
-  
+
     ___fxstatat = (int (*)(int ver, int dirfd, const char *pathname, struct stat *buf, int flags)) dlsym (RTLD_NEXT, "__fxstatat");
 
     new_path = redirect_path (pathname);
@@ -426,7 +426,7 @@ __fxstatat64(int ver, int dirfd, const char *pathname, struct stat64 *buf, int f
     int (*___fxstatat64) (int ver, int dirfd, const char *pathname, struct stat64 *buf, int flags);
     gchar *new_path = NULL;
     int ret;
-  
+
     ___fxstatat64 = (int (*)(int ver, int dirfd, const char *pathname, struct stat64 *buf, int flags)) dlsym (RTLD_NEXT, "__fxstatat64");
 
     new_path = redirect_path (pathname);
@@ -449,7 +449,7 @@ opendir (const char *name)
     result = _opendir (new_path);
     g_free (new_path);
 
-    return result; 
+    return result;
 }
 
 int
@@ -556,7 +556,7 @@ static void
 free_user (gpointer data)
 {
     struct passwd *entry = data;
-  
+
     g_free (entry->pw_name);
     g_free (entry->pw_passwd);
     g_free (entry->pw_gecos);
@@ -649,10 +649,10 @@ struct passwd *
 getpwnam (const char *name)
 {
     GList *link;
-  
+
     if (name == NULL)
         return NULL;
-  
+
     load_passwd_file ();
 
     for (link = user_entries; link; link = link->next)
@@ -690,7 +690,7 @@ static void
 free_group (gpointer data)
 {
     struct group *entry = data;
-  
+
     g_free (entry->gr_name);
     g_free (entry->gr_passwd);
     g_strfreev (entry->gr_mem);
@@ -847,7 +847,7 @@ pam_authenticate (pam_handle_t *pamh, int flags)
         status_notify ("%s", status->str);
         g_string_free (status, TRUE);
     }
-  
+
     if (strcmp (pamh->service_name, "test-remote") == 0)
     {
         int result;
@@ -856,7 +856,7 @@ pam_authenticate (pam_handle_t *pamh, int flags)
 
         msg = malloc (sizeof (struct pam_message *) * 1);
         msg[0] = malloc (sizeof (struct pam_message));
-        msg[0]->msg_style = PAM_PROMPT_ECHO_ON; 
+        msg[0]->msg_style = PAM_PROMPT_ECHO_ON;
         msg[0]->msg = "remote-login:";
         result = pamh->conversation.conv (1, (const struct pam_message **) msg, &resp, pamh->conversation.appdata_ptr);
         free (msg[0]);
@@ -919,7 +919,7 @@ pam_authenticate (pam_handle_t *pamh, int flags)
 
         msg = malloc (sizeof (struct pam_message *) * 1);
         msg[0] = malloc (sizeof (struct pam_message));
-        msg[0]->msg_style = PAM_PROMPT_ECHO_ON; 
+        msg[0]->msg_style = PAM_PROMPT_ECHO_ON;
         msg[0]->msg = LOGIN_PROMPT;
         result = pamh->conversation.conv (1, (const struct pam_message **) msg, &resp, pamh->conversation.appdata_ptr);
         free (msg[0]);
@@ -934,7 +934,7 @@ pam_authenticate (pam_handle_t *pamh, int flags)
             free (resp);
             return PAM_CONV_ERR;
         }
-      
+
         pamh->user = strdup (resp[0].resp);
         free (resp[0].resp);
         free (resp);
@@ -1072,7 +1072,7 @@ static const char *
 get_env_value (const char *name_value, const char *name)
 {
     int j;
-  
+
     for (j = 0; name[j] && name_value[j] && name[j] == name_value[j]; j++);
     if (name[j] == '\0' && name_value[j] == '=')
         return &name_value[j + 1];
@@ -1167,13 +1167,13 @@ pam_get_item (const pam_handle_t *pamh, int item_type, const void **item)
 {
     if (pamh == NULL || item == NULL)
         return PAM_SYSTEM_ERR;
-  
+
     switch (item_type)
     {
     case PAM_SERVICE:
         *item = pamh->service_name;
         return PAM_SUCCESS;
-      
+
     case PAM_USER:
         *item = pamh->user;
         return PAM_SUCCESS;
@@ -1185,11 +1185,11 @@ pam_get_item (const pam_handle_t *pamh, int item_type, const void **item)
     case PAM_RUSER:
         *item = pamh->ruser;
         return PAM_SUCCESS;
-     
+
     case PAM_USER_PROMPT:
         *item = LOGIN_PROMPT;
         return PAM_SUCCESS;
-      
+
     case PAM_TTY:
         *item = pamh->tty;
         return PAM_SUCCESS;
@@ -1310,7 +1310,7 @@ pam_acct_mgmt (pam_handle_t *pamh, int flags)
         status_notify ("%s", status->str);
         g_string_free (status, TRUE);
     }
-  
+
     if (!pamh->user)
         return PAM_USER_UNKNOWN;
 
@@ -1666,7 +1666,7 @@ xcb_connect_to_display_with_auth_info (const char *display, xcb_auth_info_t *aut
     xcb_connection_t *c;
     gchar *socket_path;
     GError *error = NULL;
-  
+
     c = malloc (sizeof (xcb_connection_t));
     c->display = g_strdup (display);
     c->error = 0;
index 1b70f304f64ddde41f5a664cf88416b63c6d5900..ab9bc39d9fd3fbdd3bf298b44059aaa2f3bef6e2 100644 (file)
@@ -38,7 +38,7 @@ main (int argc, char **argv)
     if (argc == 2 && strcmp (argv[1], "--has-active-vt") == 0)
     {
         if (g_key_file_get_boolean (config, "test-plymouth-config", "has-active-vt", NULL))
-        {          
+        {
             status_notify ("PLYMOUTH HAS-ACTIVE-VT=TRUE");
             return EXIT_SUCCESS;
         }
index 34062da48c5c7d07c6d4f75152db6538f7ca7bca..e66e22bcb5abab4d4f4105dcd3a189ea1f635bc2 100644 (file)
@@ -24,7 +24,7 @@ status_request_cb (GSocket *socket, GIOCondition condition, gpointer data)
     gchar *id, *name = NULL;
     gboolean id_matches;
     GHashTable *params;
-    GError *error = NULL;  
+    GError *error = NULL;
 
     n_read = g_socket_receive (socket, (gchar *)&length, sizeof (length), NULL, &error);
     if (n_read > 0)
index 29d193709fd8824f227d995718e4764665c65c6b..f22c888becf7412321dc831deff77ca414446349 100644 (file)
@@ -4,7 +4,7 @@
 #ifdef __cplusplus
 extern "C" {
 #endif
-  
+
 #include <glib-object.h>
 
 typedef void (*StatusRequestFunc)(const gchar *name, GHashTable *params);
index 1aec727daf69a46f2c67aef0cdb9ddddce4131c6..dc12d4755d2716be042559d2b0d347a64673e0e1 100644 (file)
@@ -531,7 +531,7 @@ handle_command (const gchar *command)
         const gchar *id, *v;
         Login1Seat *seat;
 
-        id = g_hash_table_lookup (params, "ID");      
+        id = g_hash_table_lookup (params, "ID");
         seat = add_login1_seat (g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL), id, TRUE);
         v = g_hash_table_lookup (params, "CAN-GRAPHICAL");
         if (v)
@@ -544,7 +544,7 @@ handle_command (const gchar *command)
     {
         Login1Seat *seat;
         const gchar *id;
-      
+
         id = g_hash_table_lookup (params, "ID");
         seat = find_login1_seat (id);
         if (seat)
@@ -1330,7 +1330,7 @@ handle_ck_session_call (GDBusConnection       *connection,
     CKSession *session = user_data;
 
     if (strcmp (method_name, "Lock") == 0)
-    { 
+    {
         if (!session->locked)
             check_status ("CONSOLE-KIT LOCK-SESSION");
         session->locked = TRUE;
@@ -1585,7 +1585,7 @@ remove_login1_seat (GDBusConnection *connection, const gchar *id)
     if (error)
         g_warning ("Failed to emit SeatNew: %s", error->message);
     g_clear_error (&error);
-  
+
     login1_seats = g_list_remove (login1_seats, seat);
     g_free (seat->id);
     g_free (seat->path);
@@ -1930,7 +1930,7 @@ get_accounts_user_by_uid (guint uid)
         if (u->uid == uid)
             return u;
     }
-  
+
     return NULL;
 }
 
@@ -2491,7 +2491,7 @@ main (int argc, char **argv)
         if (!g_file_test (temp_dir, G_FILE_TEST_EXISTS))
             break;
         i++;
-    }  
+    }
     g_mkdir_with_parents (temp_dir, 0755);
     g_setenv ("LIGHTDM_TEST_ROOT", temp_dir, TRUE);
 
index 7ce8a0cdfad8eca51d7dad51ff5c7dc25ab61c1f..e0d720844c4d2a4a5298c228c1c5411e236d5f22 100644 (file)
@@ -19,7 +19,7 @@ main (int argc, char **argv)
 
     config = g_key_file_new ();
     g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
-  
+
     if (argc < 2)
     {
         g_printerr ("Usage: %s text [return-value]\n", argv[0]);
index 0fbb5b1a45b4d0953bd01d991534fbaa3dd3ff8b..24cc286242736dbf435993e627704e80c600d830 100644 (file)
@@ -48,7 +48,7 @@ request_cb (const gchar *name, GHashTable *params)
         g_main_loop_quit (loop);
         return;
     }
-  
+
     if (strcmp (name, "LOGOUT") == 0)
         exit (EXIT_SUCCESS);
 
@@ -180,7 +180,7 @@ request_cb (const gchar *name, GHashTable *params)
     {
         const gchar *data = g_hash_table_lookup (params, "DATA");
         gchar *dir;
-      
+
         dir = getenv ("XDG_GREETER_DATA_DIR");
         if (dir)
         {
index ab6ea1141eca512ef28c42856612d3e4f7339382..f14cdf9c7d4751640e65aab66b161ccc1a5d2d5a 100644 (file)
@@ -93,7 +93,7 @@ read_message_cb (GIOChannel *channel, GIOCondition condition, gpointer data)
     if (n_read != payload_length)
     {
         g_printerr ("Short read for payload, %zi instead of expected %d\n", n_read, payload_length);
-        return FALSE;      
+        return FALSE;
     }
 
     switch (id)
index a8a4b5919cf2057d7753c3dd579c522c90bc9c54..b19170499b9a21c3659077851e87ab99f0dfbeb5 100644 (file)
@@ -33,7 +33,7 @@ main (int argc, char **argv)
 
     config = g_key_file_new ();
     g_key_file_load_from_file (config, g_build_filename (g_getenv ("LIGHTDM_TEST_ROOT"), "script", NULL), G_KEY_FILE_NONE, NULL);
-  
+
     if (argc > 1)
         server_address = g_strdup (argv[1]);
     else
@@ -70,7 +70,7 @@ main (int argc, char **argv)
     address = g_network_address_new (hostname, port);
     enumerator = g_socket_connectable_enumerate (address);
     result = FALSE;
-    while (TRUE) 
+    while (TRUE)
     {
         GSocketAddress *socket_address;
         GError *e = NULL;
index 5f692fe01f01ba3e4e3a1fee8cab318cff4eff58..6344b4a214b11b5a039761cd7571ceb0a3d13eb3 100644 (file)
@@ -68,10 +68,10 @@ x_authority_match_local (XAuthority *authority, const gchar *authorization_name)
     for (link = authority->priv->records; link; link = link->next)
     {
         XAuthorityRecord *record = link->data;
-      
+
         if (strcmp (record->priv->authorization_name, authorization_name) != 0)
             continue;
-      
+
         if (record->priv->family == XAUTH_FAMILY_WILD || record->priv->family == XAUTH_FAMILY_LOCAL)
             return record;
     }
@@ -87,10 +87,10 @@ x_authority_match_localhost (XAuthority *authority, const gchar *authorization_n
     for (link = authority->priv->records; link; link = link->next)
     {
         XAuthorityRecord *record = link->data;
-      
+
         if (strcmp (record->priv->authorization_name, authorization_name) != 0)
             continue;
-      
+
         if (record->priv->family == XAUTH_FAMILY_WILD || record->priv->family == XAUTH_FAMILY_LOCALHOST)
             return record;
     }
@@ -193,7 +193,7 @@ x_authority_record_check_cookie (XAuthorityRecord *record, const guint8 *cookie_
 
     if (strcmp (record->priv->authorization_name, "MIT-MAGIC-COOKIE-1") != 0)
         return FALSE;
-  
+
     if (cookie_data_length != record->priv->authorization_data_length)
         return FALSE;
 
index a9ae7f2fa987d7e2d554d2d93fe51d31a14fe8fd..ab604fdfeb8786826d8da486a988a59028ffc24c 100644 (file)
@@ -37,7 +37,7 @@ struct XServerPrivate
 struct XClientPrivate
 {
     XServer *server;
-    GSocket *socket;  
+    GSocket *socket;
     GIOChannel *channel;
 };
 
@@ -52,7 +52,7 @@ void
 x_client_send_failed (XClient *client, const gchar *reason)
 {
     gchar *message;
-  
+
     message = g_strdup_printf ("FAILED:%s", reason);
     errno = 0;
     if (send (g_io_channel_unix_get_fd (client->priv->channel), message, strlen (message), 0) != strlen (message))
@@ -60,7 +60,7 @@ x_client_send_failed (XClient *client, const gchar *reason)
     g_free (message);
 }
 
-void 
+void
 x_client_send_success (XClient *client)
 {
     gchar *message;
index 4308da871eacb397d071dd282309d6a736a82e72..63c5dba1eefd03ffd4dd05131c82aa6fdb48be76 100644 (file)
@@ -43,7 +43,7 @@ struct XDMCPClientPrivate
 };
 
 enum {
-    XDMCP_CLIENT_QUERY,  
+    XDMCP_CLIENT_QUERY,
     XDMCP_CLIENT_WILLING,
     XDMCP_CLIENT_ACCEPT,
     XDMCP_CLIENT_DECLINE,
@@ -82,7 +82,7 @@ decode_willing (XDMCPClient *client, const guint8 *buffer, gssize buffer_length)
     /* Stop sending queries */
     g_source_remove (client->priv->query_timer);
     client->priv->query_timer = 0;
-  
+
     message = g_malloc0 (sizeof (XDMCPWilling));
 
     length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
@@ -93,7 +93,7 @@ decode_willing (XDMCPClient *client, const guint8 *buffer, gssize buffer_length)
     message->status = read_string (buffer, buffer_length, length, &offset);
 
     g_signal_emit (client, xdmcp_client_signals[XDMCP_CLIENT_WILLING], 0, message);
-  
+
     g_free (message->authentication_name);
     g_free (message->hostname);
     g_free (message->status);
@@ -133,7 +133,7 @@ decode_decline (XDMCPClient *client, const guint8 *buffer, gssize buffer_length)
     XDMCPDecline *message;
     gsize offset = 0;
     guint16 length;
-  
+
     message = g_malloc0 (sizeof (XDMCPDecline));
 
     length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
@@ -142,7 +142,7 @@ decode_decline (XDMCPClient *client, const guint8 *buffer, gssize buffer_length)
     message->authentication_name = read_string (buffer, buffer_length, length, &offset);
     length = read_card16 (buffer, buffer_length, X_BYTE_ORDER_MSB, &offset);
     read_string8 (buffer, buffer_length, length, &offset);
-  
+
     g_signal_emit (client, xdmcp_client_signals[XDMCP_CLIENT_DECLINE], 0, message);
 
     g_free (message->status);
@@ -275,7 +275,7 @@ xdmcp_client_start (XDMCPClient *client)
     address = g_network_address_new (client->priv->host, client->priv->port);
     enumerator = g_socket_connectable_enumerate (address);
     result = FALSE;
-    while (TRUE) 
+    while (TRUE)
     {
         GSocketAddress *socket_address;
         GError *e = NULL;
@@ -299,11 +299,11 @@ xdmcp_client_start (XDMCPClient *client)
         g_warning ("Unable to connect XDMCP socket: %s", error->message);
     if (!result)
         return FALSE;
-  
+
     g_io_add_watch (g_io_channel_unix_new (g_socket_get_fd (client->priv->socket)), G_IO_IN, xdmcp_data_cb, client);
 
     client->priv->query_timer = g_timeout_add (2000, xdmcp_query_cb, client);
-    xdmcp_query_cb (client); 
+    xdmcp_query_cb (client);
 
     return TRUE;
 }
@@ -312,7 +312,7 @@ GInetAddress *
 xdmcp_client_get_local_address (XDMCPClient *client)
 {
     GSocketAddress *socket_address;
-  
+
     if (!client->priv->socket)
         return NULL;
 
@@ -338,7 +338,7 @@ xdmcp_client_send_query (XDMCPClient *client)
     write_card16 (buffer, MAXIMUM_REQUEST_LENGTH, X_BYTE_ORDER_MSB, 1, &offset);
     write_card8 (buffer, MAXIMUM_REQUEST_LENGTH, 0, &offset);
 
-    xdmcp_write (client, buffer, offset);   
+    xdmcp_write (client, buffer, offset);
 }
 
 void
@@ -417,7 +417,7 @@ xdmcp_client_send_manage (XDMCPClient *client, guint32 session_id, guint16 displ
     write_card16 (buffer, MAXIMUM_REQUEST_LENGTH, X_BYTE_ORDER_MSB, strlen (display_class), &offset);
     write_string (buffer, MAXIMUM_REQUEST_LENGTH, display_class, &offset);
 
-    xdmcp_write (client, buffer, offset); 
+    xdmcp_write (client, buffer, offset);
 }
 
 static void