[gimp] app: Initialize and restore GIMP in gimp_init_for_testing()
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: Initialize and restore GIMP in gimp_init_for_testing()
- Date: Thu, 21 Oct 2010 19:03:32 +0000 (UTC)
commit 784a1ce2a9932a0bdae3c72fec93009404d05fe0
Author: Martin Nordholts <martinn src gnome org>
Date: Thu Oct 21 21:11:06 2010 +0200
app: Initialize and restore GIMP in gimp_init_for_testing()
We should initialize and restore GIMP also in gimp_init_for_testing(),
not only in gimp_init_for_gui_testing(), because also non-UI tests
needs e.g. plug-ins to be available.
app/tests.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/app/tests.c b/app/tests.c
index ae36aaf..2706764 100644
--- a/app/tests.c
+++ b/app/tests.c
@@ -42,6 +42,13 @@
#include "units.h"
+static void
+gimp_status_func_dummy (const gchar *text1,
+ const gchar *text2,
+ gdouble percentage)
+{
+}
+
/**
* gimp_init_for_testing:
*
@@ -61,6 +68,8 @@ gimp_init_for_testing (void)
base_init (GIMP_BASE_CONFIG (gimp->config),
FALSE /*be_verbose*/,
FALSE /*use_cpu_accel*/);
+ gimp_initialize (gimp, gimp_status_func_dummy);
+ gimp_restore (gimp, gimp_status_func_dummy);
return gimp;
}
@@ -68,13 +77,6 @@ gimp_init_for_testing (void)
#ifndef GIMP_CONSOLE_COMPILATION
-static void
-gimp_status_func_dummy (const gchar *text1,
- const gchar *text2,
- gdouble percentage)
-{
-}
-
/**
* gimp_init_for_gui_testing:
* @use_cpu_accel:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]