[mutter/halfline/wip/kms-cleanups: 1/9] native: rename meta-launcher to meta-session-controller
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/halfline/wip/kms-cleanups: 1/9] native: rename meta-launcher to meta-session-controller
- Date: Thu, 10 Mar 2016 21:12:07 +0000 (UTC)
commit 520c62c6b7baff74337b0174d71fd8e144b50f94
Author: Ray Strode <rstrode redhat com>
Date: Fri Jan 8 10:48:53 2016 -0500
native: rename meta-launcher to meta-session-controller
meta-launcher.c doesn't do anything related to launching
these days, so let's give it a name more apropos to what
it does. MetaSessionController seems better.
src/Makefile.am | 4 +-
src/backends/native/meta-backend-native.c | 14 +++---
src/backends/native/meta-launcher.h | 37 ------------------
.../{meta-launcher.c => meta-session-controller.c} | 40 ++++++++++----------
src/backends/native/meta-session-controller.h | 37 ++++++++++++++++++
5 files changed, 66 insertions(+), 66 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 5468d47..a8ec466 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -296,8 +296,8 @@ libmutter_la_SOURCES += \
backends/native/meta-input-settings-native.h \
backends/native/meta-monitor-manager-kms.c \
backends/native/meta-monitor-manager-kms.h \
- backends/native/meta-launcher.c \
- backends/native/meta-launcher.h \
+ backends/native/meta-session-controller.c \
+ backends/native/meta-session-controller.h \
backends/native/dbus-utils.c \
backends/native/dbus-utils.h \
$(NULL)
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index d22bed1..0f25614 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -35,13 +35,13 @@
#include "meta-idle-monitor-native.h"
#include "meta-monitor-manager-kms.h"
#include "meta-cursor-renderer-native.h"
-#include "meta-launcher.h"
+#include "meta-session-controller.h"
#include <stdlib.h>
struct _MetaBackendNativePrivate
{
- MetaLauncher *launcher;
+ MetaSessionController *session_controller;
MetaBarrierManagerNative *barrier_manager;
UpClient *up_client;
guint sleep_signal_id;
@@ -58,7 +58,7 @@ meta_backend_native_finalize (GObject *object)
MetaBackendNative *native = META_BACKEND_NATIVE (object);
MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native);
- meta_launcher_free (priv->launcher);
+ meta_session_controller_free (priv->session_controller);
g_object_unref (priv->up_client);
if (priv->sleep_signal_id)
@@ -331,8 +331,8 @@ meta_backend_native_init (MetaBackendNative *native)
MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native);
GError *error = NULL;
- priv->launcher = meta_launcher_new (&error);
- if (priv->launcher == NULL)
+ priv->session_controller = meta_session_controller_new (&error);
+ if (priv->session_controller == NULL)
{
g_warning ("Can't initialize KMS backend: %s\n", error->message);
exit (1);
@@ -358,7 +358,7 @@ meta_activate_vt (int vt, GError **error)
MetaBackendNative *native = META_BACKEND_NATIVE (backend);
MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native);
- return meta_launcher_activate_vt (priv->launcher, vt, error);
+ return meta_session_controller_activate_vt (priv->session_controller, vt, error);
}
MetaBarrierManagerNative *
@@ -390,7 +390,7 @@ meta_activate_session (void)
MetaBackendNative *native = META_BACKEND_NATIVE (backend);
MetaBackendNativePrivate *priv = meta_backend_native_get_instance_private (native);
- if (!meta_launcher_activate_session (priv->launcher, &error))
+ if (!meta_session_controller_activate_session (priv->session_controller, &error))
{
g_warning ("Could not activate session: %s\n", error->message);
g_error_free (error);
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-session-controller.c
similarity index 92%
rename from src/backends/native/meta-launcher.c
rename to src/backends/native/meta-session-controller.c
index 34480cd..72b8a2e 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-session-controller.c
@@ -19,7 +19,7 @@
#include "config.h"
-#include "meta-launcher.h"
+#include "meta-session-controller.h"
#include <gio/gunixfdlist.h>
@@ -46,7 +46,7 @@
#include "meta-cursor-renderer-native.h"
#include "meta-idle-monitor-native.h"
-struct _MetaLauncher
+struct _MetaSessionController
{
Login1Session *session_proxy;
Login1Seat *seat_proxy;
@@ -209,7 +209,7 @@ on_evdev_device_open (const char *path,
gpointer user_data,
GError **error)
{
- MetaLauncher *self = user_data;
+ MetaSessionController *self = user_data;
int fd;
int major, minor;
@@ -232,7 +232,7 @@ static void
on_evdev_device_close (int fd,
gpointer user_data)
{
- MetaLauncher *self = user_data;
+ MetaSessionController *self = user_data;
int major, minor;
GError *error = NULL;
@@ -254,7 +254,7 @@ out:
}
static void
-sync_active (MetaLauncher *self)
+sync_active (MetaSessionController *self)
{
gboolean active = login1_session_get_active (LOGIN1_SESSION (self->session_proxy));
@@ -274,7 +274,7 @@ on_active_changed (Login1Session *session,
GParamSpec *pspec,
gpointer user_data)
{
- MetaLauncher *self = user_data;
+ MetaSessionController *self = user_data;
sync_active (self);
}
@@ -425,10 +425,10 @@ get_seat_id (GError **error)
return seat_id;
}
-MetaLauncher *
-meta_launcher_new (GError **error)
+MetaSessionController *
+meta_session_controller_new (GError **error)
{
- MetaLauncher *self = NULL;
+ MetaSessionController *self = NULL;
Login1Session *session_proxy = NULL;
Login1Seat *seat_proxy = NULL;
char *seat_id = NULL;
@@ -460,7 +460,7 @@ meta_launcher_new (GError **error)
free (seat_id);
- self = g_slice_new0 (MetaLauncher);
+ self = g_slice_new0 (MetaSessionController);
self->session_proxy = session_proxy;
self->seat_proxy = seat_proxy;
@@ -485,28 +485,28 @@ meta_launcher_new (GError **error)
}
void
-meta_launcher_free (MetaLauncher *self)
+meta_session_controller_free (MetaSessionController *self)
{
g_object_unref (self->seat_proxy);
g_object_unref (self->session_proxy);
- g_slice_free (MetaLauncher, self);
+ g_slice_free (MetaSessionController, self);
}
gboolean
-meta_launcher_activate_session (MetaLauncher *launcher,
- GError **error)
+meta_session_controller_activate_session (MetaSessionController *session_controller,
+ GError **error)
{
- if (!login1_session_call_activate_sync (launcher->session_proxy, NULL, error))
+ if (!login1_session_call_activate_sync (session_controller->session_proxy, NULL, error))
return FALSE;
- sync_active (launcher);
+ sync_active (session_controller);
return TRUE;
}
gboolean
-meta_launcher_activate_vt (MetaLauncher *launcher,
- signed char vt,
- GError **error)
+meta_session_controller_activate_vt (MetaSessionController *session_controller,
+ signed char vt,
+ GError **error)
{
- return login1_seat_call_switch_to_sync (launcher->seat_proxy, vt, NULL, error);
+ return login1_seat_call_switch_to_sync (session_controller->seat_proxy, vt, NULL, error);
}
diff --git a/src/backends/native/meta-session-controller.h b/src/backends/native/meta-session-controller.h
new file mode 100644
index 0000000..2d66dc1
--- /dev/null
+++ b/src/backends/native/meta-session-controller.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2013 Red Hat, Inc.
+ *
+ * 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 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef META_SESSION_CONTROLLER_H
+#define META_SESSION_CONTROLLER_H
+
+#include <glib-object.h>
+
+typedef struct _MetaSessionController MetaSessionController;
+
+MetaSessionController *meta_session_controller_new (GError **error);
+void meta_session_controller_free (MetaSessionController *self);
+
+gboolean meta_session_controller_activate_session (MetaSessionController *self,
+ GError **error);
+
+gboolean meta_session_controller_activate_vt (MetaSessionController *self,
+ signed char vt,
+ GError **error);
+
+#endif /* META_SESSION_CONTROLLER_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]