[gnome-desktop] idle-monitor: Remove the global constructor
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] idle-monitor: Remove the global constructor
- Date: Wed, 31 Oct 2012 16:59:49 +0000 (UTC)
commit ec61247253165e549308c6edb6816202a8d7ce5a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Oct 28 22:15:52 2012 -0400
idle-monitor: Remove the global constructor
To support device-specific counters, we're going to need the ability
to create multiple instances of the idle-monitor.
https://bugzilla.gnome.org/show_bug.cgi?id=682224
libgnome-desktop/gnome-idle-monitor.c | 23 ++---------------------
1 files changed, 2 insertions(+), 21 deletions(-)
---
diff --git a/libgnome-desktop/gnome-idle-monitor.c b/libgnome-desktop/gnome-idle-monitor.c
index 37a0dde..c42c770 100644
--- a/libgnome-desktop/gnome-idle-monitor.c
+++ b/libgnome-desktop/gnome-idle-monitor.c
@@ -276,27 +276,9 @@ gnome_idle_monitor_dispose (GObject *object)
monitor->priv->watches = NULL;
}
- G_OBJECT_CLASS (gnome_idle_monitor_parent_class)->dispose (object);
-}
-
-static GObject *
-gnome_idle_monitor_constructor (GType type,
- guint n_construct_properties,
- GObjectConstructParam *construct_properties)
-{
- static GnomeIdleMonitor *global_monitor = NULL;
-
- if (g_once_init_enter (&global_monitor)) {
- GnomeIdleMonitor *monitor;
+ gdk_window_remove_filter (NULL, (GdkFilterFunc)xevent_filter, monitor);
- monitor = GNOME_IDLE_MONITOR (G_OBJECT_CLASS (gnome_idle_monitor_parent_class)->constructor (type,
- n_construct_properties,
- construct_properties));
-
- g_once_init_leave (&global_monitor, monitor);
- }
-
- return g_object_ref (global_monitor);
+ G_OBJECT_CLASS (gnome_idle_monitor_parent_class)->dispose (object);
}
static void
@@ -305,7 +287,6 @@ gnome_idle_monitor_class_init (GnomeIdleMonitorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = gnome_idle_monitor_dispose;
- object_class->constructor = gnome_idle_monitor_constructor;
signals[BECAME_ACTIVE] =
g_signal_new ("became-active",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]