diff options
author | Brent Hull <[email protected]> | 2012-11-04 18:15:57 -0500 |
---|---|---|
committer | Brent Hull <[email protected]> | 2012-11-04 18:15:57 -0500 |
commit | 9fed848678414a926d19f62e9feba4f49edc1bd7 (patch) | |
tree | 478c2f1cf2e318a80ac563f283cba2df5a3f9566 | |
parent | 6e3ef00b551ed8ac5b877f0c7c8ebbc4f7fcb3ff (diff) | |
download | mate-power-manager-9fed848678414a926d19f62e9feba4f49edc1bd7.tar.bz2 mate-power-manager-9fed848678414a926d19f62e9feba4f49edc1bd7.tar.xz |
Remove commented-out screensaver-auth-request functions
-rw-r--r-- | src/gpm-manager.c | 31 | ||||
-rw-r--r-- | src/gpm-screensaver.c | 101 | ||||
-rw-r--r-- | src/gpm-screensaver.h | 4 |
3 files changed, 0 insertions, 136 deletions
diff --git a/src/gpm-manager.c b/src/gpm-manager.c index 6248b97..68ff788 100644 --- a/src/gpm-manager.c +++ b/src/gpm-manager.c @@ -1085,33 +1085,6 @@ gpm_manager_settings_changed_cb (GSettings *settings, const gchar *key, GpmManag gpm_manager_sync_policy_sleep (manager); } -#if 0 -/** - * gpm_manager_screensaver_auth_request_cb: - * @manager: This manager class instance - * @auth: If we are trying to authenticate - * - * Called when the user is trying or has authenticated - **/ -static void -gpm_manager_screensaver_auth_request_cb (GpmScreensaver *screensaver, gboolean auth_begin, GpmManager *manager) -{ - GError *error = NULL; - - if (auth_begin) { - /* We turn on the monitor unconditionally, as we may be using - * a smartcard to authenticate and DPMS might still be on. - * See #350291 for more details */ - gpm_dpms_set_mode (manager->priv->dpms, GPM_DPMS_MODE_ON, &error); - if (error != NULL) { - egg_warning ("Failed to turn on DPMS: %s", error->message); - g_error_free (error); - error = NULL; - } - } -} -#endif - /** * gpm_manager_perhaps_recall_response_cb: */ @@ -1920,10 +1893,6 @@ gpm_manager_init (GpmManager *manager) /* try and start an interactive service */ manager->priv->screensaver = gpm_screensaver_new (); -#if 0 - g_signal_connect (manager->priv->screensaver, "auth-request", - G_CALLBACK (gpm_manager_screensaver_auth_request_cb), manager); -#endif /* try an start an interactive service */ manager->priv->backlight = gpm_backlight_new (); diff --git a/src/gpm-screensaver.c b/src/gpm-screensaver.c index 7aad8a2..a26ab8b 100644 --- a/src/gpm-screensaver.c +++ b/src/gpm-screensaver.c @@ -48,83 +48,10 @@ enum { 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 * @screensaver: This class instance @@ -312,17 +239,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 } /** @@ -383,18 +299,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) { @@ -411,11 +315,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); diff --git a/src/gpm-screensaver.h b/src/gpm-screensaver.h index 2732f28..9f81aec 100644 --- a/src/gpm-screensaver.h +++ b/src/gpm-screensaver.h @@ -44,10 +44,6 @@ typedef struct typedef struct { GObjectClass parent_class; -#if 0 - void (* auth_request) (GpmScreensaver *screensaver, - gboolean auth); -#endif } GpmScreensaverClass; GType gpm_screensaver_get_type (void); |