diff options
author | Stefano Karapetsas <[email protected]> | 2012-11-05 00:35:19 -0800 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-11-05 00:35:19 -0800 |
commit | 1291601153a67b059106a578afd28eaed9f5ea7d (patch) | |
tree | c86ffdbe7de3f1d95440109c5444d98ab6250ea3 /src | |
parent | 773472d4a41e60cf7ad8db55737b0fcd21b934ba (diff) | |
parent | 107e3530c49bc8e19e5697e82a98c9c346dee20f (diff) | |
download | mate-power-manager-1291601153a67b059106a578afd28eaed9f5ea7d.tar.bz2 mate-power-manager-1291601153a67b059106a578afd28eaed9f5ea7d.tar.xz |
Merge pull request #22 from bhull2010/master
Removed unused functions and enum
Diffstat (limited to 'src')
-rw-r--r-- | src/gpm-manager.c | 31 | ||||
-rw-r--r-- | src/gpm-screensaver.c | 105 | ||||
-rw-r--r-- | src/gpm-screensaver.h | 4 |
3 files changed, 0 insertions, 140 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..26e72e7 100644 --- a/src/gpm-screensaver.c +++ b/src/gpm-screensaver.c @@ -43,88 +43,11 @@ struct GpmScreensaverPrivate DBusGProxy *proxy; }; -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 * @screensaver: This class instance @@ -312,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 } /** @@ -383,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) { @@ -411,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); 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); |