From c1c42f193dc582b9b923aa630b9dc8268ba49bc9 Mon Sep 17 00:00:00 2001 From: Martin Nordholts Date: Sat, 9 Oct 2010 17:59:44 +0200 Subject: [PATCH] app: Remove 'use_cpu_accel' from gimp_init_for_{,gui_}testing() Remove silly 'use_cpu_accel' parameter from gimp_init_for_testing() and gimp_init_for_gui_testing(). --- app/tests.c | 12 ++++++++---- app/tests.h | 5 ++--- app/tests/test-core.c | 2 +- app/tests/test-session-management.c | 2 +- app/tests/test-ui.c | 2 +- app/tests/test-xcf.c | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/tests.c b/app/tests.c index 30324ef816..ae36aaff28 100644 --- a/app/tests.c +++ b/app/tests.c @@ -49,7 +49,7 @@ * selected subset of the initialization happning in app_run(). **/ Gimp * -gimp_init_for_testing (gboolean use_cpu_accel) +gimp_init_for_testing (void) { Gimp *gimp = gimp_new ("Unit Tested GIMP", NULL, FALSE, TRUE, TRUE, TRUE, FALSE, TRUE, TRUE, FALSE); @@ -58,7 +58,9 @@ gimp_init_for_testing (gboolean use_cpu_accel) gimp_load_config (gimp, NULL, NULL); - base_init (GIMP_BASE_CONFIG (gimp->config), FALSE, use_cpu_accel); + base_init (GIMP_BASE_CONFIG (gimp->config), + FALSE /*be_verbose*/, + FALSE /*use_cpu_accel*/); return gimp; } @@ -83,7 +85,7 @@ gimp_status_func_dummy (const gchar *text1, * Returns: The #Gimp instance. **/ Gimp * -gimp_init_for_gui_testing (gboolean use_cpu_accel, gboolean show_gui) +gimp_init_for_gui_testing (gboolean show_gui) { GimpSessionInfoClass *klass; Gimp *gimp; @@ -102,7 +104,9 @@ gimp_init_for_gui_testing (gboolean use_cpu_accel, gboolean show_gui) gimp_set_show_gui (gimp, show_gui); units_init (gimp); gimp_load_config (gimp, NULL, NULL); - base_init (GIMP_BASE_CONFIG (gimp->config), FALSE, use_cpu_accel); + base_init (GIMP_BASE_CONFIG (gimp->config), + FALSE /*be_verbose*/, + FALSE /*use_cpu_accel*/); gui_init (gimp, TRUE); gimp_initialize (gimp, gimp_status_func_dummy); gimp_restore (gimp, gimp_status_func_dummy); diff --git a/app/tests.h b/app/tests.h index 37242ec994..3aa396a07b 100644 --- a/app/tests.h +++ b/app/tests.h @@ -19,9 +19,8 @@ #define __TESTS_H__ -Gimp * gimp_init_for_testing (gboolean use_cpu_accel); -Gimp * gimp_init_for_gui_testing (gboolean use_cpu_accel, - gboolean show_gui); +Gimp * gimp_init_for_testing (void); +Gimp * gimp_init_for_gui_testing (gboolean show_gui); void gimp_test_run_temp_mainloop (guint32 running_time); void gimp_test_run_mainloop_until_idle (void); void gimp_test_bail_if_no_display (void); diff --git a/app/tests/test-core.c b/app/tests/test-core.c index beba7e5bab..f5b1b875de 100644 --- a/app/tests/test-core.c +++ b/app/tests/test-core.c @@ -186,7 +186,7 @@ main (int argc, "app/tests/gimpdir"); /* We share the same application instance across all tests */ - gimp = gimp_init_for_testing (TRUE); + gimp = gimp_init_for_testing (); /* Add tests */ ADD_IMAGE_TEST (add_layer); diff --git a/app/tests/test-session-management.c b/app/tests/test-session-management.c index 214aa3bea7..6b922a2aaa 100644 --- a/app/tests/test-session-management.c +++ b/app/tests/test-session-management.c @@ -93,7 +93,7 @@ int main(int argc, char **argv) result = -1; /* Start up GIMP */ - gimp = gimp_init_for_gui_testing (FALSE, TRUE); + gimp = gimp_init_for_gui_testing (TRUE /*show_gui*/); /* Let the main loop run until idle to let things stabilize. This * includes parsing sessionrc and dockrc diff --git a/app/tests/test-ui.c b/app/tests/test-ui.c index 869a223ef2..e2d8def255 100644 --- a/app/tests/test-ui.c +++ b/app/tests/test-ui.c @@ -846,7 +846,7 @@ int main(int argc, char **argv) gimp_test_utils_setup_menus_dir (); /* Start up GIMP */ - gimp = gimp_init_for_gui_testing (FALSE, TRUE); + gimp = gimp_init_for_gui_testing (TRUE /*show_gui*/); gimp_test_run_mainloop_until_idle (); /* Add tests. Note that the order matters. For example, diff --git a/app/tests/test-xcf.c b/app/tests/test-xcf.c index 03764d17b7..55db0bf63e 100644 --- a/app/tests/test-xcf.c +++ b/app/tests/test-xcf.c @@ -977,7 +977,7 @@ main (int argc, /* We share the same application instance across all tests. We need * the GUI variant for the file procs */ - gimp = gimp_init_for_gui_testing (TRUE, FALSE); + gimp = gimp_init_for_gui_testing (FALSE /*show_gui*/); /* Add tests */ ADD_TEST (write_and_read_gimp_2_6_format);