diff options
Diffstat (limited to 'src/gpm-screensaver.c')
-rw-r--r-- | src/gpm-screensaver.c | 123 |
1 files changed, 0 insertions, 123 deletions
diff --git a/src/gpm-screensaver.c b/src/gpm-screensaver.c index b4f9ad7..26e72e7 100644 --- a/src/gpm-screensaver.c +++ b/src/gpm-screensaver.c @@ -25,7 +25,6 @@ #include <glib.h> #include <glib/gi18n.h> #include <dbus/dbus-glib.h> -#include <mateconf/mateconf-client.h> #include "gpm-screensaver.h" #include "gpm-common.h" @@ -42,105 +41,13 @@ static void gpm_screensaver_finalize (GObject *object); struct GpmScreensaverPrivate { DBusGProxy *proxy; - MateConfClient *conf; }; -enum { - AUTH_REQUEST, - LAST_SIGNAL -}; -#if 0 -static guint signals [LAST_SIGNAL] = { 0 }; -#endif static gpointer gpm_screensaver_object = NULL; G_DEFINE_TYPE (GpmScreensaver, gpm_screensaver, G_TYPE_OBJECT) -#if 0 - -/** Invoked when we get the AuthenticationRequestBegin from g-s when the user - * has moved their mouse and we are showing the authentication box. - */ -static void -gpm_screensaver_auth_begin (DBusGProxy *proxy, - GpmScreensaver *screensaver) -{ - egg_debug ("emitting auth-request : (%i)", TRUE); - g_signal_emit (screensaver, signals [AUTH_REQUEST], 0, TRUE); -} - -/** Invoked when we get the AuthenticationRequestEnd from g-s when the user - * has entered a valid password or re-authenticated. - */ -static void -gpm_screensaver_auth_end (DBusGProxy *proxy, - GpmScreensaver *screensaver) -{ - egg_debug ("emitting auth-request : (%i)", FALSE); - g_signal_emit (screensaver, signals [AUTH_REQUEST], 0, FALSE); -} - -/** - * gpm_screensaver_proxy_connect_more: - * @screensaver: This class instance - **/ -static gboolean -gpm_screensaver_proxy_connect_more (GpmScreensaver *screensaver) -{ - g_return_val_if_fail (GPM_IS_SCREENSAVER (screensaver), FALSE); - - if (screensaver->priv->proxy == NULL) { - egg_warning ("not connected"); - return FALSE; - } - - /* get AuthenticationRequestBegin */ - dbus_g_proxy_add_signal (screensaver->priv->proxy, - "AuthenticationRequestBegin", G_TYPE_INVALID); - dbus_g_proxy_connect_signal (screensaver->priv->proxy, - "AuthenticationRequestBegin", - G_CALLBACK (gpm_screensaver_auth_begin), - screensaver, NULL); - - /* get AuthenticationRequestEnd */ - dbus_g_proxy_add_signal (screensaver->priv->proxy, - "AuthenticationRequestEnd", G_TYPE_INVALID); - dbus_g_proxy_connect_signal (screensaver->priv->proxy, - "AuthenticationRequestEnd", - G_CALLBACK (gpm_screensaver_auth_end), - screensaver, NULL); - - return TRUE; -} - -/** - * gpm_screensaver_proxy_disconnect_more: - * @screensaver: This class instance - **/ -static gboolean -gpm_screensaver_proxy_disconnect_more (GpmScreensaver *screensaver) -{ - g_return_val_if_fail (GPM_IS_SCREENSAVER (screensaver), FALSE); - egg_debug ("mate-screensaver disconnected from the session DBUS"); - return TRUE; -} -#endif - -/** - * gpm_screensaver_lock_enabled: - * @screensaver: This class instance - * Return value: If mate-screensaver is set to lock the screen on screensave - **/ -gboolean -gpm_screensaver_lock_enabled (GpmScreensaver *screensaver) -{ - gboolean enabled; - g_return_val_if_fail (GPM_IS_SCREENSAVER (screensaver), FALSE); - enabled = mateconf_client_get_bool (screensaver->priv->conf, GS_PREF_LOCK_ENABLED, NULL); - return enabled; -} - /** * gpm_screensaver_lock * @screensaver: This class instance @@ -328,17 +235,6 @@ gpm_screensaver_class_init (GpmScreensaverClass *klass) object_class->finalize = gpm_screensaver_finalize; g_type_class_add_private (klass, sizeof (GpmScreensaverPrivate)); -#if 0 - signals [AUTH_REQUEST] = - g_signal_new ("auth-request", - G_TYPE_FROM_CLASS (object_class), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET (GpmScreensaverClass, auth_request), - NULL, - NULL, - g_cclosure_marshal_VOID__BOOLEAN, - G_TYPE_NONE, 1, G_TYPE_BOOLEAN); -#endif } /** @@ -357,7 +253,6 @@ gpm_screensaver_init (GpmScreensaver *screensaver) GS_LISTENER_SERVICE, GS_LISTENER_PATH, GS_LISTENER_INTERFACE); - screensaver->priv->conf = mateconf_client_get_default (); } /** @@ -374,7 +269,6 @@ gpm_screensaver_finalize (GObject *object) screensaver = GPM_SCREENSAVER (object); screensaver->priv = GPM_SCREENSAVER_GET_PRIVATE (screensaver); - g_object_unref (screensaver->priv->conf); g_object_unref (screensaver->priv->proxy); G_OBJECT_CLASS (gpm_screensaver_parent_class)->finalize (object); @@ -401,18 +295,6 @@ gpm_screensaver_new (void) #ifdef EGG_TEST #include "egg-test.h" -#if 0 -static gboolean test_got_request = FALSE; -static void -gpm_screensaver_test_auth_request_cb (GpmScreensaver *screensaver, gboolean auth, EggTest *test) -{ - egg_debug ("auth request = %i", auth); - test_got_request = auth; - - egg_test_loop_quit (test); -} -#endif - void gpm_screensaver_test (gpointer data) { @@ -429,11 +311,6 @@ gpm_screensaver_test (gpointer data) screensaver = gpm_screensaver_new (); egg_test_assert (test, (screensaver != NULL)); -#if 0 - /* connect signals */ - g_signal_connect (screensaver, "auth-request", - G_CALLBACK (gpm_screensaver_test_auth_request_cb), test); -#endif /************************************************************/ egg_test_title (test, "lock screensaver"); ret = gpm_screensaver_lock (screensaver); |