[gimp] app: Remove 'use_cpu_accel' from gimp_init_for_{, gui_}testing()



commit c1c42f193dc582b9b923aa630b9dc8268ba49bc9
Author: Martin Nordholts <martinn src gnome org>
Date:   Sat Oct 9 17:59:44 2010 +0200

    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 30324ef..ae36aaf 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 37242ec..3aa396a 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 beba7e5..f5b1b87 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 214aa3b..6b922a2 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 869a223..e2d8def 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 03764d1..55db0bf 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]