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 | |
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')
-rw-r--r-- | typing-break/drw-monitor.c | 24 | ||||
-rw-r--r-- | typing-break/drw-selection.h | 2 | ||||
-rw-r--r-- | typing-break/drw-timer.c | 8 | ||||
-rw-r--r-- | typing-break/drw-utils.c | 6 | ||||
-rw-r--r-- | typing-break/main.c | 12 |
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 (); |