summaryrefslogtreecommitdiff
path: root/mate-session
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-03-05 13:28:42 +0300
committermonsta <[email protected]>2017-03-05 13:28:42 +0300
commit54d119718d8c2c109e089669aacdb66ffeb38a3e (patch)
tree6741d9492951e3672288501229ff1adb120a8a39 /mate-session
parent7aa5d913573af7fbca7b240499ee0021656fccc3 (diff)
downloadmate-session-manager-54d119718d8c2c109e089669aacdb66ffeb38a3e.tar.bz2
mate-session-manager-54d119718d8c2c109e089669aacdb66ffeb38a3e.tar.xz
fix indent a bit
Diffstat (limited to 'mate-session')
-rw-r--r--mate-session/gsm-consolekit.c142
-rw-r--r--mate-session/gsm-logout-dialog.c8
-rw-r--r--mate-session/gsm-manager.c8
3 files changed, 79 insertions, 79 deletions
diff --git a/mate-session/gsm-consolekit.c b/mate-session/gsm-consolekit.c
index a008c4c..dee78ab 100644
--- a/mate-session/gsm-consolekit.c
+++ b/mate-session/gsm-consolekit.c
@@ -243,7 +243,7 @@ gsm_consolekit_ensure_ck_connection (GsmConsolekit *manager,
is_connected = TRUE;
- out:
+out:
if (manager->priv->is_connected != is_connected) {
manager->priv->is_connected = is_connected;
g_object_notify (G_OBJECT (manager), "is-connected");
@@ -523,7 +523,7 @@ get_current_session_id (DBusConnection *connection,
}
ret = TRUE;
- out:
+out:
if (message != NULL) {
dbus_message_unref (message);
}
@@ -578,7 +578,7 @@ get_seat_id_for_session (DBusConnection *connection,
}
ret = TRUE;
- out:
+out:
if (message != NULL) {
dbus_message_unref (message);
}
@@ -709,7 +709,7 @@ seat_can_activate_sessions (DBusConnection *connection,
dbus_message_iter_init (reply, &iter);
dbus_message_iter_get_basic (&iter, &can_activate);
- out:
+out:
if (message != NULL) {
dbus_message_unref (message);
}
@@ -752,28 +752,28 @@ gsm_consolekit_can_switch_user (GsmConsolekit *manager)
gboolean
gsm_consolekit_get_restart_privileges (GsmConsolekit *manager)
{
- g_signal_emit (G_OBJECT (manager),
- signals [PRIVILEGES_COMPLETED],
- 0, TRUE, TRUE, NULL);
+ g_signal_emit (G_OBJECT (manager),
+ signals [PRIVILEGES_COMPLETED],
+ 0, TRUE, TRUE, NULL);
- return TRUE;
+ return TRUE;
}
gboolean
gsm_consolekit_get_stop_privileges (GsmConsolekit *manager)
{
- g_signal_emit (G_OBJECT (manager),
- signals [PRIVILEGES_COMPLETED],
- 0, TRUE, TRUE, NULL);
+ g_signal_emit (G_OBJECT (manager),
+ signals [PRIVILEGES_COMPLETED],
+ 0, TRUE, TRUE, NULL);
- return TRUE;
+ return TRUE;
}
gboolean
gsm_consolekit_can_restart (GsmConsolekit *manager)
{
gboolean res;
- gboolean can_restart;
+ gboolean can_restart;
GError *error;
error = NULL;
@@ -797,16 +797,16 @@ gsm_consolekit_can_restart (GsmConsolekit *manager)
error->message);
g_error_free (error);
return FALSE;
- }
+ }
- return can_restart;
+ return can_restart;
}
gboolean
gsm_consolekit_can_stop (GsmConsolekit *manager)
{
gboolean res;
- gboolean can_stop;
+ gboolean can_stop;
GError *error;
error = NULL;
@@ -831,76 +831,76 @@ gsm_consolekit_can_stop (GsmConsolekit *manager)
error->message);
g_error_free (error);
return FALSE;
- }
+ }
- return can_stop;
+ return can_stop;
}
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;
- }
-
- 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);
+ 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);
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;
}
diff --git a/mate-session/gsm-logout-dialog.c b/mate-session/gsm-logout-dialog.c
index 9eb9366..97f7560 100644
--- a/mate-session/gsm-logout-dialog.c
+++ b/mate-session/gsm-logout-dialog.c
@@ -247,14 +247,14 @@ gsm_logout_supports_switch_user (GsmLogoutDialog *logout_dialog)
{
GSettings *settings;
gboolean ret = FALSE;
- gboolean locked;
+ gboolean locked;
settings = g_settings_new (LOCKDOWN_SCHEMA);
- locked = g_settings_get_boolean (settings, KEY_USER_SWITCHING_DISABLE);
- g_object_unref (settings);
+ locked = g_settings_get_boolean (settings, KEY_USER_SWITCHING_DISABLE);
+ g_object_unref (settings);
- if (!locked) {
+ if (!locked) {
#ifdef HAVE_SYSTEMD
if (LOGIND_RUNNING())
ret = gsm_systemd_can_switch_user (logout_dialog->priv->systemd);
diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
index e4b4f86..63a31bd 100644
--- a/mate-session/gsm-manager.c
+++ b/mate-session/gsm-manager.c
@@ -3258,7 +3258,7 @@ user_logout (GsmManager *manager,
/* If the shell isn't running, and this isn't a non-interative logout request,
* and the user has their settings configured to show a confirmation dialog for
* logout, then go ahead and show the confirmation dialog now.
- */
+ */
if (mode == GSM_MANAGER_LOGOUT_MODE_NORMAL && logout_prompt) {
show_logout_dialog (manager);
} else {
@@ -3328,14 +3328,14 @@ static gboolean
_log_out_is_locked_down (GsmManager *manager)
{
return g_settings_get_boolean (manager->priv->settings_lockdown,
- KEY_LOG_OUT_DISABLE);
+ KEY_LOG_OUT_DISABLE);
}
static gboolean
_switch_user_is_locked_down (GsmManager *manager)
{
return g_settings_get_boolean (manager->priv->settings_lockdown,
- KEY_USER_SWITCH_DISABLE);
+ KEY_USER_SWITCH_DISABLE);
}
gboolean
@@ -3401,7 +3401,7 @@ gsm_manager_can_shutdown (GsmManager *manager,
#endif
consolekit = gsm_get_consolekit ();
*shutdown_available = !_log_out_is_locked_down (manager) &&
- (gsm_consolekit_can_stop (consolekit)
+ (gsm_consolekit_can_stop (consolekit)
|| gsm_consolekit_can_restart (consolekit)
|| can_suspend
|| can_hibernate);