[notification-daemon] Drop the exit-on-idle functionality
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [notification-daemon] Drop the exit-on-idle functionality
- Date: Wed, 16 Feb 2011 16:25:43 +0000 (UTC)
commit a3f890267adf176015f1f069ec70a00ad58fb910
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Feb 15 14:15:23 2011 -0500
Drop the exit-on-idle functionality
This inherently relies on the daemon being activated, which
is problematic with gnome-shell providing the same service in
the regular gnome session, but not in fallback.
src/daemon.c | 43 -------------------------------------------
1 files changed, 0 insertions(+), 43 deletions(-)
---
diff --git a/src/daemon.c b/src/daemon.c
index ee8460f..f630d07 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -58,7 +58,6 @@
struct _NotifyDaemonPrivate
{
GDBusConnection *connection;
- guint exit_timeout_source;
NdQueue *queue;
};
@@ -76,44 +75,6 @@ notify_daemon_class_init (NotifyDaemonClass *daemon_class)
g_type_class_add_private (daemon_class, sizeof (NotifyDaemonPrivate));
}
-static gboolean
-do_exit (gpointer user_data)
-{
- g_debug ("Exiting due to inactivity");
- exit (1);
- return FALSE;
-}
-
-static void
-add_exit_timeout (NotifyDaemon *daemon)
-{
- if (daemon->priv->exit_timeout_source > 0)
- return;
-
- daemon->priv->exit_timeout_source = g_timeout_add_seconds (IDLE_SECONDS, do_exit, NULL);
-}
-
-static void
-remove_exit_timeout (NotifyDaemon *daemon)
-{
- if (daemon->priv->exit_timeout_source == 0)
- return;
-
- g_source_remove (daemon->priv->exit_timeout_source);
- daemon->priv->exit_timeout_source = 0;
-}
-
-static void
-on_queue_changed (NdQueue *queue,
- NotifyDaemon *daemon)
-{
- if (nd_queue_length (queue) > 0) {
- remove_exit_timeout (daemon);
- } else {
- add_exit_timeout (daemon);
- }
-}
-
static void
notify_daemon_init (NotifyDaemon *daemon)
{
@@ -122,8 +83,6 @@ notify_daemon_init (NotifyDaemon *daemon)
NotifyDaemonPrivate);
daemon->priv->queue = nd_queue_new ();
- add_exit_timeout (daemon);
- g_signal_connect (daemon->priv->queue, "changed", G_CALLBACK (on_queue_changed), daemon);
}
static void
@@ -133,8 +92,6 @@ notify_daemon_finalize (GObject *object)
daemon = NOTIFY_DAEMON (object);
- remove_exit_timeout (daemon);
-
g_object_unref (daemon->priv->queue);
g_free (daemon->priv);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]