summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test-caja-directory-async.c2
-rw-r--r--test/test-caja-search-engine.c12
-rw-r--r--test/test-caja-wrap-table.c26
-rw-r--r--test/test-copy.c12
-rw-r--r--test/test-eel-editable-label.c20
-rw-r--r--test/test-eel-labeled-image.c8
-rw-r--r--test/test-eel-pixbuf-scale.c24
-rw-r--r--test/test.c18
8 files changed, 61 insertions, 61 deletions
diff --git a/test/test-caja-directory-async.c b/test/test-caja-directory-async.c
index 6481ca57..32ddcc32 100644
--- a/test/test-caja-directory-async.c
+++ b/test/test-caja-directory-async.c
@@ -96,7 +96,7 @@ main (int argc, char **argv)
g_signal_connect (directory, "files-changed", G_CALLBACK (files_changed), NULL);
g_signal_connect (directory, "done-loading", G_CALLBACK (done_loading), NULL);
caja_directory_file_monitor_add (directory, client1, TRUE,
- CAJA_FILE_ATTRIBUTE_INFO,
+ CAJA_FILE_ATTRIBUTE_INFO,
NULL, NULL);
diff --git a/test/test-caja-search-engine.c b/test/test-caja-search-engine.c
index 49c949ce..4b08559b 100644
--- a/test/test-caja-search-engine.c
+++ b/test/test-caja-search-engine.c
@@ -4,7 +4,7 @@
static void
hits_added_cb (CajaSearchEngine *engine, GSList *hits)
-{
+{
g_print ("hits added\n");
while (hits) {
g_print (" - %s\n", (char *)hits->data);
@@ -29,7 +29,7 @@ finished_cb (CajaSearchEngine *engine)
// gtk_main_quit ();
}
-int
+int
main (int argc, char* argv[])
{
CajaSearchEngine *engine;
@@ -38,11 +38,11 @@ main (int argc, char* argv[])
gtk_init (&argc, &argv);
engine = caja_search_engine_new ();
- g_signal_connect (engine, "hits-added",
+ g_signal_connect (engine, "hits-added",
G_CALLBACK (hits_added_cb), NULL);
- g_signal_connect (engine, "hits-subtracted",
+ g_signal_connect (engine, "hits-subtracted",
G_CALLBACK (hits_subtracted_cb), NULL);
- g_signal_connect (engine, "finished",
+ g_signal_connect (engine, "finished",
G_CALLBACK (finished_cb), NULL);
query = caja_query_new ();
@@ -51,7 +51,7 @@ main (int argc, char* argv[])
g_object_unref (query);
caja_search_engine_start (engine);
-
+
gtk_main ();
return 0;
}
diff --git a/test/test-caja-wrap-table.c b/test/test-caja-wrap-table.c
index 43dfe632..1af209bc 100644
--- a/test/test-caja-wrap-table.c
+++ b/test/test-caja-wrap-table.c
@@ -6,7 +6,7 @@
#include "test.h"
-int
+int
main (int argc, char* argv[])
{
CajaCustomizationData *customization_data;
@@ -27,7 +27,7 @@ main (int argc, char* argv[])
gtk_widget_show (emblems_table);
gtk_container_set_border_width (GTK_CONTAINER (emblems_table), 8);
-
+
scroller = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller),
GTK_POLICY_NEVER,
@@ -42,30 +42,30 @@ main (int argc, char* argv[])
gtk_widget_show (scroller);
#if 0
- /* Get rid of default lowered shadow appearance.
+ /* Get rid of default lowered shadow appearance.
* This must be done after the widget is realized, due to
* an apparent bug in gtk_viewport_set_shadow_type.
*/
- g_signal_connect (GTK_BIN (scroller->child),
- "realize",
- remove_default_viewport_shadow,
+ g_signal_connect (GTK_BIN (scroller->child),
+ "realize",
+ remove_default_viewport_shadow,
NULL);
#endif
/* Use caja_customization to make the emblem widgets */
customization_data = caja_customization_data_new ("emblems", TRUE,
- CAJA_ICON_SIZE_SMALL,
+ CAJA_ICON_SIZE_SMALL,
CAJA_ICON_SIZE_SMALL);
-
+
while (caja_customization_data_get_next_element_for_display (customization_data,
&emblem_name,
&pixbuf,
- &label)) {
+ &label)) {
stripped_name = eel_filename_strip_extension (emblem_name);
g_free (emblem_name);
-
+
if (strcmp (stripped_name, "erase") == 0) {
g_object_unref (pixbuf);
g_free (label);
@@ -82,15 +82,15 @@ main (int argc, char* argv[])
"caja_property_name",
stripped_name,
(GDestroyNotify) g_free);
-
+
gtk_container_add (GTK_CONTAINER (emblems_table), button);
}
gtk_widget_show_all (emblems_table);
gtk_widget_show (window);
-
+
gtk_main ();
-
+
return 0;
}
diff --git a/test/test-copy.c b/test/test-copy.c
index fabd7673..ea42e257 100644
--- a/test/test-copy.c
+++ b/test/test-copy.c
@@ -34,7 +34,7 @@ finished_cb (CajaProgressInfo *info,
gtk_main_quit ();
}
-int
+int
main (int argc, char* argv[])
{
GtkWidget *window;
@@ -58,11 +58,11 @@ main (int argc, char* argv[])
sources = g_list_prepend (sources, source);
}
sources = g_list_reverse (sources);
-
+
dest = g_file_new_for_commandline_arg (argv[i]);
-
+
window = test_window_new ("copy test", 5);
-
+
gtk_widget_show (window);
caja_file_operations_copy (sources,
@@ -82,9 +82,9 @@ main (int argc, char* argv[])
g_signal_connect (progress_info, "changed", (GCallback)changed_cb, NULL);
g_signal_connect (progress_info, "progress-changed", (GCallback)progress_changed_cb, NULL);
g_signal_connect (progress_info, "finished", (GCallback)finished_cb, NULL);
-
+
gtk_main ();
-
+
return 0;
}
diff --git a/test/test-eel-editable-label.c b/test/test-eel-editable-label.c
index 154a1a4e..db30a079 100644
--- a/test/test-eel-editable-label.c
+++ b/test/test-eel-editable-label.c
@@ -12,13 +12,13 @@ quit (GtkWidget *widget, gpointer data)
gtk_main_quit ();
}
-int
+int
main (int argc, char* argv[])
{
GtkWidget *window;
GtkWidget *label;
GtkWidget *vbox;
-
+
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -27,30 +27,30 @@ main (int argc, char* argv[])
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
gtk_container_add (GTK_CONTAINER (window), vbox);
-
+
label = eel_editable_label_new ("Centered dsau dsfgsdfgoydsfiugy oiusdyfg iouysdf goiuys dfioguy siodufgy iusdyfgiu ydsf giusydf gouiysdfgoiuysdfg oiudyfsg Label");
gtk_widget_set_size_request (label, 200, -1);
eel_editable_label_set_line_wrap (EEL_EDITABLE_LABEL (label), TRUE);
-
+
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
label = eel_editable_label_new ("Left aligned label");
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
-
+
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
label = eel_editable_label_new ("Right aligned label");
gtk_label_set_xalign (GTK_LABEL (label), 1.0);
-
+
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 4);
-
+
gtk_window_set_default_size (GTK_WINDOW (window), 300, 300);
-
- gtk_widget_show_all (window);
-
+
+ gtk_widget_show_all (window);
+
gtk_main ();
return 0;
diff --git a/test/test-eel-labeled-image.c b/test/test-eel-labeled-image.c
index b9dd9cd7..b5f4e829 100644
--- a/test/test-eel-labeled-image.c
+++ b/test/test-eel-labeled-image.c
@@ -10,7 +10,7 @@ button_callback (GtkWidget *button,
{
const char *info = callback_data;
g_return_if_fail (GTK_IS_BUTTON (button));
-
+
g_print ("%s(%p)\n", info, button);
}
@@ -51,11 +51,11 @@ labeled_image_button_window_new (const char *title,
}
gtk_widget_show_all (vbox);
-
+
return window;
}
-int
+int
main (int argc, char* argv[])
{
GtkWidget *labeled_image_window = NULL;
@@ -71,7 +71,7 @@ main (int argc, char* argv[])
if (labeled_image_window) gtk_widget_show (labeled_image_window);
if (labeled_image_button_window) gtk_widget_show (labeled_image_button_window);
-
+
gtk_main ();
return test_quit (EXIT_SUCCESS);
diff --git a/test/test-eel-pixbuf-scale.c b/test/test-eel-pixbuf-scale.c
index 22999f03..bace672d 100644
--- a/test/test-eel-pixbuf-scale.c
+++ b/test/test-eel-pixbuf-scale.c
@@ -9,14 +9,14 @@
#define DEST_WIDTH 32
#define DEST_HEIGHT 32
-int
+int
main (int argc, char* argv[])
{
GdkPixbuf *pixbuf, *scaled;
GError *error;
struct timeval t1, t2;
int i;
-
+
test_init (&argc, &argv);
if (argc != 2) {
@@ -31,11 +31,11 @@ main (int argc, char* argv[])
printf ("error loading pixbuf: %s\n", error->message);
exit (1);
}
-
+
printf ("scale factors: %f, %f\n",
(double)gdk_pixbuf_get_width(pixbuf)/DEST_WIDTH,
(double)gdk_pixbuf_get_height(pixbuf)/DEST_HEIGHT);
-
+
gettimeofday(&t1, NULL);
for (i = 0; i < N_SCALES; i++) {
scaled = eel_gdk_pixbuf_scale_down (pixbuf, DEST_WIDTH, DEST_HEIGHT);
@@ -44,9 +44,9 @@ main (int argc, char* argv[])
gettimeofday(&t2, NULL);
g_print ("Time for eel_gdk_pixbuf_scale_down: %ld msecs\n",
(t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
-
-
-
+
+
+
gettimeofday(&t1, NULL);
for (i = 0; i < N_SCALES; i++) {
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_NEAREST);
@@ -56,7 +56,7 @@ main (int argc, char* argv[])
g_print ("Time for INTERP_NEAREST: %ld msecs\n",
(t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
-
+
gettimeofday(&t1, NULL);
for (i = 0; i < N_SCALES; i++) {
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_BILINEAR);
@@ -65,17 +65,17 @@ main (int argc, char* argv[])
gettimeofday(&t2, NULL);
g_print ("Time for INTERP_BILINEAR: %ld msecs\n",
(t2.tv_sec - t1.tv_sec) * 1000 + (t2.tv_usec - t1.tv_usec) / 1000);
-
+
scaled = eel_gdk_pixbuf_scale_down (pixbuf, DEST_WIDTH, DEST_HEIGHT);
- gdk_pixbuf_save (scaled, "eel_scaled.png", "png", NULL, NULL);
+ gdk_pixbuf_save (scaled, "eel_scaled.png", "png", NULL, NULL);
g_object_unref (scaled);
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_NEAREST);
- gdk_pixbuf_save (scaled, "nearest_scaled.png", "png", NULL, NULL);
+ gdk_pixbuf_save (scaled, "nearest_scaled.png", "png", NULL, NULL);
g_object_unref (scaled);
scaled = gdk_pixbuf_scale_simple (pixbuf, DEST_WIDTH, DEST_HEIGHT, GDK_INTERP_BILINEAR);
- gdk_pixbuf_save (scaled, "bilinear_scaled.png", "png", NULL, NULL);
+ gdk_pixbuf_save (scaled, "bilinear_scaled.png", "png", NULL, NULL);
g_object_unref (scaled);
return 0;
diff --git a/test/test.c b/test/test.c
index 103f8b85..d50d3321 100644
--- a/test/test.c
+++ b/test/test.c
@@ -35,16 +35,16 @@ test_window_new (const char *title, guint border_width)
GtkWidget *window;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
-
+
if (title != NULL) {
gtk_window_set_title (GTK_WINDOW (window), title);
}
g_signal_connect (window, "delete_event",
G_CALLBACK (test_delete_event), NULL);
-
+
gtk_container_set_border_width (GTK_CONTAINER (window), border_width);
-
+
return window;
}
@@ -59,7 +59,7 @@ test_gtk_widget_set_background_image (GtkWidget *widget,
g_return_if_fail (image_name != NULL);
background = eel_get_widget_background (widget);
-
+
uri = g_strdup_printf ("file://%s/%s", CAJA_DATADIR, image_name);
eel_background_set_image_uri (background, uri);
@@ -77,7 +77,7 @@ test_gtk_widget_set_background_color (GtkWidget *widget,
g_return_if_fail (color_spec != NULL);
background = eel_get_widget_background (widget);
-
+
eel_background_set_color (background, color_spec);
}
@@ -101,7 +101,7 @@ test_pixbuf_new_named (const char *name, float scale)
g_free (path);
g_return_val_if_fail (pixbuf != NULL, NULL);
-
+
if (scale != 1.0) {
GdkPixbuf *scaled;
float width = gdk_pixbuf_get_width (pixbuf) * scale;
@@ -129,18 +129,18 @@ test_label_new (const char *text,
if (text == NULL) {
text = "Foo";
}
-
+
label = gtk_label_new (text);
return label;
}
-void
+void
test_window_set_title_with_pid (GtkWindow *window,
const char *title)
{
char *tmp;
-
+
g_return_if_fail (GTK_IS_WINDOW (window));
tmp = g_strdup_printf ("%lu: %s", (gulong) getpid (), title);