Commit d8428e2b authored by Ray Strode's avatar Ray Strode

whitespace clean up

Removes tabs everywhere
parent 24ba982d
......@@ -93,8 +93,8 @@ gsm_app_get_app_id (GsmExportedApp *skeleton,
static gboolean
gsm_app_get_startup_id (GsmExportedApp *skeleton,
GDBusMethodInvocation *invocation,
GsmApp *app)
GDBusMethodInvocation *invocation,
GsmApp *app)
{
const gchar *id;
......
......@@ -271,7 +271,7 @@ gsm_consolekit_ensure_ck_connection (GsmConsolekit *manager,
is_connected = FALSE;
goto out;
}
}
}
pid = getpid ();
ret = dbus_g_proxy_call (manager->priv->ck_proxy, "GetSessionForUnixProcess", &connection_error,
......@@ -804,7 +804,7 @@ gsm_consolekit_can_restart (GsmSystem *system)
{
GsmConsolekit *manager = GSM_CONSOLEKIT (system);
gboolean res;
gboolean can_restart;
gboolean can_restart;
GError *error;
error = NULL;
......@@ -831,7 +831,7 @@ gsm_consolekit_can_restart (GsmSystem *system)
return FALSE;
}
return can_restart;
return can_restart;
}
static gboolean
......@@ -839,7 +839,7 @@ gsm_consolekit_can_stop (GsmSystem *system)
{
GsmConsolekit *manager = GSM_CONSOLEKIT (system);
gboolean res;
gboolean can_stop;
gboolean can_stop;
GError *error;
error = NULL;
......@@ -865,74 +865,74 @@ gsm_consolekit_can_stop (GsmSystem *system)
g_error_free (error);
return FALSE;
}
return can_stop;
return can_stop;
}
static gchar *
gsm_consolekit_get_current_session_type (GsmConsolekit *manager)
{
GError *gerror;
DBusConnection *connection;
DBusError error;
DBusMessage *message = NULL;
DBusMessage *reply = NULL;
gchar *session_id;
gchar *ret;
DBusMessageIter iter;
const char *value;
session_id = NULL;
ret = NULL;
DBusConnection *connection;
DBusError error;
DBusMessage *message = NULL;
DBusMessage *reply = NULL;
gchar *session_id;
gchar *ret;
DBusMessageIter iter;
const char *value;
session_id = NULL;
ret = NULL;
gerror = NULL;
if (!gsm_consolekit_ensure_ck_connection (manager, &gerror)) {
g_warning ("Could not connect to ConsoleKit: %s",
gerror->message);
g_error_free (gerror);
goto out;
goto out;
}
connection = dbus_g_connection_get_connection (manager->priv->dbus_connection);
if (!get_current_session_id (connection, &session_id)) {
goto out;
}
dbus_error_init (&error);
message = dbus_message_new_method_call (CK_NAME,
session_id,
CK_SESSION_INTERFACE,
"GetSessionType");
if (message == NULL) {
goto out;
}
connection = dbus_g_connection_get_connection (manager->priv->dbus_connection);
if (!get_current_session_id (connection, &session_id)) {
goto out;
}
dbus_error_init (&error);
message = dbus_message_new_method_call (CK_NAME,
session_id,
CK_SESSION_INTERFACE,
"GetSessionType");
if (message == NULL) {
goto out;
}
reply = dbus_connection_send_with_reply_and_block (connection,
message,
-1,
&error);
if (reply == NULL) {
if (dbus_error_is_set (&error)) {
g_warning ("Unable to determine session type: %s", error.message);
dbus_error_free (&error);
}
goto out;
}
dbus_message_iter_init (reply, &iter);
dbus_message_iter_get_basic (&iter, &value);
ret = g_strdup (value);
reply = dbus_connection_send_with_reply_and_block (connection,
message,
-1,
&error);
if (reply == NULL) {
if (dbus_error_is_set (&error)) {
g_warning ("Unable to determine session type: %s", error.message);
dbus_error_free (&error);
}
goto out;
}
dbus_message_iter_init (reply, &iter);
dbus_message_iter_get_basic (&iter, &value);
ret = g_strdup (value);
out:
if (message != NULL) {
dbus_message_unref (message);
}
if (reply != NULL) {
dbus_message_unref (reply);
}
g_free (session_id);
return ret;
if (message != NULL) {
dbus_message_unref (message);
}
if (reply != NULL) {
dbus_message_unref (reply);
}
g_free (session_id);
return ret;
}
static gboolean
......
......@@ -16,7 +16,7 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Colin Walters <walters@verbum.org>
* Colin Walters <walters@verbum.org>
*/
#include <config.h>
......
......@@ -1711,7 +1711,7 @@ gsm_manager_get_failsafe (GsmManager *manager)
{
g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);
return manager->priv->failsafe;
return manager->priv->failsafe;
}
static void
......@@ -2506,40 +2506,40 @@ gsm_manager_setenv (GsmExportedManager *skeleton,
static gboolean
is_valid_category (int category)
{
int categories[] = {
LC_CTYPE,
LC_NUMERIC,
LC_TIME,
LC_COLLATE,
LC_MONETARY,
LC_MESSAGES,
int categories[] = {
LC_CTYPE,
LC_NUMERIC,
LC_TIME,
LC_COLLATE,
LC_MONETARY,
LC_MESSAGES,
#if defined (LC_PAPER)
LC_PAPER,
LC_PAPER,
#endif
#if defined (LC_NAME)
LC_NAME,
LC_NAME,
#endif
#if defined (LC_ADDRESS)
LC_ADDRESS,
LC_ADDRESS,
#endif
#if defined (LC_TELEPHONE)
LC_TELEPHONE,
LC_TELEPHONE,
#endif
#if defined (LC_MEASUREMENT)
LC_MEASUREMENT,
LC_MEASUREMENT,
#endif
#if defined (LC_IDENTIFICATION)
LC_IDENTIFICATION,
LC_IDENTIFICATION,
#endif
LC_ALL
};
guint i;
LC_ALL
};
guint i;
for (i = 0; i < G_N_ELEMENTS(categories); i++)
if (categories[i] == category)
return TRUE;
for (i = 0; i < G_N_ELEMENTS(categories); i++)
if (categories[i] == category)
return TRUE;
return FALSE;
return FALSE;
}
static gboolean
......
......@@ -112,7 +112,7 @@ gsm_presence_set_status_text (GsmPresence *presence,
g_return_val_if_fail (GSM_IS_PRESENCE (presence), FALSE);
g_free (presence->priv->status_text);
presence->priv->status_text = NULL;
presence->priv->status_text = NULL;
/* check length */
if (status_text != NULL && strlen (status_text) > MAX_STATUS_TEXT) {
......
......@@ -270,5 +270,5 @@ gsm_session_save_clear (void)
return;
}
gsm_session_clear_saved_session (save_dir, NULL);
gsm_session_clear_saved_session (save_dir, NULL);
}
......@@ -1249,10 +1249,10 @@ save_yourself_done_callback (SmsConn conn,
client->priv->description,
success ? "True" : "False");
if (client->priv->current_save_yourself != -1) {
SmsSaveComplete (client->priv->conn);
client->priv->current_save_yourself = -1;
}
if (client->priv->current_save_yourself != -1) {
SmsSaveComplete (client->priv->conn);
client->priv->current_save_yourself = -1;
}
/* If success is false then the application couldn't save data. Nothing
* the session manager can do about, though. FIXME: we could display a
......
......@@ -192,7 +192,7 @@ require_dbus_session (int argc,
new_argv[1] = "--exit-with-session";
for (i = 0; i < argc; i++) {
new_argv[i + 2] = argv[i];
}
}
new_argv[i + 2] = NULL;
if (!execvp ("dbus-launch", new_argv)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment