summaryrefslogtreecommitdiff
path: root/src/wm-tester/main.c
diff options
context:
space:
mode:
authorJoaquín Ignacio Aramendía <[email protected]>2014-06-25 19:06:17 -0300
committerJoaquín Ignacio Aramendía <[email protected]>2014-06-26 20:03:32 -0300
commita65a66d49bd0d6ec6c94b8e3ecd551cb570cec95 (patch)
treeb451afa6025e587f0ee287601427e572712e3428 /src/wm-tester/main.c
parent32050fd47713d9254e05344a6afd87202fa45d11 (diff)
downloadmarco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.bz2
marco-a65a66d49bd0d6ec6c94b8e3ecd551cb570cec95.tar.xz
Remove all trailing whitespaces in the code tree
Just run: $ find -name '*.c' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i $ find -name '*.h' -print0 | xargs -r0 sed -e 's/[[:blank:]]\+$//' -i
Diffstat (limited to 'src/wm-tester/main.c')
-rw-r--r--src/wm-tester/main.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/src/wm-tester/main.c b/src/wm-tester/main.c
index 48a23a06..f970075f 100644
--- a/src/wm-tester/main.c
+++ b/src/wm-tester/main.c
@@ -1,8 +1,8 @@
/* WM tester main() */
-/*
+/*
* Copyright (C) 2001 Havoc Pennington
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
@@ -12,7 +12,7 @@
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
@@ -43,17 +43,17 @@ main (int argc, char **argv)
int i;
gboolean do_evil;
gboolean do_icon_windows;
-
- gtk_init (&argc, &argv);
-
+
+ gtk_init (&argc, &argv);
+
do_evil = FALSE;
do_icon_windows = FALSE;
-
+
i = 1;
while (i < argc)
{
const char *arg = argv[i];
-
+
if (strcmp (arg, "--help") == 0 ||
strcmp (arg, "-h") == 0 ||
strcmp (arg, "-?") == 0)
@@ -64,20 +64,20 @@ main (int argc, char **argv)
do_icon_windows = TRUE;
else
usage ();
-
+
++i;
}
/* Be sure some option was provided */
if (! (do_evil || do_icon_windows))
return 1;
-
+
if (do_evil)
set_up_the_evil ();
if (do_icon_windows)
set_up_icon_windows ();
-
+
gtk_main ();
return 0;
@@ -93,9 +93,9 @@ evil_timeout (gpointer data)
int len;
int create_count;
int destroy_count;
-
- len = g_slist_length (evil_windows);
-
+
+ len = g_slist_length (evil_windows);
+
if (len > 35)
{
create_count = 2;
@@ -109,7 +109,7 @@ evil_timeout (gpointer data)
/* Create some windows */
n_windows = g_random_int_range (0, create_count);
-
+
i = 0;
while (i < n_windows)
{
@@ -117,7 +117,7 @@ evil_timeout (gpointer data)
GtkWidget *c;
int t;
GtkWidget *parent;
-
+
w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
#if GTK_CHECK_VERSION(3, 0, 0)
@@ -131,7 +131,7 @@ evil_timeout (gpointer data)
gdk_screen_height ()));
parent = NULL;
-
+
/* set transient for random window (may create all kinds of weird cycles) */
if (len > 0)
{
@@ -139,22 +139,22 @@ evil_timeout (gpointer data)
if (t >= 0)
{
parent = g_slist_nth_data (evil_windows, t);
-
+
if (parent != NULL)
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (parent));
}
}
-
+
if (parent != NULL)
c = gtk_button_new_with_label ("Evil Transient!");
else
c = gtk_button_new_with_label ("Evil Window!");
gtk_container_add (GTK_CONTAINER (w), c);
-
+
gtk_widget_show_all (w);
-
+
evil_windows = g_slist_prepend (evil_windows, w);
-
+
++i;
}
@@ -166,7 +166,7 @@ evil_timeout (gpointer data)
while (i < n_windows)
{
GtkWidget *w;
-
+
w = g_slist_nth_data (evil_windows,
g_random_int_range (0, len));
if (w)
@@ -175,11 +175,11 @@ evil_timeout (gpointer data)
evil_windows = g_slist_remove (evil_windows, w);
gtk_widget_destroy (w);
}
-
+
++i;
}
}
-
+
return TRUE;
}
@@ -197,7 +197,7 @@ set_up_icon_windows (void)
/* Create some windows */
n_windows = 9;
-
+
i = 0;
while (i < n_windows)
{
@@ -205,7 +205,7 @@ set_up_icon_windows (void)
GtkWidget *c;
GList *icons;
GdkPixbuf *pix;
-
+
w = gtk_window_new (GTK_WINDOW_TOPLEVEL);
c = gtk_button_new_with_label ("Icon window");
gtk_container_add (GTK_CONTAINER (w), c);
@@ -216,7 +216,7 @@ set_up_icon_windows (void)
GTK_STOCK_SAVE,
GTK_ICON_SIZE_LARGE_TOOLBAR,
NULL);
-
+
icons = g_list_append (icons, pix);
if (i % 2)
@@ -241,9 +241,9 @@ set_up_icon_windows (void)
g_list_foreach (icons, (GFunc) g_object_unref, NULL);
g_list_free (icons);
-
+
gtk_widget_show_all (w);
-
+
++i;
}
}