diff options
author | rbuj <[email protected]> | 2019-06-16 13:21:30 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-06-18 10:07:19 +0200 |
commit | 66368a189dea7ab666cb4089ee30b6ba04ba5132 (patch) | |
tree | 3d62c86143e83d6190578c20d2fe9714746b8eb5 /typing-break/drw-monitor.c | |
parent | 5caf5bd5aa799c35050c728f72617ad6b03fb0d7 (diff) | |
download | mate-control-center-66368a189dea7ab666cb4089ee30b6ba04ba5132.tar.bz2 mate-control-center-66368a189dea7ab666cb4089ee30b6ba04ba5132.tar.xz |
Remove trailing whitespaces
find . -regextype posix-extended -regex '.*\.(c|h|ac)' -exec sed --in-place 's/[[:space:]]\+$//' {} \+
Diffstat (limited to 'typing-break/drw-monitor.c')
-rw-r--r-- | typing-break/drw-monitor.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/typing-break/drw-monitor.c b/typing-break/drw-monitor.c index 027f22b5..df6e119b 100644 --- a/typing-break/drw-monitor.c +++ b/typing-break/drw-monitor.c @@ -78,7 +78,7 @@ drw_monitor_get_type (void) }; object_type = g_type_register_static (G_TYPE_OBJECT, - "DrwMonitor", + "DrwMonitor", &object_info, 0); } @@ -89,12 +89,12 @@ static void drw_monitor_class_init (DrwMonitorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - + parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass)); - + object_class->finalize = drw_monitor_finalize; - signals[ACTIVITY] = + signals[ACTIVITY] = g_signal_new ("activity", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, @@ -108,7 +108,7 @@ static void drw_monitor_init (DrwMonitor *monitor) { DrwMonitorPriv *priv; - + priv = g_new0 (DrwMonitorPriv, 1); monitor->priv = priv; @@ -120,7 +120,7 @@ drw_monitor_finalize (GObject *object) { DrwMonitor *monitor = DRW_MONITOR (object); DrwMonitorPriv *priv; - + priv = monitor->priv; g_source_remove (priv->timeout_id); @@ -129,7 +129,7 @@ drw_monitor_finalize (GObject *object) if (priv->ss_info) { XFree (priv->ss_info); } - + g_free (priv); monitor->priv = NULL; @@ -145,15 +145,15 @@ drw_monitor_timeout (DrwMonitor *monitor) time_t now; priv = monitor->priv; - + if (XScreenSaverQueryInfo (GDK_DISPLAY_XDISPLAY(gdk_display_get_default()), DefaultRootWindow (GDK_DISPLAY_XDISPLAY(gdk_display_get_default())), priv->ss_info) != 0) { if (priv->ss_info->idle < priv->last_idle) { now = time (NULL); - + if (now - priv->last_activity < 25) { g_signal_emit (monitor, signals[ACTIVITY], 0, NULL); } - + priv->last_activity = now; } @@ -179,9 +179,9 @@ drw_monitor_setup (DrwMonitor *monitor) priv->ss_info = XScreenSaverAllocInfo (); priv->last_activity = time (NULL); - + priv->timeout_id = g_timeout_add_seconds (3, (GSourceFunc) drw_monitor_timeout, monitor); - + return TRUE; } |