gnome-settings-daemon r216 - in trunk: . plugins/typing-break
- From: jensg svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-settings-daemon r216 - in trunk: . plugins/typing-break
- Date: Tue, 11 Mar 2008 19:19:54 +0000 (GMT)
Author: jensg
Date: Tue Mar 11 19:19:54 2008
New Revision: 216
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=216&view=rev
Log:
2008-03-11 Jens Granseuer <jensgr gmx net>
* plugins/typing-break/gsd-typing-break-manager.c:
(setup_typing_break): pass data to the timeout so shutting down the
typing monitor works instead of segfaulting (bug #521786)
(gsd_typing_break_manager_start): use g_timeout_add_seconds instead of
g_timeout_add
Modified:
trunk/ChangeLog
trunk/plugins/typing-break/gsd-typing-break-manager.c
Modified: trunk/plugins/typing-break/gsd-typing-break-manager.c
==============================================================================
--- trunk/plugins/typing-break/gsd-typing-break-manager.c (original)
+++ trunk/plugins/typing-break/gsd-typing-break-manager.c Tue Mar 11 19:19:54 2008
@@ -49,10 +49,6 @@
guint setup_id;
};
-enum {
- PROP_0,
-};
-
static void gsd_typing_break_manager_class_init (GsdTypingBreakManagerClass *klass);
static void gsd_typing_break_manager_init (GsdTypingBreakManager *typing_break_manager);
static void gsd_typing_break_manager_finalize (GObject *object);
@@ -105,13 +101,14 @@
{
if (! enabled) {
if (manager->priv->typing_monitor_pid != 0) {
- manager->priv->typing_monitor_idle_id = g_timeout_add (3000, (GSourceFunc)typing_break_timeout, NULL);
+ manager->priv->typing_monitor_idle_id = g_timeout_add_seconds (3, (GSourceFunc) typing_break_timeout, manager);
}
return;
}
if (manager->priv->typing_monitor_idle_id != 0) {
g_source_remove (manager->priv->typing_monitor_idle_id);
+ manager->priv->typing_monitor_idle_id = 0;
}
if (manager->priv->typing_monitor_pid == 0) {
@@ -165,6 +162,7 @@
manager->priv->setup_id = 0;
return FALSE;
}
+
gboolean
gsd_typing_break_manager_start (GsdTypingBreakManager *manager,
GError **error)
@@ -181,9 +179,9 @@
enabled = gconf_client_get_bool (client, "/desktop/gnome/typing_break/enabled", NULL);
g_object_unref (client);
if (enabled) {
- manager->priv->setup_id = g_timeout_add (30000,
- (GSourceFunc)really_setup_typing_break,
- manager);
+ manager->priv->setup_id = g_timeout_add_seconds (3,
+ (GSourceFunc)really_setup_typing_break,
+ manager);
}
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]