summaryrefslogtreecommitdiff
path: root/typing-break
diff options
context:
space:
mode:
Diffstat (limited to 'typing-break')
-rw-r--r--typing-break/drw-monitor.c24
-rw-r--r--typing-break/drw-selection.h2
-rw-r--r--typing-break/drw-timer.c8
-rw-r--r--typing-break/drw-utils.c6
-rw-r--r--typing-break/main.c12
5 files changed, 26 insertions, 26 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;
}
diff --git a/typing-break/drw-selection.h b/typing-break/drw-selection.h
index f384a4e1..8c0e36ed 100644
--- a/typing-break/drw-selection.h
+++ b/typing-break/drw-selection.h
@@ -15,7 +15,7 @@
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL RED HAT
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
- * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
+ * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
* Author: Owen Taylor, Red Hat, Inc.
diff --git a/typing-break/drw-timer.c b/typing-break/drw-timer.c
index 075f40b7..ace2c19f 100644
--- a/typing-break/drw-timer.c
+++ b/typing-break/drw-timer.c
@@ -21,24 +21,24 @@
#include <glib.h>
#include "drw-timer.h"
-struct _DrwTimer
+struct _DrwTimer
{
GTimeVal start_time;
};
-DrwTimer * drw_timer_new ()
+DrwTimer * drw_timer_new ()
{
DrwTimer * timer = g_new0 (DrwTimer, 1);
drw_timer_start (timer);
return timer;
}
-void drw_timer_start (DrwTimer *timer)
+void drw_timer_start (DrwTimer *timer)
{
g_get_current_time (&timer->start_time);
}
-double drw_timer_elapsed (DrwTimer *timer)
+double drw_timer_elapsed (DrwTimer *timer)
{
GTimeVal now;
g_get_current_time (&now);
diff --git a/typing-break/drw-utils.c b/typing-break/drw-utils.c
index bad0869e..c3f754c1 100644
--- a/typing-break/drw-utils.c
+++ b/typing-break/drw-utils.c
@@ -29,7 +29,7 @@ create_tile_pixbuf (GdkPixbuf *dest_pixbuf,
GdkPixbuf *src_pixbuf,
GdkRectangle *field_geom,
guint alpha,
- GdkColor *bg_color)
+ GdkColor *bg_color)
{
gboolean need_composite;
gboolean use_simple;
@@ -60,7 +60,7 @@ create_tile_pixbuf (GdkPixbuf *dest_pixbuf,
if (need_composite && !use_simple)
gdk_pixbuf_composite (src_pixbuf, dest_pixbuf,
cx, cy,
- MIN (pwidth, field_geom->width - cx),
+ MIN (pwidth, field_geom->width - cx),
MIN (pheight, field_geom->height - cy),
cx, cy,
1.0, 1.0,
@@ -69,7 +69,7 @@ create_tile_pixbuf (GdkPixbuf *dest_pixbuf,
else if (need_composite && use_simple)
gdk_pixbuf_composite_color (src_pixbuf, dest_pixbuf,
cx, cy,
- MIN (pwidth, field_geom->width - cx),
+ MIN (pwidth, field_geom->width - cx),
MIN (pheight, field_geom->height - cy),
cx, cy,
1.0, 1.0,
diff --git a/typing-break/main.c b/typing-break/main.c
index 74df85bc..145d1c5d 100644
--- a/typing-break/main.c
+++ b/typing-break/main.c
@@ -38,12 +38,12 @@ have_tray (void)
Screen *xscreen = DefaultScreenOfDisplay (gdk_x11_display_get_xdisplay(gdk_display_get_default()));
Atom selection_atom;
char *selection_atom_name;
-
+
selection_atom_name = g_strdup_printf ("_NET_SYSTEM_TRAY_S%d",
XScreenNumberOfScreen (xscreen));
selection_atom = gdk_x11_get_xatom_by_name (selection_atom_name);
g_free (selection_atom_name);
-
+
if (XGetSelectionOwner (DisplayOfScreen (xscreen), selection_atom)) {
return TRUE;
} else {
@@ -68,7 +68,7 @@ main (int argc, char *argv[])
GError *error = NULL;
gboolean retval;
- bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
+ bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
@@ -76,7 +76,7 @@ main (int argc, char *argv[])
g_option_context_set_translation_domain (option_context, GETTEXT_PACKAGE);
g_option_context_add_main_entries (option_context, options, GETTEXT_PACKAGE);
g_option_context_add_group (option_context, gtk_get_option_group (TRUE));
-
+
retval = g_option_context_parse (option_context, &argc, &argv, &error);
g_option_context_free (option_context);
if (!retval) {
@@ -107,13 +107,13 @@ main (int argc, char *argv[])
"on your panel. You can add it by right-clicking on your "
"panel and choosing 'Add to panel', selecting 'Notification "
"area' and clicking 'Add'."));
-
+
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
#endif /* HAVE_APP_INDICATOR */
-
+
drwright_new ();
gtk_main ();