Commit 0601229f authored by Martin Nordholts's avatar Martin Nordholts

app: Add show_gui parameter to gimp_init_for_gui_testing()

Add show_gui parameter to gimp_init_for_gui_testing() so that we can
have tests that shows the the actual GIMP interface.
parent c847b56d
......@@ -81,7 +81,7 @@ gimp_status_func_dummy (const gchar *text1,
* Returns: The #Gimp instance.
**/
Gimp *
gimp_init_for_gui_testing (gboolean use_cpu_accel)
gimp_init_for_gui_testing (gboolean use_cpu_accel, gboolean show_gui)
{
Gimp *gimp;
......@@ -90,9 +90,9 @@ gimp_init_for_gui_testing (gboolean use_cpu_accel)
g_type_init();
/* from app_run() */
gimp = gimp_new ("Unit Tested GIMP", NULL, FALSE, TRUE, TRUE, TRUE,
gimp = gimp_new ("Unit Tested GIMP", NULL, FALSE, TRUE, TRUE, !show_gui,
FALSE, TRUE, TRUE, FALSE);
gimp_set_show_gui (gimp, FALSE);
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);
......
......@@ -20,7 +20,8 @@
Gimp * gimp_init_for_testing (gboolean use_cpu_accel);
Gimp * gimp_init_for_gui_testing (gboolean use_cpu_accel);
Gimp * gimp_init_for_gui_testing (gboolean use_cpu_accel,
gboolean show_gui);
#endif /* __TESTS_H__ */
......@@ -52,7 +52,7 @@ int main(int argc, char **argv)
g_test_init (&argc, &argv, NULL);
/* We share the same application instance across all tests */
gimp = gimp_init_for_gui_testing (FALSE);
gimp = gimp_init_for_gui_testing (FALSE, FALSE);
/* Setup the tests */
g_test_add ("/gimp-window-management/window-roles",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment