[gdm/wip/xserver-in-session: 7/19] display: drop unsubclassed vfuncs
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/xserver-in-session: 7/19] display: drop unsubclassed vfuncs
- Date: Thu, 29 Jan 2015 19:33:04 +0000 (UTC)
commit 075539de07c3cf0e807e19e1d04b333e78c1e47d
Author: Ray Strode <rstrode redhat com>
Date: Mon Jan 19 09:13:14 2015 -0500
display: drop unsubclassed vfuncs
gdm-display has a whole host of vfuncs that are now completely unused.
This commit drops thems.
daemon/gdm-display.c | 135 +++++++-------------------------------------------
daemon/gdm-display.h | 11 ----
2 files changed, 19 insertions(+), 127 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 486d167..b2f0f1a 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -154,8 +154,8 @@ _create_access_file_for_user (GdmDisplay *display,
return access_file;
}
-static gboolean
-gdm_display_real_create_authority (GdmDisplay *display)
+gboolean
+gdm_display_create_authority (GdmDisplay *display)
{
GdmDisplayAccessFile *access_file;
GError *error;
@@ -196,24 +196,10 @@ gdm_display_real_create_authority (GdmDisplay *display)
}
gboolean
-gdm_display_create_authority (GdmDisplay *display)
-{
- gboolean ret;
-
- g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-
- g_object_ref (display);
- ret = GDM_DISPLAY_GET_CLASS (display)->create_authority (display);
- g_object_unref (display);
-
- return ret;
-}
-
-static gboolean
-gdm_display_real_add_user_authorization (GdmDisplay *display,
- const char *username,
- char **filename,
- GError **error)
+gdm_display_add_user_authorization (GdmDisplay *display,
+ const char *username,
+ char **filename,
+ GError **error)
{
GdmDisplayAccessFile *access_file;
GError *access_file_error;
@@ -221,6 +207,10 @@ gdm_display_real_add_user_authorization (GdmDisplay *display,
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
+ g_debug ("GdmDisplay: Adding authorization for user:%s on display %s", username,
display->priv->x11_display_name);
+
+ g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
+
if (display->priv->user_access_file != NULL) {
g_set_error (error,
G_DBUS_ERROR,
@@ -264,25 +254,6 @@ gdm_display_real_add_user_authorization (GdmDisplay *display,
return TRUE;
}
-gboolean
-gdm_display_add_user_authorization (GdmDisplay *display,
- const char *username,
- char **filename,
- GError **error)
-{
- gboolean ret;
-
- g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-
- g_debug ("GdmDisplay: Adding authorization for user:%s on display %s", username,
display->priv->x11_display_name);
-
- g_object_ref (display);
- ret = GDM_DISPLAY_GET_CLASS (display)->add_user_authorization (display, username, filename, error);
- g_object_unref (display);
-
- return ret;
-}
-
static void
gdm_display_real_get_timed_login_details (GdmDisplay *display,
gboolean *enabledp,
@@ -396,32 +367,18 @@ gdm_display_get_timed_login_details (GdmDisplay *display,
return TRUE;
}
-static gboolean
-gdm_display_real_remove_user_authorization (GdmDisplay *display,
- const char *username,
- GError **error)
-{
- gdm_display_access_file_close (display->priv->user_access_file);
-
- return TRUE;
-}
-
gboolean
gdm_display_remove_user_authorization (GdmDisplay *display,
const char *username,
GError **error)
{
- gboolean ret;
-
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
g_debug ("GdmDisplay: Removing authorization for user:%s on display %s", username,
display->priv->x11_display_name);
- g_object_ref (display);
- ret = GDM_DISPLAY_GET_CLASS (display)->remove_user_authorization (display, username, error);
- g_object_unref (display);
+ gdm_display_access_file_close (display->priv->user_access_file);
- return ret;
+ return TRUE;
}
gboolean
@@ -557,12 +514,12 @@ on_slave_started (GdmSlave *slave,
_gdm_display_set_status (display, GDM_DISPLAY_MANAGED);
}
-static gboolean
-gdm_display_real_prepare (GdmDisplay *display)
+gboolean
+gdm_display_prepare (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
- g_debug ("GdmDisplay: prepare display");
+ g_debug ("GdmDisplay: Preparing display: %s", display->priv->id);
if (!gdm_display_create_authority (display)) {
g_warning ("Unable to set up access control for display %d",
@@ -592,29 +549,13 @@ gdm_display_real_prepare (GdmDisplay *display)
}
gboolean
-gdm_display_prepare (GdmDisplay *display)
-{
- gboolean ret;
-
- g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-
- g_debug ("GdmDisplay: Preparing display: %s", display->priv->id);
-
- g_object_ref (display);
- ret = GDM_DISPLAY_GET_CLASS (display)->prepare (display);
- g_object_unref (display);
-
- return ret;
-}
-
-static gboolean
-gdm_display_real_manage (GdmDisplay *display)
+gdm_display_manage (GdmDisplay *display)
{
gboolean res;
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
- g_debug ("GdmDisplay: manage display");
+ g_debug ("GdmDisplay: Managing display: %s", display->priv->id);
/* If not explicitly prepared, do it now */
if (display->priv->status == GDM_DISPLAY_UNMANAGED) {
@@ -630,22 +571,6 @@ gdm_display_real_manage (GdmDisplay *display)
return TRUE;
}
-gboolean
-gdm_display_manage (GdmDisplay *display)
-{
- gboolean ret;
-
- g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-
- g_debug ("GdmDisplay: Managing display: %s", display->priv->id);
-
- g_object_ref (display);
- ret = GDM_DISPLAY_GET_CLASS (display)->manage (display);
- g_object_unref (display);
-
- return ret;
-}
-
static gboolean
gdm_display_real_finish (GdmDisplay *display)
{
@@ -674,8 +599,8 @@ gdm_display_finish (GdmDisplay *display)
return ret;
}
-static gboolean
-gdm_display_real_unmanage (GdmDisplay *display)
+gboolean
+gdm_display_unmanage (GdmDisplay *display)
{
gdouble elapsed;
@@ -719,22 +644,6 @@ gdm_display_real_unmanage (GdmDisplay *display)
}
gboolean
-gdm_display_unmanage (GdmDisplay *display)
-{
- gboolean ret;
-
- g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
-
- g_debug ("GdmDisplay: Unmanaging display");
-
- g_object_ref (display);
- ret = GDM_DISPLAY_GET_CLASS (display)->unmanage (display);
- g_object_unref (display);
-
- return ret;
-}
-
-gboolean
gdm_display_get_id (GdmDisplay *display,
char **id,
GError **error)
@@ -1270,14 +1179,8 @@ gdm_display_class_init (GdmDisplayClass *klass)
object_class->dispose = gdm_display_dispose;
object_class->finalize = gdm_display_finalize;
- klass->create_authority = gdm_display_real_create_authority;
- klass->add_user_authorization = gdm_display_real_add_user_authorization;
- klass->remove_user_authorization = gdm_display_real_remove_user_authorization;
klass->get_timed_login_details = gdm_display_real_get_timed_login_details;
- klass->prepare = gdm_display_real_prepare;
- klass->manage = gdm_display_real_manage;
klass->finish = gdm_display_real_finish;
- klass->unmanage = gdm_display_real_unmanage;
g_object_class_install_property (object_class,
PROP_ID,
diff --git a/daemon/gdm-display.h b/daemon/gdm-display.h
index 32fa290..fe1f7ee 100644
--- a/daemon/gdm-display.h
+++ b/daemon/gdm-display.h
@@ -56,18 +56,7 @@ typedef struct
GObjectClass parent_class;
/* methods */
- gboolean (*create_authority) (GdmDisplay *display);
- gboolean (*add_user_authorization) (GdmDisplay *display,
- const char *username,
- char **filename,
- GError **error);
- gboolean (*remove_user_authorization) (GdmDisplay *display,
- const char *username,
- GError **error);
- gboolean (*prepare) (GdmDisplay *display);
- gboolean (*manage) (GdmDisplay *display);
gboolean (*finish) (GdmDisplay *display);
- gboolean (*unmanage) (GdmDisplay *display);
void (*get_timed_login_details) (GdmDisplay *display,
gboolean *enabled,
char **username,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]