aboutsummaryrefslogtreecommitdiff
path: root/src/lock-helper.c
diff options
context:
space:
mode:
authorKen VanDine <ken.vandine@canonical.com>2012-02-08 15:12:47 -0500
committerKen VanDine <ken.vandine@canonical.com>2012-02-08 15:12:47 -0500
commit4eacd253f0fd5cb22a6c12dbf58126eb14c95bde (patch)
tree27c93878367ff2c04a9b9482b718b71ef8652857 /src/lock-helper.c
parent6c05bbbd892c117777b11662b7e86c0d201398ec (diff)
parentfb82208c7c5a593eb89f1a53174978b562fcdae7 (diff)
downloadayatana-indicator-session-4eacd253f0fd5cb22a6c12dbf58126eb14c95bde.tar.gz
ayatana-indicator-session-4eacd253f0fd5cb22a6c12dbf58126eb14c95bde.tar.bz2
ayatana-indicator-session-4eacd253f0fd5cb22a6c12dbf58126eb14c95bde.zip
* New upstream release.
* Screensaver code cleanup * Fix ordering of items on request * Removing GOA support * Fix GTK3 Box Deprecation * Updating to dbusmenu 0.5.90 * Making the gtk logout helper and apt optional build time choices * Add name hints to the indicators * bump version for release * Drop debian/patches/01-remove-dead-gss-handling.patch: Upstream * debian/control: Updating dbusmenu dep to 0.5.90
Diffstat (limited to 'src/lock-helper.c')
-rw-r--r--src/lock-helper.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/src/lock-helper.c b/src/lock-helper.c
index 4c91aa5..8eae674 100644
--- a/src/lock-helper.c
+++ b/src/lock-helper.c
@@ -29,8 +29,6 @@ with this program. If not, see <http://www.gnu.org/licenses/>.
static DBusGProxy * gss_proxy = NULL;
static GMainLoop * gss_mainloop = NULL;
-static guint cookie = 0;
-static DBusGProxyCall * cookie_call = NULL;
static gboolean is_guest = FALSE;
@@ -38,90 +36,6 @@ static GSettings * settings = NULL;
void build_gss_proxy (void);
-/* Checks to see if there is an error and reports
- it. Not much else we can do. */
-static void
-unthrottle_return (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data)
-{
- GError * error = NULL;
- dbus_g_proxy_end_call(proxy, call, &error,
- G_TYPE_INVALID);
-
- if (error != NULL) {
- g_warning("Unable to unthrottle: %s", error->message);
- }
- return;
-}
-
-/* Sends an unthrottle if we're throttled. */
-void
-screensaver_unthrottle (void)
-{
- g_return_if_fail(cookie != 0);
-
- build_gss_proxy();
- g_return_if_fail(gss_proxy != NULL);
-
- dbus_g_proxy_begin_call(gss_proxy, "UnThrottle",
- unthrottle_return, NULL,
- NULL,
- G_TYPE_UINT, cookie,
- G_TYPE_INVALID);
-
- cookie = 0;
- return;
-}
-
-/* Gets there return cookie from the throttle command
- and sets things valid */
-static void
-throttle_return (DBusGProxy * proxy, DBusGProxyCall * call, gpointer data)
-{
- GError * error = NULL;
- cookie_call = NULL;
-
- dbus_g_proxy_end_call(proxy, call, &error,
- G_TYPE_UINT, &cookie,
- G_TYPE_INVALID);
-
- if (error != NULL) {
- g_warning("Unable to throttle the screensaver: %s", error->message);
- return;
- }
-
-
- if (cookie == 0) {
- g_warning("We didn't get a throttle cookie!");
- }
-
- return;
-}
-
-/* Throttling the screensaver by using the screen saver
- command. */
-void
-screensaver_throttle (gchar * reason)
-{
- g_return_if_fail(cookie_call == NULL);
- g_return_if_fail(will_lock_screen());
-
- if (cookie != 0) {
- screensaver_unthrottle();
- }
-
- build_gss_proxy();
- g_return_if_fail(gss_proxy != NULL);
-
- cookie_call = dbus_g_proxy_begin_call(gss_proxy, "Throttle",
- throttle_return, NULL,
- NULL,
- G_TYPE_STRING, "Session Menu",
- G_TYPE_STRING, reason,
- G_TYPE_INVALID);
-
- return;
-}
-
/* This is our logic on whether the screen should be locked
or not. It effects everything else. */
gboolean